/[gentoo-alt]/trunk/prefix-overlay/media-libs/libpng/libpng-1.2.8-r1.ebuild
Gentoo

Contents of /trunk/prefix-overlay/media-libs/libpng/libpng-1.2.8-r1.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 900 - (hide annotations) (download)
Sun Nov 27 18:50:10 2005 UTC (13 years, 4 months ago) by kito
File size: 1728 byte(s)
Initial import.
1 kito 900 # 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-r1.ebuild,v 1.1 2005/10/11 00:43:05 vapier Exp $
4    
5     EAPI="prefix"
6    
7     inherit flag-o-matic eutils toolchain-funcs
8    
9     DESCRIPTION="Portable Network Graphics library"
10     HOMEPAGE="http://www.libpng.org/"
11     SRC_URI="mirror://sourceforge/libpng/${P}.tar.bz2
12     doc? ( http://www.libpng.org/pub/png/libpng-manual.txt )"
13    
14     LICENSE="as-is"
15     SLOT="1.2"
16     KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc-macos ~ppc64 ~s390 ~sh ~sparc ~x86"
17     IUSE="doc"
18    
19     DEPEND="sys-libs/zlib"
20    
21     src_unpack() {
22     unpack ${P}.tar.bz2
23     cd "${S}"
24     use doc && cp "${DISTDIR}"/libpng-manual.txt .
25    
26     epatch "${FILESDIR}"/1.2.7-gentoo.diff
27     epatch "${FILESDIR}"/${PN}-1.2.8-strnlen.patch
28     epatch "${FILESDIR}"/${PN}-1.2.8-build.patch
29    
30     [[ $(gcc-version) == "3.3" || $(gcc-version) == "3.2" ]] \
31     && replace-cpu-flags k6 k6-2 k6-3 i586
32    
33     local makefilein
34     case ${CHOST} in
35     *-darwin*) makefilein="scripts/makefile.darwin";;
36     *) makefilein="scripts/makefile.linux";;
37     esac
38     sed \
39     -e "/^ZLIBLIB=/s:=.*:=:" \
40     -e "/^ZLIBINC=/s:=.*:=:" \
41     -e "/^LIBPATH=/s:/lib:/$(get_libdir):" \
42     -e 's:mkdir:mkdir -p:' \
43     ${makefilein} > Makefile || die
44     }
45    
46     src_compile() {
47     tc-export CC RANLIB AR
48     emake || die "emake failed"
49     }
50    
51     src_install() {
52     make DESTDIR="${D}" install || die
53     dodoc ANNOUNCE CHANGES KNOWNBUG README TODO Y2KINFO
54     use doc && dodoc libpng-manual.txt
55     }
56    
57     pkg_postinst() {
58     # the libpng authors really screwed around between 1.2.1 and 1.2.3
59     if [[ -f ${ROOT}/usr/$(get_libdir)/libpng$(get_libname 3.1.2.1) ]] ; then
60     rm -f "${ROOT}"/usr/$(get_libdir)/libpng$(get_libname 3.1.2.1)
61     fi
62     }

  ViewVC Help
Powered by ViewVC 1.1.20