/[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.7 - (hide annotations) (download)
Sun Feb 20 03:38:20 2005 UTC (9 years, 9 months ago) by usata
Branch: MAIN
Changes since 1.6: +2 -2 lines
Stable on ppc-macos.
(Portage version: 2.0.51-r15)

1 vapier 1.1 # Copyright 1999-2005 Gentoo Foundation
2     # Distributed under the terms of the GNU General Public License v2
3 usata 1.7 # $Header: /var/cvsroot/gentoo-x86/media-libs/libpng/libpng-1.2.8.ebuild,v 1.6 2005/02/07 22:22:44 kloeri 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     SRC_URI="mirror://sourceforge/libpng/${P}.tar.bz2"
10    
11     LICENSE="as-is"
12     SLOT="1.2"
13 usata 1.7 KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ~ppc64 ppc-macos s390 sh sparc x86"
14 vapier 1.1 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 gongloo 1.2 use ppc-macos || sed -i -e '/^OBJSDLL =/s:=:= -lz -lm :' Makefile
42 vapier 1.1 }
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