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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.15 - (show annotations) (download)
Sat Sep 9 10:09:57 2006 UTC (7 years, 11 months ago) by vapier
Branch: MAIN
CVS Tags: HEAD
Changes since 1.14: +1 -1 lines
FILE REMOVED
punt old files and update manifest for #146921
(Portage version: 2.1.1_rc1-r6)
 (Signed Manifest commit)

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-r1.ebuild,v 1.14 2006/04/24 02:21:19 kumba Exp $
4
5 inherit flag-o-matic eutils toolchain-funcs multilib
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 ~x86-fbsd"
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 cp scripts/makefile.linux{,.orig}
26 epatch "${FILESDIR}"/${PN}-1.2.8-strnlen.patch
27 epatch "${FILESDIR}"/${PN}-1.2.8-build.patch
28
29 [[ $(gcc-version) == "3.3" || $(gcc-version) == "3.2" ]] \
30 && replace-cpu-flags k6 k6-2 k6-3 i586
31
32 local makefilein
33 case ${CHOST} in
34 *-darwin*) makefilein="scripts/makefile.darwin";;
35 *) makefilein="scripts/makefile.linux";;
36 esac
37 sed \
38 -e "/^ZLIBLIB=/s:=.*:=:" \
39 -e "/^ZLIBINC=/s:=.*:=:" \
40 -e "/^LIBPATH=/s:/lib:/$(get_libdir):" \
41 -e 's:mkdir:mkdir -p:' \
42 ${makefilein} > Makefile || die
43
44 sed -i -e "s:libdir=\${exec_prefix}/lib:libdir=/usr/$(get_libdir):" \
45 scripts/${PN}.pc.in || die
46 }
47
48 src_compile() {
49 tc-export CC RANLIB AR
50 emake || 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