From 9fc0e57bafd90b6fd8abdd220bb4438017abace8 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Sun, 31 Dec 2006 13:37:20 +0000 Subject: [PATCH] Apply fix from dev version of libpng to plug a memleak #159216. Package-Manager: portage-2.1.2_rc4-r3 --- media-libs/libpng/ChangeLog | 8 ++- media-libs/libpng/Manifest | 25 ++++++--- .../libpng/files/digest-libpng-1.2.14-r1 | 6 +++ .../libpng/files/libpng-1.2.14-mem-leak.patch | 20 +++++++ media-libs/libpng/libpng-1.2.14-r1.ebuild | 52 +++++++++++++++++++ 5 files changed, 103 insertions(+), 8 deletions(-) create mode 100644 media-libs/libpng/files/digest-libpng-1.2.14-r1 create mode 100644 media-libs/libpng/files/libpng-1.2.14-mem-leak.patch create mode 100644 media-libs/libpng/libpng-1.2.14-r1.ebuild diff --git a/media-libs/libpng/ChangeLog b/media-libs/libpng/ChangeLog index 915b37cd9a94..a99e68d87171 100644 --- a/media-libs/libpng/ChangeLog +++ b/media-libs/libpng/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for media-libs/libpng # Copyright 1999-2006 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/media-libs/libpng/ChangeLog,v 1.103 2006/11/28 03:16:37 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/media-libs/libpng/ChangeLog,v 1.104 2006/12/31 13:37:20 vapier Exp $ + +*libpng-1.2.14-r1 (31 Dec 2006) + + 31 Dec 2006; Mike Frysinger + +files/libpng-1.2.14-mem-leak.patch, +libpng-1.2.14-r1.ebuild: + Apply fix from dev version of libpng to plug a memleak #159216. *libpng-1.2.14 (28 Nov 2006) diff --git a/media-libs/libpng/Manifest b/media-libs/libpng/Manifest index 795d01426948..53d9e67b861a 100644 --- a/media-libs/libpng/Manifest +++ b/media-libs/libpng/Manifest @@ -9,6 +9,10 @@ AUX libpng-1.2.12-no-asm.patch 1885 RMD160 19da2d7ad292c01b120dbb8d5c817b1db8537 MD5 c0960ea4127d955b2767930f001007be files/libpng-1.2.12-no-asm.patch 1885 RMD160 19da2d7ad292c01b120dbb8d5c817b1db8537d57 files/libpng-1.2.12-no-asm.patch 1885 SHA256 293b782f43787a57f0f60aae3198efead8099df67652fe9026a2ff3266e2bbfc files/libpng-1.2.12-no-asm.patch 1885 +AUX libpng-1.2.14-mem-leak.patch 565 RMD160 4b00f5d04d7c90b484358566668438336c297618 SHA1 10b0488b0a1eed2f49b6ad3b7ea7bc5f51ecbd9f SHA256 a789985bc858b246dd80185ba8310185880b0a5b51418b7e31c8418ca81b1c34 +MD5 7ffe44e32fb9136f58eacbc7dcc9751c files/libpng-1.2.14-mem-leak.patch 565 +RMD160 4b00f5d04d7c90b484358566668438336c297618 files/libpng-1.2.14-mem-leak.patch 565 +SHA256 a789985bc858b246dd80185ba8310185880b0a5b51418b7e31c8418ca81b1c34 files/libpng-1.2.14-mem-leak.patch 565 DIST libpng-1.2.12.tar.bz2 621295 RMD160 c5c702869d73732d5e91e53a9e380fcbf89f3ae2 SHA1 44bd6821607ba09ac500279363871ad5974a01b5 SHA256 7d06103ce32bffa39730d1c12c4b4dcfd50a8f1c18d2462807cfe7c0c3ca0e64 DIST libpng-1.2.13.tar.bz2 621104 RMD160 3edb65770d365c0512fd22aed90ecc11e9bb5512 SHA1 e0c7d80b1300ad632b88982ee832f21ac35551ca SHA256 4e36607065911bddb3eb942511878b1f7b691c6eee6de29b01e5b2a979978955 DIST libpng-1.2.14.tar.bz2 620379 RMD160 37c91bc411a8c4bc467bb8b229a4e39bcca4bd8a SHA1 3cf3efcada7896982b165ea34ed6b399ef7fb4af SHA256 2678855a235ed02d5b30831a70dff84d5b562c5de388f1323bd680ac5cdd1722 @@ -21,14 +25,18 @@ EBUILD libpng-1.2.13.ebuild 1328 RMD160 67cc2285e08e7365a6cd2ce08dccf7d4f43ee2f8 MD5 95f13e1d9ea4666cf61d017b66f55658 libpng-1.2.13.ebuild 1328 RMD160 67cc2285e08e7365a6cd2ce08dccf7d4f43ee2f8 libpng-1.2.13.ebuild 1328 SHA256 e8d5f8a36eb78a38e466c8861db8ab15c58858a3940cae3bc0f992a486ae3717 libpng-1.2.13.ebuild 1328 +EBUILD libpng-1.2.14-r1.ebuild 1394 RMD160 922b90cfd8ddae35ffa78ff1768b3617da3c6572 SHA1 4f45ca1a344d69c0a79b5c852fd76180f1c37c29 SHA256 6b44feb78559aa8c43ff028b1cca611974dcd27cd108a7286d690d743df87034 +MD5 f27c6ea4f9f91644189df4f8bdbf2fc4 libpng-1.2.14-r1.ebuild 1394 +RMD160 922b90cfd8ddae35ffa78ff1768b3617da3c6572 libpng-1.2.14-r1.ebuild 1394 +SHA256 6b44feb78559aa8c43ff028b1cca611974dcd27cd108a7286d690d743df87034 libpng-1.2.14-r1.ebuild 1394 EBUILD libpng-1.2.14.ebuild 1336 RMD160 ebef8594facf474b8e39ab2e4d60c6d3358c45d2 SHA1 7357c6c9234e4d6d9b39e5e6e93f2521d1476a59 SHA256 9abe367430af7ac86402455f870fc807776d40a85fc805745a626e84a6a0b9c6 MD5 ac707fea1961fcc52448b15741375800 libpng-1.2.14.ebuild 1336 RMD160 ebef8594facf474b8e39ab2e4d60c6d3358c45d2 libpng-1.2.14.ebuild 1336 SHA256 9abe367430af7ac86402455f870fc807776d40a85fc805745a626e84a6a0b9c6 libpng-1.2.14.ebuild 1336 -MISC ChangeLog 15227 RMD160 4464d7196e07e078c5f93658d618b32dd22c80f9 SHA1 f713aff92aaa769311be43cdb2ad251e62062abc SHA256 e624199469504d1c0a45c84505968b61c7a0172bbb49176eb26275956d94571f -MD5 27dfc15996d79da04c04d5ec93872951 ChangeLog 15227 -RMD160 4464d7196e07e078c5f93658d618b32dd22c80f9 ChangeLog 15227 -SHA256 e624199469504d1c0a45c84505968b61c7a0172bbb49176eb26275956d94571f ChangeLog 15227 +MISC ChangeLog 15442 RMD160 5ad9c2baf8cd870ed4729e1b84ed4fe41a5e1486 SHA1 28974cbf652ded9e96bbcb81f4cc14b49b4b4ec2 SHA256 02870914345ec0d5621ca63afe87303012178a21274d293cd3c8f72f59e39490 +MD5 5a8ab473b6c2bed127c13929c9473eaa ChangeLog 15442 +RMD160 5ad9c2baf8cd870ed4729e1b84ed4fe41a5e1486 ChangeLog 15442 +SHA256 02870914345ec0d5621ca63afe87303012178a21274d293cd3c8f72f59e39490 ChangeLog 15442 MISC metadata.xml 164 RMD160 f43cbec30b7074319087c9acffdb9354b17b0db3 SHA1 9c213f5803676c56439df3716be07d6692588856 SHA256 f5f2891f2a4791cd31350bb2bb572131ad7235cd0eeb124c9912c187ac10ce92 MD5 9a09f8d531c582e78977dbfd96edc1f2 metadata.xml 164 RMD160 f43cbec30b7074319087c9acffdb9354b17b0db3 metadata.xml 164 @@ -42,10 +50,13 @@ SHA256 2832b3ed3dd5c0c50e2645051b26ddee3878f096969f1d29cf1ea268f7feb77b files/di MD5 a6f991df3639ab6e09a0d5ec7e3c49d4 files/digest-libpng-1.2.14 476 RMD160 82399bbe06301ddd5d87135f92e197bee3f66d17 files/digest-libpng-1.2.14 476 SHA256 d28977cad68514c3b85207013a8ae2d8e576f6de273800f7e32aceae1c798e13 files/digest-libpng-1.2.14 476 +MD5 a6f991df3639ab6e09a0d5ec7e3c49d4 files/digest-libpng-1.2.14-r1 476 +RMD160 82399bbe06301ddd5d87135f92e197bee3f66d17 files/digest-libpng-1.2.14-r1 476 +SHA256 d28977cad68514c3b85207013a8ae2d8e576f6de273800f7e32aceae1c798e13 files/digest-libpng-1.2.14-r1 476 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.1 (GNU/Linux) -iD8DBQFFl7je8bi6rjpTunYRArITAJ9ijBWAGgxDYWEJHQcUbUsq4vla4wCcDvIY -SWr7lhqYzCE/sMjIugDh2Ik= -=7oB3 +iD8DBQFFl71W8bi6rjpTunYRArXoAKDUfvLvn5rUtbyTaSX87uu5VBGi5QCfW/sx +aaa5FPnFY5QwZP9tClV3iY4= +=umA8 -----END PGP SIGNATURE----- diff --git a/media-libs/libpng/files/digest-libpng-1.2.14-r1 b/media-libs/libpng/files/digest-libpng-1.2.14-r1 new file mode 100644 index 000000000000..5ff5683f03fd --- /dev/null +++ b/media-libs/libpng/files/digest-libpng-1.2.14-r1 @@ -0,0 +1,6 @@ +MD5 2ec1e1beb2e6376b09d090f74d259160 libpng-1.2.14.tar.bz2 620379 +RMD160 37c91bc411a8c4bc467bb8b229a4e39bcca4bd8a libpng-1.2.14.tar.bz2 620379 +SHA256 2678855a235ed02d5b30831a70dff84d5b562c5de388f1323bd680ac5cdd1722 libpng-1.2.14.tar.bz2 620379 +MD5 a3e91d819c1a925c89b2d114336afa02 libpng-manual.txt 128288 +RMD160 7d145e2427b05f66f945bc8773725386f5090613 libpng-manual.txt 128288 +SHA256 0c6fc39145bbb2c61cbd9200abfd2eb0303b08c4622f33ad7aa9e4f28cb6fa2b libpng-manual.txt 128288 diff --git a/media-libs/libpng/files/libpng-1.2.14-mem-leak.patch b/media-libs/libpng/files/libpng-1.2.14-mem-leak.patch new file mode 100644 index 000000000000..a962fc7f7afe --- /dev/null +++ b/media-libs/libpng/files/libpng-1.2.14-mem-leak.patch @@ -0,0 +1,20 @@ +plug a memleak + +http://bugs.gentoo.org/159216 + +--- 1.2.14/pngwutil.c ++++ 1.2.15rc5/pngwutil.c +@@ -757,8 +757,11 @@ + profile_len = 0; + + if (profile_len > 3) +- embedded_profile_len = ((*(profile ))<<24) | ((*(profile+1))<<16) | +- ((*(profile+2))<< 8) | ((*(profile+3)) ); ++ embedded_profile_len = ++ ((*( (png_bytep)profile ))<<24) | ++ ((*( (png_bytep)profile+1))<<16) | ++ ((*( (png_bytep)profile+2))<< 8) | ++ ((*( (png_bytep)profile+3)) ); + + if (profile_len < embedded_profile_len) + { diff --git a/media-libs/libpng/libpng-1.2.14-r1.ebuild b/media-libs/libpng/libpng-1.2.14-r1.ebuild new file mode 100644 index 000000000000..b95c642b6300 --- /dev/null +++ b/media-libs/libpng/libpng-1.2.14-r1.ebuild @@ -0,0 +1,52 @@ +# Copyright 1999-2006 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/media-libs/libpng/libpng-1.2.14-r1.ebuild,v 1.1 2006/12/31 13:37:20 vapier Exp $ + +WANT_AUTOCONF="latest" +WANT_AUTOMAKE="latest" +inherit eutils autotools multilib + +DESCRIPTION="Portable Network Graphics library" +HOMEPAGE="http://www.libpng.org/" +SRC_URI="mirror://sourceforge/libpng/${P}.tar.bz2 + doc? ( http://www.libpng.org/pub/png/libpng-manual.txt )" + +LICENSE="as-is" +SLOT="1.2" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd" +IUSE="doc" +RESTRICT="mirror" #146921 + +DEPEND="sys-libs/zlib" + +src_unpack() { + unpack ${P}.tar.bz2 + cd "${S}" + use doc && cp "${DISTDIR}"/libpng-manual.txt . + + epatch "${FILESDIR}"/1.2.7-gentoo.diff + epatch "${FILESDIR}"/${P}-mem-leak.patch #159216 + + epatch "${FILESDIR}"/${PN}-1.2.12-no-asm.patch #136452 + eautoreconf +} + +src_compile() { + econf || die + mv pngconf.h pngconf.h.in + emake pngconf.h || die + emake || die +} + +src_install() { + make DESTDIR="${D}" install || die + dodoc ANNOUNCE CHANGES KNOWNBUG README TODO Y2KINFO + use doc && dodoc libpng-manual.txt +} + +pkg_postinst() { + # the libpng authors really screwed around between 1.2.1 and 1.2.3 + if [[ -f ${ROOT}/usr/$(get_libdir)/libpng.so.3.1.2.1 ]] ; then + rm -f "${ROOT}"/usr/$(get_libdir)/libpng.so.3.1.2.1 + fi +} -- 2.26.2