Browse files

FL-632 sys-libs/zlib-1.2.8

  • Loading branch information...
1 parent 4092252 commit b024e479ca5433cdf3699417c0390a094c8019f5 Ryan Harris committed Jul 21, 2013
Showing with 100 additions and 0 deletions.
  1. +1 −0 sys-libs/zlib/Manifest
  2. +99 −0 sys-libs/zlib/zlib-1.2.8.ebuild
View
1 sys-libs/zlib/Manifest
@@ -4,3 +4,4 @@ DIST zlib-1.2.5.1.tar.gz 548499 SHA256 c1f24a64f808528293cf04ba09a2dffbc3dd65ad7
DIST zlib-1.2.5.tar.bz2 486374 SHA256 239aead2f22f16bfcfa6a6a5150dcbd6d6f2e4d1eaa8727b5769ea014120b307
DIST zlib-1.2.6.tar.gz 557220 SHA256 21235e08552e6feba09ea5e8d750805b3391c62fb81c71a235c0044dc7a8a61b SHA512 f812ab3049fc2920a8da4649f6e60340ac365d58a0e76ace5219426aeb0759c0a474cfb2b9902cd0471158fa32a4d2c35692309d266e66013444bdced8ed00d9 WHIRLPOOL 9655627d9770b6850d33b18ef7dc349396454fc217b90d3f7c2ffdac028533ff741c3a70ee4280ef91baf67425d037e6559dcea1da4c568ca51df8e9b7ab6df3
DIST zlib-1.2.7.tar.gz 560351 SHA256 fa9c9c8638efb8cb8ef5e4dd5453e455751e1c530b1595eed466e1be9b7e26c5 SHA512 b1c073ad26684e354f7c522c14655840592e03872bc0a94690f89cae2ff88f146fce1dad252ff27a889dac4a32ff9f8ab63ba940671f9da89e9ba3e19f1bf58d WHIRLPOOL 2f0bc05a9c14033adc33cdd14d1dce72a57c650304692141a89af26274b62ffa67d09afbc68562d07279f80e214e396b357f20094ecf4b9576bc200cafa01a6d
+DIST zlib-1.2.8.tar.gz 571091 SHA256 36658cb768a54c1d4dec43c3116c27ed893e88b02ecfcb44f2166f9c0b7f2a0d SHA512 ece209d4c7ec0cb58ede791444dc754e0d10811cbbdebe3df61c0fd9f9f9867c1c3ccd5f1827f847c005e24eef34fb5bf87b5d3f894d75da04f1797538290e4a WHIRLPOOL bcb6243f1a9370eafcea03c227938da1cc106c934193ce59ef4fbdca0167777b95c9baa376feb6d8d369023024a74de5df17c2b6ec5887cdb732ffc95808ef95
View
99 sys-libs/zlib/zlib-1.2.8.ebuild
@@ -0,0 +1,99 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-libs/zlib/zlib-1.2.8.ebuild,v 1.2 2013/06/17 02:33:13 vapier Exp $
+
+AUTOTOOLS_AUTO_DEPEND="no"
+inherit autotools toolchain-funcs multilib
+
+DESCRIPTION="Standard (de)compression library"
+HOMEPAGE="http://www.zlib.net/"
+SRC_URI="http://zlib.net/${P}.tar.gz
+ http://www.gzip.org/zlib/${P}.tar.gz
+ http://www.zlib.net/current/beta/${P}.tar.gz"
+
+LICENSE="ZLIB"
+SLOT="0"
+KEYWORDS="~*"
+IUSE="minizip static-libs"
+
+DEPEND="minizip? ( ${AUTOTOOLS_DEPEND} )"
+RDEPEND="!<dev-libs/libxml2-2.7.7" #309623
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+
+ if use minizip ; then
+ cd contrib/minizip
+ eautoreconf
+ fi
+}
+
+echoit() { echo "$@"; "$@"; }
+src_compile() {
+ case ${CHOST} in
+ *-mingw*|mingw*)
+ emake -f win32/Makefile.gcc STRIP=true PREFIX=${CHOST}- || die
+ sed \
+ -e 's|@prefix@|/usr|g' \
+ -e 's|@exec_prefix@|${prefix}|g' \
+ -e 's|@libdir@|${exec_prefix}/'$(get_libdir)'|g' \
+ -e 's|@sharedlibdir@|${exec_prefix}/'$(get_libdir)'|g' \
+ -e 's|@includedir@|${prefix}/include|g' \
+ -e 's|@VERSION@|'${PV}'|g' \
+ zlib.pc.in > zlib.pc || die
+ ;;
+ *) # not an autoconf script, so can't use econf
+ local uname=$(/usr/share/gnuconfig/config.sub "${CHOST}" | cut -d- -f3) #347167
+ echoit ./configure \
+ --shared \
+ --prefix=/usr \
+ --libdir=/usr/$(get_libdir) \
+ ${uname:+--uname=${uname}} \
+ || die
+ emake || die
+ ;;
+ esac
+ if use minizip ; then
+ cd contrib/minizip
+ econf $(use_enable static-libs static)
+ emake || die
+ fi
+}
+
+sed_macros() {
+ # clean up namespace a little #383179
+ # we do it here so we only have to tweak 2 files
+ sed -i -r 's:\<(O[FN])\>:_Z_\1:g' "$@" || die
+}
+src_install() {
+ case ${CHOST} in
+ *-mingw*|mingw*)
+ emake -f win32/Makefile.gcc install \
+ BINARY_PATH="${D}/usr/bin" \
+ LIBRARY_PATH="${D}/usr/$(get_libdir)" \
+ INCLUDE_PATH="${D}/usr/include" \
+ SHARED_MODE=1 \
+ || die
+ insinto /usr/share/pkgconfig
+ doins zlib.pc || die
+ ;;
+
+ *)
+ emake install DESTDIR="${D}" LDCONFIG=: || die
+ gen_usr_ldscript -a z
+ ;;
+ esac
+ sed_macros "${D}"/usr/include/*.h
+
+ dodoc FAQ README ChangeLog doc/*.txt
+
+ if use minizip ; then
+ cd contrib/minizip
+ emake install DESTDIR="${D}" || die
+ sed_macros "${D}"/usr/include/minizip/*.h
+ dodoc *.txt
+ fi
+
+ use static-libs || rm -f "${D}"/usr/$(get_libdir)/lib{z,minizip}.{a,la} #419645
+}

0 comments on commit b024e47

Please sign in to comment.