gdk-pixbuf: Fix the native png load error and remove duplicated recipe

Native gdk-pixbuf-csource failed to load png file as the "loaders.cache" was
not properly set by gdk-pxibuf-query-loaders when install. This patch use the
wrapper script rather than query-loaders binary as required libtool library was
not installed when do_install_append.

Also remove dedicated recipe for gdk-pixbuf-native.

[sgw: Added PACKAGES_DYMAMIC_virtclass-native]
Signed-off-by: Zhai Edwin <edwin.zhai@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
This commit is contained in:
Zhai Edwin 2011-01-30 20:28:58 +08:00 committed by Richard Purdie
parent 4e8e8a7128
commit fd03e8a682
3 changed files with 35 additions and 45 deletions

View File

@ -1,13 +0,0 @@
require gdk-pixbuf.inc
inherit native
DEPENDS = "libpng-native gettext-native glib-2.0-native jpeg-native"
PR = "r0"
PACKAGES_DYNAMIC = ""
do_install_append() {
GDK_PIXBUF_MODULEDIR=${D}${libdir}/gdk-pixbuf-2.0/2.10.0/loaders ${D}${bindir}/gdk-pixbuf-query-loaders > ${D}${libdir}/gdk-pixbuf-2.0/2.10.0/loaders.cache
sed -i -e 's#${D}##g' ${D}${libdir}/gdk-pixbuf-2.0/2.10.0/loaders.cache
find ${D}${libdir} -name "libpixbufloader-*.la" -exec rm \{\} \;
}

View File

@ -1,30 +0,0 @@
DESCRIPTION = "Image loading library for GTK+"
HOMEPAGE = "http://www.gtk.org/"
BUGTRACKER = "https://bugzilla.gnome.org/"
LICENSE = "LGPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=3bf50002aefd002f49e7bb854063f7e7 \
file://gdk-pixbuf/gdk-pixbuf.h;endline=26;md5=5066b71daefeff678494fffa3040aba9"
SECTION = "libs"
PRIORITY = "optional"
DEPENDS = "libpng gettext glib-2.0"
SRC_URI = "http://ftp.acc.umu.se/pub/GNOME/sources/gdk-pixbuf/2.22/gdk-pixbuf-${PV}.tar.gz \
file://hardcoded_libtool.patch;patch=1 \
file://configure_fix.patch;patch=1 \
"
SRC_URI[md5sum] = "fcfc854e9aec7dbb2bb3059484d44556"
SRC_URI[sha256sum] = "bbb57364ffba70d64f5fcfe6eda1d67249b3d58844edb06dc0f94d1ad599b4ec"
inherit autotools pkgconfig
LIBV = "2.10.0"
EXTRA_OECONF = "\
--without-libtiff \
--with-libpng \
"

View File

@ -1,9 +1,34 @@
require gdk-pixbuf.inc
DESCRIPTION = "Image loading library for GTK+"
HOMEPAGE = "http://www.gtk.org/"
BUGTRACKER = "https://bugzilla.gnome.org/"
DEPENDS += "jpeg"
LICENSE = "LGPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=3bf50002aefd002f49e7bb854063f7e7 \
file://gdk-pixbuf/gdk-pixbuf.h;endline=26;md5=5066b71daefeff678494fffa3040aba9"
SECTION = "libs"
PRIORITY = "optional"
DEPENDS = "libpng gettext glib-2.0 jpeg"
PR = "r0"
SRC_URI = "http://ftp.acc.umu.se/pub/GNOME/sources/gdk-pixbuf/2.22/gdk-pixbuf-${PV}.tar.gz \
file://hardcoded_libtool.patch;patch=1 \
file://configure_fix.patch;patch=1 \
"
SRC_URI[md5sum] = "fcfc854e9aec7dbb2bb3059484d44556"
SRC_URI[sha256sum] = "bbb57364ffba70d64f5fcfe6eda1d67249b3d58844edb06dc0f94d1ad599b4ec"
inherit autotools pkgconfig
LIBV = "2.10.0"
EXTRA_OECONF = "\
--without-libtiff \
--with-libpng \
"
FILES_${PN} = "${bindir}/gdk-pixbuf-query-loaders \
${libdir}/lib*.so.*"
@ -26,6 +51,7 @@ test -x ${bindir}/gtk-update-icon-cache && gtk-update-icon-cache -q ${datadir}/
}
PACKAGES_DYNAMIC += "gdk-pixbuf-loader-*"
PACKAGES_DYNAMIC_virtclass-native = ""
python populate_packages_prepend () {
postinst_pixbufloader = bb.data.getVar("postinst_pixbufloader", d, 1)
@ -35,3 +61,10 @@ python populate_packages_prepend () {
do_split_packages(d, loaders_root, '^libpixbufloader-(.*)\.so$', 'gdk-pixbuf-loader-%s', 'GDK pixbuf loader for %s', postinst_pixbufloader)
}
do_install_append_virtclass-native() {
#Use wrapper script rather than binary as required libtool library is not installed now
GDK_PIXBUF_MODULEDIR=${D}${libdir}/gdk-pixbuf-2.0/2.10.0/loaders ${S}/gdk-pixbuf/gdk-pixbuf-query-loaders > ${D}${libdir}/gdk-pixbuf-2.0/2.10.0/loaders.cache
sed -i -e 's#${D}##g' ${D}${libdir}/gdk-pixbuf-2.0/2.10.0/loaders.cache
find ${D}${libdir} -name "libpixbufloader-*.la" -exec rm \{\} \;
}
BBCLASSEXTEND = "native"