Patchwork librsvg: update gdk-pixbuf loader cache when staging native package

login
register
mail settings
Submitter Tomas Frydrych
Date May 10, 2013, 1:36 p.m.
Message ID <1368192999-30014-1-git-send-email-tf+lists.yocto@r-finger.com>
Download mbox | patch
Permalink /patch/49713/
State Accepted
Commit c4c053b8f31ee47db99a15282ccc1c4038f20907
Headers show

Comments

Tomas Frydrych - May 10, 2013, 1:36 p.m.
From: Tomas Frydrych <tomas@sleepfive.com>

librsvg installs an svg loader for gdk-pixbuf; in order for the native version
of the loader to be usable by gdk-pixbuf-native we have to update the loader
cache.

Signed-off-by: Tomas Frydrych <tomas@sleepfive.com>
---
 meta/recipes-gnome/librsvg/librsvg_2.32.1.bb |   11 +++++++++++
 1 file changed, 11 insertions(+)

Patch

diff --git a/meta/recipes-gnome/librsvg/librsvg_2.32.1.bb b/meta/recipes-gnome/librsvg/librsvg_2.32.1.bb
index ff17cf7..dcacce4 100644
--- a/meta/recipes-gnome/librsvg/librsvg_2.32.1.bb
+++ b/meta/recipes-gnome/librsvg/librsvg_2.32.1.bb
@@ -55,3 +55,14 @@  FILES_librsvg-gtk-dbg += "${libdir}/gdk-pixbuf-2.0/.debug \
 
 PIXBUF_PACKAGES = "librsvg-gtk"
 PARALLEL_MAKE = ""
+
+# ensure that the native gdk-pixbuf loaders cache is updated when we stage
+# our svg loader
+SSTATEPOSTINSTFUNCS_class_native += "librsvg_sstate_postinst"
+
+librsvg_sstate_postinst() {
+	if [ "${BB_CURRENTTASK}" = "populate_sysroot" -o "${BB_CURRENTTASK}" = "populate_sysroot_setscene" ]
+	then
+		GDK_PIXBUF_MODULEDIR=${STAGING_LIBDIR_NATIVE}/gdk-pixbuf-2.0/2.10.0/loaders GDK_PIXBUF_MODULE_FILE=${STAGING_LIBDIR_NATIVE}/gdk-pixbuf-2.0/2.10.0/loaders.cache gdk-pixbuf-query-loaders --update-cache
+	fi
+}