/[gentoo-x86]/media-gfx/optipng/optipng-0.6.5.ebuild
Gentoo

Contents of /media-gfx/optipng/optipng-0.6.5.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.6 - (show annotations) (download)
Thu Mar 8 12:48:08 2012 UTC (2 years, 5 months ago) by ssuominen
Branch: MAIN
CVS Tags: HEAD
Changes since 1.5: +1 -1 lines
FILE REMOVED
punt vulnerable

(Portage version: 2.2.0_alpha90/cvs/Linux x86_64)

1 # Copyright 1999-2011 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/media-gfx/optipng/optipng-0.6.5.ebuild,v 1.5 2011/10/10 17:25:15 ssuominen Exp $
4
5 EAPI=2
6 inherit eutils toolchain-funcs
7
8 DESCRIPTION="Compress PNG files without affecting image quality"
9 HOMEPAGE="http://optipng.sourceforge.net/"
10 SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
11
12 LICENSE="ZLIB"
13 SLOT="0"
14 KEYWORDS="~alpha amd64 ppc ~ppc64 x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos ~x86-solaris"
15 IUSE=""
16
17 RDEPEND=">=media-libs/libpng-1.4:0"
18 DEPEND="${RDEPEND}"
19
20 src_prepare() {
21 sed -i \
22 -e '/^C/s: -O2.*: $(GENTOO_CFLAGS) -Wall:' \
23 -e '/^LD/s: -s$: $(GENTOO_LDFLAGS):' \
24 src/scripts/gcc.mak.in \
25 lib/pngxtern/scripts/gcc.mak.in \
26 || die "sed failed"
27
28 # FIXME
29 if has_version "<media-libs/libpng-1.5:0"; then
30 cp lib/libpng/pngpriv.h src/ || die
31 rm -rf lib/{libpng,zlib}
32 epatch "${FILESDIR}"/${P}-libpng-1.4.8.patch
33 else
34 ewarn "Using internal copy of libpng, see bug 355739"
35 rm -rf lib/zlib
36 fi
37 }
38
39 src_configure() {
40 ./configure \
41 $(has_version "<media-libs/libpng-1.5:0" && echo -with-system-libpng) \
42 -with-system-zlib \
43 || die "configure failed"
44 }
45
46 src_compile() {
47 emake \
48 -C src \
49 -f scripts/gcc.mak \
50 CC="$(tc-getCC)" \
51 GENTOO_CFLAGS="${CFLAGS}" \
52 GENTOO_LDFLAGS="${LDFLAGS}" \
53 || die "emake failed"
54 }
55
56 src_install() {
57 dobin src/optipng || die "dobin failed"
58 dodoc README.txt doc/*.txt || die
59 dohtml doc/*.html || die
60 doman man/optipng.1 || die
61 }

  ViewVC Help
Powered by ViewVC 1.1.20