From d19d221ca77ff5cfbe92cf8234b2f4f35dd07329 Mon Sep 17 00:00:00 2001 From: Jussi Kukkonen Date: Thu, 5 Nov 2015 22:26:08 +0200 Subject: gdk-pixbuf: Upgrade 2.30.8 -> 2.32.1 Remove a backported patch. Signed-off-by: Jussi Kukkonen Signed-off-by: Ross Burton --- ...ps-Be-more-careful-about-integer-overflow.patch | 89 ---------------- meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf_2.30.8.bb | 112 --------------------- meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf_2.32.1.bb | 111 ++++++++++++++++++++ 3 files changed, 111 insertions(+), 201 deletions(-) delete mode 100644 meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf/0001-pixops-Be-more-careful-about-integer-overflow.patch delete mode 100644 meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf_2.30.8.bb create mode 100644 meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf_2.32.1.bb (limited to 'meta/recipes-gnome') diff --git a/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf/0001-pixops-Be-more-careful-about-integer-overflow.patch b/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf/0001-pixops-Be-more-careful-about-integer-overflow.patch deleted file mode 100644 index fe7c1d5017..0000000000 --- a/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf/0001-pixops-Be-more-careful-about-integer-overflow.patch +++ /dev/null @@ -1,89 +0,0 @@ -From ffec86ed5010c5a2be14f47b33bcf4ed3169a199 Mon Sep 17 00:00:00 2001 -From: Matthias Clasen -Date: Mon, 13 Jul 2015 00:33:40 -0400 -Subject: [PATCH] pixops: Be more careful about integer overflow - -Our loader code is supposed to handle out-of-memory and overflow -situations gracefully, reporting errors instead of aborting. But -if you load an image at a specific size, we also execute our -scaling code, which was not careful enough about overflow in some -places. - -This commit makes the scaling code silently return if it fails to -allocate filter tables. This is the best we can do, since -gdk_pixbuf_scale() is not taking a GError. - -https://bugzilla.gnome.org/show_bug.cgi?id=752297 - -Upstream-Status: backport - -Signed-off-by: Li Zhou ---- - gdk-pixbuf/pixops/pixops.c | 22 +++++++++++++++++----- - 1 file changed, 17 insertions(+), 5 deletions(-) - -diff --git a/gdk-pixbuf/pixops/pixops.c b/gdk-pixbuf/pixops/pixops.c -index 29a1c14..ce51745 100644 ---- a/gdk-pixbuf/pixops/pixops.c -+++ b/gdk-pixbuf/pixops/pixops.c -@@ -1272,7 +1272,16 @@ make_filter_table (PixopsFilter *filter) - int i_offset, j_offset; - int n_x = filter->x.n; - int n_y = filter->y.n; -- int *weights = g_new (int, SUBSAMPLE * SUBSAMPLE * n_x * n_y); -+ gsize n_weights; -+ int *weights; -+ -+ n_weights = SUBSAMPLE * SUBSAMPLE * n_x * n_y; -+ if (n_weights / (SUBSAMPLE * SUBSAMPLE * n_x) != n_y) -+ return NULL; /* overflow, bail */ -+ -+ weights = g_try_new (int, n_weights); -+ if (!weights) -+ return NULL; /* overflow, bail */ - - for (i_offset=0; i_offset < SUBSAMPLE; i_offset++) - for (j_offset=0; j_offset < SUBSAMPLE; j_offset++) -@@ -1347,8 +1356,11 @@ pixops_process (guchar *dest_buf, - if (x_step == 0 || y_step == 0) - return; /* overflow, bail out */ - -- line_bufs = g_new (guchar *, filter->y.n); - filter_weights = make_filter_table (filter); -+ if (!filter_weights) -+ return; /* overflow, bail out */ -+ -+ line_bufs = g_new (guchar *, filter->y.n); - - check_shift = check_size ? get_check_shift (check_size) : 0; - -@@ -1468,7 +1480,7 @@ tile_make_weights (PixopsFilterDimension *dim, - double scale) - { - int n = ceil (1 / scale + 1); -- double *pixel_weights = g_new (double, SUBSAMPLE * n); -+ double *pixel_weights = g_malloc_n (sizeof (double) * SUBSAMPLE, n); - int offset; - int i; - -@@ -1526,7 +1538,7 @@ bilinear_magnify_make_weights (PixopsFilterDimension *dim, - } - - dim->n = n; -- dim->weights = g_new (double, SUBSAMPLE * n); -+ dim->weights = g_malloc_n (sizeof (double) * SUBSAMPLE, n); - - pixel_weights = dim->weights; - -@@ -1617,7 +1629,7 @@ bilinear_box_make_weights (PixopsFilterDimension *dim, - double scale) - { - int n = ceil (1/scale + 3.0); -- double *pixel_weights = g_new (double, SUBSAMPLE * n); -+ double *pixel_weights = g_malloc_n (sizeof (double) * SUBSAMPLE, n); - double w; - int offset, i; - --- -1.7.9.5 - diff --git a/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf_2.30.8.bb b/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf_2.30.8.bb deleted file mode 100644 index 68f3850fb7..0000000000 --- a/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf_2.30.8.bb +++ /dev/null @@ -1,112 +0,0 @@ -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" - -MAJ_VER = "${@oe.utils.trim_version("${PV}", 2)}" - -SRC_URI = "${GNOME_MIRROR}/${BPN}/${MAJ_VER}/${BPN}-${PV}.tar.xz \ - file://hardcoded_libtool.patch \ - file://extending-libinstall-dependencies.patch \ - file://run-ptest \ - file://fatal-loader.patch \ - file://0001-pixops-Be-more-careful-about-integer-overflow.patch \ - " - -SRC_URI[md5sum] = "4fed0d54432f1b69fc6e66e608bd5542" -SRC_URI[sha256sum] = "4853830616113db4435837992c0aebd94cbb993c44dc55063cee7f72a7bef8be" - -inherit autotools pkgconfig gettext pixbufcache ptest-gnome - -LIBV = "2.10.0" - -GDK_PIXBUF_LOADERS ?= "png jpeg" - -PACKAGECONFIG ??= "${GDK_PIXBUF_LOADERS}" -PACKAGECONFIG_linuxstdbase = "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)} ${GDK_PIXBUF_LOADERS}" -PACKAGECONFIG_class-native = "${GDK_PIXBUF_LOADERS}" - -PACKAGECONFIG[png] = "--with-libpng,--without-libpng,libpng" -PACKAGECONFIG[jpeg] = "--with-libjpeg,--without-libjpeg,jpeg" -PACKAGECONFIG[tiff] = "--with-libtiff,--without-libtiff,tiff" -PACKAGECONFIG[jpeg2000] = "--with-libjasper,--without-libjasper,jasper" - -# Use GIO to sniff image format instead of trying all loaders -PACKAGECONFIG[gio-sniff] = "--enable-gio-sniffing,--disable-gio-sniffing,,shared-mime-info" -PACKAGECONFIG[x11] = "--with-x11,--without-x11,virtual/libx11" - -EXTRA_OECONF = "--disable-introspection" - -PACKAGES =+ "${PN}-xlib" - -FILES_${PN}-xlib = "${libdir}/*pixbuf_xlib*${SOLIBS}" -ALLOW_EMPTY_${PN}-xlib = "1" - -FILES_${PN} = "${libdir}/gdk-pixbuf-2.0/gdk-pixbuf-query-loaders \ - ${libdir}/lib*.so.*" - -FILES_${PN}-dev += " \ - ${bindir}/gdk-pixbuf-csource \ - ${bindir}/gdk-pixbuf-pixdata \ - ${includedir}/* \ - ${libdir}/gdk-pixbuf-2.0/${LIBV}/loaders/*.la \ -" - -FILES_${PN}-dbg += " \ - ${libdir}/.debug/* \ - ${libdir}/gdk-pixbuf-2.0/.debug/* \ - ${libdir}/gdk-pixbuf-2.0/${LIBV}/loaders/.debug/* \ -" - -PACKAGES_DYNAMIC += "^gdk-pixbuf-loader-.*" -PACKAGES_DYNAMIC_class-native = "" - -python populate_packages_prepend () { - postinst_pixbufloader = d.getVar("postinst_pixbufloader", True) - - loaders_root = d.expand('${libdir}/gdk-pixbuf-2.0/${LIBV}/loaders') - - packages = ' '.join(do_split_packages(d, loaders_root, '^libpixbufloader-(.*)\.so$', 'gdk-pixbuf-loader-%s', 'GDK pixbuf loader for %s')) - d.setVar('PIXBUF_PACKAGES', packages) - - # The test suite exercises all the loaders, so ensure they are all - # dependencies of the ptest package. - d.appendVar("RDEPENDS_gdk-pixbuf-ptest", " " + packages) -} - -do_install_append() { - # Move gdk-pixbuf-query-loaders into libdir so it is always available - # in multilib builds. - mv ${D}/${bindir}/gdk-pixbuf-query-loaders ${D}/${libdir}/gdk-pixbuf-2.0/ -} - -do_install_append_class-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}/${libdir}/gdk-pixbuf-2.0/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" - -SSTATEPREINSTFUNCS_append_class-native = " gdkpixbuf_sstate_preinst" -SYSROOT_PREPROCESS_FUNCS_append_class-native = " gdkpixbuf_sstate_preinst" - -gdkpixbuf_sstate_preinst() { - if [ "${BB_CURRENTTASK}" = "populate_sysroot" ]; then - rm -rf ${STAGING_LIBDIR_NATIVE}/gdk-pixbuf-2.0/${LIBV}/* - fi -} diff --git a/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf_2.32.1.bb b/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf_2.32.1.bb new file mode 100644 index 0000000000..6e3cb02b65 --- /dev/null +++ b/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf_2.32.1.bb @@ -0,0 +1,111 @@ +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" + +MAJ_VER = "${@oe.utils.trim_version("${PV}", 2)}" + +SRC_URI = "${GNOME_MIRROR}/${BPN}/${MAJ_VER}/${BPN}-${PV}.tar.xz \ + file://hardcoded_libtool.patch \ + file://extending-libinstall-dependencies.patch \ + file://run-ptest \ + file://fatal-loader.patch \ + " + +SRC_URI[md5sum] = "b1590189a2e89fab9f871959c168508c" +SRC_URI[sha256sum] = "4432b74f25538c7d6bcb3ca51adabdd666168955f25812a2568dc9637697f3bc" + +inherit autotools pkgconfig gettext pixbufcache ptest-gnome + +LIBV = "2.10.0" + +GDK_PIXBUF_LOADERS ?= "png jpeg" + +PACKAGECONFIG ??= "${GDK_PIXBUF_LOADERS}" +PACKAGECONFIG_linuxstdbase = "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)} ${GDK_PIXBUF_LOADERS}" +PACKAGECONFIG_class-native = "${GDK_PIXBUF_LOADERS}" + +PACKAGECONFIG[png] = "--with-libpng,--without-libpng,libpng" +PACKAGECONFIG[jpeg] = "--with-libjpeg,--without-libjpeg,jpeg" +PACKAGECONFIG[tiff] = "--with-libtiff,--without-libtiff,tiff" +PACKAGECONFIG[jpeg2000] = "--with-libjasper,--without-libjasper,jasper" + +# Use GIO to sniff image format instead of trying all loaders +PACKAGECONFIG[gio-sniff] = "--enable-gio-sniffing,--disable-gio-sniffing,,shared-mime-info" +PACKAGECONFIG[x11] = "--with-x11,--without-x11,virtual/libx11" + +EXTRA_OECONF = "--disable-introspection" + +PACKAGES =+ "${PN}-xlib" + +FILES_${PN}-xlib = "${libdir}/*pixbuf_xlib*${SOLIBS}" +ALLOW_EMPTY_${PN}-xlib = "1" + +FILES_${PN} = "${libdir}/gdk-pixbuf-2.0/gdk-pixbuf-query-loaders \ + ${libdir}/lib*.so.*" + +FILES_${PN}-dev += " \ + ${bindir}/gdk-pixbuf-csource \ + ${bindir}/gdk-pixbuf-pixdata \ + ${includedir}/* \ + ${libdir}/gdk-pixbuf-2.0/${LIBV}/loaders/*.la \ +" + +FILES_${PN}-dbg += " \ + ${libdir}/.debug/* \ + ${libdir}/gdk-pixbuf-2.0/.debug/* \ + ${libdir}/gdk-pixbuf-2.0/${LIBV}/loaders/.debug/* \ +" + +PACKAGES_DYNAMIC += "^gdk-pixbuf-loader-.*" +PACKAGES_DYNAMIC_class-native = "" + +python populate_packages_prepend () { + postinst_pixbufloader = d.getVar("postinst_pixbufloader", True) + + loaders_root = d.expand('${libdir}/gdk-pixbuf-2.0/${LIBV}/loaders') + + packages = ' '.join(do_split_packages(d, loaders_root, '^libpixbufloader-(.*)\.so$', 'gdk-pixbuf-loader-%s', 'GDK pixbuf loader for %s')) + d.setVar('PIXBUF_PACKAGES', packages) + + # The test suite exercises all the loaders, so ensure they are all + # dependencies of the ptest package. + d.appendVar("RDEPENDS_gdk-pixbuf-ptest", " " + packages) +} + +do_install_append() { + # Move gdk-pixbuf-query-loaders into libdir so it is always available + # in multilib builds. + mv ${D}/${bindir}/gdk-pixbuf-query-loaders ${D}/${libdir}/gdk-pixbuf-2.0/ +} + +do_install_append_class-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}/${libdir}/gdk-pixbuf-2.0/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" + +SSTATEPREINSTFUNCS_append_class-native = " gdkpixbuf_sstate_preinst" +SYSROOT_PREPROCESS_FUNCS_append_class-native = " gdkpixbuf_sstate_preinst" + +gdkpixbuf_sstate_preinst() { + if [ "${BB_CURRENTTASK}" = "populate_sysroot" ]; then + rm -rf ${STAGING_LIBDIR_NATIVE}/gdk-pixbuf-2.0/${LIBV}/* + fi +} -- cgit v1.2.3