diff options
author | Sebastian Pipping <sping@gentoo.org> | 2015-10-11 21:10:43 +0200 |
---|---|---|
committer | Sebastian Pipping <sping@gentoo.org> | 2015-10-11 21:11:41 +0200 |
commit | e64498a11278374b3ea04983586a0ab8f599406e (patch) | |
tree | 8c959243a5dda7776b73929d9c764d0e95b38775 /media-gfx/optipng | |
parent | profiles: mask test revision bump for sys-devel/llvm (diff) | |
download | gentoo-e64498a11278374b3ea04983586a0ab8f599406e.tar.gz gentoo-e64498a11278374b3ea04983586a0ab8f599406e.tar.bz2 gentoo-e64498a11278374b3ea04983586a0ab8f599406e.zip |
media-gfx/optipng: Apply upstream patch for bug #561882
Package-Manager: portage-2.2.23
Diffstat (limited to 'media-gfx/optipng')
-rw-r--r-- | media-gfx/optipng/files/optipng-0.7.5-gifread.patch | 12 | ||||
-rw-r--r-- | media-gfx/optipng/optipng-0.7.5-r1.ebuild | 57 |
2 files changed, 69 insertions, 0 deletions
diff --git a/media-gfx/optipng/files/optipng-0.7.5-gifread.patch b/media-gfx/optipng/files/optipng-0.7.5-gifread.patch new file mode 100644 index 000000000000..14b37190405d --- /dev/null +++ b/media-gfx/optipng/files/optipng-0.7.5-gifread.patch @@ -0,0 +1,12 @@ +diff --git a/src/gifread/gifread.c b/src/gifread/gifread.c +index b24aa6e..2896493 100644 +--- a/src/gifread/gifread.c ++++ b/src/gifread/gifread.c +@@ -357,6 +357,7 @@ static int LZWGetCode(int code_size, int init_flag, FILE *stream) + { + curbit = 0; + lastbit = 0; ++ last_byte = 2; + done = LZW_FALSE; + return 0; + } diff --git a/media-gfx/optipng/optipng-0.7.5-r1.ebuild b/media-gfx/optipng/optipng-0.7.5-r1.ebuild new file mode 100644 index 000000000000..b3b452856b30 --- /dev/null +++ b/media-gfx/optipng/optipng-0.7.5-r1.ebuild @@ -0,0 +1,57 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=4 + +inherit eutils toolchain-funcs + +DESCRIPTION="Compress PNG files without affecting image quality" +HOMEPAGE="http://optipng.sourceforge.net/" +SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz" + +LICENSE="ZLIB" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos ~x86-solaris" +IUSE="" + +RDEPEND="sys-libs/zlib + media-libs/libpng:0" +DEPEND="${RDEPEND} + sys-apps/findutils" + +src_prepare() { + epatch "${FILESDIR}"/${P}-gifread.patch # bug #561882 + epatch "${FILESDIR}"/${P}-estonian.patch + + rm -R src/{libpng,zlib} || die + find . -type d -name build -exec rm -R {} + || die + + # next release is almost a complete rewrite, so plug this compilation + # problem in anticipation of the much (c)leaner(?) rewrite + sed -i \ + -e 's/^#ifdef AT_FDCWD/#if defined(AT_FDCWD) \&\& !(defined (__SVR4) \&\& defined (__sun))/' \ + src/optipng/osys.c || die + + tc-export CC AR RANLIB + export LD=$(tc-getCC) +} + +src_configure() { + ./configure \ + -with-system-libpng \ + -with-system-zlib \ + || die "configure failed" +} + +src_compile() { + emake -C src/optipng +} + +src_install() { + dodoc README.txt doc/*.txt + dohtml doc/*.html + doman src/${PN}/man/${PN}.1 + + dobin src/${PN}/${PN} +} |