6 |
6 |
# Worth keeping an eye on 'develop' branch upstream for possible backports.
|
7 |
7 |
AUTOTOOLS_AUTO_DEPEND="no"
|
8 |
8 |
VERIFY_SIG_OPENPGP_KEY_PATH="${BROOT}"/usr/share/openpgp-keys/madler.asc
|
9 |
|
inherit autotools multilib-minimal flag-o-matic toolchain-funcs usr-ldscript verify-sig
|
|
9 |
inherit autotools edo multilib-minimal flag-o-matic toolchain-funcs usr-ldscript verify-sig
|
10 |
10 |
|
11 |
11 |
DESCRIPTION="Standard (de)compression library"
|
12 |
12 |
HOMEPAGE="https://zlib.net/"
|
13 |
|
SRC_URI="https://zlib.net/${P}.tar.xz
|
|
13 |
SRC_URI="
|
|
14 |
https://zlib.net/${P}.tar.xz
|
14 |
15 |
https://zlib.net/fossils/${P}.tar.xz
|
15 |
16 |
https://zlib.net/current/beta/${P}.tar.xz
|
16 |
|
verify-sig? ( https://zlib.net/${P}.tar.xz.asc )"
|
|
17 |
https://github.com/madler/zlib/releases/download/v${PV}/${P}.tar.xz
|
|
18 |
verify-sig? (
|
|
19 |
https://zlib.net/${P}.tar.xz.asc
|
|
20 |
https://github.com/madler/zlib/releases/download/v${PV}/${P}.tar.xz.asc
|
|
21 |
)
|
|
22 |
"
|
17 |
23 |
|
18 |
24 |
LICENSE="ZLIB"
|
19 |
25 |
SLOT="0/1" # subslot = SONAME
|
20 |
|
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
|
|
26 |
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
|
21 |
27 |
IUSE="minizip static-libs"
|
22 |
28 |
|
23 |
29 |
RDEPEND="!sys-libs/zlib-ng[compat]"
|
... | ... | |
59 |
65 |
esac
|
60 |
66 |
}
|
61 |
67 |
|
62 |
|
echoit() { echo "$@"; "$@"; }
|
63 |
|
|
64 |
68 |
multilib_src_configure() {
|
65 |
69 |
# We pass manually instead of relying on the configure script/makefile
|
66 |
70 |
# because it would pass it even for older binutils.
|
... | ... | |
89 |
93 |
)
|
90 |
94 |
|
91 |
95 |
# Not an autoconf script, so can't use econf
|
92 |
|
echoit "${S}"/configure "${myconf[@]}" || die
|
|
96 |
edo "${S}"/configure "${myconf[@]}"
|
93 |
97 |
|
94 |
98 |
;;
|
95 |
99 |
esac
|
... | ... | |
126 |
130 |
use minizip && emake -C contrib/minizip
|
127 |
131 |
}
|
128 |
132 |
|
129 |
|
sed_macros() {
|
130 |
|
# Clean up namespace a little, bug #383179
|
131 |
|
# We do it here so we only have to tweak 2 files
|
132 |
|
sed -i -r 's:\<(O[FN])\>:_Z_\1:g' "$@" || die
|
133 |
|
}
|
134 |
|
|
135 |
133 |
multilib_src_install() {
|
136 |
134 |
case ${CHOST} in
|
137 |
135 |
*-mingw*|mingw*)
|
... | ... | |
154 |
152 |
;;
|
155 |
153 |
esac
|
156 |
154 |
|
157 |
|
sed_macros "${ED}"/usr/include/*.h
|
158 |
|
|
159 |
155 |
if use minizip ; then
|
160 |
156 |
emake -C contrib/minizip install DESTDIR="${D}"
|
161 |
|
sed_macros "${ED}"/usr/include/minizip/*.h
|
162 |
157 |
|
163 |
158 |
# This might not exist if slibtool is used.
|
164 |
159 |
# bug #816756
|