mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-09-16 14:29:05 -07:00
sys-libs/zlib: install ints.h again
Note that I've tweaked the upstream patch for this (madler said he's merged it locally) to drop the crypt.h ref, but I suspect that zlib commit 7e6f0784cc0c33e8d5fcb368248168c6656f73c8 means we can actually drop the crypt.h hack too. But left that for now. Bug: https://bugs.gentoo.org/658536 Bug: https://bugs.gentoo.org/970227 Closes: https://bugs.gentoo.org/970234 Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
25
sys-libs/zlib/files/zlib-1.3.2-minizip-install.patch
Normal file
25
sys-libs/zlib/files/zlib-1.3.2-minizip-install.patch
Normal file
@@ -0,0 +1,25 @@
|
||||
https://github.com/madler/zlib/issues/1164
|
||||
https://github.com/madler/zlib/pull/1165
|
||||
|
||||
From 36ff1be48ef696cc67b0855f7c8537ce0276210d Mon Sep 17 00:00:00 2001
|
||||
From: Rui Chen <rui@chenrui.dev>
|
||||
Date: Tue, 17 Feb 2026 10:48:39 -0500
|
||||
Subject: [PATCH] contrib/minizip: install ints.h
|
||||
|
||||
Signed-off-by: Rui Chen <rui@chenrui.dev>
|
||||
---
|
||||
contrib/minizip/Makefile.am | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/contrib/minizip/Makefile.am b/contrib/minizip/Makefile.am
|
||||
index d343011eb..b7dea4f7e 100644
|
||||
--- a/contrib/minizip/Makefile.am
|
||||
+++ b/contrib/minizip/Makefile.am
|
||||
@@ -27,5 +27,6 @@ libminizip_la_LDFLAGS = $(AM_LDFLAGS) -version-info 1:0:0 -lz
|
||||
minizip_includedir = $(includedir)/minizip
|
||||
minizip_include_HEADERS = \
|
||||
+ ints.h \
|
||||
ioapi.h \
|
||||
mztools.h \
|
||||
unzip.h \
|
||||
|
||||
177
sys-libs/zlib/zlib-1.3.2-r1.ebuild
Normal file
177
sys-libs/zlib/zlib-1.3.2-r1.ebuild
Normal file
@@ -0,0 +1,177 @@
|
||||
# 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
|
||||
|
||||
"${FILESDIR}"/${PN}-1.3.2-minizip-install.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
|
||||
}
|
||||
Reference in New Issue
Block a user