[oe-commits] Laurentiu Palcu : gdk-pixbuf: generate the pixbuf loader' s cache ar rootfs time
git at git.openembedded.org
git at git.openembedded.org
Thu Dec 6 12:34:38 UTC 2012
Module: openembedded-core.git
Branch: master
Commit: 5ba420bc0e282a1cbf000ce32034ad7ab15c01d5
URL: http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=5ba420bc0e282a1cbf000ce32034ad7ab15c01d5
Author: Laurentiu Palcu <laurentiu.palcu at intel.com>
Date: Tue Sep 18 18:59:54 2012 +0300
gdk-pixbuf: generate the pixbuf loader's cache ar rootfs time
This will generate the loaders.cache file for pixbuf, at rootfs time.
Signed-off-by: Laurentiu Palcu <laurentiu.palcu at intel.com>
Signed-off-by: Saul Wold <sgw at linux.intel.com>
---
meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf_2.24.1.bb | 17 +++++++++++++++--
1 files changed, 15 insertions(+), 2 deletions(-)
diff --git a/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf_2.24.1.bb b/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf_2.24.1.bb
index 65a2d68..2377d0e 100644
--- a/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf_2.24.1.bb
+++ b/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf_2.24.1.bb
@@ -58,9 +58,21 @@ FILES_${PN}-dbg += " \
postinst_pixbufloader () {
if [ "x$D" != "x" ]; then
- exit 1
+# Update the target's pixbuf loader's cache. Since the native binary will
+# throw an error if the shared objects do not belong to the same ELF class,
+# we trick the gdk-pixbuf-query-loaders into scanning the native shared
+# objects and then we remove the NATIVE_ROOT prefix from the paths in
+# loaders.cache.
+gdk-pixbuf-query-loaders $(find $D/${libdir}/gdk-pixbuf-2.0/${LIBV}/loaders \
+ -name *.so | sed -e "s:$D:$NATIVE_ROOT:g") > \
+ $D/${libdir}/gdk-pixbuf-2.0/${LIBV}/loaders.cache || exit 1
+
+sed -i -e "s:$NATIVE_ROOT:/:g" $D/${libdir}/gdk-pixbuf-2.0/${LIBV}/loaders.cache
+
+exit 0
fi
+# Update the pixbuf loaders in case they haven't been registered yet
GDK_PIXBUF_MODULEDIR=${libdir}/gdk-pixbuf-2.0/${LIBV}/loaders gdk-pixbuf-query-loaders --update-cache
if [ -x ${bindir}/gtk-update-icon-cache ] && [ -d ${datadir}/icons ]; then
@@ -93,6 +105,7 @@ do_install_append_class-native() {
GDK_PIXBUF_MODULE_FILE=${STAGING_LIBDIR_NATIVE}/gdk-pixbuf-2.0/${LIBV}/loaders.cache
create_wrapper ${D}/${bindir}/gdk-pixbuf-query-loaders \
- GDK_PIXBUF_MODULE_FILE=${STAGING_LIBDIR_NATIVE}/gdk-pixbuf-2.0/${LIBV}/loaders.cache
+ GDK_PIXBUF_MODULE_FILE=${STAGING_LIBDIR_NATIVE}/gdk-pixbuf-2.0/${LIBV}/loaders.cache \
+ GDK_PIXBUF_MODULEDIR=${STAGING_LIBDIR_NATIVE}/gdk-pixbuf-2.0/${LIBV}/loaders
}
BBCLASSEXTEND = "native"
More information about the Openembedded-commits
mailing list