summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Haubenwallner <haubi@gentoo.org>2018-01-17 18:19:51 +0100
committerMichael Haubenwallner <haubi@gentoo.org>2018-01-17 18:20:14 +0100
commit03d80d896aa99447ff64cc89078b20b2d7755441 (patch)
treeb09cbeaa2e565437afc0fd37964857e9c78fcbe3
parentsys-libs/zlib: sync (diff)
downloadprefix-03d80d896aa99447ff64cc89078b20b2d7755441.zip
prefix-03d80d896aa99447ff64cc89078b20b2d7755441.tar.gz
prefix-03d80d896aa99447ff64cc89078b20b2d7755441.tar.bz2
sys-libs/zlib: apply minizip cygwin patches
Let's see how Cygwin upstream patches for minizip can help here. Closes: https://bugs.gentoo.org/643916 Package-Manager: Portage-2.3.19, Repoman-2.3.6
-rw-r--r--sys-libs/zlib/Manifest2
-rw-r--r--sys-libs/zlib/zlib-1.2.11-r1.ebuild19
2 files changed, 17 insertions, 4 deletions
diff --git a/sys-libs/zlib/Manifest b/sys-libs/zlib/Manifest
index a09e7fa..c6c0351 100644
--- a/sys-libs/zlib/Manifest
+++ b/sys-libs/zlib/Manifest
@@ -1 +1,3 @@
+DIST 1.2.11-gzopen_w.patch 1170 SHA256 2eea64808bc6edd2f12a7f7ef66381a73a546fa31ec9f95e5305cf51f3db3d86 SHA512 14cc63a17fbf6afb6c8a8dd0b92df9807b48e0faf09c88f952083f10716ae62be8de2a0e1424b77fb538605b88898b381160521f2872afdda59e12bd27535c5a WHIRLPOOL f7ac23bd77c2de46877788733ccea829a70c3fc6edf2b107c2b1b6542264be01252d44d25384c1844a60691a1d76434d3aa5244377afb0ea4d940c28545ad724
+DIST 1.2.7-minizip-cygwin.patch 2626 SHA256 0352e8b84ea4c9c8e3de1817fe42db6a729cce834d5784b399974418ec0e44e8 SHA512 e372f1e06311e843eca2092e182c41abb009b5e9880b60292d708e4bc0de5a9e4c43d49b25b0c09df4784bc46a1254472bc5cdbdd8d6c762a9f6a145a555bfe7 WHIRLPOOL ebe80cee80ba6b6fee91ead27e3a5fd3988de918ab50d5567ec567e66a42a1de36271cb62a8c2b7bb7e391b6b086db4fc493e1eaa06bd8ff671528407d3458ef
DIST zlib-1.2.11.tar.gz 607698 SHA256 c3e5e9fdd5004dcb542feda5ee4f0ff0744628baf8ed2dd5d66f8ca1197cb1a1 SHA512 73fd3fff4adeccd4894084c15ddac89890cd10ef105dd5e1835e1e9bbb6a49ff229713bd197d203edfa17c2727700fce65a2a235f07568212d820dca88b528ae WHIRLPOOL 4263b67dd133e9eb6a837f270a53e6083af871993c52f89a21135f188f83c58646e7aa5882d62f35370032afe7a9964dd2796c25d104b8a2a70b293a5e31f72a
diff --git a/sys-libs/zlib/zlib-1.2.11-r1.ebuild b/sys-libs/zlib/zlib-1.2.11-r1.ebuild
index 934d21d..c96c3f2 100644
--- a/sys-libs/zlib/zlib-1.2.11-r1.ebuild
+++ b/sys-libs/zlib/zlib-1.2.11-r1.ebuild
@@ -6,11 +6,17 @@ AUTOTOOLS_AUTO_DEPEND="no"
inherit autotools toolchain-funcs multilib multilib-minimal
+CYGWINPATCHES=(
+ "https://github.com/cygwinports/zlib/raw/22a3462cae33a82ad966ea0a7d6cbe8fc1368fec/1.2.11-gzopen_w.patch"
+ "https://github.com/cygwinports/zlib/raw/22a3462cae33a82ad966ea0a7d6cbe8fc1368fec/1.2.7-minizip-cygwin.patch"
+)
+
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"
+ http://www.zlib.net/current/beta/${P}.tar.gz
+ elibc_Cygwin? ( ${CYGWINPATCHES[*]} )"
LICENSE="ZLIB"
SLOT="0/1" # subslot = SONAME
@@ -27,9 +33,16 @@ RDEPEND="abi_x86_32? (
src_prepare() {
epatch "${FILESDIR}"/${PN}-1.2.11-fix-deflateParams-usage.patch
+ local p
+ use elibc_Cygwin &&
+ for p in "${CYGWINPATCHES[@]}"; do
+ epatch "${DISTDIR}/${p##*/}"
+ done
+
if use minizip ; then
- cd contrib/minizip || die
+ pushd contrib/minizip >/dev/null || die
eautoreconf
+ popd >/dev/null || die
fi
# epatch "${FILESDIR}"/${PN}-1.2.7-aix-soname.patch #213277
@@ -38,8 +51,6 @@ src_prepare() {
*-cygwin*)
# do not use _wopen, is a mingw symbol only
sed -i -e '/define WIDECHAR/d' "${S}"/gzguts.h
- # do not export gzopen_w, is a mingw symbol only
- sed -i -e '/gzopen_w/d' win32/zlib.def || die
# zlib1.dll is the mingw name, need cygz.dll
# cygz.dll is loaded by toolchain, put into subdir
sed -i -e 's|zlib1.dll|win32/cygz.dll|' win32/Makefile.gcc || die