mirror of
https://github.com/flatcar/scripts.git
synced 2025-08-12 07:26:58 +02:00
sys-libs/zlib: Sync with Gentoo
It's from Gentoo commit 44adc9b74598ec176148cf3f620f45ca86c7c172.
This commit is contained in:
parent
da04ed4c7a
commit
fef0dc835c
@ -1,4 +1,2 @@
|
||||
DIST zlib-1.2.11-cygwin-gzopen_w.patch 1170 BLAKE2B fe351436716634bd823da8c2811d332327d335d450d89bee85d7713b09dd454fe6aee264b044a41bf3be603aa36d67943ba6c7d8b46470e180e9b639728b5274 SHA512 14cc63a17fbf6afb6c8a8dd0b92df9807b48e0faf09c88f952083f10716ae62be8de2a0e1424b77fb538605b88898b381160521f2872afdda59e12bd27535c5a
|
||||
DIST zlib-1.2.13.tar.xz 1296496 BLAKE2B cefcd25989ce27e7d339af2a88455fcf64f6f5e647bedb0f05a45e4370a885fe45a60c023aa63e79b8ecf20ed3254d0052245f33f5769aca2838b42242be14a8 SHA512 9e7ac71a1824855ae526506883e439456b74ac0b811d54e94f6908249ba8719bec4c8d7672903c5280658b26cb6b5e93ecaaafe5cdc2980c760fa196773f0725
|
||||
DIST zlib-1.2.13.tar.xz.asc 235 BLAKE2B 29206175f06b4e36960fc6b9403101f55c1f5b768e1921ce1402217bc85978b9fba1a4130db2df5c148b6a1c947148372be20ff8c4ce337c6f2541b42fef7274 SHA512 ca5decebe9572e77e88bac5c5119bfda7e222ed3944e4692510ae70fb5f01d8694b59a6878472b84e6b61d2d1682d94473b6312832afa520a2a23293572ea621
|
||||
DIST zlib-1.2.7-cygwin-minizip.patch 2626 BLAKE2B 885f1fda877c0b783618b163702fb46126b7db572767cd4edb86bd92db1f432c887ef1724e70c8319c26886368dba3a962af5284ec0875c20ec8ad2245fd100a SHA512 e372f1e06311e843eca2092e182c41abb009b5e9880b60292d708e4bc0de5a9e4c43d49b25b0c09df4784bc46a1254472bc5cdbdd8d6c762a9f6a145a555bfe7
|
||||
|
@ -8,22 +8,16 @@ AUTOTOOLS_AUTO_DEPEND="no"
|
||||
VERIFY_SIG_OPENPGP_KEY_PATH="${BROOT}"/usr/share/openpgp-keys/madler.asc
|
||||
inherit autotools multilib-minimal flag-o-matic toolchain-funcs usr-ldscript verify-sig
|
||||
|
||||
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.xz
|
||||
https://zlib.net/fossils/${P}.tar.xz
|
||||
https://zlib.net/current/beta/${P}.tar.xz
|
||||
verify-sig? ( https://zlib.net/${P}.tar.xz.asc )
|
||||
elibc_Cygwin? ( ${CYGWINPATCHES[*]} )"
|
||||
verify-sig? ( https://zlib.net/${P}.tar.xz.asc )"
|
||||
|
||||
LICENSE="ZLIB"
|
||||
SLOT="0/1" # subslot = SONAME
|
||||
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris ~x86-winnt"
|
||||
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"
|
||||
IUSE="minizip static-libs"
|
||||
|
||||
RDEPEND="!sys-libs/zlib-ng[compat]"
|
||||
@ -51,33 +45,13 @@ PATCHES=(
|
||||
src_prepare() {
|
||||
default
|
||||
|
||||
if use elibc_Cygwin ; then
|
||||
local p
|
||||
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
|
||||
*-cygwin*)
|
||||
# Do not use _wopen, it's a mingw-only symbol
|
||||
sed -i -e '/define WIDECHAR/d' "${S}"/gzguts.h || 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
|
||||
|
||||
;;
|
||||
esac
|
||||
|
||||
case ${CHOST} in
|
||||
*-mingw*|mingw*|*-cygwin*)
|
||||
*-mingw*|mingw*)
|
||||
# Uses preconfigured Makefile rather than configure script
|
||||
multilib_copy_sources
|
||||
|
||||
@ -100,7 +74,7 @@ multilib_src_configure() {
|
||||
fi
|
||||
|
||||
case ${CHOST} in
|
||||
*-mingw*|mingw*|*-cygwin*)
|
||||
*-mingw*|mingw*)
|
||||
;;
|
||||
|
||||
*)
|
||||
@ -131,7 +105,7 @@ multilib_src_configure() {
|
||||
|
||||
multilib_src_compile() {
|
||||
case ${CHOST} in
|
||||
*-mingw*|mingw*|*-cygwin*)
|
||||
*-mingw*|mingw*)
|
||||
emake -f win32/Makefile.gcc STRIP=true PREFIX=${CHOST}-
|
||||
sed \
|
||||
-e 's|@prefix@|'"${EPREFIX}"'/usr|g' \
|
||||
@ -160,7 +134,7 @@ sed_macros() {
|
||||
|
||||
multilib_src_install() {
|
||||
case ${CHOST} in
|
||||
*-mingw*|mingw*|*-cygwin*)
|
||||
*-mingw*|mingw*)
|
||||
emake -f win32/Makefile.gcc install \
|
||||
BINARY_PATH="${ED}/usr/bin" \
|
||||
LIBRARY_PATH="${ED}/usr/$(get_libdir)" \
|
||||
|
Loading…
Reference in New Issue
Block a user