diff options
author | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 13:49:04 -0700 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 17:38:18 -0700 |
commit | 56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch) | |
tree | 3f91093cdb475e565ae857f1c5a7fd339e2d781e /x11-libs/gdk-pixbuf | |
download | gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2 gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip |
proj/gentoo: Initial commit
This commit represents a new era for Gentoo:
Storing the gentoo-x86 tree in Git, as converted from CVS.
This commit is the start of the NEW history.
Any historical data is intended to be grafted onto this point.
Creation process:
1. Take final CVS checkout snapshot
2. Remove ALL ChangeLog* files
3. Transform all Manifests to thin
4. Remove empty Manifests
5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$
5.1. Do not touch files with -kb/-ko keyword flags.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests
X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project
X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration
X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn
X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts
X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration
X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging
X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'x11-libs/gdk-pixbuf')
-rw-r--r-- | x11-libs/gdk-pixbuf/Manifest | 1 | ||||
-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 | ||||
-rw-r--r-- | x11-libs/gdk-pixbuf/gdk-pixbuf-2.30.8.ebuild | 117 | ||||
-rw-r--r-- | x11-libs/gdk-pixbuf/metadata.xml | 5 |
6 files changed, 362 insertions, 0 deletions
diff --git a/x11-libs/gdk-pixbuf/Manifest b/x11-libs/gdk-pixbuf/Manifest new file mode 100644 index 000000000000..3bbc8ef7816b --- /dev/null +++ b/x11-libs/gdk-pixbuf/Manifest @@ -0,0 +1 @@ +DIST gdk-pixbuf-2.30.8.tar.xz 1336788 SHA256 4853830616113db4435837992c0aebd94cbb993c44dc55063cee7f72a7bef8be SHA512 2888cf035b70330e8d3ac87af54b69b2c990440fd59922464088d2a685e90022ad39c83d1ce1ccccfac3872b55ce9445ec4a3e9c7ab6371e20b19e20df7f261d WHIRLPOOL e7f69807ed629c5703750a91cc7a95ee2b3aa178a74c9197c20f863648436a023d140cf1274ba38369e8da3d77216bb1fcc66bae5b612ee8ee33ee4b42e11d65 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..1faf84bc6775 --- /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 +# $Id$ + +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 +} diff --git a/x11-libs/gdk-pixbuf/gdk-pixbuf-2.30.8.ebuild b/x11-libs/gdk-pixbuf/gdk-pixbuf-2.30.8.ebuild new file mode 100644 index 000000000000..4ef0c9efaf9f --- /dev/null +++ b/x11-libs/gdk-pixbuf/gdk-pixbuf-2.30.8.ebuild @@ -0,0 +1,117 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +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() { + # 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 +} + +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 +} diff --git a/x11-libs/gdk-pixbuf/metadata.xml b/x11-libs/gdk-pixbuf/metadata.xml new file mode 100644 index 000000000000..6e0e2ecb48ca --- /dev/null +++ b/x11-libs/gdk-pixbuf/metadata.xml @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <herd>gnome</herd> +</pkgmetadata> |