From 86de3125f30febe81df04644e3884e1d1c2fd82d Mon Sep 17 00:00:00 2001 From: Mamoru Komachi Date: Sat, 20 Nov 2004 03:58:17 +0000 Subject: Extracted png_do_strip_filler patch from libpng-1.2.8beta4. This fixes bug #67069. --- media-libs/libpng/ChangeLog | 11 +++- media-libs/libpng/Manifest | 21 ++++-- media-libs/libpng/files/digest-libpng-1.2.7-r1 | 1 + .../files/libpng-1.2.7-png_do_strip_filler.diff | 76 ++++++++++++++++++++++ media-libs/libpng/libpng-1.2.7-r1.ebuild | 67 +++++++++++++++++++ 5 files changed, 170 insertions(+), 6 deletions(-) create mode 100644 media-libs/libpng/files/digest-libpng-1.2.7-r1 create mode 100644 media-libs/libpng/files/libpng-1.2.7-png_do_strip_filler.diff create mode 100644 media-libs/libpng/libpng-1.2.7-r1.ebuild (limited to 'media-libs/libpng') diff --git a/media-libs/libpng/ChangeLog b/media-libs/libpng/ChangeLog index c88c9a938e30..bfd3ddaf858d 100644 --- a/media-libs/libpng/ChangeLog +++ b/media-libs/libpng/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for media-libs/libpng # Copyright 2002-2004 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/media-libs/libpng/ChangeLog,v 1.56 2004/11/13 03:54:21 kumba Exp $ +# $Header: /var/cvsroot/gentoo-x86/media-libs/libpng/ChangeLog,v 1.57 2004/11/20 03:58:17 usata Exp $ + +*libpng-1.2.7-r1 (20 Nov 2004) + + 20 Nov 2004; Mamoru KOMACHI + +files/libpng-1.2.7-png_do_strip_filler.diff, +libpng-1.2.7-r1.ebuild: + Extracted png_do_strip_filler patch from libpng-1.2.8beta4. + This fixes bug #67069. 12 Nov 2004; Joshua Kinard libpng-1.2.7.ebuild: Marked stable on mips. @@ -37,7 +44,7 @@ 06 Aug 2004; foser libpng-1.0* : Remove all traces of libpng-1.0* (#59424) - 06 Aug 2004; Bryan Østergaard,,, libpng-1.2.5-r8.ebuild: + 06 Aug 2004; Bryan ƒŠstergaard,,, libpng-1.2.5-r8.ebuild: Stable on alpha, bug #59424. 05 Aug 2004; Ciaran McCreesh libpng-1.2.5-r8.ebuild: diff --git a/media-libs/libpng/Manifest b/media-libs/libpng/Manifest index 67c8c49e9f73..b14ed6005ae4 100644 --- a/media-libs/libpng/Manifest +++ b/media-libs/libpng/Manifest @@ -1,9 +1,22 @@ -MD5 cdd66afae709fa94ed95a954d066b0b3 ChangeLog 9599 +-----BEGIN PGP SIGNED MESSAGE----- +Hash: SHA1 + +MD5 9917c1cb37cc57405416916517af1f37 ChangeLog 9842 MD5 602563e0a8ad2ef1f5345717fa660cae libpng-1.2.5-r8.ebuild 1870 +MD5 70a8894e625b7342ddcfc43c28ae866f libpng-1.2.7-r1.ebuild 1896 MD5 540eed8a696949bf70e500c8c461168f libpng-1.2.7.ebuild 1832 -MD5 3338fff0166374e14ae138e6a1f4cd21 files/1.2.7-gentoo.diff 464 MD5 82c75412d0c6a4a86704a7a4545ee502 files/digest-libpng-1.2.5-r8 65 +MD5 cf98652d430c500b40470ffbcc2636e1 files/digest-libpng-1.2.7-r1 65 +MD5 7443cfcd027ad293e56ec7bed76ee21c files/macos.patch 589 +MD5 d1cb64b64c0652863c89a3eb1f7c5f66 files/libpng-1.2.5-security.diff 10114 +MD5 3338fff0166374e14ae138e6a1f4cd21 files/1.2.7-gentoo.diff 464 MD5 cf98652d430c500b40470ffbcc2636e1 files/digest-libpng-1.2.7 65 MD5 b664d38f024a7b21f299727e4aa76d2e files/libpng-1.2.5-gentoo.diff 3470 -MD5 d1cb64b64c0652863c89a3eb1f7c5f66 files/libpng-1.2.5-security.diff 10114 -MD5 7443cfcd027ad293e56ec7bed76ee21c files/macos.patch 589 +MD5 fbf3226ad08934966af8773089b8c945 files/libpng-1.2.7-png_do_strip_filler.diff 3033 +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v1.2.6 (GNU/Linux) + +iD8DBQFBnsDcVWNWqTUmv+0RAm0OAJ9mlknja6JnFGehntCimj8l2ayaEACbBFeM +1lEqqbJvJxUoahlDuuJ/DcM= +=V8SL +-----END PGP SIGNATURE----- diff --git a/media-libs/libpng/files/digest-libpng-1.2.7-r1 b/media-libs/libpng/files/digest-libpng-1.2.7-r1 new file mode 100644 index 000000000000..c0b13966cdce --- /dev/null +++ b/media-libs/libpng/files/digest-libpng-1.2.7-r1 @@ -0,0 +1 @@ +MD5 21030102f99f81c37276403e5956d198 libpng-1.2.7.tar.bz2 379504 diff --git a/media-libs/libpng/files/libpng-1.2.7-png_do_strip_filler.diff b/media-libs/libpng/files/libpng-1.2.7-png_do_strip_filler.diff new file mode 100644 index 000000000000..34906e98bfab --- /dev/null +++ b/media-libs/libpng/files/libpng-1.2.7-png_do_strip_filler.diff @@ -0,0 +1,76 @@ +--- libpng-1.2.7.orig/png.h 2004-09-12 11:19:30.000000000 +0900 ++++ libpng-1.2.7/png.h 2004-11-13 13:04:49.000000000 +0900 +@@ -3090,7 +3092,7 @@ + #if defined(PNG_WRITE_FILLER_SUPPORTED) || \ + defined(PNG_READ_STRIP_ALPHA_SUPPORTED) + PNG_EXTERN void png_do_strip_filler PNGARG((png_row_infop row_info, +- png_bytep row, png_uint_32 flags)); ++ png_bytep row, png_uint_32 flags, png_uint_32 transformations)); + #endif + + #if defined(PNG_READ_SWAP_SUPPORTED) || defined(PNG_WRITE_SWAP_SUPPORTED) +--- libpng-1.2.7.orig/pngrtran.c 2004-09-12 11:19:31.000000000 +0900 ++++ libpng-1.2.7/pngrtran.c 2004-11-13 13:04:50.000000000 +0900 +@@ -1211,7 +1211,7 @@ + #if defined(PNG_READ_STRIP_ALPHA_SUPPORTED) + if (png_ptr->transformations & PNG_STRIP_ALPHA) + png_do_strip_filler(&(png_ptr->row_info), png_ptr->row_buf + 1, +- PNG_FLAG_FILLER_AFTER); ++ PNG_FLAG_FILLER_AFTER,png_ptr->transformations); + #endif + + #if defined(PNG_READ_RGB_TO_GRAY_SUPPORTED) +--- libpng-1.2.7.orig/pngtrans.c 2004-09-12 11:19:31.000000000 +0900 ++++ libpng-1.2.7/pngtrans.c 2004-11-13 13:04:50.000000000 +0900 +@@ -380,7 +380,8 @@ + defined(PNG_READ_STRIP_ALPHA_SUPPORTED) + /* remove filler or alpha byte(s) */ + void /* PRIVATE */ +-png_do_strip_filler(png_row_infop row_info, png_bytep row, png_uint_32 flags) ++png_do_strip_filler(png_row_infop row_info, png_bytep row, png_uint_32 flags, ++ png_uint_32 transformations) + { + png_debug(1, "in png_do_strip_filler\n"); + #if defined(PNG_USELESS_TESTS_SUPPORTED) +@@ -392,7 +393,9 @@ + png_uint_32 row_width=row_info->width; + png_uint_32 i; + +- if (row_info->color_type == PNG_COLOR_TYPE_RGB && ++ if ((row_info->color_type == PNG_COLOR_TYPE_RGB || ++ (row_info->color_type == PNG_COLOR_TYPE_RGB_ALPHA && ++ (transformations & PNG_STRIP_ALPHA))) && + row_info->channels == 4) + { + if (row_info->bit_depth == 8) +@@ -471,7 +474,9 @@ + } + row_info->channels = 3; + } +- else if (row_info->color_type == PNG_COLOR_TYPE_GRAY && ++ else if ((row_info->color_type == PNG_COLOR_TYPE_GRAY || ++ (row_info->color_type == PNG_COLOR_TYPE_GRAY_ALPHA && ++ (transformations & PNG_STRIP_ALPHA))) && + row_info->channels == 2) + { + if (row_info->bit_depth == 8) +@@ -525,6 +530,8 @@ + } + row_info->channels = 1; + } ++ if (transformations & PNG_STRIP_ALPHA) ++ row_info->color_type &= ~PNG_COLOR_MASK_ALPHA; + } + } + #endif +--- libpng-1.2.7.orig/pngwtran.c 2004-09-12 11:19:32.000000000 +0900 ++++ libpng-1.2.7/pngwtran.c 2004-11-13 13:04:50.000000000 +0900 +@@ -40,7 +40,7 @@ + #if defined(PNG_WRITE_FILLER_SUPPORTED) + if (png_ptr->transformations & PNG_FILLER) + png_do_strip_filler(&(png_ptr->row_info), png_ptr->row_buf + 1, +- png_ptr->flags); ++ png_ptr->flags,png_ptr->transformations); + #endif + #if defined(PNG_WRITE_PACKSWAP_SUPPORTED) + if (png_ptr->transformations & PNG_PACKSWAP) diff --git a/media-libs/libpng/libpng-1.2.7-r1.ebuild b/media-libs/libpng/libpng-1.2.7-r1.ebuild new file mode 100644 index 000000000000..692ca49e27c2 --- /dev/null +++ b/media-libs/libpng/libpng-1.2.7-r1.ebuild @@ -0,0 +1,67 @@ +# Copyright 1999-2004 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/media-libs/libpng/libpng-1.2.7-r1.ebuild,v 1.1 2004/11/20 03:58:17 usata Exp $ + +inherit flag-o-matic eutils gcc + +DESCRIPTION="Portable Network Graphics library" +HOMEPAGE="http://www.libpng.org/" +SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2" + +LICENSE="as-is" +SLOT="1.2" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~ppc-macos ~s390 ~sparc ~x86" +IUSE="" + +DEPEND="sys-libs/zlib" + +src_unpack() { + unpack ${A} + cd "${S}" + + epatch "${FILESDIR}/${P}-png_do_strip_filler.diff" + epatch "${FILESDIR}/${PV}-gentoo.diff" + + if [ "$(gcc-version)" == "3.3" -o "$(gcc-version)" == "3.2" ] ; then + replace-cpu-flags k6 k6-2 k6-3 i586 + fi + + if use ppc-macos ; then + epatch "${FILESDIR}/macos.patch" # implements strnlen + sed \ + -e "s:ZLIBLIB=.*:ZLIBLIB=/usr/$(get_libdir):" \ + -e "s:ZLIBINC=.*:ZLIBINC=/usr/include:" \ + -e "s:-O3:${CFLAGS}:" \ + -e "s:prefix=/usr/local:prefix=/usr:" \ + scripts/makefile.darwin > Makefile + else + sed \ + -e "s:ZLIBLIB=.*:ZLIBLIB=/usr/$(get_libdir):" \ + -e "s:ZLIBINC=.*:ZLIBINC=/usr/include:" \ + -e "s:-O3:${CFLAGS}:" \ + -e "s:prefix=/usr/local:prefix=/usr:" \ + -e "s:OBJSDLL = :OBJSDLL = -lz -lm :" \ + scripts/makefile.linux > Makefile + fi +} + +src_compile() { + emake \ + CC="$(gcc-getCC)" \ + CXX="$(gcc-getCXX)" \ + || die "emake failed" +} + +src_install() { + dodir /usr/include /usr/$(get_libdir) /usr/share/man + make DESTDIR="${D}" MANPATH="/usr/share/man" LIBPATH="/usr/$(get_libdir)" install || die + doman libpng.3 libpngpf.3 png.5 + dodoc ANNOUNCE CHANGES KNOWNBUG README TODO Y2KINFO +} + +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 "${ROOT}/usr/$(get_libdir)/libpng.so.3.1.2.1" + fi +} -- cgit v1.2.3-65-gdbad