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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.13 - (show annotations) (download)
Mon Jan 3 21:38:14 2005 UTC (9 years, 9 months ago) by vapier
Branch: MAIN
CVS Tags: HEAD
Changes since 1.12: +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-r8.ebuild,v 1.12 2004/11/06 21:05:45 mr_bones_ 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 ppc-macos"
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 epatch ${FILESDIR}/${P}-security.diff
24 if use ppc-macos ; then
25 epatch ${FILESDIR}/macos.patch # implements strnlen
26 fi
27
28 [ "`gcc-version`" == "3.2" ] && replace-cpu-flags k6 k6-2 k6-3 i586
29 [ "`gcc-version`" == "3.3" ] && replace-cpu-flags k6 k6-2 k6-3 i586
30
31 sed \
32 -e "s:ZLIBLIB=.*:ZLIBLIB=/usr/lib:" \
33 -e "s:ZLIBINC=.*:ZLIBINC=/usr/include:" \
34 -e "s:-O3:${CFLAGS}:" \
35 -e "s:prefix=/usr/local:prefix=/usr:" \
36 -e "s:OBJSDLL = :OBJSDLL = -lz -lm :" \
37 scripts/makefile.linux > Makefile
38
39 if use ppc-macos ; then
40 einfo "Patching the source for Mac OS X / Darwin compatibility"
41 sed \
42 -e "s:ZLIBLIB=.*:ZLIBLIB=/usr/lib:" \
43 -e "s:ZLIBINC=.*:ZLIBINC=/usr/include:" \
44 -e "s:-O3:${CFLAGS}:" \
45 -e "s:prefix=/usr/local:prefix=/usr:" \
46 scripts/makefile.darwin > Makefile
47 fi
48 }
49
50 src_compile() {
51 emake CC="$(gcc-getCC)" CXX="$(gcc-getCXX)" || die "Make failed"
52 }
53
54 src_install() {
55 dodir /usr/{include,lib} /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