/[gentoo-x86]/sys-libs/zlib/zlib-1.2.5.1-r1.ebuild
Gentoo

Contents of /sys-libs/zlib/zlib-1.2.5.1-r1.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (show annotations) (download)
Sun Jul 8 16:38:55 2012 UTC (2 years, 1 month ago) by armin76
Branch: MAIN
Changes since 1.2: +2 -2 lines
ia64/m68k/s390/sh/sparc stable wrt #384483

(Portage version: 2.1.11.5/cvs/Linux ia64)

1 # Copyright 1999-2012 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/sys-libs/zlib/zlib-1.2.5.1-r1.ebuild,v 1.2 2012/06/17 17:57:12 armin76 Exp $
4
5 inherit eutils toolchain-funcs
6
7 DESCRIPTION="Standard (de)compression library"
8 HOMEPAGE="http://www.zlib.net/"
9 SRC_URI="http://www.gzip.org/zlib/${P}.tar.gz
10 http://www.zlib.net/current/beta/${P}.tar.gz"
11
12 LICENSE="ZLIB"
13 SLOT="0"
14 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd"
15 IUSE=""
16
17 RDEPEND="!<dev-libs/libxml2-2.7.7" #309623
18
19 src_unpack() {
20 unpack ${A}
21 cd "${S}"
22 # trust exit status of the compiler rather than stderr #55434
23 # -if test "`(...) 2>&1`" = ""; then
24 # +if (...) 2>/dev/null; then
25 sed -i 's|\<test "`\([^"]*\) 2>&1`" = ""|\1 2>/dev/null|' configure || die
26
27 epatch "${FILESDIR}"/${P}-version.patch
28 epatch "${FILESDIR}"/${P}-symlinks.patch
29 }
30
31 echoit() { echo "$@"; "$@"; }
32 src_compile() {
33 case ${CHOST} in
34 *-mingw*|mingw*)
35 emake -f win32/Makefile.gcc STRIP=true PREFIX=${CHOST}- || die
36 sed \
37 -e 's|@prefix@|/usr|g' \
38 -e 's|@exec_prefix@|${prefix}|g' \
39 -e 's|@libdir@|${exec_prefix}/'$(get_libdir)'|g' \
40 -e 's|@sharedlibdir@|${exec_prefix}/'$(get_libdir)'|g' \
41 -e 's|@includedir@|${prefix}/include|g' \
42 -e 's|@VERSION@|'${PV}'|g' \
43 zlib.pc.in > zlib.pc || die
44 ;;
45 *) # not an autoconf script, so can't use econf
46 echoit ./configure --shared --prefix=/usr --libdir=/usr/$(get_libdir) || die
47 emake || die
48 ;;
49 esac
50 }
51
52 src_install() {
53 case ${CHOST} in
54 *-mingw*|mingw*)
55 emake -f win32/Makefile.gcc install \
56 BINARY_PATH="${D}/usr/bin" \
57 LIBRARY_PATH="${D}/usr/$(get_libdir)" \
58 INCLUDE_PATH="${D}/usr/include" \
59 SHARED_MODE=1 \
60 || die
61 insinto /usr/share/pkgconfig
62 doins zlib.pc || die
63 ;;
64
65 *)
66 emake install DESTDIR="${D}" LDCONFIG=: || die
67 gen_usr_ldscript -a z
68 ;;
69 esac
70
71 # clean up namespace a little #383179
72 # we do it here so we only have to tweak 2 files
73 sed -i -r 's:\<(O[FN])\>:_Z_\1:g' "${D}"/usr/include/*.h
74
75 dodoc FAQ README ChangeLog doc/*.txt
76 }

  ViewVC Help
Powered by ViewVC 1.1.20