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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.11 - (show annotations) (download)
Sun May 15 19:05:27 2005 UTC (9 years, 2 months ago) by vapier
Branch: MAIN
CVS Tags: HEAD
Changes since 1.10: +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.ebuild,v 1.10 2005/01/03 21:58:47 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}/${PV}-gentoo.diff"
23
24 if [ "$(gcc-version)" == "3.3" -o "$(gcc-version)" == "3.2" ] ; then
25 replace-cpu-flags k6 k6-2 k6-3 i586
26 fi
27
28 if use ppc-macos ; then
29 epatch "${FILESDIR}/macos.patch" # implements strnlen
30 sed \
31 -e "s:ZLIBLIB=.*:ZLIBLIB=/usr/$(get_libdir):" \
32 -e "s:ZLIBINC=.*:ZLIBINC=/usr/include:" \
33 -e "s:-O3:${CFLAGS}:" \
34 -e "s:prefix=/usr/local:prefix=/usr:" \
35 scripts/makefile.darwin > Makefile
36 else
37 sed \
38 -e "s:ZLIBLIB=.*:ZLIBLIB=/usr/$(get_libdir):" \
39 -e "s:ZLIBINC=.*:ZLIBINC=/usr/include:" \
40 -e "s:-O3:${CFLAGS}:" \
41 -e "s:prefix=/usr/local:prefix=/usr:" \
42 -e "s:OBJSDLL = :OBJSDLL = -lz -lm :" \
43 scripts/makefile.linux > Makefile
44 fi
45 }
46
47 src_compile() {
48 emake \
49 CC="$(gcc-getCC)" \
50 CXX="$(gcc-getCXX)" \
51 || die "emake failed"
52 }
53
54 src_install() {
55 dodir /usr/include /usr/$(get_libdir) /usr/share/man
56 make DESTDIR="${D}" MANPATH="/usr/share/man" LIBPATH="/usr/$(get_libdir)" install || die
57 doman libpng.3 libpngpf.3 png.5
58 dodoc ANNOUNCE CHANGES KNOWNBUG README TODO Y2KINFO
59 }
60
61 pkg_postinst() {
62 # the libpng authors really screwed around between 1.2.1 and 1.2.3
63 if [ -f "${ROOT}/usr/$(get_libdir)/libpng.so.3.1.2.1" ] ; then
64 rm "${ROOT}/usr/$(get_libdir)/libpng.so.3.1.2.1"
65 fi
66 }

  ViewVC Help
Powered by ViewVC 1.1.20