/[gentoo-x86]/media-libs/libpng/libpng-1.2.7-r1.ebuild
Gentoo

Contents of /media-libs/libpng/libpng-1.2.7-r1.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.4 - (show annotations) (download)
Sun May 15 19:05:27 2005 UTC (10 years ago) by vapier
Branch: MAIN
CVS Tags: HEAD
Changes since 1.3: +1 -1 lines
FILE REMOVED
old
(Portage version: 2.0.51.21-r1)

1 # Copyright 1999-2005 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.7-r1.ebuild,v 1.3 2005/01/03 22:00:35 vapier 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="alpha amd64 arm hppa ia64 mips ppc ppc64 ppc-macos s390 sparc x86"
14 IUSE=""
15
16 DEPEND="sys-libs/zlib"
17
18 src_unpack() {
19 unpack ${A}
20 cd "${S}"
21
22 epatch "${FILESDIR}/${P}-png_do_strip_filler.diff"
23 epatch "${FILESDIR}/${PV}-gentoo.diff"
24
25 if [ "$(gcc-version)" == "3.3" -o "$(gcc-version)" == "3.2" ] ; then
26 replace-cpu-flags k6 k6-2 k6-3 i586
27 fi
28
29 if use ppc-macos ; then
30 epatch "${FILESDIR}/macos.patch" # implements strnlen
31 sed \
32 -e "s:ZLIBLIB=.*:ZLIBLIB=/usr/$(get_libdir):" \
33 -e "s:ZLIBINC=.*:ZLIBINC=/usr/include:" \
34 -e "s:-O3:${CFLAGS}:" \
35 -e "s:prefix=/usr/local:prefix=/usr:" \
36 scripts/makefile.darwin > Makefile
37 else
38 sed \
39 -e "s:ZLIBLIB=.*:ZLIBLIB=/usr/$(get_libdir):" \
40 -e "s:ZLIBINC=.*:ZLIBINC=/usr/include:" \
41 -e "s:-O3:${CFLAGS}:" \
42 -e "s:prefix=/usr/local:prefix=/usr:" \
43 -e "s:OBJSDLL = :OBJSDLL = -lz -lm :" \
44 scripts/makefile.linux > Makefile
45 fi
46 }
47
48 src_compile() {
49 emake \
50 CC="$(gcc-getCC)" \
51 CXX="$(gcc-getCXX)" \
52 || die "emake failed"
53 }
54
55 src_install() {
56 dodir /usr/include /usr/$(get_libdir) /usr/share/man
57 make DESTDIR="${D}" MANPATH="/usr/share/man" LIBPATH="/usr/$(get_libdir)" install || die
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 if [ -f "${ROOT}/usr/$(get_libdir)/libpng.so.3.1.2.1" ] ; then
65 rm "${ROOT}/usr/$(get_libdir)/libpng.so.3.1.2.1"
66 fi
67 }

  ViewVC Help
Powered by ViewVC 1.1.20