summaryrefslogtreecommitdiff
blob: d7b753e80c9d25382d888b28ac6efd71058a21a8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/media-gfx/optipng/optipng-0.5.4.ebuild,v 1.5 2007/05/21 19:59:35 grobian Exp $

inherit eutils

DESCRIPTION="Find the optimal compression settings for your png files"
SRC_URI="mirror://sourceforge/optipng/${P}.tar.gz"
HOMEPAGE="http://optipng.sourceforge.net/"

LICENSE="as-is"

SLOT="0"
KEYWORDS="~alpha amd64 ppc x86"
IUSE=""

DEPEND="virtual/libc"

src_unpack() {
	unpack ${A}
	sed -i -e 's!-O2!${CFLAGS}!' ${S}/src/scripts/gcc.mak
}

src_compile() {
	emake -C ${S}/src -f ${S}/src/scripts/gcc.mak optipng \
		CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" || die
}

src_install() {
	dobin ${S}/src/optipng
	dodoc ${S}/doc/{CAVEAT.txt,HISTORY.txt,TODO.txt,USAGE.txt}
	dohtml ${S}/doc/{design.html,features.html,guide.html,thanks.html}
	doman ${S}/man/optipng.1
}