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

Contents of /sys-libs/zlib/zlib-1.2.7.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.12 - (show annotations) (download)
Sun Sep 30 17:26:34 2012 UTC (21 months, 4 weeks ago) by armin76
Branch: MAIN
Changes since 1.11: +2 -2 lines
ia64/m68k/s390/sh/sparc stable wrt #435754

(Portage version: 2.1.11.16/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.7.ebuild,v 1.11 2012/09/28 13:37:32 johu Exp $
4
5 AUTOTOOLS_AUTO_DEPEND="no"
6 inherit autotools toolchain-funcs
7
8 DESCRIPTION="Standard (de)compression library"
9 HOMEPAGE="http://www.zlib.net/"
10 SRC_URI="http://zlib.net/${P}.tar.gz
11 http://www.gzip.org/zlib/${P}.tar.gz
12 http://www.zlib.net/current/beta/${P}.tar.gz"
13
14 LICENSE="ZLIB"
15 SLOT="0"
16 KEYWORDS="alpha amd64 arm hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
17 IUSE="minizip static-libs"
18
19 DEPEND="minizip? ( ${AUTOTOOLS_DEPEND} )"
20 RDEPEND="!<dev-libs/libxml2-2.7.7" #309623
21
22 src_unpack() {
23 unpack ${A}
24 cd "${S}"
25
26 if use minizip ; then
27 cd contrib/minizip
28 eautoreconf
29 fi
30 }
31
32 echoit() { echo "$@"; "$@"; }
33 src_compile() {
34 case ${CHOST} in
35 *-mingw*|mingw*)
36 emake -f win32/Makefile.gcc STRIP=true PREFIX=${CHOST}- || die
37 sed \
38 -e 's|@prefix@|/usr|g' \
39 -e 's|@exec_prefix@|${prefix}|g' \
40 -e 's|@libdir@|${exec_prefix}/'$(get_libdir)'|g' \
41 -e 's|@sharedlibdir@|${exec_prefix}/'$(get_libdir)'|g' \
42 -e 's|@includedir@|${prefix}/include|g' \
43 -e 's|@VERSION@|'${PV}'|g' \
44 zlib.pc.in > zlib.pc || die
45 ;;
46 *) # not an autoconf script, so can't use econf
47 local uname=$(/usr/share/gnuconfig/config.sub "${CHOST}" | cut -d- -f3) #347167
48 echoit ./configure \
49 --shared \
50 --prefix=/usr \
51 --libdir=/usr/$(get_libdir) \
52 ${uname:+--uname=${uname}} \
53 || die
54 emake || die
55 ;;
56 esac
57 if use minizip ; then
58 cd contrib/minizip
59 econf $(use_enable static-libs static)
60 emake || die
61 fi
62 }
63
64 sed_macros() {
65 # clean up namespace a little #383179
66 # we do it here so we only have to tweak 2 files
67 sed -i -r 's:\<(O[FN])\>:_Z_\1:g' "$@" || die
68 }
69 src_install() {
70 case ${CHOST} in
71 *-mingw*|mingw*)
72 emake -f win32/Makefile.gcc install \
73 BINARY_PATH="${D}/usr/bin" \
74 LIBRARY_PATH="${D}/usr/$(get_libdir)" \
75 INCLUDE_PATH="${D}/usr/include" \
76 SHARED_MODE=1 \
77 || die
78 insinto /usr/share/pkgconfig
79 doins zlib.pc || die
80 ;;
81
82 *)
83 emake install DESTDIR="${D}" LDCONFIG=: || die
84 gen_usr_ldscript -a z
85 ;;
86 esac
87 sed_macros "${D}"/usr/include/*.h
88
89 dodoc FAQ README ChangeLog doc/*.txt
90
91 if use minizip ; then
92 cd contrib/minizip
93 emake install DESTDIR="${D}" || die
94 sed_macros "${D}"/usr/include/minizip/*.h
95 dodoc *.txt
96 fi
97
98 use static-libs || rm -f "${D}"/usr/$(get_libdir)/lib{z,minizip}.{a,la} #419645
99 }

  ViewVC Help
Powered by ViewVC 1.1.20