diff options
author | Sam James <sam@gentoo.org> | 2023-08-18 11:36:51 +0100 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2023-08-18 11:36:51 +0100 |
commit | 1dc5bd0a25acd202393010f3c0ff396b06793e12 (patch) | |
tree | e7e4a7b381f972b94abfee6e90d1bf14f592b486 /app-arch/pigz | |
parent | sys-auth/polkit: add 123 (diff) | |
download | gentoo-1dc5bd0a25acd202393010f3c0ff396b06793e12.tar.gz gentoo-1dc5bd0a25acd202393010f3c0ff396b06793e12.tar.bz2 gentoo-1dc5bd0a25acd202393010f3c0ff396b06793e12.zip |
app-arch/pigz: fix compat w/ zlib-1.3
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'app-arch/pigz')
-rw-r--r-- | app-arch/pigz/files/pigz-2.7-zlib-1.3.patch | 22 | ||||
-rw-r--r-- | app-arch/pigz/pigz-2.7-r2.ebuild | 41 |
2 files changed, 63 insertions, 0 deletions
diff --git a/app-arch/pigz/files/pigz-2.7-zlib-1.3.patch b/app-arch/pigz/files/pigz-2.7-zlib-1.3.patch new file mode 100644 index 000000000000..232dc3787ab7 --- /dev/null +++ b/app-arch/pigz/files/pigz-2.7-zlib-1.3.patch @@ -0,0 +1,22 @@ +https://github.com/madler/pigz/issues/111 +https://github.com/madler/pigz/commit/907ca0763be4547a9b0cce8c1057217488149744 + +From 907ca0763be4547a9b0cce8c1057217488149744 Mon Sep 17 00:00:00 2001 +From: Mark Adler <madler@alumni.caltech.edu> +Date: Fri, 18 Aug 2023 03:27:12 -0700 +Subject: [PATCH] Make pigz compatible with two-component zlib version numbers. + +zlib 1.3 (not 1.3.0) broke the zlib_vernum() function in pigz. +This commit fixes that. +--- a/pigz.c ++++ b/pigz.c +@@ -1333,7 +1333,7 @@ local long zlib_vernum(void) { + } + ver++; + } while (left); +- return left < 2 ? num << (left << 2) : -1; ++ return left < 3 ? num << (left << 2) : -1; + } + + // -- check value combination routines for parallel calculation -- + diff --git a/app-arch/pigz/pigz-2.7-r2.ebuild b/app-arch/pigz/pigz-2.7-r2.ebuild new file mode 100644 index 000000000000..8f054ba7cec4 --- /dev/null +++ b/app-arch/pigz/pigz-2.7-r2.ebuild @@ -0,0 +1,41 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit toolchain-funcs flag-o-matic + +DESCRIPTION="A parallel implementation of gzip" +HOMEPAGE="https://www.zlib.net/pigz/" +SRC_URI="https://www.zlib.net/pigz/${P}.tar.gz" + +LICENSE="ZLIB" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~ppc-macos" +IUSE="static test" +RESTRICT="!test? ( test )" + +LIB_DEPEND="sys-libs/zlib[static-libs(+)]" +RDEPEND="!static? ( ${LIB_DEPEND//\[static-libs(+)]} )" +DEPEND=" + ${RDEPEND} + static? ( ${LIB_DEPEND} ) + test? ( app-arch/ncompress ) +" + +PATCHES=( + "${FILESDIR}"/${P}-memcpy-ub.patch + "${FILESDIR}"/${P}-zlib-1.3.patch +) + +src_compile() { + use static && append-ldflags -static + emake CC="$(tc-getCC)" CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" +} + +src_install() { + dobin ${PN} + dosym ${PN} /usr/bin/un${PN} + dodoc README + doman ${PN}.1 +} |