mirror of
https://github.com/flatcar/scripts.git
synced 2026-05-06 04:36:12 +02:00
sys-libs/zlib: Sync with Gentoo
It's from Gentoo commit 19fddda78288ed9da75807b3ed45b45ed7e02a93. Signed-off-by: Flatcar Buildbot <buildbot@flatcar-linux.org>
This commit is contained in:
parent
2af683643b
commit
3c03f14506
29
sdk_container/src/third_party/portage-stable/sys-libs/zlib/files/zlib-1.3.2-s390.patch
vendored
Normal file
29
sdk_container/src/third_party/portage-stable/sys-libs/zlib/files/zlib-1.3.2-s390.patch
vendored
Normal file
@ -0,0 +1,29 @@
|
||||
From 3625bc4c8e2015bbd0d902c75d9ef8bb5a8a3c17 Mon Sep 17 00:00:00 2001
|
||||
From: Robert Wolke <rwolke@users.noreply.github.com>
|
||||
Date: Wed, 18 Feb 2026 14:33:27 +0100
|
||||
Subject: [PATCH] fix: Add missing replacment of VGFMAFLAG
|
||||
|
||||
---
|
||||
configure | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/configure b/configure
|
||||
index bc723443e..4e6c8d85b 100755
|
||||
--- a/configure
|
||||
+++ b/configure
|
||||
@@ -1024,6 +1024,7 @@ sed < ${SRCDIR}Makefile.in "
|
||||
/^LDFLAGS *=/s#=.*#=$LDFLAGS#
|
||||
/^LDSHARED *=/s#=.*#=$LDSHARED#
|
||||
/^CPP *=/s#=.*#=$CPP#
|
||||
+/^VGFMAFLAG *=/s#=.*#=$VGFMAFLAG#
|
||||
/^STATICLIB *=/s#=.*#=$STATICLIB#
|
||||
/^SHAREDLIB *=/s#=.*#=$SHAREDLIB#
|
||||
/^SHAREDLIBV *=/s#=.*#=$SHAREDLIBV#
|
||||
@@ -1054,6 +1055,7 @@ sed < ${SRCDIR}zlib.pc.in "
|
||||
/^CC *=/s#=.*#=$CC#
|
||||
/^CFLAGS *=/s#=.*#=$CFLAGS#
|
||||
/^CPP *=/s#=.*#=$CPP#
|
||||
+/^VGFMAFLAG *=/s#=.*#=$VGFMAFLAG#
|
||||
/^LDSHARED *=/s#=.*#=$LDSHARED#
|
||||
/^STATICLIB *=/s#=.*#=$STATICLIB#
|
||||
/^SHAREDLIB *=/s#=.*#=$SHAREDLIB#
|
||||
@ -23,7 +23,7 @@ SRC_URI="
|
||||
|
||||
LICENSE="ZLIB"
|
||||
SLOT="0/1" # subslot = SONAME
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~arm64-macos ~x64-macos ~x64-solaris"
|
||||
KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sparc x86 ~arm64-macos ~x64-macos ~x64-solaris"
|
||||
IUSE="minizip static-libs"
|
||||
|
||||
RDEPEND="!sys-libs/zlib-ng[compat]"
|
||||
@ -45,6 +45,9 @@ PATCHES=(
|
||||
"${FILESDIR}"/${PN}-1.3.1-configure-fix-AR-libtool-on-darwin.patch
|
||||
|
||||
"${FILESDIR}"/${PN}-1.3.2-minizip-install.patch
|
||||
|
||||
# https://github.com/madler/zlib/issues/1200
|
||||
"${FILESDIR}"/${PN}-1.3.2-s390.patch
|
||||
)
|
||||
|
||||
src_prepare() {
|
||||
|
||||
@ -1,175 +0,0 @@
|
||||
# Copyright 1999-2026 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
# Worth keeping an eye on 'develop' branch upstream for possible backports.
|
||||
AUTOTOOLS_AUTO_DEPEND="no"
|
||||
VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/madler.asc
|
||||
inherit autotools dot-a edo multilib-minimal flag-o-matic verify-sig
|
||||
|
||||
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
|
||||
https://github.com/madler/zlib/releases/download/v${PV}/${P}.tar.xz
|
||||
verify-sig? (
|
||||
https://zlib.net/${P}.tar.xz.asc
|
||||
https://github.com/madler/zlib/releases/download/v${PV}/${P}.tar.xz.asc
|
||||
)
|
||||
"
|
||||
|
||||
LICENSE="ZLIB"
|
||||
SLOT="0/1" # subslot = SONAME
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~arm64-macos ~x64-macos ~x64-solaris"
|
||||
IUSE="minizip static-libs"
|
||||
|
||||
RDEPEND="!sys-libs/zlib-ng[compat]"
|
||||
DEPEND="${RDEPEND}"
|
||||
BDEPEND="
|
||||
minizip? ( ${AUTOTOOLS_DEPEND} )
|
||||
verify-sig? ( sec-keys/openpgp-keys-madler )
|
||||
"
|
||||
|
||||
PATCHES=(
|
||||
# Don't install unexpected & unused crypt.h header (which would clash with other pkgs)
|
||||
# Pending upstream. bug #658536
|
||||
"${FILESDIR}"/${PN}-1.2.11-minizip-drop-crypt-header.patch
|
||||
|
||||
# Respect AR, RANLIB, NM during build. Pending upstream. bug #831628
|
||||
"${FILESDIR}"/${PN}-1.3.1-configure-fix-AR-RANLIB-NM-detection.patch
|
||||
|
||||
# On Darwin, don't force /usr/bin/libtool as AR. bug #924839
|
||||
"${FILESDIR}"/${PN}-1.3.1-configure-fix-AR-libtool-on-darwin.patch
|
||||
)
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
|
||||
if use minizip ; then
|
||||
cd contrib/minizip || die
|
||||
eautoreconf
|
||||
fi
|
||||
|
||||
case ${CHOST} in
|
||||
*-mingw*|mingw*)
|
||||
# Uses preconfigured Makefile rather than configure script
|
||||
multilib_copy_sources
|
||||
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
use static-libs && lto-guarantee-fat
|
||||
multilib-minimal_src_configure
|
||||
}
|
||||
|
||||
multilib_src_configure() {
|
||||
append-ldflags $(test-flags-CCLD -Wl,--undefined-version)
|
||||
|
||||
case ${CHOST} in
|
||||
*-mingw*|mingw*)
|
||||
;;
|
||||
|
||||
*)
|
||||
# bug #347167
|
||||
local uname=$("${BROOT}"/usr/share/gnuconfig/config.sub "${CHOST}" | cut -d- -f3)
|
||||
|
||||
# for GNU Hurd
|
||||
if [[ ${uname} == gnu ]] ; then
|
||||
uname=GNU
|
||||
fi
|
||||
|
||||
local myconf=(
|
||||
--shared
|
||||
--prefix="${EPREFIX}/usr"
|
||||
--libdir="${EPREFIX}/usr/$(get_libdir)"
|
||||
${uname:+--uname=${uname}}
|
||||
)
|
||||
|
||||
# Not an autoconf script, so can't use econf
|
||||
edo "${S}"/configure "${myconf[@]}"
|
||||
|
||||
;;
|
||||
esac
|
||||
|
||||
if use minizip ; then
|
||||
local minizipdir="contrib/minizip"
|
||||
mkdir -p "${BUILD_DIR}/${minizipdir}" || die
|
||||
|
||||
cd ${minizipdir} || die
|
||||
ECONF_SOURCE="${S}/${minizipdir}" econf $(use_enable static-libs static)
|
||||
fi
|
||||
}
|
||||
|
||||
multilib_src_compile() {
|
||||
case ${CHOST} in
|
||||
*-mingw*|mingw*)
|
||||
emake -f win32/Makefile.gcc STRIP=true PREFIX=${CHOST}-
|
||||
sed \
|
||||
-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' \
|
||||
-e 's|@includedir@|${prefix}/include|g' \
|
||||
-e 's|@VERSION@|'${PV}'|g' \
|
||||
zlib.pc.in > zlib.pc || die
|
||||
;;
|
||||
|
||||
*)
|
||||
emake
|
||||
|
||||
;;
|
||||
esac
|
||||
|
||||
use minizip && emake -C contrib/minizip
|
||||
}
|
||||
|
||||
multilib_src_install() {
|
||||
case ${CHOST} in
|
||||
*-mingw*|mingw*)
|
||||
emake -f win32/Makefile.gcc install \
|
||||
BINARY_PATH="${ED}/usr/bin" \
|
||||
LIBRARY_PATH="${ED}/usr/$(get_libdir)" \
|
||||
INCLUDE_PATH="${ED}/usr/include" \
|
||||
SHARED_MODE=1
|
||||
|
||||
# Overwrites zlib.pc created from win32/Makefile.gcc, bug #620136
|
||||
insinto /usr/$(get_libdir)/pkgconfig
|
||||
doins zlib.pc
|
||||
|
||||
;;
|
||||
|
||||
*)
|
||||
emake install DESTDIR="${D}" LDCONFIG=:
|
||||
|
||||
;;
|
||||
esac
|
||||
|
||||
if use minizip ; then
|
||||
emake -C contrib/minizip install DESTDIR="${D}"
|
||||
|
||||
# This might not exist if slibtool is used.
|
||||
# bug #816756
|
||||
rm -f "${ED}"/usr/$(get_libdir)/libminizip.la || die
|
||||
fi
|
||||
|
||||
if ! use static-libs ; then
|
||||
# bug #419645
|
||||
rm "${ED}"/usr/$(get_libdir)/libz.a || die
|
||||
fi
|
||||
}
|
||||
|
||||
multilib_src_install_all() {
|
||||
strip-lto-bytecode
|
||||
|
||||
dodoc FAQ README ChangeLog doc/*.txt
|
||||
|
||||
if use minizip ; then
|
||||
dodoc contrib/minizip/*.txt
|
||||
doman contrib/minizip/*.1
|
||||
fi
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user