1 |
commit: e7f9cc1a14669e3d592e50ee8ad8ccc33ac1d692 |
2 |
Author: Sam James <sam <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Dec 13 11:38:51 2020 +0000 |
4 |
Commit: Sam James <sam <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Dec 26 20:14:51 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e7f9cc1a |
7 |
|
8 |
sys-libs/zlib: sync with ::prefix |
9 |
|
10 |
Bring the prefix-only changes to the main tree. |
11 |
Affected prefix platforms: cygwin/mingw. |
12 |
|
13 |
Closes: https://bugs.gentoo.org/729940 |
14 |
Package-Manager: Portage-3.0.12-prefix, Repoman-3.0.2 |
15 |
Signed-off-by: Sam James <sam <AT> gentoo.org> |
16 |
|
17 |
sys-libs/zlib/Manifest | 2 ++ |
18 |
sys-libs/zlib/zlib-1.2.11-r3.ebuild | 40 +++++++++++++++++++++++++++++-------- |
19 |
2 files changed, 34 insertions(+), 8 deletions(-) |
20 |
|
21 |
diff --git a/sys-libs/zlib/Manifest b/sys-libs/zlib/Manifest |
22 |
index 1db6ff63153..9a8e50982b8 100644 |
23 |
--- a/sys-libs/zlib/Manifest |
24 |
+++ b/sys-libs/zlib/Manifest |
25 |
@@ -1 +1,3 @@ |
26 |
+DIST zlib-1.2.11-cygwin-gzopen_w.patch 1170 BLAKE2B fe351436716634bd823da8c2811d332327d335d450d89bee85d7713b09dd454fe6aee264b044a41bf3be603aa36d67943ba6c7d8b46470e180e9b639728b5274 SHA512 14cc63a17fbf6afb6c8a8dd0b92df9807b48e0faf09c88f952083f10716ae62be8de2a0e1424b77fb538605b88898b381160521f2872afdda59e12bd27535c5a |
27 |
DIST zlib-1.2.11.tar.gz 607698 BLAKE2B 6bfc4bca5dcadba8a0d4121a2b3ed0bfe440c261003521862c8e6381f1a6f0a72d3fc037351d30afd7ef321e8e8d2ec817c046ac749f2ca0c97fbdc2f7e840b7 SHA512 73fd3fff4adeccd4894084c15ddac89890cd10ef105dd5e1835e1e9bbb6a49ff229713bd197d203edfa17c2727700fce65a2a235f07568212d820dca88b528ae |
28 |
+DIST zlib-1.2.7-cygwin-minizip.patch 2626 BLAKE2B 885f1fda877c0b783618b163702fb46126b7db572767cd4edb86bd92db1f432c887ef1724e70c8319c26886368dba3a962af5284ec0875c20ec8ad2245fd100a SHA512 e372f1e06311e843eca2092e182c41abb009b5e9880b60292d708e4bc0de5a9e4c43d49b25b0c09df4784bc46a1254472bc5cdbdd8d6c762a9f6a145a555bfe7 |
29 |
|
30 |
diff --git a/sys-libs/zlib/zlib-1.2.11-r3.ebuild b/sys-libs/zlib/zlib-1.2.11-r3.ebuild |
31 |
index b7ea3672a88..691432e4706 100644 |
32 |
--- a/sys-libs/zlib/zlib-1.2.11-r3.ebuild |
33 |
+++ b/sys-libs/zlib/zlib-1.2.11-r3.ebuild |
34 |
@@ -6,15 +6,21 @@ AUTOTOOLS_AUTO_DEPEND="no" |
35 |
|
36 |
inherit autotools toolchain-funcs multilib multilib-minimal usr-ldscript |
37 |
|
38 |
+CYGWINPATCHES=( |
39 |
+ "https://github.com/cygwinports/zlib/raw/22a3462cae33a82ad966ea0a7d6cbe8fc1368fec/1.2.11-gzopen_w.patch -> ${PN}-1.2.11-cygwin-gzopen_w.patch" |
40 |
+ "https://github.com/cygwinports/zlib/raw/22a3462cae33a82ad966ea0a7d6cbe8fc1368fec/1.2.7-minizip-cygwin.patch -> ${PN}-1.2.7-cygwin-minizip.patch" |
41 |
+) |
42 |
+ |
43 |
DESCRIPTION="Standard (de)compression library" |
44 |
HOMEPAGE="https://zlib.net/" |
45 |
SRC_URI="https://zlib.net/${P}.tar.gz |
46 |
http://www.gzip.org/zlib/${P}.tar.gz |
47 |
- http://www.zlib.net/current/beta/${P}.tar.gz" |
48 |
+ http://www.zlib.net/current/beta/${P}.tar.gz |
49 |
+ elibc_Cygwin? ( ${CYGWINPATCHES[*]} )" |
50 |
|
51 |
LICENSE="ZLIB" |
52 |
SLOT="0/1" # subslot = SONAME |
53 |
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" |
54 |
+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" |
55 |
IUSE="minizip static-libs" |
56 |
|
57 |
BDEPEND="minizip? ( ${AUTOTOOLS_DEPEND} )" |
58 |
@@ -29,13 +35,31 @@ PATCHES=( |
59 |
src_prepare() { |
60 |
default |
61 |
|
62 |
+ local p |
63 |
+ if use elibc_Cygwin ; then |
64 |
+ for p in "${CYGWINPATCHES[@]}" ; do |
65 |
+ # Strip out the "... -> " from the array |
66 |
+ eapply -p2 "${DISTDIR}/${p#*> }" |
67 |
+ done |
68 |
+ fi |
69 |
+ |
70 |
if use minizip ; then |
71 |
cd contrib/minizip || die |
72 |
eautoreconf |
73 |
fi |
74 |
|
75 |
case ${CHOST} in |
76 |
- *-mingw*|mingw*) |
77 |
+ *-cygwin*) |
78 |
+ # do not use _wopen, is a mingw symbol only |
79 |
+ sed -i -e '/define WIDECHAR/d' "${S}"/gzguts.h |
80 |
+ # zlib1.dll is the mingw name, need cygz.dll |
81 |
+ # cygz.dll is loaded by toolchain, put into subdir |
82 |
+ sed -i -e 's|zlib1.dll|win32/cygz.dll|' win32/Makefile.gcc || die |
83 |
+ ;; |
84 |
+ esac |
85 |
+ |
86 |
+ case ${CHOST} in |
87 |
+ *-mingw*|mingw*|*-cygwin*) |
88 |
# uses preconfigured Makefile rather than configure script |
89 |
multilib_copy_sources |
90 |
;; |
91 |
@@ -46,12 +70,12 @@ echoit() { echo "$@"; "$@"; } |
92 |
|
93 |
multilib_src_configure() { |
94 |
case ${CHOST} in |
95 |
- *-mingw*|mingw*) |
96 |
+ *-mingw*|mingw*|*-cygwin*) |
97 |
;; |
98 |
*) |
99 |
local uname=$("${EPREFIX}"/usr/share/gnuconfig/config.sub "${CHOST}" | cut -d- -f3) #347167 |
100 |
local myconf=( |
101 |
- --shared |
102 |
+ $(tc-is-static-only && echo "--static" || echo "--shared") |
103 |
--prefix="${EPREFIX}/usr" |
104 |
--libdir="${EPREFIX}/usr/$(get_libdir)" |
105 |
${uname:+--uname=${uname}} |
106 |
@@ -72,10 +96,10 @@ multilib_src_configure() { |
107 |
|
108 |
multilib_src_compile() { |
109 |
case ${CHOST} in |
110 |
- *-mingw*|mingw*) |
111 |
+ *-mingw*|mingw*|*-cygwin*) |
112 |
emake -f win32/Makefile.gcc STRIP=true PREFIX=${CHOST}- |
113 |
sed \ |
114 |
- -e 's|@prefix@|/usr|g' \ |
115 |
+ -e 's|@prefix@|'"${EPREFIX}"'/usr|g' \ |
116 |
-e 's|@exec_prefix@|${prefix}|g' \ |
117 |
-e 's|@libdir@|${exec_prefix}/'$(get_libdir)'|g' \ |
118 |
-e 's|@sharedlibdir@|${exec_prefix}/'$(get_libdir)'|g' \ |
119 |
@@ -98,7 +122,7 @@ sed_macros() { |
120 |
|
121 |
multilib_src_install() { |
122 |
case ${CHOST} in |
123 |
- *-mingw*|mingw*) |
124 |
+ *-mingw*|mingw*|*-cygwin*) |
125 |
emake -f win32/Makefile.gcc install \ |
126 |
BINARY_PATH="${ED}/usr/bin" \ |
127 |
LIBRARY_PATH="${ED}/usr/$(get_libdir)" \ |