From patchwork Wed Sep 26 12:11:44 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: gdk-pixbuf: Use qemu to run postinsts in offline root mode Date: Wed, 26 Sep 2012 12:11:44 -0000 From: Phil Blundell X-Patchwork-Id: 37273 Message-Id: <1348661505.31293.106.camel@phil-desktop> To: openembedded-core This makes it possible to use gdk-pixbuf on a read-only rootfs. Signed-off-by: Phil Blundell --- meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf_2.24.1.bb | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 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 82a7eaa..df35b8d 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 @@ -8,7 +8,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=3bf50002aefd002f49e7bb854063f7e7 \ SECTION = "libs" -DEPENDS = "libpng glib-2.0 jpeg" +DEPENDS = "libpng glib-2.0 jpeg qemu-native" DEPENDS_append_linuxstdbase = " virtual/libx11" SRC_URI = "http://ftp.acc.umu.se/pub/GNOME/sources/gdk-pixbuf/2.24/gdk-pixbuf-${PV}.tar.xz \ @@ -21,9 +21,9 @@ SRC_URI = "http://ftp.acc.umu.se/pub/GNOME/sources/gdk-pixbuf/2.24/gdk-pixbuf-${ SRC_URI[md5sum] = "72f39b34b20f68148c1609bd27415412" SRC_URI[sha256sum] = "da7a3f00db360913716368e19e336402755cafa93769f3cfa28a969303e4bee1" -PR = "r7" +PR = "r8" -inherit autotools pkgconfig gettext +inherit autotools pkgconfig gettext qemu LIBV = "2.10.0" @@ -41,26 +41,31 @@ PACKAGES =+ "${PN}-xlib" FILES_${PN}-xlib = "${libdir}/*pixbuf_xlib*${SOLIBS}" ALLOW_EMPTY_${PN}-xlib = "1" +loadersdir = "${libdir}/gdk-pixbuf-2.0/${LIBV}/loaders" + FILES_${PN} = "${bindir}/gdk-pixbuf-query-loaders \ ${libdir}/lib*.so.*" FILES_${PN}-dev += " \ ${bindir}/gdk-pixbuf-csource \ ${includedir}/* \ - ${libdir}/gdk-pixbuf-2.0/${LIBV}/loaders/*.la \ + ${loadersdir}/*.la \ " FILES_${PN}-dbg += " \ ${libdir}/.debug/* \ - ${libdir}/gdk-pixbuf-2.0/${LIBV}/loaders/.debug/* \ + ${loadersdir}/.debug/* \ " postinst_pixbufloader () { if [ "x$D" != "x" ]; then - exit 1 + if [ ! -f "$D${loadersdir}/../loaders.cache" ]; then + ${@qemu_target_binary(d)} -drop-ld-preload -L $D $D${bindir}/gdk-pixbuf-query-loaders > "$D${loadersdir}/../loaders.cache" + fi + exit 0 fi -GDK_PIXBUF_MODULEDIR=${libdir}/gdk-pixbuf-2.0/${LIBV}/loaders gdk-pixbuf-query-loaders --update-cache +GDK_PIXBUF_MODULEDIR="${loadersdir}" gdk-pixbuf-query-loaders --update-cache if [ -x ${bindir}/gtk-update-icon-cache ] && [ -d ${datadir}/icons ]; then for icondir in /usr/share/icons/*; do