diff options
-rw-r--r-- | x11-libs/gdk-pixbuf/ChangeLog | 10 | ||||
-rw-r--r-- | x11-libs/gdk-pixbuf/Manifest | 35 | ||||
-rw-r--r-- | x11-libs/gdk-pixbuf/files/gdk-pixbuf-2.30.8-divide-by-zero.patch | 28 | ||||
-rw-r--r-- | x11-libs/gdk-pixbuf/files/gdk-pixbuf-2.30.8-pixops-overflow.patch | 85 | ||||
-rw-r--r-- | x11-libs/gdk-pixbuf/gdk-pixbuf-2.30.8-r1.ebuild | 126 |
5 files changed, 268 insertions, 16 deletions
diff --git a/x11-libs/gdk-pixbuf/ChangeLog b/x11-libs/gdk-pixbuf/ChangeLog index 28e5f7c4c006..0a93f6dceac0 100644 --- a/x11-libs/gdk-pixbuf/ChangeLog +++ b/x11-libs/gdk-pixbuf/ChangeLog @@ -1,6 +1,14 @@ # ChangeLog for x11-libs/gdk-pixbuf # Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/x11-libs/gdk-pixbuf/ChangeLog,v 1.139 2015/03/03 11:07:39 dlan Exp $ +# $Header: /var/cvsroot/gentoo-x86/x11-libs/gdk-pixbuf/ChangeLog,v 1.140 2015/08/01 00:52:50 tetromino Exp $ + +*gdk-pixbuf-2.30.8-r1 (01 Aug 2015) + + 01 Aug 2015; Alexandre Rostovtsev <tetromino@gentoo.org> + +gdk-pixbuf-2.30.8-r1.ebuild, +files/gdk-pixbuf-2.30.8-divide-by-zero.patch, + +files/gdk-pixbuf-2.30.8-pixops-overflow.patch: + Fix integer overflow in pixops (bug #556314, thanks to Agostino Sarubbo). Fix + gtk-doc installation (bug #549166, thanks to Rafał Mużyło). 03 Mar 2015; Yixun Lan <dlan@gentoo.org> gdk-pixbuf-2.30.8.ebuild: add arm64 support, tested on A53 board diff --git a/x11-libs/gdk-pixbuf/Manifest b/x11-libs/gdk-pixbuf/Manifest index 3fa5cc8019e0..97d75b1332be 100644 --- a/x11-libs/gdk-pixbuf/Manifest +++ b/x11-libs/gdk-pixbuf/Manifest @@ -1,24 +1,29 @@ -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 +AUX gdk-pixbuf-2.30.8-divide-by-zero.patch 1012 SHA256 b20f6a108399906ce923aaa0f0863c4ff1e4acaaafa10014587d66599d36797a SHA512 31deb46ec0f6627770550fb1b7d0b8216b6c9cad666a0c18af03905137cc5bf794de608e5a537be05b9bfa13e9db8f9e90bb5fd7d83121f3a5c21517984d6962 WHIRLPOOL 95d3661d6cb027b19d65529c56337785d07ea88aea52cf8737c4719a4e1271c4000c90b0c2e7fdde92134118d8b413e24300eb134b9d17ea5736f8b655333c97 +AUX gdk-pixbuf-2.30.8-pixops-overflow.patch 2870 SHA256 bbfe849f517ce999f680c78caf7183d75494f4a0cdf0b241fc931352e7a9d9aa SHA512 40228e024d653bc30d34fb82265d113b2ba3d7a5aaeefb5fd7713f4fc1215c56a0c8481fbe4784936ac9790f39209fcdf7de85d9180b014ecfb8675ba6aad8d5 WHIRLPOOL 68f9e7215d27cb290a3358d97047876a88d7dcd4cb2d78f2f0340d05549da60c1b6b887ec498017164ad8e2ce56848d5d4735be49ad28da9ffc482ef2689e02c DIST gdk-pixbuf-2.30.8.tar.xz 1336788 SHA256 4853830616113db4435837992c0aebd94cbb993c44dc55063cee7f72a7bef8be SHA512 2888cf035b70330e8d3ac87af54b69b2c990440fd59922464088d2a685e90022ad39c83d1ce1ccccfac3872b55ce9445ec4a3e9c7ab6371e20b19e20df7f261d WHIRLPOOL e7f69807ed629c5703750a91cc7a95ee2b3aa178a74c9197c20f863648436a023d140cf1274ba38369e8da3d77216bb1fcc66bae5b612ee8ee33ee4b42e11d65 +EBUILD gdk-pixbuf-2.30.8-r1.ebuild 3984 SHA256 a30039d69416b8e1ad13de77900daaec6d95e3f29cb174f8e588ef4c3d913595 SHA512 1c42c8320df716a6b02da8f31bf3fff9821cb413f915be45a1c9371ad0fdb4b7012c061989be92f84c9db45d24c5be1e87357ea476ff1b7891290d1f6cabb41a WHIRLPOOL 54dd6a169b56380b25c73559c15ea97910e8884118ce31c9f68178047ef6fcab30c9477d0ec2f7416c5cd07a42d5fae0eba10e17f386e04f9650269ae5785d77 EBUILD gdk-pixbuf-2.30.8.ebuild 3658 SHA256 1cbaf14b56b2186e0037db3adca6b01794a5df7892779cc15ba0b1ea406c1c36 SHA512 9332329818afe4b48419579abdadb5b14b5d1b4ef4781599d25568cab6a6571ebc93e129b183281e1e8dc9c549b69f63470ad516084ba85bfbe6f8e7a74eb5a2 WHIRLPOOL e297d537f7f406de177e08a027f5943b3de5e519e2a2e1fec9acc63a86773d283b48bf0f81dc2d70dffacee226f5bb543e9cd9180d953edea108f2499f8479da -MISC ChangeLog 19924 SHA256 1a7677b6dc4858205275f88c7dd284b1be4877be7d48bb1068b09084c88eae96 SHA512 85f8e98cc988d97f262ec18253ee1ea846121c6d15a1a653e736721101a30eb0e77b673403338c71bde3a44643c112eb26b48c60c57cc85977207ff422de3455 WHIRLPOOL b729c2aa84d210ceba9a4549ddf27fec69f281a9964642e2cd4a73b9609beb527ca65dacb47570382be98db33d23f0b1a1e8bc611b5e5f6106596ac819cb8708 +MISC ChangeLog 20300 SHA256 ebdd05fe60fcbf30862e96a054f72728cfac9acecdfc5b16cbe0e558782d62c0 SHA512 c4542814d3e0a5857b2fc0da5d578c676f9a071b7126b79ed5c22ba6328a33ef5ad94f19e4717a2c897cabbcea92aa9b1d40c48958fdff0a3ff5d7e74e9f8c0e WHIRLPOOL eef9709fbb0f29de5064a37cc13072beb0feb171e72d6a45a8b3bcd34cc23f0e80b1747281aa81a3eb84d075464d4ddc112549ae950c4f528eeeb2c654cfcbd3 MISC metadata.xml 160 SHA256 4d793ecb79b17794248102d8409d16bc27b1022c72038bd2d1241e129693d5f2 SHA512 677650c05f31fc27035e12f3f5e4b095715dfe12d2d3483f800bfbc6e986a98dbb1997cd52ad7a177b5c120c9b87fe5a2452a4f0f9852ac9a58262e0c5d576c9 WHIRLPOOL 070602fb27fee6a25035c9e93f5c2422270a5781fd11dac318d3f5c32cf9e49163abf7999729df230d3e181b6a1362982744e1f0ac016bf59a3458ae23abbb83 -----BEGIN PGP SIGNATURE----- -Version: GnuPG v2 +Version: GnuPG v2.1 -iQIcBAEBCAAGBQJU9SUdAAoJEJIMDbyqvv1VtroQAIk44smjdVIcby+CX4s1o/KW -GEhiKznT3rd/j9tbl07cCd5gNiGTy2LZUEtN8vhbRpUT7ieWv9clJkDx/s1DabGX -TX1tS7IXHSDg79zXRxpNubahUPjNmlNpfShL2wumNvTUkTx/FQ39+Zjs3fNZkFnE -5ab3tI7f0cNXtVFY7dRzDwBUCm60p9fWchnLXHjQhVG8eRNMj905E9eCrV4afGQn -ukDYz/gNQBXUZoOb4qdM0T77wexuhsUR0cLt17plC/ClGAVX/DNnF3BJbB22D+xw -yL5cVs+gHo4FgsF6AHu3ZGM63DeVcOCMT3ac66N7c1IuoUR2rVo+JNs8MN/Tgezg -5z7pXzNDT88NadRa7o4/iDIC9+j1Tfo8Tb+6tFAXqPMqJD/cGa5mh/Gr4wyPKs8q -A9CsW+TnaXrKFGlvSaBWYKlRiBq3PYzY4pLWFpmYJTYLYZs4zDMCLYufNC88MYuq -P+uxCbraEcdL2pPBkctYsz40Sy/Y0w39/uYqxXAF0Q8DMYbhHvDfxXXwD/rZNJIB -n0XTB3dnFiTOsAXRt8u8gZba4syzc4zDGqCvUIgRoa3nipFHAH9tYBoyaOnHVF7b -DCwWQc0/q3pmkS35F7C/lNZoSVboV8o+M1nrl8AgC5FzbJs5kh+VqLEufM383Zp0 -bFJW4ACavQRUb9GsnXx1 -=do6y +iQJ8BAEBCABmBQJVvBhjXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w +ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQ1RTNCRkUzRDRBNkI2MEEwQkYwQzMyOEEx +OEU1QjZGMkQ4RDVFQzhEAAoJEBjltvLY1eyNBXMP/RufiJiPJRA0Vs8JSc9do3Tt +I80bH0xTBd2HBYMXk5SBEif74VXu9q20X1rblLetgsj4b7uoSsqlR2jwFozVhVON +xraeBuvnj6W+QVWoITraU0cT602tNNgNXJy6/srKcO1XuPbKca6dpUIRfDtqFDPn +ywwK5QZyWQfVoAUXFXoUZ+3nANdxsdpnU/9aJlG6ghJdHgiURVvOActUfqdSC+4R +gFmEbjyGCLLvn3plPxZNaXaGnytljpXWRyqnCzyerHGwd2iAECE/BxLzWB+E1JuL +TXTjs9JY6uT8aLKMP5mvq2I1Sp4uwx1pcvjBH5P1Q1Mh8vXL0I3kU4bRuznk/0+j +DXzOzgAEbVYLHCWWt/e7JVL03fXtnIMMuFc48XGLnc3Ia6auCKsMUpMNYsbJHfQo +dLyh9l/wz3FxkgxV2BCdZIizZIvFU4vRaXebyGZw22KsTjEnlH6R8XcgHwNPEh4R +09NIoUmphNpbbX8Tp+lUnfkP6fyxF/JJTQl+UY90Khg4ja4xDjDytV14oW6YwpPf +bMcyDh9M141s/J2cbX5v+gJOpvhkN4M0DsF5ueRUhBsN1A9wwxyrXnosq6tVJcSG +v63EIyY9JjB5a3mghVt4RZ05vwHjkNwsFCOjtKsezc1g1XfP6oPx2T111xmWPu5l +uudpGcqf4gq5eevszCXO +=3wI3 -----END PGP SIGNATURE----- diff --git a/x11-libs/gdk-pixbuf/files/gdk-pixbuf-2.30.8-divide-by-zero.patch b/x11-libs/gdk-pixbuf/files/gdk-pixbuf-2.30.8-divide-by-zero.patch new file mode 100644 index 000000000000..7881e6580aca --- /dev/null +++ b/x11-libs/gdk-pixbuf/files/gdk-pixbuf-2.30.8-divide-by-zero.patch @@ -0,0 +1,28 @@ +From 74c418ba2e41ab9e2287420378a6192788b1fab6 Mon Sep 17 00:00:00 2001 +From: Sarita Rawat <sarita.rawat@samsung.com> +Date: Fri, 5 Jun 2015 06:56:00 +0000 +Subject: [PATCH] Avoid a possible divide-by-zero + +Pointed out in + +https://bugzilla.gnome.org/show_bug.cgi?id=750440 +--- + gdk-pixbuf/gdk-pixbuf-loader.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/gdk-pixbuf/gdk-pixbuf-loader.c b/gdk-pixbuf/gdk-pixbuf-loader.c +index 65845ed..668b703 100644 +--- a/gdk-pixbuf/gdk-pixbuf-loader.c ++++ b/gdk-pixbuf/gdk-pixbuf-loader.c +@@ -330,7 +330,7 @@ gdk_pixbuf_loader_prepare (GdkPixbuf *pixbuf, + else + anim = gdk_pixbuf_non_anim_new (pixbuf); + +- if (priv->needs_scale) { ++ if (priv->needs_scale && width != 0 && height != 0) { + priv->animation = GDK_PIXBUF_ANIMATION (_gdk_pixbuf_scaled_anim_new (anim, + (double) priv->width / width, + (double) priv->height / height, +-- +2.5.0 + diff --git a/x11-libs/gdk-pixbuf/files/gdk-pixbuf-2.30.8-pixops-overflow.patch b/x11-libs/gdk-pixbuf/files/gdk-pixbuf-2.30.8-pixops-overflow.patch new file mode 100644 index 000000000000..22a3c25508ce --- /dev/null +++ b/x11-libs/gdk-pixbuf/files/gdk-pixbuf-2.30.8-pixops-overflow.patch @@ -0,0 +1,85 @@ +From ffec86ed5010c5a2be14f47b33bcf4ed3169a199 Mon Sep 17 00:00:00 2001 +From: Matthias Clasen <mclasen@redhat.com> +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 +--- + 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; + +-- +2.5.0 + diff --git a/x11-libs/gdk-pixbuf/gdk-pixbuf-2.30.8-r1.ebuild b/x11-libs/gdk-pixbuf/gdk-pixbuf-2.30.8-r1.ebuild new file mode 100644 index 000000000000..901a15bcae3c --- /dev/null +++ b/x11-libs/gdk-pixbuf/gdk-pixbuf-2.30.8-r1.ebuild @@ -0,0 +1,126 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/x11-libs/gdk-pixbuf/gdk-pixbuf-2.30.8-r1.ebuild,v 1.1 2015/08/01 00:52:50 tetromino Exp $ + +EAPI="5" +GCONF_DEBUG="no" +GNOME2_LA_PUNT="yes" + +inherit eutils flag-o-matic gnome2 multilib libtool multilib-minimal + +DESCRIPTION="Image loading library for GTK+" +HOMEPAGE="http://www.gtk.org/" + +LICENSE="LGPL-2+" +SLOT="2" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~x86-interix ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" +IUSE="+X debug +introspection jpeg jpeg2k tiff test" + +COMMON_DEPEND=" + >=dev-libs/glib-2.37.6:2[${MULTILIB_USEDEP}] + >=media-libs/libpng-1.4:0=[${MULTILIB_USEDEP}] + introspection? ( >=dev-libs/gobject-introspection-0.9.3 ) + jpeg? ( virtual/jpeg:0=[${MULTILIB_USEDEP}] ) + jpeg2k? ( media-libs/jasper:=[${MULTILIB_USEDEP}] ) + tiff? ( >=media-libs/tiff-3.9.2:0=[${MULTILIB_USEDEP}] ) + X? ( x11-libs/libX11[${MULTILIB_USEDEP}] ) +" +DEPEND="${COMMON_DEPEND} + >=dev-util/gtk-doc-am-1.20 + >=sys-devel/gettext-0.17 + virtual/pkgconfig +" +# librsvg blocker is for the new pixbuf loader API, you lose icons otherwise +RDEPEND="${COMMON_DEPEND} + !<gnome-base/gail-1000 + !<gnome-base/librsvg-2.31.0 + !<x11-libs/gtk+-2.21.3:2 + !<x11-libs/gtk+-2.90.4:3 + abi_x86_32? ( + !<=app-emulation/emul-linux-x86-gtklibs-20131008-r2 + !app-emulation/emul-linux-x86-gtklibs[-abi_x86_32(-)] + ) +" + +MULTILIB_CHOST_TOOLS=( + /usr/bin/gdk-pixbuf-query-loaders +) + +src_prepare() { + # Upstream patches from 2.31.x + epatch "${FILESDIR}"/${PN}-2.30.8-divide-by-zero.patch \ + "${FILESDIR}"/${PN}-2.30.8-pixops-overflow.patch #556314 + + # This will avoid polluting the pkg-config file with versioned libpng, + # which is causing problems with libpng14 -> libpng15 upgrade + # See upstream bug #667068 + # First check that the pattern is present, to catch upstream changes on bumps, + # because sed doesn't return failure code if it doesn't do any replacements + grep -q 'l in libpng16' configure || die "libpng check order has changed upstream" + sed -e 's:l in libpng16:l in libpng libpng16:' -i configure || die + [[ ${CHOST} == *-solaris* ]] && append-libs intl + + gnome2_src_prepare +} + +multilib_src_configure() { + # png always on to display icons + ECONF_SOURCE="${S}" \ + gnome2_src_configure \ + $(usex debug --enable-debug=yes "") \ + $(use_with jpeg libjpeg) \ + $(use_with jpeg2k libjasper) \ + $(use_with tiff libtiff) \ + $(multilib_native_use_enable introspection) \ + $(use_with X x11) \ + --with-libpng + + # work-around gtk-doc out-of-source brokedness + if multilib_is_native_abi; then + ln -s "${S}"/docs/reference/${PN}/html docs/reference/${PN}/html || die + fi +} + +multilib_src_install() { + # Parallel install fails when no gdk-pixbuf is already installed, bug #481372 + MAKEOPTS="${MAKEOPTS} -j1" gnome2_src_install +} + +pkg_preinst() { + gnome2_pkg_preinst + + multilib_pkg_preinst() { + # Make sure loaders.cache belongs to gdk-pixbuf alone + local cache="usr/$(get_libdir)/${PN}-2.0/2.10.0/loaders.cache" + + if [[ -e ${EROOT}${cache} ]]; then + cp "${EROOT}"${cache} "${ED}"/${cache} || die + else + touch "${ED}"/${cache} || die + fi + } + + multilib_foreach_abi multilib_pkg_preinst +} + +pkg_postinst() { + # causes segfault if set, see bug 375615 + unset __GL_NO_DSO_FINALIZER + + multilib_foreach_abi gnome2_pkg_postinst + + # Migration snippet for when this was handled by gtk+ + if [ -e "${EROOT}"usr/lib/gtk-2.0/2.*/loaders ]; then + elog "You need to rebuild ebuilds that installed into" "${EROOT}"usr/lib/gtk-2.0/2.*/loaders + elog "to do that you can use qfile from portage-utils:" + elog "emerge -va1 \$(qfile -qC ${EPREFIX}/usr/lib/gtk-2.0/2.*/loaders)" + fi +} + +pkg_postrm() { + gnome2_pkg_postrm + + if [[ -z ${REPLACED_BY_VERSIONS} ]]; then + rm -f "${EROOT}"usr/lib*/${PN}-2.0/2.10.0/loaders.cache + fi +} |