[OE-core] [RFC 5/7] gdk-pixbuf: generate the pixbuf loader's cache ar rootfs time
Khem Raj
raj.khem at gmail.com
Wed Sep 19 13:30:51 UTC 2012
On Wed, Sep 19, 2012 at 4:49 AM, Laurentiu Palcu
<laurentiu.palcu at intel.com> wrote:
> This will generate the loaders.cache file for pixbuf, at rootfs time.
>
> Signed-off-by: Laurentiu Palcu <laurentiu.palcu at intel.com>
> ---
> meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf_2.24.1.bb | 24 ++++++++++++--------
> 1 file changed, 14 insertions(+), 10 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 99f6cb4..c4afb97 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
> @@ -57,18 +57,22 @@ 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/2.10.0/loaders \
> + -name *.so | sed -e "s:$D:$NATIVE_ROOT:g") > \
> + $D/${libdir}/gdk-pixbuf-2.0/2.10.0/loaders.cache || exit 1
> +
> +sed -i -e "s:$NATIVE_ROOT:/:g" $D/${libdir}/gdk-pixbuf-2.0/2.10.0/loaders.cache
> +
gdk-pixbuf-2.0/2.10.0 seems to be quite hardcoded. Can it be converted
into something more general may be use wildcard appropriately ?
> +exit 0
> fi
>
> -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
> - for icondir in /usr/share/icons/*; do
> - if [ -d ${icondir} ]; then
> - gtk-update-icon-cache -t -q ${icondir}
> - fi
> - done
> -fi
> +# Update the pixbuf loaders in case they haven't been registered yet
> +GDK_PIXBUF_MODULEDIR=${libdir}/gdk-pixbuf-2.0/2.10.0/loaders gdk-pixbuf-query-loaders --update-cache
> }
>
> PACKAGES_DYNAMIC += "gdk-pixbuf-loader-*"
> --
> 1.7.9.5
>
>
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core at lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
More information about the Openembedded-core
mailing list