1 |
# Copyright 1999-2004 Gentoo Technologies, Inc. |
2 |
# Distributed under the terms of the GNU General Public License v2 |
3 |
# $Header: /home/cvsroot/gentoo-x86/media-libs/libpng/libpng-1.2.5-r5.ebuild,v 1.1 2004/05/11 19:55:36 solar Exp $ |
4 |
|
5 |
inherit flag-o-matic eutils gcc |
6 |
|
7 |
DESCRIPTION="Portable Network Graphics library" |
8 |
HOMEPAGE="http://www.libpng.org/" |
9 |
SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2" |
10 |
|
11 |
LICENSE="as-is" |
12 |
SLOT="1.2" |
13 |
KEYWORDS="x86 ppc sparc mips alpha arm hppa amd64 ia64 ppc64 s390" |
14 |
IUSE="" |
15 |
|
16 |
DEPEND="sys-libs/zlib" |
17 |
|
18 |
src_unpack() { |
19 |
unpack ${A} |
20 |
cd ${S} |
21 |
|
22 |
epatch ${FILESDIR}/${P}-gentoo.diff |
23 |
|
24 |
sed \ |
25 |
-e "s:ZLIBLIB=.*:ZLIBLIB=/usr/lib:" \ |
26 |
-e "s:ZLIBINC=.*:ZLIBINC=/usr/include:" \ |
27 |
-e "s:-O3:${CFLAGS}:" \ |
28 |
-e "s:prefix=/usr/local:prefix=/usr:" \ |
29 |
-e "s:OBJSDLL = :OBJSDLL = -lz -lm :" \ |
30 |
scripts/makefile.linux > Makefile |
31 |
} |
32 |
|
33 |
src_compile() { |
34 |
emake CC="$(gcc-getCC)" CXX="$(gcc-getCXX)" || die "Make failed" |
35 |
} |
36 |
|
37 |
src_install() { |
38 |
dodir /usr/{include,lib} |
39 |
dodir /usr/share/man |
40 |
einstall MANPATH=${D}/usr/share/man|| die "Failed to install" |
41 |
|
42 |
doman libpng.3 libpngpf.3 png.5 |
43 |
dodoc ANNOUNCE CHANGES KNOWNBUG README TODO Y2KINFO |
44 |
} |
45 |
|
46 |
pkg_postinst() { |
47 |
# the libpng authors really screwed around between 1.2.1 and 1.2.3 |
48 |
[ -f ${ROOT}/usr/lib/libpng.so.3.1.2.1 ] && rm ${ROOT}/usr/lib/libpng.so.3.1.2.1 |
49 |
} |