summaryrefslogtreecommitdiff
path: root/sys-libs/zlib
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /sys-libs/zlib
reinit the tree, so we can have metadata
Diffstat (limited to 'sys-libs/zlib')
-rw-r--r--sys-libs/zlib/Manifest7
-rw-r--r--sys-libs/zlib/files/zlib-1.2.11-fix-deflateParams-usage.patch67
-rw-r--r--sys-libs/zlib/metadata.xml14
-rw-r--r--sys-libs/zlib/zlib-1.2.11-r1.ebuild126
-rw-r--r--sys-libs/zlib/zlib-1.2.11.ebuild124
5 files changed, 338 insertions, 0 deletions
diff --git a/sys-libs/zlib/Manifest b/sys-libs/zlib/Manifest
new file mode 100644
index 000000000000..cdb36a2f44c6
--- /dev/null
+++ b/sys-libs/zlib/Manifest
@@ -0,0 +1,7 @@
+AUX zlib-1.2.11-fix-deflateParams-usage.patch 2937 SHA256 0b8c6cbbb179fdb55fb492657a6c4514b4035ff126c353ef9fae2e5a0837c1c6 SHA512 9b949d894be2bbb60d687820e79d7a02e733e8426e6602482f3a3902fca3571bbfba38ddd84a88f5a093fdb25ac90e4076905d19b86ab70ebce6e250fd118286 WHIRLPOOL fbb8143e35a9eace23c4a3cdf80cfb66c9f09ed499abeab130445d89e61949b67bf0f1b70c11f9a65c99a722ac83a53897b5cd2b291563cc0ea32154559547ac
+DIST zlib-1.2.11.tar.gz 607698 SHA256 c3e5e9fdd5004dcb542feda5ee4f0ff0744628baf8ed2dd5d66f8ca1197cb1a1 SHA512 73fd3fff4adeccd4894084c15ddac89890cd10ef105dd5e1835e1e9bbb6a49ff229713bd197d203edfa17c2727700fce65a2a235f07568212d820dca88b528ae WHIRLPOOL 4263b67dd133e9eb6a837f270a53e6083af871993c52f89a21135f188f83c58646e7aa5882d62f35370032afe7a9964dd2796c25d104b8a2a70b293a5e31f72a
+EBUILD zlib-1.2.11-r1.ebuild 3176 SHA256 c5b42704b850e4f45ffc8cc1fc15aa6a121a72e895793611f87faf1abc1af17c SHA512 4df2ffc5c7358543797fbd187c3a5107d32967577b0822daa032cf44c31beeb448db9def6324b56a6f3f66745effa58643dec36d1c90c0241d78e52de45936a1 WHIRLPOOL 6809a3f7745a9e3dedf1b385f6df5541766d6ed1566766372b2aa2e9c455eab7d18e427c2cbb495d6708b14f2ea27d3af33d5bebbde243a86ac312a3f1751343
+EBUILD zlib-1.2.11.ebuild 3102 SHA256 a150eed4cbe2c3f3c756dd0fcf25c1f06f0b8121d75ae0181dd3da47e631146c SHA512 d423c1019803166a5f4b14a4e6bbf2119d698eaa9977c259140e2e378e692721235e6b6a45279fca1f7928e4c3d18c3e430f73ad994e69f4b4b3213b14668ee2 WHIRLPOOL e2c601a0f5749c42dbd947108a618b59b5fcce7d9cb2615df8f1b8ff37af6ed7e435a2e088f32632c3a4c4182fc6d155540b2b3bc3aebbed70989f308e41851d
+MISC ChangeLog 4685 SHA256 3f2edb1c1b304356ed97ad121cd544c76a41d2c28eaba05a920dd501ba50b83e SHA512 5db4b21be1cc55c9735480a409273caa84f9ce8837a390499835f5899d720a4dfad99b933004ad3c0f1fe3565175462f66e6d757b1fdf1909c9f43c09c3e944a WHIRLPOOL 96346a194bca8decd2468bb54fb9883c38ae1b0ee3a9d5ba429a080bdeeaf4295df2d76693e07f17f8b6cae7090ba8cfffa12dcbaffa1f4d3e2ac21453a76f57
+MISC ChangeLog-2015 18533 SHA256 4d97faf5b6f64cd59bdf027d8150044cb9e37e48c14a2aa3d1ffadd8f6b2ba9e SHA512 8274af7f6e2931f659e8cf895b423233f8be84d18b769573374b400cffdbaf95b3ff2393e062dfbe5824b28bea687d70d0710a4a295c9f1f4da189d044526f8c WHIRLPOOL e5fc8260f89cd61ff45e45bac801e53972155c84a9f0ef3fde517d69f0aadcc3f779efa34e758123f3632f90425ab0749dbb110cd91f7af258beb81d8213cc4c
+MISC metadata.xml 432 SHA256 b7ffe87c593d62ee6c38be6ecf0829fa9ac85e3002d6a8d031b3ad3cdbc56652 SHA512 947d4b2035ab49c42f6141f14553f1e8f4796b4ddc24c6a4f071ac2300eb120648dd03eef49773295d3e3f30cd9d3cbb391bde798dacf1187b46ff75abd59420 WHIRLPOOL c64a493a3b0f91be8588a7524de172c3db792a638d3d89b6473f8131d1e3cae280378c1f4b0edfbc132e51b285c24687fbd8cace280b723c134ba1ef28c9b0c9
diff --git a/sys-libs/zlib/files/zlib-1.2.11-fix-deflateParams-usage.patch b/sys-libs/zlib/files/zlib-1.2.11-fix-deflateParams-usage.patch
new file mode 100644
index 000000000000..18764849b945
--- /dev/null
+++ b/sys-libs/zlib/files/zlib-1.2.11-fix-deflateParams-usage.patch
@@ -0,0 +1,67 @@
+From f9694097dd69354b03cb8af959094c7f260db0a1 Mon Sep 17 00:00:00 2001
+From: Mark Adler <madler@alumni.caltech.edu>
+Date: Mon, 16 Jan 2017 09:49:35 -0800
+Subject: [PATCH] Permit a deflateParams() parameter change as soon as
+ possible.
+
+This commit allows a parameter change even if the input data has
+not all been compressed and copied to the application output
+buffer, so long as all of the input data has been compressed to
+the internal pending output buffer. This also allows an immediate
+deflateParams change so long as there have been no deflate calls
+since initialization or reset.
+---
+ deflate.c | 6 +++---
+ zlib.h | 11 ++++++-----
+ 2 files changed, 9 insertions(+), 8 deletions(-)
+
+diff --git a/deflate.c b/deflate.c
+index b63311a5..20bda4f6 100644
+--- a/deflate.c
++++ b/deflate.c
+@@ -494,7 +494,7 @@ int ZEXPORT deflateResetKeep (strm)
+ s->wrap == 2 ? crc32(0L, Z_NULL, 0) :
+ #endif
+ adler32(0L, Z_NULL, 0);
+- s->last_flush = Z_NO_FLUSH;
++ s->last_flush = -2;
+
+ _tr_init(s);
+
+@@ -587,12 +587,12 @@ int ZEXPORT deflateParams(strm, level, strategy)
+ func = configuration_table[s->level].func;
+
+ if ((strategy != s->strategy || func != configuration_table[level].func) &&
+- s->high_water) {
++ s->last_flush != -2) {
+ /* Flush the last buffer: */
+ int err = deflate(strm, Z_BLOCK);
+ if (err == Z_STREAM_ERROR)
+ return err;
+- if (strm->avail_out == 0)
++ if (strm->avail_in || (s->strstart - s->block_start) + s->lookahead)
+ return Z_BUF_ERROR;
+ }
+ if (s->level != level) {
+diff --git a/zlib.h b/zlib.h
+index 5daf4f28..577d81e3 100644
+--- a/zlib.h
++++ b/zlib.h
+@@ -712,11 +712,12 @@ ZEXTERN int ZEXPORT deflateParams OF((z_streamp strm,
+ used to switch between compression and straight copy of the input data, or
+ to switch to a different kind of input data requiring a different strategy.
+ If the compression approach (which is a function of the level) or the
+- strategy is changed, and if any input has been consumed in a previous
+- deflate() call, then the input available so far is compressed with the old
+- level and strategy using deflate(strm, Z_BLOCK). There are three approaches
+- for the compression levels 0, 1..3, and 4..9 respectively. The new level
+- and strategy will take effect at the next call of deflate().
++ strategy is changed, and if there have been any deflate() calls since the
++ state was initialized or reset, then the input available so far is
++ compressed with the old level and strategy using deflate(strm, Z_BLOCK).
++ There are three approaches for the compression levels 0, 1..3, and 4..9
++ respectively. The new level and strategy will take effect at the next call
++ of deflate().
+
+ If a deflate(strm, Z_BLOCK) is performed by deflateParams(), and it does
+ not have enough output space to complete, then the parameter change will not
diff --git a/sys-libs/zlib/metadata.xml b/sys-libs/zlib/metadata.xml
new file mode 100644
index 000000000000..105b205e9e4e
--- /dev/null
+++ b/sys-libs/zlib/metadata.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>base-system@gentoo.org</email>
+ <name>Gentoo Base System</name>
+</maintainer>
+<use>
+ <flag name="minizip">include the minizip library for quick and dirty zip extraction</flag>
+</use>
+<upstream>
+ <remote-id type="cpe">cpe:/a:gnu:zlib</remote-id>
+</upstream>
+</pkgmetadata>
diff --git a/sys-libs/zlib/zlib-1.2.11-r1.ebuild b/sys-libs/zlib/zlib-1.2.11-r1.ebuild
new file mode 100644
index 000000000000..065bb3497be1
--- /dev/null
+++ b/sys-libs/zlib/zlib-1.2.11-r1.ebuild
@@ -0,0 +1,126 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+AUTOTOOLS_AUTO_DEPEND="no"
+
+inherit autotools toolchain-funcs multilib multilib-minimal
+
+DESCRIPTION="Standard (de)compression library"
+HOMEPAGE="https://zlib.net/"
+SRC_URI="https://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/1" # subslot = SONAME
+KEYWORDS="~alpha amd64 ~arm ~arm64 ~hppa ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh ~sparc x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
+IUSE="minizip static-libs"
+
+DEPEND="minizip? ( ${AUTOTOOLS_DEPEND} )"
+RDEPEND="abi_x86_32? (
+ !<=app-emulation/emul-linux-x86-baselibs-20130224
+ !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)]
+ )
+ !<dev-libs/libxml2-2.7.7" #309623
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-1.2.11-fix-deflateParams-usage.patch
+
+ if use minizip ; then
+ cd contrib/minizip || die
+ eautoreconf
+ fi
+
+ case ${CHOST} in
+ *-mingw*|mingw*)
+ # uses preconfigured Makefile rather than configure script
+ multilib_copy_sources
+ ;;
+ esac
+}
+
+echoit() { echo "$@"; "$@"; }
+
+multilib_src_configure() {
+ case ${CHOST} in
+ *-mingw*|mingw*)
+ ;;
+ *) # not an autoconf script, so can't use econf
+ local uname=$("${EPREFIX}"/usr/share/gnuconfig/config.sub "${CHOST}" | cut -d- -f3) #347167
+ echoit "${S}"/configure \
+ --shared \
+ --prefix="${EPREFIX}/usr" \
+ --libdir="${EPREFIX}/usr/$(get_libdir)" \
+ ${uname:+--uname=${uname}} \
+ || die
+ ;;
+ esac
+
+ if use minizip ; then
+ local minizipdir="contrib/minizip"
+ mkdir -p "${BUILD_DIR}/${minizipdir}" || die
+ cd ${minizipdir} || die
+ ECONF_SOURCE="${S}/${minizipdir}" \
+ econf $(use_enable static-libs static)
+ fi
+}
+
+multilib_src_compile() {
+ case ${CHOST} in
+ *-mingw*|mingw*)
+ emake -f win32/Makefile.gcc STRIP=true PREFIX=${CHOST}-
+ 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
+ ;;
+ *)
+ emake
+ ;;
+ esac
+ use minizip && emake -C contrib/minizip
+}
+
+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
+}
+
+multilib_src_install() {
+ case ${CHOST} in
+ *-mingw*|mingw*)
+ emake -f win32/Makefile.gcc install \
+ BINARY_PATH="${ED}/usr/bin" \
+ LIBRARY_PATH="${ED}/usr/$(get_libdir)" \
+ INCLUDE_PATH="${ED}/usr/include" \
+ SHARED_MODE=1
+ # overwrites zlib.pc created from win32/Makefile.gcc #620136
+ insinto /usr/$(get_libdir)/pkgconfig
+ doins zlib.pc
+ ;;
+
+ *)
+ emake install DESTDIR="${D}" LDCONFIG=:
+ gen_usr_ldscript -a z
+ ;;
+ esac
+ sed_macros "${ED}"/usr/include/*.h
+
+ if use minizip ; then
+ emake -C contrib/minizip install DESTDIR="${D}"
+ sed_macros "${ED}"/usr/include/minizip/*.h
+ fi
+
+ use static-libs || rm -f "${ED}"/usr/$(get_libdir)/lib{z,minizip}.{a,la} #419645
+}
+
+multilib_src_install_all() {
+ dodoc FAQ README ChangeLog doc/*.txt
+ use minizip && dodoc contrib/minizip/*.txt
+}
diff --git a/sys-libs/zlib/zlib-1.2.11.ebuild b/sys-libs/zlib/zlib-1.2.11.ebuild
new file mode 100644
index 000000000000..8880513349a7
--- /dev/null
+++ b/sys-libs/zlib/zlib-1.2.11.ebuild
@@ -0,0 +1,124 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+AUTOTOOLS_AUTO_DEPEND="no"
+
+inherit autotools toolchain-funcs multilib multilib-minimal
+
+DESCRIPTION="Standard (de)compression library"
+HOMEPAGE="https://zlib.net/"
+SRC_URI="https://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/1" # subslot = SONAME
+KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
+IUSE="minizip static-libs"
+
+DEPEND="minizip? ( ${AUTOTOOLS_DEPEND} )"
+RDEPEND="abi_x86_32? (
+ !<=app-emulation/emul-linux-x86-baselibs-20130224
+ !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)]
+ )
+ !<dev-libs/libxml2-2.7.7" #309623
+
+src_prepare() {
+ if use minizip ; then
+ cd contrib/minizip || die
+ eautoreconf
+ fi
+
+ case ${CHOST} in
+ *-mingw*|mingw*)
+ # uses preconfigured Makefile rather than configure script
+ multilib_copy_sources
+ ;;
+ esac
+}
+
+echoit() { echo "$@"; "$@"; }
+
+multilib_src_configure() {
+ case ${CHOST} in
+ *-mingw*|mingw*)
+ ;;
+ *) # not an autoconf script, so can't use econf
+ local uname=$("${EPREFIX}"/usr/share/gnuconfig/config.sub "${CHOST}" | cut -d- -f3) #347167
+ echoit "${S}"/configure \
+ --shared \
+ --prefix="${EPREFIX}/usr" \
+ --libdir="${EPREFIX}/usr/$(get_libdir)" \
+ ${uname:+--uname=${uname}} \
+ || die
+ ;;
+ esac
+
+ if use minizip ; then
+ local minizipdir="contrib/minizip"
+ mkdir -p "${BUILD_DIR}/${minizipdir}" || die
+ cd ${minizipdir} || die
+ ECONF_SOURCE="${S}/${minizipdir}" \
+ econf $(use_enable static-libs static)
+ fi
+}
+
+multilib_src_compile() {
+ case ${CHOST} in
+ *-mingw*|mingw*)
+ emake -f win32/Makefile.gcc STRIP=true PREFIX=${CHOST}-
+ 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
+ ;;
+ *)
+ emake
+ ;;
+ esac
+ use minizip && emake -C contrib/minizip
+}
+
+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
+}
+
+multilib_src_install() {
+ case ${CHOST} in
+ *-mingw*|mingw*)
+ emake -f win32/Makefile.gcc install \
+ BINARY_PATH="${ED}/usr/bin" \
+ LIBRARY_PATH="${ED}/usr/$(get_libdir)" \
+ INCLUDE_PATH="${ED}/usr/include" \
+ SHARED_MODE=1
+ # overwrites zlib.pc created from win32/Makefile.gcc #620136
+ insinto /usr/$(get_libdir)/pkgconfig
+ doins zlib.pc
+ ;;
+
+ *)
+ emake install DESTDIR="${D}" LDCONFIG=:
+ gen_usr_ldscript -a z
+ ;;
+ esac
+ sed_macros "${ED}"/usr/include/*.h
+
+ if use minizip ; then
+ emake -C contrib/minizip install DESTDIR="${D}"
+ sed_macros "${ED}"/usr/include/minizip/*.h
+ fi
+
+ use static-libs || rm -f "${ED}"/usr/$(get_libdir)/lib{z,minizip}.{a,la} #419645
+}
+
+multilib_src_install_all() {
+ dodoc FAQ README ChangeLog doc/*.txt
+ use minizip && dodoc contrib/minizip/*.txt
+}