diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2011-11-23 15:05:39 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2011-11-23 15:10:48 +0000 |
commit | 46033c3cd49214f98df3715fe597e95012b46602 (patch) | |
tree | 2e64a5ba70f69971dad3091a1bedaf4c482b5543 | |
parent | 54217ee467f239f244a8697c5e12c0fa8212f4c2 (diff) | |
download | poky-46033c3cd49214f98df3715fe597e95012b46602.tar.gz |
gconf: Ensure the correct backend directory is used
Without these changes, gconf will use the hardcoded backend directory meaning
we can see errors when building if the binary was relocated.
(From OE-Core rev: aaa2a70f7f1b8a299f31626d61d7ea27f29fb9e2)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | meta/classes/gconf.bbclass | 1 | ||||
-rw-r--r-- | meta/recipes-gnome/gnome/gconf-3.2.3/backenddir.patch | 43 | ||||
-rw-r--r-- | meta/recipes-gnome/gnome/gconf_3.2.3.bb | 5 |
3 files changed, 48 insertions, 1 deletions
diff --git a/meta/classes/gconf.bbclass b/meta/classes/gconf.bbclass index 71926b7818..f164547782 100644 --- a/meta/classes/gconf.bbclass +++ b/meta/classes/gconf.bbclass | |||
@@ -3,6 +3,7 @@ DEPENDS += "gconf gconf-native" | |||
3 | # This is referenced by the gconf m4 macros and would default to the value hardcoded | 3 | # This is referenced by the gconf m4 macros and would default to the value hardcoded |
4 | # into gconf at compile time otherwise | 4 | # into gconf at compile time otherwise |
5 | export GCONF_SCHEMA_INSTALL_SOURCE = "xml:merged:${STAGING_DIR_NATIVE}${sysconfdir}/gconf/gconf.xml.defaults" | 5 | export GCONF_SCHEMA_INSTALL_SOURCE = "xml:merged:${STAGING_DIR_NATIVE}${sysconfdir}/gconf/gconf.xml.defaults" |
6 | export GCONF_BACKEND_DIR = "${STAGING_LIBDIR_NATIVE}/GConf/2" | ||
6 | 7 | ||
7 | gconf_postinst() { | 8 | gconf_postinst() { |
8 | if [ "x$D" != "x" ]; then | 9 | if [ "x$D" != "x" ]; then |
diff --git a/meta/recipes-gnome/gnome/gconf-3.2.3/backenddir.patch b/meta/recipes-gnome/gnome/gconf-3.2.3/backenddir.patch new file mode 100644 index 0000000000..4baf905b71 --- /dev/null +++ b/meta/recipes-gnome/gnome/gconf-3.2.3/backenddir.patch | |||
@@ -0,0 +1,43 @@ | |||
1 | Allow the backend directory to be specified from the environment. This is | ||
2 | required so we can relocate gconf-native to different paths and still | ||
3 | allow it to work. | ||
4 | |||
5 | Upstream-Status: Pending | ||
6 | |||
7 | RP 2011/11/23 | ||
8 | |||
9 | Index: GConf-3.2.3/gconf/gconf-backend.c | ||
10 | =================================================================== | ||
11 | --- GConf-3.2.3.orig/gconf/gconf-backend.c 2011-07-01 14:01:20.000000000 +0100 | ||
12 | +++ GConf-3.2.3/gconf/gconf-backend.c 2011-11-23 14:56:37.141293320 +0000 | ||
13 | @@ -21,6 +21,7 @@ | ||
14 | #include <config.h> | ||
15 | #include "gconf-backend.h" | ||
16 | #include "gconf-internals.h" | ||
17 | +#include <stdlib.h> | ||
18 | #include <stdio.h> | ||
19 | #include <string.h> | ||
20 | #include <sys/stat.h> | ||
21 | @@ -171,6 +172,7 @@ | ||
22 | gchar* back; | ||
23 | gchar* file; | ||
24 | gchar* retval; | ||
25 | + const gchar* backenddir; | ||
26 | |||
27 | g_return_val_if_fail(address != NULL, NULL); | ||
28 | |||
29 | @@ -179,9 +181,13 @@ | ||
30 | if (back == NULL) | ||
31 | return NULL; | ||
32 | |||
33 | + backenddir = getenv("GCONF_BACKEND_DIR"); | ||
34 | + if (backenddir == NULL) | ||
35 | + backenddir = GCONF_BACKEND_DIR; | ||
36 | + | ||
37 | file = g_strconcat("gconfbackend-", back, NULL); | ||
38 | |||
39 | - retval = g_module_build_path(GCONF_BACKEND_DIR, file); | ||
40 | + retval = g_module_build_path(backenddir, file); | ||
41 | |||
42 | g_free(back); | ||
43 | |||
diff --git a/meta/recipes-gnome/gnome/gconf_3.2.3.bb b/meta/recipes-gnome/gnome/gconf_3.2.3.bb index 3d3e65ff91..aa9da780f9 100644 --- a/meta/recipes-gnome/gnome/gconf_3.2.3.bb +++ b/meta/recipes-gnome/gnome/gconf_3.2.3.bb | |||
@@ -5,10 +5,13 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=55ca817ccb7d5b5b66355690e9abc605" | |||
5 | 5 | ||
6 | DEPENDS = "glib-2.0 dbus dbus-glib libxml2 intltool-native" | 6 | DEPENDS = "glib-2.0 dbus dbus-glib libxml2 intltool-native" |
7 | 7 | ||
8 | PR = "r1" | ||
9 | |||
8 | inherit gnomebase | 10 | inherit gnomebase |
9 | 11 | ||
10 | SRC_URI = "${GNOME_MIRROR}/GConf/${@gnome_verdir("${PV}")}/GConf-${PV}.tar.bz2;name=archive \ | 12 | SRC_URI = "${GNOME_MIRROR}/GConf/${@gnome_verdir("${PV}")}/GConf-${PV}.tar.bz2;name=archive \ |
11 | file://nointro.patch" | 13 | file://nointro.patch \ |
14 | file://backenddir.patch" | ||
12 | 15 | ||
13 | SRC_URI[archive.md5sum] = "f80329173cd9d134ad07e36002dd2a15" | 16 | SRC_URI[archive.md5sum] = "f80329173cd9d134ad07e36002dd2a15" |
14 | SRC_URI[archive.sha256sum] = "52008a82a847527877d9e1e549a351c86cc53cada4733b8a70a1123925d6aff4" | 17 | SRC_URI[archive.sha256sum] = "52008a82a847527877d9e1e549a351c86cc53cada4733b8a70a1123925d6aff4" |