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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (show annotations) (download)
Wed Feb 2 23:54:14 2005 UTC (9 years, 9 months ago) by vapier
Branch: MAIN
Changes since 1.2: +2 -2 lines
amd64/arm/hppa/ia64/s390/sh/x86 stable
(Portage version: 2.0.51-r15)

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.8.ebuild,v 1.2 2005/01/19 04:46:40 gongloo Exp $
4
5 inherit flag-o-matic eutils toolchain-funcs
6
7 DESCRIPTION="Portable Network Graphics library"
8 HOMEPAGE="http://www.libpng.org/"
9 SRC_URI="mirror://sourceforge/libpng/${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 sh ~sparc x86"
14 IUSE=""
15
16 DEPEND="sys-libs/zlib"
17
18 src_unpack() {
19 unpack ${A}
20 cd "${S}"
21
22 epatch "${FILESDIR}"/1.2.7-gentoo.diff
23
24 [[ $(gcc-version) == "3.3" || $(gcc-version) == "3.2" ]] \
25 && replace-cpu-flags k6 k6-2 k6-3 i586
26
27 local makefilein="scripts/makefile.linux"
28 if use ppc-macos ; then
29 epatch "${FILESDIR}"/macos.patch # implements strnlen
30 makefilein="scripts/makefile.darwin"
31 fi
32 sed \
33 -e "/^ZLIBLIB=/s:=.*:=/usr/$(get_libdir):" \
34 -e '/^ZLIBINC=/s:=.*:=/usr/include:' \
35 -e "s:-O3:${CFLAGS}:" \
36 -e '/^prefix=/s:/local::' \
37 -e '/^MANPATH=/s:/man:/share/man:' \
38 -e "/^LIBPATH=/s:/lib:/$(get_libdir):" \
39 -e 's:mkdir:mkdir -p:' \
40 ${makefilein} > Makefile
41 use ppc-macos || sed -i -e '/^OBJSDLL =/s:=:= -lz -lm :' Makefile
42 }
43
44 src_compile() {
45 emake \
46 CC="$(tc-getCC)" \
47 CXX="$(tc-getCXX)" \
48 || die "emake failed"
49 }
50
51 src_install() {
52 make DESTDIR="${D}" install || die
53 dodoc ANNOUNCE CHANGES KNOWNBUG README TODO Y2KINFO
54 }
55
56 pkg_postinst() {
57 # the libpng authors really screwed around between 1.2.1 and 1.2.3
58 if [[ -f ${ROOT}/usr/$(get_libdir)/libpng.so.3.1.2.1 ]] ; then
59 rm -f "${ROOT}"/usr/$(get_libdir)/libpng.so.3.1.2.1
60 fi
61 }

  ViewVC Help
Powered by ViewVC 1.1.20