From ec7742873f2e8dfd9acf1e3d135484e02025fa31 Mon Sep 17 00:00:00 2001 From: Grazvydas Ignotas Date: Thu, 2 Oct 2014 03:28:37 +0300 Subject: [PATCH] gdk-pixbuf: add recipe gdk-pixbuf was split off gtk+ on 2.21.3 release --- conf/compatibility-providers.conf | 28 +++--- conf/distro/angstrom-2008.1.conf | 2 + .../extending-libinstall-dependencies.patch | 42 +++++++++ .../gdk-pixbuf/gdk-pixbuf/fatal-loader.patch | 79 +++++++++++++++++ .../gdk-pixbuf/hardcoded_libtool.patch | 33 +++++++ recipes/gdk-pixbuf/gdk-pixbuf/run-ptest | 3 + recipes/gdk-pixbuf/gdk-pixbuf_2.30.8.bb | 88 +++++++++++++++++++ 7 files changed, 261 insertions(+), 14 deletions(-) create mode 100644 recipes/gdk-pixbuf/gdk-pixbuf/extending-libinstall-dependencies.patch create mode 100644 recipes/gdk-pixbuf/gdk-pixbuf/fatal-loader.patch create mode 100644 recipes/gdk-pixbuf/gdk-pixbuf/hardcoded_libtool.patch create mode 100644 recipes/gdk-pixbuf/gdk-pixbuf/run-ptest create mode 100644 recipes/gdk-pixbuf/gdk-pixbuf_2.30.8.bb diff --git a/conf/compatibility-providers.conf b/conf/compatibility-providers.conf index 7823f6694d..cc71d8e4d6 100644 --- a/conf/compatibility-providers.conf +++ b/conf/compatibility-providers.conf @@ -17,20 +17,20 @@ PREFERRED_PROVIDER_e-wm-menu ?= "e-wm-menu" PREFERRED_PROVIDER_frameworkd-config ?= "frameworkd-config" PREFERRED_PROVIDER_gconf ?= "gconf" #PREFERRED_PROVIDER_gconf ?= "gconf-dbus" -PREFERRED_PROVIDER_gdk-pixbuf-csource-native ?= "gtk+-native" -PREFERRED_PROVIDER_gdk-pixbuf-loader-ani ?= "gtk+" -PREFERRED_PROVIDER_gdk-pixbuf-loader-bmpg ?= "gtk+" -PREFERRED_PROVIDER_gdk-pixbuf-loader-gif ?= "gtk+" -PREFERRED_PROVIDER_gdk-pixbuf-loader-ico ?= "gtk+" -PREFERRED_PROVIDER_gdk-pixbuf-loader-jpeg ?= "gtk+" -PREFERRED_PROVIDER_gdk-pixbuf-loader-pcx ?= "gtk+" -PREFERRED_PROVIDER_gdk-pixbuf-loader-png ?= "gtk+" -PREFERRED_PROVIDER_gdk-pixbuf-loader-pnm ?= "gtk+" -PREFERRED_PROVIDER_gdk-pixbuf-loader-ras ?= "gtk+" -PREFERRED_PROVIDER_gdk-pixbuf-loader-tga ?= "gtk+" -PREFERRED_PROVIDER_gdk-pixbuf-loader-wbmp ?= "gtk+" -PREFERRED_PROVIDER_gdk-pixbuf-loader-xbm ?= "gtk+" -PREFERRED_PROVIDER_gdk-pixbuf-loader-xpm ?= "gtk+" +PREFERRED_PROVIDER_gdk-pixbuf-csource-native ?= "gdk-pixbuf-native" +PREFERRED_PROVIDER_gdk-pixbuf-loader-ani ?= "gdk-pixbuf" +PREFERRED_PROVIDER_gdk-pixbuf-loader-bmpg ?= "gdk-pixbuf" +PREFERRED_PROVIDER_gdk-pixbuf-loader-gif ?= "gdk-pixbuf" +PREFERRED_PROVIDER_gdk-pixbuf-loader-ico ?= "gdk-pixbuf" +PREFERRED_PROVIDER_gdk-pixbuf-loader-jpeg ?= "gdk-pixbuf" +PREFERRED_PROVIDER_gdk-pixbuf-loader-pcx ?= "gdk-pixbuf" +PREFERRED_PROVIDER_gdk-pixbuf-loader-png ?= "gdk-pixbuf" +PREFERRED_PROVIDER_gdk-pixbuf-loader-pnm ?= "gdk-pixbuf" +PREFERRED_PROVIDER_gdk-pixbuf-loader-ras ?= "gdk-pixbuf" +PREFERRED_PROVIDER_gdk-pixbuf-loader-tga ?= "gdk-pixbuf" +PREFERRED_PROVIDER_gdk-pixbuf-loader-wbmp ?= "gdk-pixbuf" +PREFERRED_PROVIDER_gdk-pixbuf-loader-xbm ?= "gdk-pixbuf" +PREFERRED_PROVIDER_gdk-pixbuf-loader-xpm ?= "gdk-pixbuf" PREFERRED_PROVIDER_gnome-vfs ?= "gnome-vfs" PREFERRED_PROVIDER_gnome-vfs-plugin-file ?= "gnome-vfs" #PREFERRED_PROVIDER_gpsd ?= "fso-gpsd" diff --git a/conf/distro/angstrom-2008.1.conf b/conf/distro/angstrom-2008.1.conf index 3c77b2894c..594ff18e19 100644 --- a/conf/distro/angstrom-2008.1.conf +++ b/conf/distro/angstrom-2008.1.conf @@ -137,6 +137,8 @@ PREFERRED_PROVIDER_dbus-glib = "dbus-glib" PREFERRED_PROVIDER_hotplug = "udev" PREFERRED_PROVIDER_opkg ?= "opkg-nogpg-nocurl" +PREFERRED_PROVIDER_gdk-pixbuf = gdk-pixbuf + ANGSTROM_BLACKLIST_pn-bluez-libs = "bluez-libs 3.x has been replaced by bluez4" ANGSTROM_BLACKLIST_pn-bluez-utils = "bluez-utils 3.x has been replaced by bluez4" diff --git a/recipes/gdk-pixbuf/gdk-pixbuf/extending-libinstall-dependencies.patch b/recipes/gdk-pixbuf/gdk-pixbuf/extending-libinstall-dependencies.patch new file mode 100644 index 0000000000..edbdced43a --- /dev/null +++ b/recipes/gdk-pixbuf/gdk-pixbuf/extending-libinstall-dependencies.patch @@ -0,0 +1,42 @@ +Upstream-Status: Pending + +This patch fixes parallel install issue that lib libpixbufloader-png.la +depends on libgdk_pixbuf-2.0.la which will be regenerated during insta- +llation, if libgdk_pixbuf-2.0.la is regenerating and at the same time +libpixbufloader-png.la links it, the error will happen. + +Error message is: +* usr/bin/ld: cannot find -lgdk_pixbuf-2.0 +* collect2: ld returned 1 exit status + +Make an explicit dependency to the libs install targets would fix this +issue. + +Signed-off-by: Wenzong Fan +--- + gdk-pixbuf/Makefile.am | 1 + + libdeps.mk | 3 +++ + 2 files changed, 4 insertions(+), 0 deletions(-) + create mode 100644 libdeps.mk + +diff --git a/gdk-pixbuf/Makefile.am b/gdk-pixbuf/Makefile.am +index 95a93a8..db44cae 100644 +--- a/gdk-pixbuf/Makefile.am ++++ b/gdk-pixbuf/Makefile.am +@@ -783,3 +783,4 @@ loaders.cache: + endif + + -include $(top_srcdir)/git.mk ++-include $(top_srcdir)/libdeps.mk +diff --git a/libdeps.mk b/libdeps.mk +new file mode 100644 +index 0000000..d7a10a8 +--- /dev/null ++++ b/libdeps.mk +@@ -0,0 +1,3 @@ ++# Extending dependencies of install-loaderLTLIBRARIES: ++# The $(lib-LTLIBRARIES) is needed by relinking $(loader_LTLIBRARIES) ++install-loaderLTLIBRARIES: install-libLTLIBRARIES +-- +1.7.6.1 + diff --git a/recipes/gdk-pixbuf/gdk-pixbuf/fatal-loader.patch b/recipes/gdk-pixbuf/gdk-pixbuf/fatal-loader.patch new file mode 100644 index 0000000000..70146c6181 --- /dev/null +++ b/recipes/gdk-pixbuf/gdk-pixbuf/fatal-loader.patch @@ -0,0 +1,79 @@ +If an environment variable is specified set the return value from main() to +non-zero if the loader had errors (missing libraries, generally). + +Upstream-Status: Pending +Signed-off-by: Ross Burton + +diff --git a/gdk-pixbuf/queryloaders.c b/gdk-pixbuf/queryloaders.c +index a9ca015..395674a 100644 +--- a/gdk-pixbuf/queryloaders.c ++++ b/gdk-pixbuf/queryloaders.c +@@ -146,7 +146,7 @@ write_loader_info (GString *contents, const char *path, GdkPixbufFormat *info) + g_string_append_c (contents, '\n'); + } + +-static void ++static gboolean + query_module (GString *contents, const char *dir, const char *file) + { + char *path; +@@ -155,6 +155,7 @@ query_module (GString *contents, const char *dir, const char *file) + void (*fill_vtable) (GdkPixbufModule *module); + gpointer fill_info_ptr; + gpointer fill_vtable_ptr; ++ gboolean ret = TRUE; + + if (g_path_is_absolute (file)) + path = g_strdup (file); +@@ -204,10 +205,13 @@ query_module (GString *contents, const char *dir, const char *file) + g_module_error()); + else + g_fprintf (stderr, "Cannot load loader %s\n", path); ++ ret = FALSE; + } + if (module) + g_module_close (module); + g_free (path); ++ ++ return ret; + } + + #ifdef G_OS_WIN32 +@@ -257,6 +261,7 @@ int main (int argc, char **argv) + GString *contents; + gchar *cache_file = NULL; + gint first_file = 1; ++ gboolean success = TRUE; + + #ifdef G_OS_WIN32 + gchar *libdir; +@@ -360,7 +365,8 @@ int main (int argc, char **argv) + gint len = strlen (dent); + if (len > SOEXT_LEN && + strcmp (dent + len - SOEXT_LEN, SOEXT) == 0) { +- query_module (contents, path, dent); ++ if (!query_module (contents, path, dent)) ++ success = FALSE; + } + } + g_dir_close (dir); +@@ -378,7 +384,8 @@ int main (int argc, char **argv) + infilename = g_locale_to_utf8 (infilename, + -1, NULL, NULL, NULL); + #endif +- query_module (contents, cwd, infilename); ++ if (!query_module (contents, cwd, infilename)) ++ success = FALSE; + } + g_free (cwd); + } +@@ -394,5 +401,8 @@ int main (int argc, char **argv) + else + g_print ("%s\n", contents->str); + +- return 0; ++ if (g_getenv ("GDK_PIXBUF_FATAL_LOADER")) ++ return success ? 0 : 1; ++ else ++ return 0; + } diff --git a/recipes/gdk-pixbuf/gdk-pixbuf/hardcoded_libtool.patch b/recipes/gdk-pixbuf/gdk-pixbuf/hardcoded_libtool.patch new file mode 100644 index 0000000000..ecca62a712 --- /dev/null +++ b/recipes/gdk-pixbuf/gdk-pixbuf/hardcoded_libtool.patch @@ -0,0 +1,33 @@ +Upstream-Status: Inappropriate [configuration] + +Index: gdk-pixbuf-2.22.1/configure.ac +=================================================================== +--- gdk-pixbuf-2.22.1.orig/configure.ac 2010-11-26 09:06:34.000000000 +0800 ++++ gdk-pixbuf-2.22.1/configure.ac 2010-11-26 09:07:33.000000000 +0800 +@@ -287,7 +287,7 @@ + case $enable_explicit_deps in + auto) + export SED +- deplibs_check_method=`(./libtool --config; echo 'eval echo \"$deplibs_check_method\"') | sh` ++ deplibs_check_method=`(./$host_alias-libtool --config; echo 'eval echo \"$deplibs_check_method\"') | sh` + if test "x$deplibs_check_method" '!=' xpass_all || test "x$enable_static" = xyes ; then + enable_explicit_deps=yes + else +@@ -484,7 +484,7 @@ + dnl Now we check to see if our libtool supports shared lib deps + dnl (in a rather ugly way even) + if $dynworks; then +- pixbuf_libtool_config="${CONFIG_SHELL-/bin/sh} ./libtool --config" ++ pixbuf_libtool_config="${CONFIG_SHELL-/bin/sh} ./$host_alias-libtool --config" + pixbuf_deplibs_check=`$pixbuf_libtool_config | \ + grep '^[[a-z_]]*check[[a-z_]]*_method=[['\''"]]' | \ + sed 's/.*[['\''"]]\(.*\)[['\''"]]$/\1/'` +@@ -957,7 +957,7 @@ + # We are using gmodule-no-export now, but I'm leaving the stripping + # code in place for now, since pango and atk still require gmodule. + export SED +-export_dynamic=`(./libtool --config; echo eval echo \\$export_dynamic_flag_spec) | sh` ++export_dynamic=`(./$host_alias-libtool --config; echo eval echo \\$export_dynamic_flag_spec) | sh` + if test -n "$export_dynamic"; then + GDK_PIXBUF_DEP_LIBS=`echo $GDK_PIXBUF_DEP_LIBS | sed -e "s/$export_dynamic//"` + fi diff --git a/recipes/gdk-pixbuf/gdk-pixbuf/run-ptest b/recipes/gdk-pixbuf/gdk-pixbuf/run-ptest new file mode 100644 index 0000000000..8f9072386e --- /dev/null +++ b/recipes/gdk-pixbuf/gdk-pixbuf/run-ptest @@ -0,0 +1,3 @@ +#! /bin/sh + +gnome-desktop-testing-runner gdk-pixbuf diff --git a/recipes/gdk-pixbuf/gdk-pixbuf_2.30.8.bb b/recipes/gdk-pixbuf/gdk-pixbuf_2.30.8.bb new file mode 100644 index 0000000000..c3422d807c --- /dev/null +++ b/recipes/gdk-pixbuf/gdk-pixbuf_2.30.8.bb @@ -0,0 +1,88 @@ +SUMMARY = "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=72b39da7cbdde2e665329fef618e1d6b" + +SECTION = "libs" + +DEPENDS = "glib-2.0" +DEPENDS_append_linuxstdbase = " virtual/libx11" + +SRC_URI = "${GNOME_MIRROR}/${BPN}/2.30/${BPN}-${PV}.tar.xz \ + file://hardcoded_libtool.patch;patch=1 \ + file://extending-libinstall-dependencies.patch;patch=1 \ + file://run-ptest \ + file://fatal-loader.patch;patch=1 \ + " + +SRC_URI[md5sum] = "4fed0d54432f1b69fc6e66e608bd5542" +SRC_URI[sha256sum] = "4853830616113db4435837992c0aebd94cbb993c44dc55063cee7f72a7bef8be" + +inherit autotools pkgconfig gettext +# pixbufcache ptest + +LIBV = "2.10.0" + +EXTRA_OECONF = "\ + --disable-introspection --enable-gio-sniffing=no --with-libpng --with-libjpeg --with-libtiff --with-x11 \ +" +EXTRA_OECONF_append_virtclass-native = " --without-libtiff --without-libjpeg" + +PACKAGES =+ "${PN}-xlib" + +FILES_${PN}-xlib = "${libdir}/*pixbuf_xlib*so.*" +ALLOW_EMPTY_${PN}-xlib = "1" + +FILES_${PN} = "${bindir}/gdk-pixbuf-query-loaders \ + ${bindir}/gdk-pixbuf-pixdata \ + ${libdir}/lib*.so.*" + +FILES_${PN}-dev += " \ + ${bindir}/gdk-pixbuf-csource \ + ${includedir}/* \ + ${libdir}/gdk-pixbuf-2.0/${LIBV}/loaders/*.la \ +" + +FILES_${PN}-dbg += " \ + ${libdir}/.debug/* \ + ${libdir}/gdk-pixbuf-2.0/${LIBV}/loaders/.debug/* \ +" + +postinst_pixbufloader () { +if [ "x$D" != "x" ]; then + exit 1 +fi + +GDK_PIXBUF_MODULEDIR=${libdir}/gdk-pixbuf-2.0/${LIBV}/loaders gdk-pixbuf-query-loaders --update-cache + +test -x ${bindir}/gtk-update-icon-cache && gtk-update-icon-cache -q ${datadir}/icons/hicolor +} + +PACKAGES_DYNAMIC += "gdk-pixbuf-loader-*" +PACKAGES_DYNAMIC_class-native = "" + +python populate_packages_prepend () { + postinst_pixbufloader = bb.data.getVar("postinst_pixbufloader", d, 1) + + loaders_root = bb.data.expand('${libdir}/gdk-pixbuf-2.0/${LIBV}/loaders', d) + + do_split_packages(d, loaders_root, '^libpixbufloader-(.*)\.so$', 'gdk-pixbuf-loader-%s', 'GDK pixbuf loader for %s', postinst_pixbufloader) +} + +do_install_append_virtclass-native() { + find ${D}${libdir} -name "libpixbufloader-*.la" -exec rm \{\} \; + + create_wrapper ${D}/${bindir}/gdk-pixbuf-csource \ + GDK_PIXBUF_MODULE_FILE=${STAGING_LIBDIR_NATIVE}/gdk-pixbuf-2.0/${LIBV}/loaders.cache + + create_wrapper ${D}/${bindir}/gdk-pixbuf-pixdata \ + 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_MODULEDIR=${STAGING_LIBDIR_NATIVE}/gdk-pixbuf-2.0/${LIBV}/loaders +} +BBCLASSEXTEND = "native" -- 2.39.5