/[gentoo-x86]/media-libs/libpng/libpng-1.2.5-r7.ebuild
Gentoo

Contents of /media-libs/libpng/libpng-1.2.5-r7.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.7 - (show annotations) (download)
Thu Sep 23 03:50:24 2004 UTC (10 years, 3 months ago) by vapier
Branch: MAIN
CVS Tags: HEAD
Changes since 1.6: +1 -1 lines
FILE REMOVED
old

1 # Copyright 1999-2004 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/media-libs/libpng/libpng-1.2.5-r7.ebuild,v 1.6 2004/09/22 05:29:12 usata 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 macos ppc-macos"
14 IUSE=""
15
16 DEPEND="sys-libs/zlib"
17
18 src_unpack() {
19 unpack ${A}
20 cd ${S}
21
22
23 epatch ${FILESDIR}/${P}-gentoo.diff
24
25 ( use macos || use ppc-macos ) && epatch ${FILESDIR}/macos.patch # implements strnlen
26
27 [ "`gcc-version`" == "3.2" ] && replace-cpu-flags i586 k6 k6-2 k6-3
28 [ "`gcc-version`" == "3.3" ] && replace-cpu-flags i586 k6 k6-2 k6-3
29
30 sed \
31 -e "s:ZLIBLIB=.*:ZLIBLIB=/usr/lib:" \
32 -e "s:ZLIBINC=.*:ZLIBINC=/usr/include:" \
33 -e "s:-O3:${CFLAGS}:" \
34 -e "s:prefix=/usr/local:prefix=/usr:" \
35 -e "s:OBJSDLL = :OBJSDLL = -lz -lm :" \
36 scripts/makefile.linux > Makefile
37
38 if use macos || use ppc-macos ; then
39 einfo "Patching the source for Mac OS X / Darwin compatibility"
40 sed \
41 -e "s:ZLIBLIB=.*:ZLIBLIB=/usr/lib:" \
42 -e "s:ZLIBINC=.*:ZLIBINC=/usr/include:" \
43 -e "s:-O3:${CFLAGS}:" \
44 -e "s:prefix=/usr/local:prefix=/usr:" \
45 scripts/makefile.darwin > Makefile
46 fi
47 }
48
49 src_compile() {
50 emake CC="$(gcc-getCC)" CXX="$(gcc-getCXX)" || die "Make failed"
51 }
52
53 src_install() {
54 dodir /usr/{include,lib}
55 dodir /usr/share/man
56 einstall MANPATH=${D}/usr/share/man || die "Failed to install"
57
58 doman libpng.3 libpngpf.3 png.5
59 dodoc ANNOUNCE CHANGES KNOWNBUG README TODO Y2KINFO
60 }
61
62 pkg_postinst() {
63 # the libpng authors really screwed around between 1.2.1 and 1.2.3
64 [ -f ${ROOT}/usr/lib/libpng.so.3.1.2.1 ] && rm ${ROOT}/usr/lib/libpng.so.3.1.2.1
65 }

  ViewVC Help
Powered by ViewVC 1.1.20