summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2020-12-13 11:38:51 +0000
committerSam James <sam@gentoo.org>2020-12-26 20:14:51 +0000
commite7f9cc1a14669e3d592e50ee8ad8ccc33ac1d692 (patch)
tree1828a3706ea0df4ec48b5e8e3ed13c27ce59e2fa /sys-libs/zlib
parentmedia-sound/teamspeak-client: drop old version (diff)
downloadgentoo-e7f9cc1a14669e3d592e50ee8ad8ccc33ac1d692.tar.gz
gentoo-e7f9cc1a14669e3d592e50ee8ad8ccc33ac1d692.tar.bz2
gentoo-e7f9cc1a14669e3d592e50ee8ad8ccc33ac1d692.zip
sys-libs/zlib: sync with ::prefix
Bring the prefix-only changes to the main tree. Affected prefix platforms: cygwin/mingw. Closes: https://bugs.gentoo.org/729940 Package-Manager: Portage-3.0.12-prefix, Repoman-3.0.2 Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'sys-libs/zlib')
-rw-r--r--sys-libs/zlib/Manifest2
-rw-r--r--sys-libs/zlib/zlib-1.2.11-r3.ebuild40
2 files changed, 34 insertions, 8 deletions
diff --git a/sys-libs/zlib/Manifest b/sys-libs/zlib/Manifest
index 1db6ff63153..9a8e50982b8 100644
--- a/sys-libs/zlib/Manifest
+++ b/sys-libs/zlib/Manifest
@@ -1 +1,3 @@
+DIST zlib-1.2.11-cygwin-gzopen_w.patch 1170 BLAKE2B fe351436716634bd823da8c2811d332327d335d450d89bee85d7713b09dd454fe6aee264b044a41bf3be603aa36d67943ba6c7d8b46470e180e9b639728b5274 SHA512 14cc63a17fbf6afb6c8a8dd0b92df9807b48e0faf09c88f952083f10716ae62be8de2a0e1424b77fb538605b88898b381160521f2872afdda59e12bd27535c5a
DIST zlib-1.2.11.tar.gz 607698 BLAKE2B 6bfc4bca5dcadba8a0d4121a2b3ed0bfe440c261003521862c8e6381f1a6f0a72d3fc037351d30afd7ef321e8e8d2ec817c046ac749f2ca0c97fbdc2f7e840b7 SHA512 73fd3fff4adeccd4894084c15ddac89890cd10ef105dd5e1835e1e9bbb6a49ff229713bd197d203edfa17c2727700fce65a2a235f07568212d820dca88b528ae
+DIST zlib-1.2.7-cygwin-minizip.patch 2626 BLAKE2B 885f1fda877c0b783618b163702fb46126b7db572767cd4edb86bd92db1f432c887ef1724e70c8319c26886368dba3a962af5284ec0875c20ec8ad2245fd100a SHA512 e372f1e06311e843eca2092e182c41abb009b5e9880b60292d708e4bc0de5a9e4c43d49b25b0c09df4784bc46a1254472bc5cdbdd8d6c762a9f6a145a555bfe7
diff --git a/sys-libs/zlib/zlib-1.2.11-r3.ebuild b/sys-libs/zlib/zlib-1.2.11-r3.ebuild
index b7ea3672a88..691432e4706 100644
--- a/sys-libs/zlib/zlib-1.2.11-r3.ebuild
+++ b/sys-libs/zlib/zlib-1.2.11-r3.ebuild
@@ -6,15 +6,21 @@ AUTOTOOLS_AUTO_DEPEND="no"
inherit autotools toolchain-funcs multilib multilib-minimal usr-ldscript
+CYGWINPATCHES=(
+ "https://github.com/cygwinports/zlib/raw/22a3462cae33a82ad966ea0a7d6cbe8fc1368fec/1.2.11-gzopen_w.patch -> ${PN}-1.2.11-cygwin-gzopen_w.patch"
+ "https://github.com/cygwinports/zlib/raw/22a3462cae33a82ad966ea0a7d6cbe8fc1368fec/1.2.7-minizip-cygwin.patch -> ${PN}-1.2.7-cygwin-minizip.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
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris ~x86-winnt"
IUSE="minizip static-libs"
BDEPEND="minizip? ( ${AUTOTOOLS_DEPEND} )"
@@ -29,13 +35,31 @@ PATCHES=(
src_prepare() {
default
+ local p
+ if use elibc_Cygwin ; then
+ for p in "${CYGWINPATCHES[@]}" ; do
+ # Strip out the "... -> " from the array
+ eapply -p2 "${DISTDIR}/${p#*> }"
+ done
+ fi
+
if use minizip ; then
cd contrib/minizip || die
eautoreconf
fi
case ${CHOST} in
- *-mingw*|mingw*)
+ *-cygwin*)
+ # do not use _wopen, is a mingw symbol only
+ sed -i -e '/define WIDECHAR/d' "${S}"/gzguts.h
+ # 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
+ ;;
+ esac
+
+ case ${CHOST} in
+ *-mingw*|mingw*|*-cygwin*)
# uses preconfigured Makefile rather than configure script
multilib_copy_sources
;;
@@ -46,12 +70,12 @@ echoit() { echo "$@"; "$@"; }
multilib_src_configure() {
case ${CHOST} in
- *-mingw*|mingw*)
+ *-mingw*|mingw*|*-cygwin*)
;;
*)
local uname=$("${EPREFIX}"/usr/share/gnuconfig/config.sub "${CHOST}" | cut -d- -f3) #347167
local myconf=(
- --shared
+ $(tc-is-static-only && echo "--static" || echo "--shared")
--prefix="${EPREFIX}/usr"
--libdir="${EPREFIX}/usr/$(get_libdir)"
${uname:+--uname=${uname}}
@@ -72,10 +96,10 @@ multilib_src_configure() {
multilib_src_compile() {
case ${CHOST} in
- *-mingw*|mingw*)
+ *-mingw*|mingw*|*-cygwin*)
emake -f win32/Makefile.gcc STRIP=true PREFIX=${CHOST}-
sed \
- -e 's|@prefix@|/usr|g' \
+ -e 's|@prefix@|'"${EPREFIX}"'/usr|g' \
-e 's|@exec_prefix@|${prefix}|g' \
-e 's|@libdir@|${exec_prefix}/'$(get_libdir)'|g' \
-e 's|@sharedlibdir@|${exec_prefix}/'$(get_libdir)'|g' \
@@ -98,7 +122,7 @@ sed_macros() {
multilib_src_install() {
case ${CHOST} in
- *-mingw*|mingw*)
+ *-mingw*|mingw*|*-cygwin*)
emake -f win32/Makefile.gcc install \
BINARY_PATH="${ED}/usr/bin" \
LIBRARY_PATH="${ED}/usr/$(get_libdir)" \