summaryrefslogtreecommitdiffstats
path: root/main
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2011-04-12 11:07:17 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2011-04-12 14:20:13 +0000
commit553d41ec2ec5275790e98ddc324904cdb8d93c25 (patch)
tree17e2480766b64302849222f9fd1bd4b1c239edc5 /main
parent2dce2605afcdb09074150594e3f4b3d688557c36 (diff)
downloadaports-553d41ec2ec5275790e98ddc324904cdb8d93c25.tar.bz2
aports-553d41ec2ec5275790e98ddc324904cdb8d93c25.tar.xz
main/dconf: moved from testing
Diffstat (limited to 'main')
-rw-r--r--main/dconf/0001-Avoid-posix_fallocate-so-it-works-on-uClibc.patch36
-rw-r--r--main/dconf/APKBUILD42
2 files changed, 78 insertions, 0 deletions
diff --git a/main/dconf/0001-Avoid-posix_fallocate-so-it-works-on-uClibc.patch b/main/dconf/0001-Avoid-posix_fallocate-so-it-works-on-uClibc.patch
new file mode 100644
index 000000000..5317b39c9
--- /dev/null
+++ b/main/dconf/0001-Avoid-posix_fallocate-so-it-works-on-uClibc.patch
@@ -0,0 +1,36 @@
+From e6d875ff19ba7f23e68a2131d9abe2de3f39d001 Mon Sep 17 00:00:00 2001
+From: Natanael Copa <ncopa@alpinelinux.org>
+Date: Sat, 9 Oct 2010 20:34:08 +0000
+Subject: [PATCH] Avoid posix_fallocate() so it works on uClibc
+
+It seems like the possix_fallocate() does not need to be provided on
+all implementations (see "Application Usage" in
+http://www.opengroup.org/onlinepubs/009695399/functions/posix_fallocate.html )
+
+I'm not too familiar with the code but it looks like _DConfEngine->shm
+is a mmap to a file with 1 char size. If thats the case then something
+like this would work:
+---
+ engine/dconf-engine.c | 6 +++++-
+ 1 files changed, 5 insertions(+), 1 deletions(-)
+
+diff --git a/engine/dconf-engine.c b/engine/dconf-engine.c
+index cf57431..8eb3fa7 100644
+--- a/engine/dconf-engine.c
++++ b/engine/dconf-engine.c
+@@ -144,7 +144,11 @@ dconf_engine_setup_user (DConfEngine *engine)
+
+ if (fd >= 0)
+ {
+- if (posix_fallocate (fd, 0, 1) == 0)
++ struct stat st;
++ int r = fstat(fd, &st);
++ if (r == 0 && st.st_size == 0)
++ r = write(fd, "", 1);
++ if (r == 0)
+ {
+ engine->shm = mmap (NULL, 1, PROT_READ, MAP_SHARED, fd, 0);
+
+--
+1.7.3.1
+
diff --git a/main/dconf/APKBUILD b/main/dconf/APKBUILD
new file mode 100644
index 000000000..255a6d833
--- /dev/null
+++ b/main/dconf/APKBUILD
@@ -0,0 +1,42 @@
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=dconf
+pkgver=0.5.1
+pkgrel=0
+pkgdesc="A low-level configuration system."
+url="http://live.gnome.org/dconf"
+arch="all"
+license="LGPL2.1"
+depends=""
+makedepends="vala gobject-introspection gtk+-dev glib-dev libxml2-dev"
+install=
+source="http://download.gnome.org/sources/dconf/0.5/dconf-$pkgver.tar.bz2
+ 0001-Avoid-posix_fallocate-so-it-works-on-uClibc.patch
+ "
+
+_builddir="$srcdir"/$pkgname-$pkgver
+prepare() {
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch)
+ patch -p1 -i "$srcdir/$i" || return 1
+ ;;
+ esac
+ done
+}
+
+build ()
+{
+ cd "$_builddir"
+ ./configure --prefix=/usr \
+ --libexecdir=/usr/lib/dconf
+ make
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install || return 1
+}
+
+md5sums="c905497d0255fe2ba58564f9655908ab dconf-0.5.1.tar.bz2
+750788f7fa6ff128ecdf7639ffff8b78 0001-Avoid-posix_fallocate-so-it-works-on-uClibc.patch"