/[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.12 - (hide annotations) (download)
Fri Jun 9 13:42:35 2006 UTC (8 years, 6 months ago) by vapier
Branch: MAIN
CVS Tags: HEAD
Changes since 1.11: +1 -1 lines
FILE REMOVED
old
(Portage version: 2.1_rc4-r3)

1 vapier 1.11 # Copyright 1999-2006 Gentoo Foundation
2 vapier 1.1 # Distributed under the terms of the GNU General Public License v2
3 vapier 1.12 # $Header: /var/cvsroot/gentoo-x86/media-libs/libpng/libpng-1.2.8.ebuild,v 1.11 2006/03/20 02:42:21 vapier Exp $
4 vapier 1.1
5     inherit flag-o-matic eutils toolchain-funcs
6    
7     DESCRIPTION="Portable Network Graphics library"
8     HOMEPAGE="http://www.libpng.org/"
9 vapier 1.10 SRC_URI="mirror://sourceforge/libpng/${P}.tar.bz2
10     doc? ( http://www.libpng.org/pub/png/libpng-manual.txt )"
11 vapier 1.1
12     LICENSE="as-is"
13     SLOT="1.2"
14 vapier 1.11 KEYWORDS="alpha amd64 arm hppa ia64 m68k mips ppc ppc-macos ppc64 s390 sh sparc x86"
15 vapier 1.10 IUSE="doc"
16 vapier 1.1
17     DEPEND="sys-libs/zlib"
18    
19     src_unpack() {
20 vapier 1.10 unpack ${P}.tar.bz2
21 vapier 1.1 cd "${S}"
22 vapier 1.10 use doc && cp "${DISTDIR}"/libpng-manual.txt .
23 vapier 1.1
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 gongloo 1.2 use ppc-macos || sed -i -e '/^OBJSDLL =/s:=:= -lz -lm :' Makefile
44 vapier 1.1 }
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 vapier 1.10 use doc && dodoc libpng-manual.txt
57 vapier 1.1 }
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