/[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.11 - (show annotations) (download)
Mon Mar 20 02:42:21 2006 UTC (8 years, 6 months ago) by vapier
Branch: MAIN
Changes since 1.10: +3 -3 lines
m68k love
(Portage version: 2.1_pre6-r3)

1 # Copyright 1999-2006 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.10 2005/05/27 21:57:50 vapier 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 doc? ( http://www.libpng.org/pub/png/libpng-manual.txt )"
11
12 LICENSE="as-is"
13 SLOT="1.2"
14 KEYWORDS="alpha amd64 arm hppa ia64 m68k mips ppc ppc-macos ppc64 s390 sh sparc x86"
15 IUSE="doc"
16
17 DEPEND="sys-libs/zlib"
18
19 src_unpack() {
20 unpack ${P}.tar.bz2
21 cd "${S}"
22 use doc && cp "${DISTDIR}"/libpng-manual.txt .
23
24 epatch "${FILESDIR}"/1.2.7-gentoo.diff
25
26 [[ $(gcc-version) == "3.3" || $(gcc-version) == "3.2" ]] \
27 && replace-cpu-flags k6 k6-2 k6-3 i586
28
29 local makefilein="scripts/makefile.linux"
30 if use ppc-macos ; then
31 epatch "${FILESDIR}"/macos.patch # implements strnlen
32 makefilein="scripts/makefile.darwin"
33 fi
34 sed \
35 -e "/^ZLIBLIB=/s:=.*:=/usr/$(get_libdir):" \
36 -e '/^ZLIBINC=/s:=.*:=/usr/include:' \
37 -e "s:-O3:${CFLAGS}:" \
38 -e '/^prefix=/s:/local::' \
39 -e '/^MANPATH=/s:/man:/share/man:' \
40 -e "/^LIBPATH=/s:/lib:/$(get_libdir):" \
41 -e 's:mkdir:mkdir -p:' \
42 ${makefilein} > Makefile
43 use ppc-macos || sed -i -e '/^OBJSDLL =/s:=:= -lz -lm :' Makefile
44 }
45
46 src_compile() {
47 emake \
48 CC="$(tc-getCC)" \
49 CXX="$(tc-getCXX)" \
50 || die "emake failed"
51 }
52
53 src_install() {
54 make DESTDIR="${D}" install || die
55 dodoc ANNOUNCE CHANGES KNOWNBUG README TODO Y2KINFO
56 use doc && dodoc libpng-manual.txt
57 }
58
59 pkg_postinst() {
60 # the libpng authors really screwed around between 1.2.1 and 1.2.3
61 if [[ -f ${ROOT}/usr/$(get_libdir)/libpng.so.3.1.2.1 ]] ; then
62 rm -f "${ROOT}"/usr/$(get_libdir)/libpng.so.3.1.2.1
63 fi
64 }

  ViewVC Help
Powered by ViewVC 1.1.20