aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGregory M. Tuner <gmt@be-evil.net>2014-01-25 12:23:22 -0800
committerGregory M. Tuner <gmt@be-evil.net>2014-01-25 12:23:22 -0800
commit6531a24dab7c5e3e6aacf7bf56a1c180e7ae3465 (patch)
treec7a2e5410d67f011deb2081da66613b0294a9500 /media-libs
parentmedia-libs/clutter-gst: multilib-utize (diff)
downloadgmt-6531a24dab7c5e3e6aacf7bf56a1c180e7ae3465.tar.gz
gmt-6531a24dab7c5e3e6aacf7bf56a1c180e7ae3465.tar.bz2
gmt-6531a24dab7c5e3e6aacf7bf56a1c180e7ae3465.zip
media-libs/imlib: clone upstream
Signed-off-by: Gregory M. Tuner <gmt@be-evil.net>
Diffstat (limited to 'media-libs')
-rw-r--r--media-libs/imlib/ChangeLog299
-rw-r--r--media-libs/imlib/Manifest11
-rw-r--r--media-libs/imlib/files/imlib-1.9.15-asneeded.patch38
-rw-r--r--media-libs/imlib/files/imlib-1.9.15-bpp16-CVE-2007-3568.patch11
-rw-r--r--media-libs/imlib/files/imlib-1.9.15-fix-rendering.patch105
-rw-r--r--media-libs/imlib/files/imlib-1.9.15-libpng15.patch142
-rw-r--r--media-libs/imlib/files/imlib-1.9.15.patch70
-rw-r--r--media-libs/imlib/files/imlib-security.patch510
-rw-r--r--media-libs/imlib/imlib-1.9.15-r4.ebuild61
-rw-r--r--media-libs/imlib/metadata.xml5
10 files changed, 1252 insertions, 0 deletions
diff --git a/media-libs/imlib/ChangeLog b/media-libs/imlib/ChangeLog
new file mode 100644
index 0000000..b97196a
--- /dev/null
+++ b/media-libs/imlib/ChangeLog
@@ -0,0 +1,299 @@
+# ChangeLog for media-libs/imlib
+# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/media-libs/imlib/ChangeLog,v 1.78 2011/10/11 20:21:46 ssuominen Exp $
+
+ 11 Oct 2011; Samuli Suominen <ssuominen@gentoo.org> -imlib-1.9.15-r2.ebuild:
+ old
+
+ 11 Oct 2011; Samuli Suominen <ssuominen@gentoo.org> imlib-1.9.15-r3.ebuild:
+ ppc/ppc64 stable wrt #385215
+
+ 11 Oct 2011; Jeroen Roovers <jer@gentoo.org> imlib-1.9.15-r3.ebuild:
+ Stable for HPPA (bug #385215).
+
+ 08 Oct 2011; Raúl Porcel <armin76@gentoo.org> imlib-1.9.15-r3.ebuild:
+ alpha/arm/ia64/sh/sparc stable wrt #385215
+
+ 04 Oct 2011; Pawel Hajdan jr <phajdan.jr@gentoo.org> imlib-1.9.15-r3.ebuild:
+ x86 stable wrt bug #385215
+
+ 03 Oct 2011; Markos Chandras <hwoarang@gentoo.org> imlib-1.9.15-r3.ebuild:
+ Stable on amd64 wrt bug #385215
+
+ 07 Aug 2011; Samuli Suominen <ssuominen@gentoo.org> imlib-1.9.15-r3.ebuild,
+ +files/imlib-1.9.15-libpng15.patch:
+ Fix building with libpng15 wrt #357167 by Lars Wendler
+
+*imlib-1.9.15-r3 (28 Mar 2011)
+
+ 28 Mar 2011; Samuli Suominen <ssuominen@gentoo.org> +imlib-1.9.15-r3.ebuild:
+ USE="static-libs" and remove useless libtool file. Remove USE="deprecated"
+ now that nothing is using it anymore.
+
+ 08 Nov 2010; Markus Meier <maekke@gentoo.org> imlib-1.9.15-r2.ebuild:
+ change jpeg dep to virtual/jpeg
+
+ 24 Nov 2009; Samuli Suominen <ssuominen@gentoo.org>
+ imlib-1.9.15-r2.ebuild, metadata.xml:
+ Rename USE gtk (x11-libs/gtk+:1.2) to USE deprecated.
+
+ 16 Jul 2008; Peter Volkov <pva@gentoo.org>
+ +files/imlib-1.9.15-asneeded.patch, imlib-1.9.15-r2.ebuild:
+ Fixed build problems: 1. when gtk+-1 is not installed AM_PATH_GTK could
+ not be found, 2. build failes with --as-needed, bug #207638, thank Muelli
+ for report.
+
+ 05 Jul 2008; Peter Alfredsen <loki_val@gentoo.org>
+ -imlib-1.9.15-r1.ebuild:
+ Drop old.
+
+ 05 Jul 2008; Peter Alfredsen <loki_val@gentoo.org> imlib-1.9.15-r2.ebuild:
+ Fix for libtool-2.2 wrt bug #213805. Thanks to all the people on that bug.
+
+ 14 Dec 2007; Tobias Scherbaum <dertobi123@gentoo.org>
+ imlib-1.9.15-r2.ebuild:
+ ppc stable, bug #201887
+
+ 14 Dec 2007; Markus Rothe <corsair@gentoo.org> imlib-1.9.15-r2.ebuild:
+ Stable on ppc64; bug #201887
+
+ 14 Dec 2007; <welp@gentoo.org> imlib-1.9.15-r2.ebuild:
+ Stable on amd64; bug 201887
+
+ 13 Dec 2007; Raúl Porcel <armin76@gentoo.org> imlib-1.9.15-r2.ebuild:
+ alpha/ia64 stable wrt security #201887
+
+ 13 Dec 2007; Jeroen Roovers <jer@gentoo.org> imlib-1.9.15-r2.ebuild:
+ Stable for HPPA (bug #201887).
+
+ 13 Dec 2007; Ferris McCormick <fmccor@gentoo.org> imlib-1.9.15-r2.ebuild:
+ Sparc stable, Security Bug #201887.
+
+ 13 Dec 2007; Christian Faulhammer <opfer@gentoo.org>
+ imlib-1.9.15-r2.ebuild:
+ stable x86, security bug 201887
+
+*imlib-1.9.15-r2 (10 Dec 2007)
+
+ 10 Dec 2007; <pva@gentoo.org>
+ +files/imlib-1.9.15-bpp16-CVE-2007-3568.patch,
+ +files/imlib-1.9.15-fix-rendering.patch, +imlib-1.9.15-r2.ebuild:
+ Fixed denial of service (infinite loop) via a BMP image, bug #201887. Fixed
+ bug which prevented imlib to render images is MIT-SHM when the MIT-SHM
+ extension doesn't support shared pixmaps (bugs.debian.org/448360). Thank for
+ report Antti Mäkelä <zarhan AT cs.tut.fi>. Homepage changed. No website is
+ available for this old library, so pointing to sources location.
+
+ 23 Sep 2007; Samuli Suominen <drac@gentoo.org> imlib-1.9.15-r1.ebuild:
+ Fix modular X deps wrt #192733.
+
+ 24 Jun 2007; Joshua Kinard <kumba@gentoo.org> imlib-1.9.15-r1.ebuild:
+ Stable on mips, per #172638.
+
+ 14 Jun 2007; Samuli Suominen <drac@gentoo.org> imlib-1.9.15-r1.ebuild:
+ Add libX11 as depend.
+
+ 11 Jun 2007; Samuli Suominen <drac@gentoo.org> imlib-1.9.15-r1.ebuild:
+ Stable on arm wrt #173638.
+
+ 02 Jun 2007; Raúl Porcel <armin76@gentoo.org> imlib-1.9.15-r1.ebuild:
+ alpha stable wrt #173638
+
+ 10 Apr 2007; Gustavo Zacarias <gustavoz@gentoo.org>
+ imlib-1.9.15-r1.ebuild:
+ Stable on sparc wrt #173638
+
+ 09 Apr 2007; Raúl Porcel <armin76@gentoo.org> imlib-1.9.15-r1.ebuild:
+ ia64 stable wrt bug 173638
+
+ 08 Apr 2007; Peter Weller <welp@gentoo.org> imlib-1.9.15-r1.ebuild:
+ Stable on amd64 wrt bug 173638
+
+ 08 Apr 2007; Markus Rothe <corsair@gentoo.org> imlib-1.9.15-r1.ebuild:
+ Stable on ppc64; bug #173638
+
+ 07 Apr 2007; Joseph Jezak <josejx@gentoo.org> imlib-1.9.15-r1.ebuild:
+ Marked ppc stable for bug #173638.
+
+ 07 Apr 2007; Jeroen Roovers <jer@gentoo.org> imlib-1.9.15-r1.ebuild:
+ Stable for HPPA (bug #173638).
+
+ 07 Apr 2007; Christian Faulhammer <opfer@gentoo.org>
+ imlib-1.9.15-r1.ebuild:
+ stable x86, bug 173638
+
+ 06 Apr 2007; Samuli Suominen <drac@gentoo.org> imlib-1.9.15-r1.ebuild:
+ Fix misplaced quote.
+
+ 06 Feb 2007; Samuli Suominen <drac@gentoo.org> imlib-1.9.15-r1.ebuild:
+ Stop using eautomake.
+
+ 05 Feb 2007; Samuli Suominen <drac@gentoo.org> imlib-1.9.14-r3.ebuild:
+ Simple patch name change.
+
+ 05 Feb 2007; Samuli Suominen <drac@gentoo.org> files/imlib-1.9.15.patch,
+ imlib-1.9.15-r1.ebuild:
+ Revert a change in patch and really fix autotools.
+
+*imlib-1.9.15-r1 (05 Feb 2007)
+
+ 05 Feb 2007; Samuli Suominen <drac@gentoo.org> +files/imlib-1.9.15.patch,
+ +files/imlib-security.patch, +imlib-1.9.15-r1.ebuild:
+ Fix fix for 3425, sed call was outdated. Remove USE static. Fix autotools
+ handling. Fix documentation installation. Clean up.
+
+ 19 Jan 2007; Daniel Gryniewicz <dang@gentoo.org> metadata.xml:
+ Gnome herd doesn't want to maintain this anymore
+
+ 12 Apr 2006; Diego Pettenò <flameeyes@gentoo.org> imlib-1.9.14-r3.ebuild:
+ Keyword the unmasked one too.
+
+ 12 Apr 2006; Diego Pettenò <flameeyes@gentoo.org> imlib-1.9.15.ebuild:
+ Add ~x86-fbsd keyword.
+
+ 17 Dec 2005; Mike Frysinger <vapier@gentoo.org> imlib-1.9.14-r3.ebuild,
+ imlib-1.9.15.ebuild:
+ Remove pointless call to preplib.
+
+*imlib-1.9.15 (30 May 2005)
+
+ 30 May 2005; Leonardo Boshell <leonardop@gentoo.org> imlib-1.9.15.ebuild,
+ files/imlib-1.9.15-gdk_flag.patch:
+ New release. Implements the 'static' USE flag and contains a new,
+ experimental patch to disable Gdk functionality. See bug #40453.
+
+ 30 May 2005; Leonardo Boshell <leonardop@gentoo.org> imlib-1.9.14-r3.ebuild:
+ Updated HOMEPAGE.
+
+ 29 Dec 2004; Ciaran McCreesh <ciaranm@gentoo.org> :
+ Change encoding to UTF-8 for GLEP 31 compliance
+
+ 05 Dec 2004; Stephen P. Becker <geoman@gentoo.org> imlib-1.9.14-r3.ebuild:
+ stable on mips wrt bug 72681
+
+ 05 Dec 2004; Bryan Østergaard <kloeri@gentoo.org> imlib-1.9.14-r3.ebuild:
+ Stable on alpha, bug 72681.
+
+ 05 Dec 2004; Ferris McCormick <fmccor@gentoo.org> imlib-1.9.14-r3.ebuild:
+ Stable for sparc wrt Bug 72681 --- builds and tests OK with ruby-gdkimlib.
+
+ 05 Dec 2004; Markus Rothe <corsair@gentoo.org> imlib-1.9.14-r3.ebuild:
+ Stable on ppc64; bug #72681
+
+ 05 Dec 2004; <SeJo@gentoo.org> imlib-1.9.14-r3.ebuild:
+ stable on ppc: gsla 72681
+
+ 04 Dec 2004; Mike Doty <kingtaco@gentoo.org> imlib-1.9.14-r3.ebuild:
+ stable on amd64 per bug #72681
+
+*imlib-1.9.14-r3 (04 Dec 2004)
+
+ 04 Dec 2004; Joe McCann <joem@gentoo.org> +files/imlib-1.9.14-sec2.patch,
+ +imlib-1.9.14-r3.ebuild:
+ Adding security patch. See bug #72681 for more information
+
+ 17 Oct 2004; Hardave Riar <hardave@gentoo.org> imlib-1.9.14-r2.ebuild:
+ Stable on mips, bug #62487.
+
+ 09 Oct 2004; Tom Gall <tgall@gentoo.org> imlib-1.9.14-r2.ebuild:
+ stable on ppc64, bug #62487
+
+ 08 Sep 2004; Bryan Østergaard <kloeri@gentoo.org> imlib-1.9.14-r2.ebuild:
+ Stable on alpha, bug 62487.
+
+ 06 Sep 2004; Gustavo Zacarias <gustavoz@gentoo.org> imlib-1.9.14-r2.ebuild:
+ Stable on sparc wrt #62487
+
+*imlib-1.9.14-r2 (06 Sep 2004)
+
+ 06 Sep 2004; Chris White <chriswhite@gentoo.org>
+ +files/imlib-1.9.14-bound.patch, +imlib-1.9.14-r2.ebuild:
+ Security rev bump per Bug #62487. x86 stable marked for security bug.
+
+ 26 Aug 2004; Hanno Boeck <hanno@gentoo.org> imlib-1.9.14-r1.ebuild:
+ Re-indtroduced the hard-gtk-dep, because the "hack" to disable it didn't
+ really work.
+
+ 13 Aug 2004; Michael Sterrett <mr_bones_@gentoo.org> imlib-1.9.14-r1.ebuild:
+ fix use invocation
+
+ 12 Aug 2004; Hanno Boeck <hanno@gentoo.org> imlib-1.9.14-r1.ebuild:
+ No gtk-dep if USE="-gtk" is set.
+
+ 26 Jul 2004; Tom Gall <tgall@gentoo.org> imlib-1.9.14-r1.ebuild:
+ stable on ppc64
+
+ 02 Jul 2004; Tom Gall <tgall@gentoo.org> imlib-1.9.14-r1.ebuild:
+ mark ~ppc64
+
+ 14 Apr 2004; Stephen P. Becker <geoman@gentoo.org> imlib-1.9.14-r1.ebuild:
+ Marked stable on mips.
+
+ 07 Mar 2004; Stephen P. Becker <geoman@gentoo.org> imlib-1.9.14-r1.ebuild:
+ Added ~mips keyword.
+
+ 14 Nov 2003; Aron Griffis <agriffis@gentoo.org> imlib-1.9.14-r1.ebuild:
+ Stable on ia64
+
+ 06 Dec 2002; Rodney Rees <manson@gentoo.org> : changed sparc ~sparc keywords
+
+ 29 Nov 2002; foser <foser@gentoo.org> imlib-1.9.14-r1.ebuild :
+ Fixed imlib-config (bug #3425)
+
+*imlib-1.9.14-r1 (17 Nov 2002)
+
+ 04 Jul 2003; Guy Martin <gmsoft@gentoo.org> imlib-1.9.14-r1.ebuild :
+ Added hppa to KEYWORDS.
+
+ 17 Nov 2002; Martin Holzer <mholzer@gentoo.org> imlib-1.9.14-r1.ebuild
+ ChangeLog :
+
+ Fixed download URL.
+
+*imlib-1.9.14-r1 (28 May 2002)
+
+ 28 May 2002; Matthew Kennedy <mkennedy@gentoo.org> imlib-1.9.14-r1.ebuild
+ files/digest-imlib-1.9.14-r1, ChangeLog :
+
+ Pass configure --includedir="" and make install
+ includedir=${D}/usr/include to make gcc3.1 happy (also tested on a
+ 2.95.3 machine). Thanks to Rufiao Valhacouto
+ <rufiao@gmx.net> and lostlogic@lostlogicx.com (Brandon Low) of bug
+ #3135 for this nice catch.
+
+*imlib-1.9.14 (4 May 2002)
+
+ 4 May 2002; Seemant Kulleen <seemant@gentoo.org> imlib-1.9.14.ebuild
+ files/digest-imlib-1.9.14 :
+
+ Version bump, and now tiff, libpng, libungif, giflib and jpeg-6 are all
+ REQUIRED. Go figure. Thanks to TMB- in #gentoo for the upgrade notice.
+
+*imlib-1.9.13-r1 (12 Apr 2002)
+
+ 12 Apr 2002; Seemant Kulleen <seemant@gentoo.org> imlib-1.9.13-r2.ebuild :
+
+ Compile against newest libpng
+
+ 03 Apr 2002; M.Schlemmer <azarah@gentoo.org> imlib-1.9.13-r1.ebuild :
+
+ Remove unneeded aclocal, autoconf and automake.
+
+*imlib-1.9.13-r1 (21 Mar 2002)
+
+ 21 Mar 2002; Seemant Kulleen <seemant@gentoo.org> imlib-1.9.13-r1.ebuild :
+
+ stefan@mdy.univie.ac.at pointed out the fact that html documentation gets
+ gzipped. This is fixed now.
+
+*imlib-1.9.13 (16 Mar 2002)
+
+*imlib-1.9.10-r1 (1 Feb 2002)
+
+ 1 Feb 2002; G.Bevin <gbevin@gentoo.org> ChangeLog :
+
+ Added initial ChangeLog which should be updated whenever the package is
+ updated in any way. This changelog is targetted to users. This means that the
+ comments should well explained and written in clean English. The details about
+ writing correct changelogs are explained in the skel.ChangeLog file which you
+ can find in the root directory of the portage repository.
diff --git a/media-libs/imlib/Manifest b/media-libs/imlib/Manifest
new file mode 100644
index 0000000..9fc6e77
--- /dev/null
+++ b/media-libs/imlib/Manifest
@@ -0,0 +1,11 @@
+AUX imlib-1.9.15-asneeded.patch 1120 SHA256 60f8a3f9bee11c0987b663ec86d48f208d7d96f35463f9babdd43389f466ce94 SHA512 d0cb21e5b7ecb928d25a6afbedbd40e5e2374ea33a3d546efdd65b26c0877d001985710462604c71a507c30f345f7e1a316719208e2d06c4a740e640a9b07cb3 WHIRLPOOL fd8c373299dddab50acd04b232df4780d6fb90e8a095ca2d09e6f624bcaf994eb56746ad2aef52e7f7ca872d4c8560547c0b44634e68974a4203b980447e5762
+AUX imlib-1.9.15-bpp16-CVE-2007-3568.patch 457 SHA256 f0097c1db200b19a3e8f06d85765dd8b8f757dd0bc6fd9bafa0c31cd9c14d8ec SHA512 545936b5620fea74993a079db0555780d612d38865b56845330e36b7d04327fd93eb31b2d7841cd050c54ca450e305e923fb7d779c9c9948158041ec2734cf2b WHIRLPOOL 6ab4e66d57fca46c138600189a1184475cd3c2cf3af579dd569c15c979f404e1a48e90532ee8b2f2320f5f63f64eab28625c84c7096a74e9a07b98d00518fbcc
+AUX imlib-1.9.15-fix-rendering.patch 3263 SHA256 7f5f8967ec52658e776a0a60a3a3c93d367ccf877d92569a9313e78bbd510604 SHA512 4e94da8de3f18b711bdfcf4184dbc2220ef566aa61b72c6139e490e55051b3090dc5330929b218f6fab1764c8c2ee8acdd630a0c64010b56b4b4f1b8c55c3f89 WHIRLPOOL d25d7be59ad63e97a8f12baf41532d1da4ea0b8cb004074c681e08e5c8c473fa4b68d46285e5cf7361601bb99d42b523c1299ffe5bdd7c69b120d8559de48d03
+AUX imlib-1.9.15-libpng15.patch 3785 SHA256 0306f872438822888d436f9e151e4875ffa3ee1b261f7a092738ea87e4ca589b SHA512 e7a6d48ef04fbcfcab998e6968130796ab3da1fd9def14ab2ccc713e0956f1f2be3f3a8f680ded5f00cb7ac9ea31d2f94de04aaa039ec5b03cece71f36f14294 WHIRLPOOL 72bc3ce8fa6bb86cbac53e6a0e2a346bc8906cbcec6e43f2f29f56e47d8fc0a2e1c13dbd43e079e77e7c450e1b5d6bc43e10c1c369d597a7d19b5018384e26ff
+AUX imlib-1.9.15.patch 2253 SHA256 43dd12dae7913475f968f35a4fa4b1ef4670451e58c712cbd6e5460f20fc9197 SHA512 4de2fb6e28a6b9da3f474153ef618aad199d1fe6e365670d3d2070afa5b123597f108cac0972454dbcf38b8d84a9a6eb8f011d92a9d754248af41e3abd799b6d WHIRLPOOL d5417943c318d6d9371f5826ccaa6ccee9d84ac128db5ea46ae7a570e9a64fba2de7ff0fbc6a935026defc5ef0c0a45c62ca0459c0f1211c96cf1451cc653bb2
+AUX imlib-security.patch 13040 SHA256 d67a7faa2dba8d361cf25b6fc8125c1da92f25b612bffe909daacdeda577dd57 SHA512 a75537267e9e276920fbc0360cd4832f727c6c9857401889bdb1466f3088c98e5ea2ef84a94a5873a3c12dda0b9aed36a5e2039fece87e51154a3b773d97aa5c WHIRLPOOL 5f892847f9aa86896ecefc50d77575066a4ae1e573a9d631247a104a8d51d1f907cfb405a5d19f3a738912140900843c916661399e469b5f44c5ac5efdab6121
+DIST gtk-1-for-imlib.m4.bz2 2742 SHA256 e024d822d64819e23f7ad7c8283086ffd1e112b859b4669f1624dda1c56d8c47 SHA512 83708af1c7d7cf10960463b785bad096d77e985be5907dd59c73c2cb86c4b89fb5453a02ffddca1519185b91d205dbd96c4c4c1df4da4b67e64bad413cd8a40e WHIRLPOOL 5490f53e1559b9f505cd0ac4b8d0a9c74d8cb323daf4e048b4123725b1f1c12dae936595a0173cdb9d74e2377f6c8942d14e783977d91e6d920342bd5d2e724e
+DIST imlib-1.9.15.tar.bz2 683242 SHA256 4e6a270308a9ae16586bfc133c1a3dfb2e56f431edb66aaa3a80e36e5ed84ce0 SHA512 f50d9141b3c54b44921aa09c0a5ea848aefaa904efdd6da132dace42604671f8dbd3e4b71a596f054f0db4525ba2002864b5e5b21f8805cf1b5514b661ac254a WHIRLPOOL b9127c602a69eb52ab2bbe66733e8d35c8311a6decf569dd3d63dcff8d1d69ca8ed5572fac4ab795685beef46fb039a68325b70e697e7257d4ee92ad2c4edde2
+EBUILD imlib-1.9.15-r4.ebuild 1604 SHA256 724a33ab0f801c4b11df0a144e3a6852a2056f9a165495aa761a16f943fc8ee9 SHA512 d8dde7989de3ab450583b8c9d97e2744f33dc2edf0c216bd9282adf88f28ec89631c3ba92a36c1534d8535bbcae3b4bec15ddcd21ffec83ccc380ce9aaa35f65 WHIRLPOOL 8eb7248133fbbb724edc28c28156330cf030f796d444116c712864f9fadeeacff20c1dc160177c2fef29c9ec2cdc447e7b93d7029a5974250b59b5d1fa8cc204
+MISC ChangeLog 10722 SHA256 05aa3a5742e266a4e3b8b4185d2d436078bb3c45a440312eebe0de7a2e755b2e SHA512 37eb453de8ecd77007bd3a0d6b78ed1cbebad0d538f11c48dc4069e04981a52e0ff3e3b64aecbe53e5800f435af338e02c7855fdb953b9f873e0a8c2e538f14a WHIRLPOOL 43eb2d8799a997abd9ad1e35089da383cf5c189f9b5e3df4e780d8801e16b15a1f5157d3b61f9f507baa4bb7c26e6cd60812f6cf6e299d31a410adb56684614c
+MISC metadata.xml 161 SHA256 e8daadc5e27e3ef1148993b5b48d96e93bc36d798a1f416693f7f8c84be427e1 SHA512 425caf0160f1410ce7bf1d4639020be7f6335152c339edbce80676bff4166f1cab3ae9e13161c47b98dc00741dab3bfa45e9572a3314844476e480f5c2b58d7d WHIRLPOOL ad7cdd3352dbc12cb4181fb5d63b5aee5ce3a151b975c12a96c4a5c91f751736d27282ad22633c7e768230266bce5d17947735d33ef5c5c2341c3f9435b9ebb0
diff --git a/media-libs/imlib/files/imlib-1.9.15-asneeded.patch b/media-libs/imlib/files/imlib-1.9.15-asneeded.patch
new file mode 100644
index 0000000..3b7dd8a
--- /dev/null
+++ b/media-libs/imlib/files/imlib-1.9.15-asneeded.patch
@@ -0,0 +1,38 @@
+This code is broken with the newer libtool. Just dropping it is more or less
+safe as in any case if libtool does not supports shared libraries it'll issue
+an error...
+
+Adding include is necessary for gcc-4.3.
+
+--- configure.in 2008-07-16 09:18:35 +0000
++++ configure.in 2008-07-16 09:18:43 +0000
+@@ -61,6 +61,7 @@
+ AC_TRY_RUN([
+ #include <glib.h>
+ #include <gmodule.h>
++#include <stdlib.h>
+ main ()
+ {
+ if (g_module_supported ())
+@@ -74,21 +74,6 @@
+ CFLAGS="$oCFLAGS"
+ fi
+
+-dnl Now we check to see if our libtool supports shared lib deps
+-dnl (in a rather ugly way even)
+-builddir=`pwd`
+-if $dynworks; then
+- imlib_libtool_config="$builddir/libtool --config"
+- imlib_deplibs_check=`$imlib_libtool_config | \
+- grep '^[[a-z_]]*check[[a-z_]]*_method=[['\''"]]' | \
+- sed 's/.*[['\''"]]\(.*\)[['\''"]]$/\1/'`
+- if test "x$imlib_deplibs_check" = "xnone" || \
+- test "x$imlib_deplibs_check" = "xunknown" || \
+- test "x$imlib_deplibs_check" = "x"; then
+- dynworks=false
+- fi
+-fi
+-
+ if $dynworks; then
+ AC_DEFINE(USE_GMODULE, 1, [ ])
+ GMODULE_LIBS="`glib-config --libs gmodule`"
diff --git a/media-libs/imlib/files/imlib-1.9.15-bpp16-CVE-2007-3568.patch b/media-libs/imlib/files/imlib-1.9.15-bpp16-CVE-2007-3568.patch
new file mode 100644
index 0000000..94595ff
--- /dev/null
+++ b/media-libs/imlib/files/imlib-1.9.15-bpp16-CVE-2007-3568.patch
@@ -0,0 +1,11 @@
+--- Imlib/load.c.orig 2007-08-13 23:06:20.000000000 -0300
++++ Imlib/load.c 2007-08-13 23:06:51.000000000 -0300
+@@ -645,7 +645,7 @@
+ planes = (int)word;
+ fread(&word, 2, 1, file);
+ bpp = (int)word;
+- if (bpp != 1 && bpp != 4 && bpp != 8 && bpp && 16 && bpp != 24 && bpp != 32)
++ if (bpp != 1 && bpp != 4 && bpp != 8 && bpp != 16 && bpp != 24 && bpp != 32)
+ {
+ fprintf(stderr, "IMLIB ERROR: unknown bitdepth in file\n");
+ return NULL;
diff --git a/media-libs/imlib/files/imlib-1.9.15-fix-rendering.patch b/media-libs/imlib/files/imlib-1.9.15-fix-rendering.patch
new file mode 100644
index 0000000..6212ed3
--- /dev/null
+++ b/media-libs/imlib/files/imlib-1.9.15-fix-rendering.patch
@@ -0,0 +1,105 @@
+Michel Dänzer <daenzer AT debian.org>
+
+* The boolean value returned via the last parameter to XShmQueryVersion()
+ isn't honoured everywhere.
+* The init functions that take parameters allow the caller to enable shared
+ pixmaps when they aren't supported (or disabled by configuration files).
+
+
+These result in incorrect rendering when the MIT-SHM extension doesn't support
+shared pixmaps, e.g. using EXA with current versions of Xorg.
+
+http://bugs.gentoo.org/show_bug.cgi?id=197489
+
+diff -up -ru imlib-1.9.15.orig/gdk_imlib/misc.c imlib-1.9.15/gdk_imlib/misc.c
+--- imlib-1.9.15.orig/gdk_imlib/misc.c 2002-03-04 18:06:32.000000000 +0100
++++ imlib-1.9.15/gdk_imlib/misc.c 2007-10-28 14:00:04.000000000 +0100
+@@ -674,6 +674,10 @@ gdk_imlib_init_params(GdkImlibInitParams
+ visual = gdk_rgb_get_visual();
+ id->x.visual = GDK_VISUAL_XVISUAL(visual); /* the visual type */
+ id->x.depth = visual->depth; /* the depth of the screen in bpp */
++
++ id->x.shm = 0;
++ id->x.shmp = 0;
++ id->max_shm = 0;
+ #ifdef HAVE_SHM
+ if (XShmQueryExtension(id->x.disp))
+ {
+@@ -689,17 +693,14 @@ gdk_imlib_init_params(GdkImlibInitParams
+ id->x.last_xim = NULL;
+ id->x.last_sxim = NULL;
+ id->max_shm = 0x7fffffff;
+- if (XShmPixmapFormat(id->x.disp) == ZPixmap)
++ if ((XShmPixmapFormat(id->x.disp) == ZPixmap) &&
++ (pm == True))
+ id->x.shmp = 1;
+ }
+ }
+ }
+- else
+ #endif
+- {
+- id->x.shm = 0;
+- id->x.shmp = 0;
+- }
++
+ id->cache.on_image = 0;
+ id->cache.size_image = 0;
+ id->cache.num_image = 0;
+@@ -935,8 +936,8 @@ gdk_imlib_init_params(GdkImlibInitParams
+ }
+ if (p->flags & PARAMS_SHAREDPIXMAPS)
+ {
+- if (id->x.shm)
+- id->x.shmp = p->sharedpixmaps;
++ if (!p->sharedpixmaps)
++ id->x.shmp = 0;
+ }
+ if (p->flags & PARAMS_PALETTEOVERRIDE)
+ override = p->paletteoverride;
+diff -up -ru imlib-1.9.15.orig/Imlib/misc.c imlib-1.9.15/Imlib/misc.c
+--- imlib-1.9.15.orig/Imlib/misc.c 2004-09-21 02:22:59.000000000 +0200
++++ imlib-1.9.15/Imlib/misc.c 2007-10-28 14:00:23.000000000 +0100
+@@ -675,6 +675,10 @@ Imlib_init_with_params(Display * disp, I
+ id->x.root = DefaultRootWindow(disp); /* the root window id */
+ id->x.visual = DefaultVisual(disp, id->x.screen); /* the visual type */
+ id->x.depth = DefaultDepth(disp, id->x.screen); /* the depth of the screen in bpp */
++
++ id->x.shm = 0;
++ id->x.shmp = 0;
++ id->max_shm = 0;
+ #ifdef HAVE_SHM
+ if (XShmQueryExtension(id->x.disp))
+ {
+@@ -690,17 +694,14 @@ Imlib_init_with_params(Display * disp, I
+ id->x.last_xim = NULL;
+ id->x.last_sxim = NULL;
+ id->max_shm = 0x7fffffff;
+- if (XShmPixmapFormat(id->x.disp) == ZPixmap)
++ if ((XShmPixmapFormat(id->x.disp) == ZPixmap &&
++ (pm == True)))
+ id->x.shmp = 1;
+ }
+ }
+ }
+- else
+ #endif
+- {
+- id->x.shm = 0;
+- id->x.shmp = 0;
+- }
++
+ id->cache.on_image = 0;
+ id->cache.size_image = 0;
+ id->cache.num_image = 0;
+@@ -952,8 +953,8 @@ Imlib_init_with_params(Display * disp, I
+ }
+ if (p->flags & PARAMS_SHAREDPIXMAPS)
+ {
+- if (id->x.shm)
+- id->x.shmp = p->sharedpixmaps;
++ if (!p->sharedpixmaps)
++ id->x.shmp = 0;
+ }
+ if (p->flags & PARAMS_PALETTEOVERRIDE)
+ override = p->paletteoverride;
diff --git a/media-libs/imlib/files/imlib-1.9.15-libpng15.patch b/media-libs/imlib/files/imlib-1.9.15-libpng15.patch
new file mode 100644
index 0000000..7837cd4
--- /dev/null
+++ b/media-libs/imlib/files/imlib-1.9.15-libpng15.patch
@@ -0,0 +1,142 @@
+--- gdk_imlib/io-png.c
++++ gdk_imlib/io-png.c
+@@ -40,13 +40,13 @@
+ return NULL;
+ }
+
+- if (setjmp(png_ptr->jmpbuf))
++ if (setjmp(png_jmpbuf(png_ptr)))
+ {
+ png_destroy_read_struct(&png_ptr, &info_ptr, NULL);
+ return NULL;
+ }
+
+- if (info_ptr->color_type == PNG_COLOR_TYPE_RGB_ALPHA)
++ if (png_get_color_type(png_ptr, info_ptr) == PNG_COLOR_TYPE_RGB_ALPHA)
+ {
+ png_destroy_read_struct(&png_ptr, &info_ptr, NULL);
+ return NULL;
+@@ -275,13 +275,13 @@
+ return NULL;
+ }
+
+- if (setjmp(png_ptr->jmpbuf))
++ if (setjmp(png_jmpbuf(png_ptr)))
+ {
+ png_destroy_read_struct(&png_ptr, &info_ptr, NULL);
+ return NULL;
+ }
+
+- if (info_ptr->color_type == PNG_COLOR_TYPE_RGB_ALPHA)
++ if (png_get_color_type(png_ptr, info_ptr) == PNG_COLOR_TYPE_RGB_ALPHA)
+ {
+ png_destroy_read_struct(&png_ptr, &info_ptr, NULL);
+ return NULL;
+@@ -301,6 +301,9 @@
+ /* Setup Translators */
+ if (color_type == PNG_COLOR_TYPE_PALETTE)
+ png_set_expand(png_ptr);
++ if (color_type == PNG_COLOR_TYPE_GRAY && bit_depth < 8)
++ png_set_expand(png_ptr);
++
+ png_set_strip_16(png_ptr);
+ png_set_packing(png_ptr);
+ if (png_get_valid(png_ptr, info_ptr, PNG_INFO_tRNS))
+@@ -440,13 +443,13 @@
+ return NULL;
+ }
+
+- if (setjmp(png_ptr->jmpbuf))
++ if (setjmp(png_jmpbuf(png_ptr)))
+ {
+ png_destroy_read_struct(&png_ptr, &info_ptr, NULL);
+ return NULL;
+ }
+
+- if (info_ptr->color_type == PNG_COLOR_TYPE_RGB_ALPHA)
++ if (png_get_color_type(png_ptr, info_ptr) == PNG_COLOR_TYPE_RGB_ALPHA)
+ {
+ png_destroy_read_struct(&png_ptr, &info_ptr, NULL);
+ return NULL;
+@@ -635,7 +638,7 @@
+ png_destroy_write_struct(&png_ptr, (png_infopp) NULL);
+ return 0;
+ }
+- if (setjmp(png_ptr->jmpbuf))
++ if (setjmp(png_jmpbuf(png_ptr)))
+ {
+ fclose(f);
+ png_destroy_write_struct(&png_ptr, (png_infopp) NULL);
+--- Imlib/load.c
++++ Imlib/load.c
+@@ -197,12 +197,12 @@
+ png_destroy_read_struct(&png_ptr, NULL, NULL);
+ return NULL;
+ }
+- if (setjmp(png_ptr->jmpbuf))
++ if (setjmp(png_jmpbuf(png_ptr)))
+ {
+ png_destroy_read_struct(&png_ptr, &info_ptr, NULL);
+ return NULL;
+ }
+- if (info_ptr->color_type == PNG_COLOR_TYPE_RGB_ALPHA)
++ if (png_get_color_type(png_ptr, info_ptr) == PNG_COLOR_TYPE_RGB_ALPHA)
+ {
+ png_destroy_read_struct(&png_ptr, &info_ptr, NULL);
+ return NULL;
+@@ -260,7 +260,8 @@
+ png_read_image(png_ptr, lines);
+ png_destroy_read_struct(&png_ptr, &info_ptr, NULL);
+ ptr = data;
+- if (color_type == PNG_COLOR_TYPE_GRAY_ALPHA)
++ if (color_type == PNG_COLOR_TYPE_GRAY
++ || color_type == PNG_COLOR_TYPE_GRAY_ALPHA)
+ {
+ for (y = 0; y < *h; y++)
+ {
+@@ -285,6 +286,7 @@
+ }
+ }
+ }
++#if 0
+ else if (color_type == PNG_COLOR_TYPE_GRAY)
+ {
+ for (y = 0; y < *h; y++)
+@@ -300,6 +302,7 @@
+ }
+ }
+ }
++#endif
+ else
+ {
+ for (y = 0; y < *h; y++)
+--- Imlib/save.c
++++ Imlib/save.c
+@@ -342,7 +342,7 @@
+ png_destroy_write_struct(&png_ptr, (png_infopp) NULL);
+ return 0;
+ }
+- if (setjmp(png_ptr->jmpbuf))
++ if (setjmp(png_jmpbuf(png_ptr)))
+ {
+ fclose(f);
+ png_destroy_write_struct(&png_ptr, (png_infopp) NULL);
+--- Imlib/utils.c
++++ Imlib/utils.c
+@@ -1981,14 +1981,13 @@
+ png_destroy_read_struct(&png_ptr, NULL, NULL);
+ return NULL;
+ }
+-
+- if (setjmp(png_ptr->jmpbuf))
++ if (setjmp(png_jmpbuf(png_ptr)))
+ {
+ png_destroy_read_struct(&png_ptr, &info_ptr, NULL);
+ return NULL;
+ }
+
+- if (info_ptr->color_type == PNG_COLOR_TYPE_RGB_ALPHA)
++ if (png_get_color_type(png_ptr, info_ptr) == PNG_COLOR_TYPE_RGB_ALPHA)
+ {
+ png_destroy_read_struct(&png_ptr, &info_ptr, NULL);
+ return NULL;
diff --git a/media-libs/imlib/files/imlib-1.9.15.patch b/media-libs/imlib/files/imlib-1.9.15.patch
new file mode 100644
index 0000000..c78aea9
--- /dev/null
+++ b/media-libs/imlib/files/imlib-1.9.15.patch
@@ -0,0 +1,70 @@
+diff -ur imlib-1.9.15.orig/configure.in imlib-1.9.15/configure.in
+--- imlib-1.9.15.orig/configure.in 2004-09-23 04:13:45.000000000 +0300
++++ imlib-1.9.15/configure.in 2007-02-05 23:43:18.000000000 +0200
+@@ -17,11 +17,26 @@
+ dnl incase it is broken for example.
+ AC_ARG_ENABLE(shm, [ --enable-shm support shared memory if available [default=yes]], echo $enable_shm, enable_shm="yes")
+
++AC_ARG_ENABLE(gdk, [ --enable-gdk enable gdk_imlib compilation [default=yes]],[
++ if test x$enableval = xyes; then
++ disable_gdk="no"
++ else
++ disable_gdk="yes"
++ fi],disable_gdk=no)
++
++if test x$disable_gdk = xno; then
++ AC_MSG_RESULT(no)
++
+ AM_PATH_GTK(1.2.1,[
+ GDK_IMLIB="gdk_imlib utils"],[
+ GDK_IMLIB=""
+ AC_MSG_WARN([*** gdk_imlib will not be built ***])])
+
++else
++ AC_MSG_RESULT(yes)
++ GDK_IMLIB=""
++fi
++
+ AC_MSG_CHECKING(whether to build gmodulized imlib)
+
+ AC_ARG_ENABLE(modules, [ --disable-modules Disables dynamic module loading],[
+diff -ur imlib-1.9.15.orig/imlib-config.in imlib-1.9.15/imlib-config.in
+--- imlib-1.9.15.orig/imlib-config.in 2004-08-27 19:03:11.000000000 +0300
++++ imlib-1.9.15/imlib-config.in 2007-02-05 23:46:34.000000000 +0200
+@@ -46,15 +46,9 @@
+ echo @VERSION@
+ ;;
+ --cflags)
+- if test @includedir@ != /usr/include ; then
+- includes=-I@includedir@
+- fi
+ echo $includes @X_CFLAGS@
+ ;;
+ --cflags-gdk)
+- if test @includedir@ != /usr/include ; then
+- includes=-I@includedir@
+- fi
+ echo `@GTK_CONFIG@ --cflags` $includes @X_CFLAGS@
+ ;;
+ --libs)
+diff -ur imlib-1.9.15.orig/imlib.m4 imlib-1.9.15/imlib.m4
+--- imlib-1.9.15.orig/imlib.m4 2004-08-27 19:03:11.000000000 +0300
++++ imlib-1.9.15/imlib.m4 2007-02-05 23:42:57.000000000 +0200
+@@ -6,7 +6,7 @@
+ dnl AM_PATH_IMLIB([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
+ dnl Test for IMLIB, and define IMLIB_CFLAGS and IMLIB_LIBS
+ dnl
+-AC_DEFUN(AM_PATH_IMLIB,
++AC_DEFUN([AM_PATH_IMLIB],
+ [dnl
+ dnl Get the cflags and libraries from the imlib-config script
+ dnl
+@@ -164,7 +164,7 @@
+ ])
+
+ # Check for gdk-imlib
+-AC_DEFUN(AM_PATH_GDK_IMLIB,
++AC_DEFUN([AM_PATH_GDK_IMLIB],
+ [dnl
+ dnl Get the cflags and libraries from the imlib-config script
+ dnl
diff --git a/media-libs/imlib/files/imlib-security.patch b/media-libs/imlib/files/imlib-security.patch
new file mode 100644
index 0000000..c820270
--- /dev/null
+++ b/media-libs/imlib/files/imlib-security.patch
@@ -0,0 +1,510 @@
+diff -urN imlib-1.9.13.orig/Imlib/load.c imlib-1.9.13/Imlib/load.c
+--- imlib-1.9.13.orig/Imlib/load.c Wed Mar 13 19:06:29 2002
++++ imlib-1.9.13/Imlib/load.c Thu Sep 16 17:21:01 2004
+@@ -4,6 +4,8 @@
+ #include "Imlib_private.h"
+ #include <setjmp.h>
+
++#define G_MAXINT ((int) 0x7fffffff)
++
+ /* Split the ID - damages input */
+
+ static char *
+@@ -41,13 +43,17 @@
+
+ /*
+ * Make sure we don't wrap on our memory allocations
++ * we check G_MAXINT/4 because rend.c malloc's w * h * bpp
++ * + 3 is safety margin
+ */
+
+ void * _imlib_malloc_image(unsigned int w, unsigned int h)
+ {
+- if( w > 32767 || h > 32767)
+- return NULL;
+- return malloc(w * h * 3);
++ if (w <= 0 || w > 32767 ||
++ h <= 0 || h > 32767 ||
++ h >= (G_MAXINT/4 - 1) / w)
++ return NULL;
++ return malloc(w * h * 3 + 3);
+ }
+
+ #ifdef HAVE_LIBJPEG
+@@ -360,7 +366,9 @@
+ npix = ww * hh;
+ *w = (int)ww;
+ *h = (int)hh;
+- if(ww > 32767 || hh > 32767)
++ if (ww <= 0 || ww > 32767 ||
++ hh <= 0 || hh > 32767 ||
++ hh >= (G_MAXINT/sizeof(uint32)) / ww)
+ {
+ TIFFClose(tif);
+ return NULL;
+@@ -463,7 +471,7 @@
+ }
+ *w = gif->Image.Width;
+ *h = gif->Image.Height;
+- if (*h > 32767 || *w > 32767)
++ if (*h <= 0 || *h > 32767 || *w <= 0 || *w > 32767)
+ {
+ return NULL;
+ }
+@@ -965,7 +973,12 @@
+ comment = 0;
+ quote = 0;
+ context = 0;
++ memset(lookup, 0, sizeof(lookup));
++
+ line = malloc(lsz);
++ if (!line)
++ return NULL;
++
+ while (!done)
+ {
+ pc = c;
+@@ -994,25 +1007,25 @@
+ {
+ /* Header */
+ sscanf(line, "%i %i %i %i", w, h, &ncolors, &cpp);
+- if (ncolors > 32766)
++ if (ncolors <= 0 || ncolors > 32766)
+ {
+ fprintf(stderr, "IMLIB ERROR: XPM files wth colors > 32766 not supported\n");
+ free(line);
+ return NULL;
+ }
+- if (cpp > 5)
++ if (cpp <= 0 || cpp > 5)
+ {
+ fprintf(stderr, "IMLIB ERROR: XPM files with characters per pixel > 5 not supported\n");
+ free(line);
+ return NULL;
+ }
+- if (*w > 32767)
++ if (*w <= 0 || *w > 32767)
+ {
+ fprintf(stderr, "IMLIB ERROR: Image width > 32767 pixels for file\n");
+ free(line);
+ return NULL;
+ }
+- if (*h > 32767)
++ if (*h <= 0 || *h > 32767)
+ {
+ fprintf(stderr, "IMLIB ERROR: Image height > 32767 pixels for file\n");
+ free(line);
+@@ -1045,11 +1058,13 @@
+ {
+ int slen;
+ int hascolor, iscolor;
++ int space;
+
+ iscolor = 0;
+ hascolor = 0;
+ tok[0] = 0;
+ col[0] = 0;
++ space = sizeof(col) - 1;
+ s[0] = 0;
+ len = strlen(line);
+ strncpy(cmap[j].str, line, cpp);
+@@ -1072,10 +1087,10 @@
+ {
+ if (k >= len)
+ {
+- if (col[0])
+- strcat(col, " ");
+- if (strlen(col) + strlen(s) < sizeof(col))
+- strcat(col, s);
++ if (col[0] && space > 0)
++ strcat(col, " "), space -= 1;
++ if (slen <= space)
++ strcat(col, s), space -= slen;
+ }
+ if (col[0])
+ {
+@@ -1105,14 +1120,17 @@
+ }
+ }
+ }
+- strcpy(tok, s);
++ if (slen < sizeof(tok));
++ strcpy(tok, s);
+ col[0] = 0;
++ space = sizeof(col) - 1;
+ }
+ else
+ {
+- if (col[0])
+- strcat(col, " ");
+- strcat(col, s);
++ if (col[0] && space > 0)
++ strcat(col, " "), space -=1;
++ if (slen <= space)
++ strcat(col, s), space -= slen;
+ }
+ }
+ }
+@@ -1341,12 +1359,12 @@
+ sscanf(s, "%i %i", w, h);
+ a = *w;
+ b = *h;
+- if (a > 32767)
++ if (a <= 0 || a > 32767)
+ {
+ fprintf(stderr, "IMLIB ERROR: Image width > 32767 pixels for file\n");
+ return NULL;
+ }
+- if (b > 32767)
++ if (b <= 0 || b > 32767)
+ {
+ fprintf(stderr, "IMLIB ERROR: Image height > 32767 pixels for file\n");
+ return NULL;
+diff -urN imlib-1.9.13.orig/Imlib/utils.c imlib-1.9.13/Imlib/utils.c
+--- imlib-1.9.13.orig/Imlib/utils.c Mon Mar 4 17:45:28 2002
++++ imlib-1.9.13/Imlib/utils.c Thu Sep 16 17:21:15 2004
+@@ -1496,36 +1496,56 @@
+ context = 0;
+ ptr = NULL;
+ end = NULL;
++ memset(lookup, 0, sizeof(lookup));
+
+ while (!done)
+ {
+ line = data[count++];
++ if (!line)
++ break;
++ line = strdup(line);
++ if (!line)
++ break;
++ len = strlen(line);
++ for (i = 0; i < len; ++i)
++ {
++ c = line[i];
++ if (c < 32)
++ line[i] = 32;
++ else if (c > 127)
++ line[i] = 127;
++ }
++
+ if (context == 0)
+ {
+ /* Header */
+ sscanf(line, "%i %i %i %i", &w, &h, &ncolors, &cpp);
+- if (ncolors > 32766)
++ if (ncolors <= 0 || ncolors > 32766)
+ {
+ fprintf(stderr, "IMLIB ERROR: XPM data wth colors > 32766 not supported\n");
+ free(im);
++ free(line);
+ return NULL;
+ }
+- if (cpp > 5)
++ if (cpp <= 0 || cpp > 5)
+ {
+ fprintf(stderr, "IMLIB ERROR: XPM data with characters per pixel > 5 not supported\n");
+ free(im);
++ free(line);
+ return NULL;
+ }
+- if (w > 32767)
++ if (w <= 0 || w > 32767)
+ {
+ fprintf(stderr, "IMLIB ERROR: Image width > 32767 pixels for data\n");
+ free(im);
++ free(line);
+ return NULL;
+ }
+- if (h > 32767)
++ if (h <= 0 || h > 32767)
+ {
+ fprintf(stderr, "IMLIB ERROR: Image height > 32767 pixels for data\n");
+ free(im);
++ free(line);
+ return NULL;
+ }
+ cmap = malloc(sizeof(struct _cmap) * ncolors);
+@@ -1533,6 +1553,7 @@
+ if (!cmap)
+ {
+ free(im);
++ free(line);
+ return NULL;
+ }
+ im->rgb_width = w;
+@@ -1542,6 +1563,7 @@
+ {
+ free(cmap);
+ free(im);
++ free(line);
+ return NULL;
+ }
+ im->alpha_data = NULL;
+@@ -1817,6 +1839,7 @@
+ }
+ if ((ptr) && ((ptr - im->rgb_data) >= w * h * 3))
+ done = 1;
++ free(line);
+ }
+ if (!transp)
+ {
+diff -urN imlib-1.9.13.orig/gdk_imlib/io-gif.c imlib-1.9.13/gdk_imlib/io-gif.c
+--- imlib-1.9.13.orig/gdk_imlib/io-gif.c Mon Mar 4 17:26:51 2002
++++ imlib-1.9.13/gdk_imlib/io-gif.c Thu Sep 16 16:11:31 2004
+@@ -55,7 +55,7 @@
+ }
+ *w = gif->Image.Width;
+ *h = gif->Image.Height;
+- if(*h > 32767 || *w > 32767)
++ if(*h <= 0 || *h > 32767 || *w <= 0 || *w > 32767)
+ {
+ return NULL;
+ }
+diff -urN imlib-1.9.13.orig/gdk_imlib/io-ppm.c imlib-1.9.13/gdk_imlib/io-ppm.c
+--- imlib-1.9.13.orig/gdk_imlib/io-ppm.c Mon Mar 4 17:26:51 2002
++++ imlib-1.9.13/gdk_imlib/io-ppm.c Thu Sep 16 16:13:13 2004
+@@ -53,12 +53,12 @@
+ sscanf(s, "%i %i", w, h);
+ a = *w;
+ b = *h;
+- if (a > 32767)
++ if (a <= 0 || a > 32767)
+ {
+ fprintf(stderr, "gdk_imlib ERROR: Image width > 32767 pixels for file\n");
+ return NULL;
+ }
+- if (b > 32767)
++ if (b <= 0 || b > 32767)
+ {
+ fprintf(stderr, "gdk_imlib ERROR: Image height > 32767 pixels for file\n");
+ return NULL;
+diff -urN imlib-1.9.13.orig/gdk_imlib/io-tiff.c imlib-1.9.13/gdk_imlib/io-tiff.c
+--- imlib-1.9.13.orig/gdk_imlib/io-tiff.c Mon Mar 4 17:26:51 2002
++++ imlib-1.9.13/gdk_imlib/io-tiff.c Thu Sep 16 16:13:57 2004
+@@ -36,7 +36,9 @@
+ npix = ww * hh;
+ *w = (int)ww;
+ *h = (int)hh;
+- if(ww > 32767 || hh > 32767)
++ if (ww <= 0 || ww > 32767 ||
++ hh <= 0 || hh > 32767 ||
++ hh >= (G_MAXINT/sizeof(uint32)) / ww)
+ {
+ TIFFClose(tif);
+ return NULL;
+diff -urN imlib-1.9.13.orig/gdk_imlib/io-xpm.c imlib-1.9.13/gdk_imlib/io-xpm.c
+--- imlib-1.9.13.orig/gdk_imlib/io-xpm.c Mon Mar 4 17:26:51 2002
++++ imlib-1.9.13/gdk_imlib/io-xpm.c Thu Sep 16 17:08:24 2004
+@@ -40,8 +40,12 @@
+ context = 0;
+ i = j = 0;
+ cmap = NULL;
++ memset(lookup, 0, sizeof(lookup));
+
+ line = malloc(lsz);
++ if (!line)
++ return NULL;
++
+ while (!done)
+ {
+ pc = c;
+@@ -70,25 +74,25 @@
+ {
+ /* Header */
+ sscanf(line, "%i %i %i %i", w, h, &ncolors, &cpp);
+- if (ncolors > 32766)
++ if (ncolors <= 0 || ncolors > 32766)
+ {
+ fprintf(stderr, "gdk_imlib ERROR: XPM files wth colors > 32766 not supported\n");
+ free(line);
+ return NULL;
+ }
+- if (cpp > 5)
++ if (cpp <= 0 || cpp > 5)
+ {
+ fprintf(stderr, "gdk_imlib ERROR: XPM files with characters per pixel > 5 not supported\n");
+ free(line);
+ return NULL;
+ }
+- if (*w > 32767)
++ if (*w <= 0 || *w > 32767)
+ {
+ fprintf(stderr, "gdk_imlib ERROR: Image width > 32767 pixels for file\n");
+ free(line);
+ return NULL;
+ }
+- if (*h > 32767)
++ if (*h <= 0 || *h > 32767)
+ {
+ fprintf(stderr, "gdk_imlib ERROR: Image height > 32767 pixels for file\n");
+ free(line);
+@@ -120,11 +124,13 @@
+ {
+ int slen;
+ int hascolor, iscolor;
++ int space;
+
+ hascolor = 0;
+ iscolor = 0;
+ tok[0] = 0;
+ col[0] = 0;
++ space = sizeof(col) - 1;
+ s[0] = 0;
+ len = strlen(line);
+ strncpy(cmap[j].str, line, cpp);
+@@ -147,10 +153,10 @@
+ {
+ if (k >= len)
+ {
+- if (col[0])
+- strcat(col, " ");
+- if (strlen(col) + strlen(s) < sizeof(col))
+- strcat(col, s);
++ if (col[0] && space > 0)
++ strncat(col, " ", space), space -= 1;
++ if (slen <= space)
++ strcat(col, s), space -= slen;
+ }
+ if (col[0])
+ {
+@@ -180,14 +186,17 @@
+ }
+ }
+ }
+- strcpy(tok, s);
++ if (slen < sizeof(tok))
++ strcpy(tok, s);
+ col[0] = 0;
++ space = sizeof(col) - 1;
+ }
+ else
+ {
+- if (col[0])
+- strcat(col, " ");
+- strcat(col, s);
++ if (col[0] && space > 0)
++ strcat(col, " "), space -= 1;
++ if (slen <= space)
++ strcat(col, s), space -= slen;
+ }
+ }
+ }
+diff -urN imlib-1.9.13.orig/gdk_imlib/misc.c imlib-1.9.13/gdk_imlib/misc.c
+--- imlib-1.9.13.orig/gdk_imlib/misc.c Mon Mar 4 17:26:51 2002
++++ imlib-1.9.13/gdk_imlib/misc.c Thu Sep 16 16:35:32 2004
+@@ -1355,11 +1355,16 @@
+
+ /*
+ * Make sure we don't wrap on our memory allocations
++ * we check G_MAX_INT/4 because rend.c malloc's w * h * bpp
++ * + 3 is safety margin
+ */
+
+ void *_gdk_malloc_image(unsigned int w, unsigned int h)
+ {
+- if( w > 32767 || h > 32767)
++ if (w <= 0 || w > 32767 ||
++ h <= 0 || h > 32767 ||
++ h >= (G_MAXINT/4 - 1) / w)
+ return NULL;
+- return malloc(w * h * 3);
++ return malloc(w * h * 3 + 3);
+ }
++
+diff -urN imlib-1.9.13.orig/gdk_imlib/utils.c imlib-1.9.13/gdk_imlib/utils.c
+--- imlib-1.9.13.orig/gdk_imlib/utils.c Mon Mar 4 17:26:51 2002
++++ imlib-1.9.13/gdk_imlib/utils.c Thu Sep 16 17:28:35 2004
+@@ -1236,36 +1236,56 @@
+ context = 0;
+ ptr = NULL;
+ end = NULL;
++ memset(lookup, 0, sizeof(lookup));
+
+ while (!done)
+ {
+ line = data[count++];
++ if (!line)
++ break;
++ line = strdup(line);
++ if (!line)
++ break;
++ len = strlen(line);
++ for (i = 0; i < len; ++i)
++ {
++ c = line[i];
++ if (c < 32)
++ line[i] = 32;
++ else if (c > 127)
++ line[i] = 127;
++ }
++
+ if (context == 0)
+ {
+ /* Header */
+ sscanf(line, "%i %i %i %i", &w, &h, &ncolors, &cpp);
+- if (ncolors > 32766)
++ if (ncolors <= 0 || ncolors > 32766)
+ {
+ fprintf(stderr, "gdk_imlib ERROR: XPM data wth colors > 32766 not supported\n");
+ free(im);
++ free(line);
+ return NULL;
+ }
+- if (cpp > 5)
++ if (cpp <= 0 || cpp > 5)
+ {
+ fprintf(stderr, "gdk_imlib ERROR: XPM data with characters per pixel > 5 not supported\n");
+ free(im);
++ free(line);
+ return NULL;
+ }
+- if (w > 32767)
++ if (w <= 0 || w > 32767)
+ {
+ fprintf(stderr, "gdk_imlib ERROR: Image width > 32767 pixels for data\n");
+ free(im);
++ free(line);
+ return NULL;
+ }
+- if (h > 32767)
++ if (h <= 0 || h > 32767)
+ {
+ fprintf(stderr, "gdk_imlib ERROR: Image height > 32767 pixels for data\n");
+ free(im);
++ free(line);
+ return NULL;
+ }
+ cmap = malloc(sizeof(struct _cmap) * ncolors);
+@@ -1273,6 +1293,7 @@
+ if (!cmap)
+ {
+ free(im);
++ free(line);
+ return NULL;
+ }
+ im->rgb_width = w;
+@@ -1282,6 +1303,7 @@
+ {
+ free(cmap);
+ free(im);
++ free(line);
+ return NULL;
+ }
+ im->alpha_data = NULL;
+@@ -1355,7 +1377,7 @@
+ strcpy(col + colptr, " ");
+ colptr++;
+ }
+- if (colptr + ls <= sizeof(col))
++ if (colptr + ls < sizeof(col))
+ {
+ strcpy(col + colptr, s);
+ colptr += ls;
+@@ -1558,6 +1580,7 @@
+ }
+ if ((ptr) && ((ptr - im->rgb_data) >= w * h * 3))
+ done = 1;
++ free(line);
+ }
+ if (!transp)
+ {
diff --git a/media-libs/imlib/imlib-1.9.15-r4.ebuild b/media-libs/imlib/imlib-1.9.15-r4.ebuild
new file mode 100644
index 0000000..0c7e9ba
--- /dev/null
+++ b/media-libs/imlib/imlib-1.9.15-r4.ebuild
@@ -0,0 +1,61 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI=2
+inherit autotools eutils
+
+PVP=(${PV//[-\._]/ })
+DESCRIPTION="Image loading and rendering library"
+HOMEPAGE="http://ftp.acc.umu.se/pub/GNOME/sources/imlib/1.9/"
+SRC_URI="mirror://gnome/sources/${PN}/${PVP[0]}.${PVP[1]}/${P}.tar.bz2
+ mirror://gentoo/gtk-1-for-imlib.m4.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 sh sparc x86 ~x86-fbsd"
+IUSE="doc static-libs"
+
+RDEPEND=">=media-libs/tiff-3.5.5
+ >=media-libs/giflib-4.1.0
+ >=media-libs/libpng-1.2.1
+ virtual/jpeg
+ x11-libs/libICE
+ x11-libs/libSM
+ x11-libs/libXext"
+DEPEND="${RDEPEND}"
+
+src_prepare() {
+ # Fix aclocal underquoted definition warnings.
+ # Conditionalize gdk functions for bug 40453.
+ # Fix imlib-config for bug 3425.
+ epatch "${FILESDIR}"/${P}.patch
+ epatch "${FILESDIR}"/${PN}-security.patch #security #72681
+ epatch "${FILESDIR}"/${P}-bpp16-CVE-2007-3568.patch # security #201887
+ epatch "${FILESDIR}"/${P}-fix-rendering.patch #197489
+ epatch "${FILESDIR}"/${P}-asneeded.patch #207638
+ epatch "${FILESDIR}"/${P}-libpng15.patch #357167
+
+ mkdir m4 && cp "${WORKDIR}"/gtk-1-for-imlib.m4 m4
+
+ AT_M4DIR="m4" eautoreconf
+}
+
+src_configure() {
+ econf \
+ --sysconfdir=/etc/imlib \
+ $(use_enable static-libs static) \
+ --disable-gdk \
+ --disable-gtktest
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die
+
+ dodoc AUTHORS ChangeLog README
+ use doc && dohtml doc/*
+
+ # Punt unused files
+ rm -f "${D}"/usr/lib*/pkgconfig/imlibgdk.pc
+ find "${D}" -name '*.la' -exec rm -f {} +
+}
diff --git a/media-libs/imlib/metadata.xml b/media-libs/imlib/metadata.xml
new file mode 100644
index 0000000..e770d1b
--- /dev/null
+++ b/media-libs/imlib/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>graphics</herd>
+</pkgmetadata>