aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Larson <chris_larson@mentor.com>2010-10-04 09:46:34 -0700
committerChris Larson <chris_larson@mentor.com>2010-10-04 18:33:22 -0700
commit653f9f0f698d91ca9b0ac958c9679c101c591eb0 (patch)
treefe19d5ed5f97322584820aaade982db21ffa048f
parent1e2e6295dae84b73ba33c24ddeeb8916667afe68 (diff)
downloadopenembedded-653f9f0f698d91ca9b0ac958c9679c101c591eb0.zip
openembedded-653f9f0f698d91ca9b0ac958c9679c101c591eb0.tar.gz
openembedded-653f9f0f698d91ca9b0ac958c9679c101c591eb0.tar.bz2
gtk+-native: fix relocation
In a sysroot process hook, to deal with relocation: - Re-generate the gdk-pixbuf.loaders file to contain the current sysroot path to the pixbuf loaders directory. - Create wrappers for gdk-pixbuf-csource and gdk-pixbuf-query-loaders utilities, passing along the appropriate environment variables to ensure they too point at the current sysroot path. Signed-off-by: Chris Larson <chris_larson@mentor.com>
-rw-r--r--recipes/gtk+/gtk+.inc35
1 files changed, 20 insertions, 15 deletions
diff --git a/recipes/gtk+/gtk+.inc b/recipes/gtk+/gtk+.inc
index bb74d78..76e1a4f 100644
--- a/recipes/gtk+/gtk+.inc
+++ b/recipes/gtk+/gtk+.inc
@@ -16,7 +16,7 @@ SRC_URI = "http://download.gnome.org/sources/gtk+/${MAJ_VER}/gtk+-${PV}.tar.bz2;
file://xsettings.patch \
"
-INC_PR = "r8"
+INC_PR = "r10"
inherit autotools pkgconfig
@@ -66,21 +66,26 @@ do_install_append () {
rm -f ${D}${libdir}/gtk-2.0/*/*.la ${D}${libdir}/gtk-2.0/${LIBV}/*/*.la
}
-do_install_virtclass-native () {
- autotools_do_install
-
- mkdir -p ${D}${libdir}/gtk-2.0/include
- install -m 0644 gdk/gdkconfig.h ${D}${libdir}/gtk-2.0/include/gdkconfig.h
- # Copy over all headers, since the maemo stuff needs access to the private api. *sigh*
- cp gtk/*.h ${D}${includedir}/gtk-2.0/gtk/
-
- install -m 0644 m4macros/gtk-2.0.m4 ${STAGING_DATADIR}/aclocal/
-
- install -d ${D}${sysconfdir}/gtk-2.0
- rm -f ${D}${libdir}/gtk-2.0/*/*.la ${D}${libdir}/gtk-2.0/${LIBV}/*/*.la
+do_install_append_virtclass-native () {
+ ${D}${bindir}/gdk-pixbuf-query-loaders \
+ ${D}${libdir}/gtk-2.0/${LIBV}/loaders/*.so | \
+ sed -e's,${D},,' > \
+ ${D}${sysconfdir}/gtk-2.0/gdk-pixbuf.loaders
+}
- mkdir -p "${D}${sysconfdir}/gtk-2.0"
- ${B}/gdk-pixbuf/gdk-pixbuf-query-loaders ${B}/gdk-pixbuf/.libs/*.so | sed 's:${B}/gdk-pixbuf/.libs:${STAGING_LIBDIR}/gtk-2.0/${LIBV}/loaders:' > "${D}${sysconfdir}/gtk-2.0/gdk-pixbuf.loaders"
+SYSROOT_PREPROCESS_FUNCS_append_virtclass-native = " gdk_pixbuf_fixup"
+
+_SYSROOT_DEST = "${SYSROOT_DESTDIR}${STAGING_DIR_HOST}"
+gdk_pixbuf_fixup () {
+ create_wrapper ${_SYSROOT_DEST}${bindir}/gdk-pixbuf-query-loaders \
+ LD_LIBRARY_PATH=${STAGING_LIBDIR} \
+ GDK_PIXBUF_MODULEDIR=${libdir}/gtk-2.0/${LIBV}/loaders
+ ${_SYSROOT_DEST}${bindir}/gdk-pixbuf-query-loaders \
+ ${_SYSROOT_DEST}${libdir}/gtk-2.0/${LIBV}/loaders/*.so | \
+ sed -e's,${_SYSROOT_DEST},,' > \
+ ${_SYSROOT_DEST}${sysconfdir}/gtk-2.0/gdk-pixbuf.loaders
+ create_wrapper ${_SYSROOT_DEST}${bindir}/gdk-pixbuf-csource \
+ GDK_PIXBUF_MODULE_FILE=${sysconfdir}/gtk-2.0/gdk-pixbuf.loaders
}
postinst_prologue() {