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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.4 - (hide annotations) (download)
Thu May 3 19:08:41 2012 UTC (6 years, 7 months ago) by vapier
Branch: MAIN
Changes since 1.3: +2 -2 lines
Fix by jk3064 for mingw headers #409801.

(Portage version: 2.2.0_alpha100/cvs/Linux x86_64)

1 vapier 1.1 # Copyright 1999-2012 Gentoo Foundation
2     # Distributed under the terms of the GNU General Public License v2
3 vapier 1.4 # $Header: /var/cvsroot/gentoo-x86/sys-libs/zlib/zlib-1.2.6.ebuild,v 1.3 2012/04/26 12:52:15 aballier Exp $
4 vapier 1.1
5     AUTOTOOLS_AUTO_DEPEND="no"
6     inherit autotools eutils 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 aballier 1.3 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
17 vapier 1.1 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     echoit ./configure --shared --prefix=/usr --libdir=/usr/$(get_libdir) || die
48     emake || die
49     ;;
50     esac
51     if use minizip ; then
52     cd contrib/minizip
53     econf $(use_enable static-libs static)
54     emake || die
55     fi
56     }
57    
58     sed_macros() {
59     # clean up namespace a little #383179
60     # we do it here so we only have to tweak 2 files
61     sed -i -r 's:\<(O[FN])\>:_Z_\1:g' "$@" || die
62     }
63     src_install() {
64     case ${CHOST} in
65     *-mingw*|mingw*)
66     emake -f win32/Makefile.gcc install \
67     BINARY_PATH="${D}/usr/bin" \
68     LIBRARY_PATH="${D}/usr/$(get_libdir)" \
69     INCLUDE_PATH="${D}/usr/include" \
70     SHARED_MODE=1 \
71     || die
72     insinto /usr/share/pkgconfig
73     doins zlib.pc || die
74     ;;
75    
76     *)
77     emake install DESTDIR="${D}" LDCONFIG=: || die
78     gen_usr_ldscript -a z
79     ;;
80     esac
81 vapier 1.4 sed_macros "${D}"/usr/include/*.h
82 vapier 1.1
83     dodoc FAQ README ChangeLog doc/*.txt
84    
85     if use minizip ; then
86     cd contrib/minizip
87     emake install DESTDIR="${D}" || die
88     sed_macros "${D}"/usr/include/minizip/*.h
89     dodoc *.txt
90     fi
91    
92     use static-libs || rm -f "${D}"/usr/$(get_libdir)/*.{a,la}
93     }

  ViewVC Help
Powered by ViewVC 1.1.20