diff options
author | Michał Górny <mgorny@gentoo.org> | 2023-09-12 12:25:08 +0200 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2023-09-12 12:25:50 +0200 |
commit | 45b40c67c120aadd5474063b1bd2d2cd1833b9d4 (patch) | |
tree | ec1417b381f3933cff6a2b81ca2d3adcb006da22 /app-arch | |
parent | dev-python/readme-renderer: keyword 42.0 for ~loong (diff) | |
download | gentoo-45b40c67c120aadd5474063b1bd2d2cd1833b9d4.tar.gz gentoo-45b40c67c120aadd5474063b1bd2d2cd1833b9d4.tar.bz2 gentoo-45b40c67c120aadd5474063b1bd2d2cd1833b9d4.zip |
app-arch/libarchive: Bump to 3.7.2
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'app-arch')
-rw-r--r-- | app-arch/libarchive/Manifest | 2 | ||||
-rw-r--r-- | app-arch/libarchive/files/libarchive-3.7.2-32bit-test.patch | 29 | ||||
-rw-r--r-- | app-arch/libarchive/libarchive-3.7.2.ebuild | 147 |
3 files changed, 178 insertions, 0 deletions
diff --git a/app-arch/libarchive/Manifest b/app-arch/libarchive/Manifest index 34ff66da5d15..0784c5c3e794 100644 --- a/app-arch/libarchive/Manifest +++ b/app-arch/libarchive/Manifest @@ -1,2 +1,4 @@ DIST libarchive-3.7.1.tar.xz 5254260 BLAKE2B 1a6fa4f5027effea3df1cfcd2d99b8b126fe03d727412b0a4529d6b2157c2c29490bcce206d0f771256c5ed6dec9612608c2c54c4861647f4e2892e0f5548adb SHA512 24380b9aa24434dfe39929ec85ede33580291023b20b7cdf03990ce62578eaeb389f5ca5680245a84c7aad51574c85a1fa3fad5254ec5395eadac1cb2130a936 DIST libarchive-3.7.1.tar.xz.asc 659 BLAKE2B 5e72732d2e5a4f5f04f3510b3d81a148f23dffa10a3ebe709e816388c5a6e68c08ee2bbe36d81141d5ffa94ed64df3e4ca05994cda651c09589fda69a6a95e90 SHA512 6f6f6e5780c609bd9c6c359c210656f26afb585bda46988687e19d1e55f4f3260ea80bf11bfba1213fb3a3e1514c5c096692b4b9e96ffbadf06f85eb1227250a +DIST libarchive-3.7.2.tar.xz 5237056 BLAKE2B 7221db4811a965ee61d879a2603480363628a19995a351b572d099be9f35576d76f0b0822f9a5a47d9929bc094d4444fd8eafcb4a073e39bb3aa797d4b926ca5 SHA512 a21bebb27b808cb7d2ed13a70739904a1b7b55661d8dea83c9897a0129cf71e20c962f13666c571782ff0f4f753ca885619c2097d9e7691c2dee4e6e4b9a2971 +DIST libarchive-3.7.2.tar.xz.asc 659 BLAKE2B 7141baf007b89b7ee38ec817b648cef5efb4d694953fcd49f6ed2dc95cf4da2d9259262b9eb4f01ff5d4ecee1257b266a8c6687a8e8ef8790121048229f1ad22 SHA512 c2ce850088245d7723720737d74d1cc1819984d01b3f9e4ed96b0757f4c6d6d511b78792181a12400c563632d74edcd0c2c3a4b7527cba40ada7ef74488078fc diff --git a/app-arch/libarchive/files/libarchive-3.7.2-32bit-test.patch b/app-arch/libarchive/files/libarchive-3.7.2-32bit-test.patch new file mode 100644 index 000000000000..5f43c2626735 --- /dev/null +++ b/app-arch/libarchive/files/libarchive-3.7.2-32bit-test.patch @@ -0,0 +1,29 @@ +From 3bd918d92f8c34ba12de9c6604d96f9e262a59fc Mon Sep 17 00:00:00 2001 +From: Martin Matuska <martin@matuska.de> +Date: Tue, 12 Sep 2023 08:54:47 +0200 +Subject: [PATCH] tests: fix zstd long option test for 32-bit architectures + +Fixes #1968 +--- + libarchive/test/test_write_filter_zstd.c | 8 ++++++-- + 1 file changed, 6 insertions(+), 2 deletions(-) + +diff --git a/libarchive/test/test_write_filter_zstd.c b/libarchive/test/test_write_filter_zstd.c +index 3cdbd812a..c9731f1b6 100644 +--- a/libarchive/test/test_write_filter_zstd.c ++++ b/libarchive/test/test_write_filter_zstd.c +@@ -161,8 +161,12 @@ DEFINE_TEST(test_write_filter_zstd) + archive_write_set_filter_option(a, NULL, "max-frame-size", "1048576")); + #endif + #if ZSTD_VERSION_NUMBER >= MINVER_LONG +- assertEqualIntA(a, ARCHIVE_OK, +- archive_write_set_filter_option(a, NULL, "long", "27")); ++ if ((int)(sizeof(size_t) == 4)) ++ assertEqualIntA(a, ARCHIVE_OK, ++ archive_write_set_filter_option(a, NULL, "long", "26")); ++ else ++ assertEqualIntA(a, ARCHIVE_OK, ++ archive_write_set_filter_option(a, NULL, "long", "27")); + assertEqualIntA(a, ARCHIVE_FAILED, + archive_write_set_filter_option(a, NULL, "long", "-1")); /* negative */ + #endif diff --git a/app-arch/libarchive/libarchive-3.7.2.ebuild b/app-arch/libarchive/libarchive-3.7.2.ebuild new file mode 100644 index 000000000000..cc8d80504e15 --- /dev/null +++ b/app-arch/libarchive/libarchive-3.7.2.ebuild @@ -0,0 +1,147 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 +inherit multilib-minimal toolchain-funcs verify-sig + +DESCRIPTION="Multi-format archive and compression library" +HOMEPAGE=" + https://www.libarchive.org/ + https://github.com/libarchive/libarchive/ +" +SRC_URI=" + https://www.libarchive.de/downloads/${P}.tar.xz + verify-sig? ( https://www.libarchive.de/downloads/${P}.tar.xz.asc ) +" + +LICENSE="BSD BSD-2 BSD-4 public-domain" +SLOT="0/13" +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="acl blake2 +bzip2 +e2fsprogs expat +iconv lz4 +lzma lzo nettle static-libs xattr zstd" +VERIFY_SIG_OPENPGP_KEY_PATH=${BROOT}/usr/share/openpgp-keys/libarchive.org.asc + +RDEPEND=" + sys-libs/zlib[${MULTILIB_USEDEP}] + acl? ( virtual/acl[${MULTILIB_USEDEP}] ) + blake2? ( app-crypt/libb2[${MULTILIB_USEDEP}] ) + bzip2? ( app-arch/bzip2[${MULTILIB_USEDEP}] ) + expat? ( dev-libs/expat[${MULTILIB_USEDEP}] ) + !expat? ( dev-libs/libxml2[${MULTILIB_USEDEP}] ) + iconv? ( virtual/libiconv[${MULTILIB_USEDEP}] ) + kernel_linux? ( + xattr? ( sys-apps/attr[${MULTILIB_USEDEP}] ) + ) + dev-libs/openssl:0=[${MULTILIB_USEDEP}] + lz4? ( >=app-arch/lz4-0_p131:0=[${MULTILIB_USEDEP}] ) + lzma? ( >=app-arch/xz-utils-5.2.5-r1[${MULTILIB_USEDEP}] ) + lzo? ( >=dev-libs/lzo-2[${MULTILIB_USEDEP}] ) + nettle? ( dev-libs/nettle:0=[${MULTILIB_USEDEP}] ) + zstd? ( app-arch/zstd[${MULTILIB_USEDEP}] ) +" +DEPEND="${RDEPEND} + kernel_linux? ( + virtual/os-headers + e2fsprogs? ( sys-fs/e2fsprogs[${MULTILIB_USEDEP}] ) + ) +" +BDEPEND=" + verify-sig? ( >=sec-keys/openpgp-keys-libarchive-20221209 ) + elibc_musl? ( sys-libs/queue-standalone ) +" + +# false positives (checks for libc-defined hash functions) +QA_CONFIG_IMPL_DECL_SKIP=( + SHA256_Init SHA256_Update SHA256_Final + SHA384_Init SHA384_Update SHA384_Final + SHA512_Init SHA512_Update SHA512_Final +) + +PATCHES=( + # https://github.com/libarchive/libarchive/issues/1968 + "${FILESDIR}/${P}-32bit-test.patch" +) + +multilib_src_configure() { + export ac_cv_header_ext2fs_ext2_fs_h=$(usex e2fsprogs) #354923 + + local myconf=( + $(use_enable acl) + $(use_enable static-libs static) + $(use_enable xattr) + $(use_with blake2 libb2) + $(use_with bzip2 bz2lib) + $(use_with expat) + $(use_with !expat xml2) + $(use_with iconv) + $(use_with lz4) + $(use_with lzma) + $(use_with lzo lzo2) + $(use_with nettle) + --with-zlib + $(use_with zstd) + + # Windows-specific + --without-cng + ) + if multilib_is_native_abi ; then + myconf+=( + --enable-bsdcat="$(tc-is-static-only && echo static || echo shared)" + --enable-bsdcpio="$(tc-is-static-only && echo static || echo shared)" + --enable-bsdtar="$(tc-is-static-only && echo static || echo shared)" + --enable-bsdunzip="$(tc-is-static-only && echo static || echo shared)" + ) + else + myconf+=( + --disable-bsdcat + --disable-bsdcpio + --disable-bsdtar + --disable-bsdunzip + ) + fi + + ECONF_SOURCE="${S}" econf "${myconf[@]}" +} + +multilib_src_compile() { + if multilib_is_native_abi ; then + emake + else + emake libarchive.la + fi +} + +src_test() { + mkdir -p "${T}"/bin || die + # tests fail when lbzip2[symlink] is used in place of ref bunzip2 + ln -s "${BROOT}/bin/bunzip2" "${T}"/bin || die + local -x PATH=${T}/bin:${PATH} + multilib-minimal_src_test +} + +multilib_src_test() { + # sandbox is breaking long symlink behavior + local -x SANDBOX_ON=0 + local -x LD_PRELOAD= + # some locales trigger different output that breaks tests + local -x LC_ALL=C + emake check +} + +multilib_src_install() { + if multilib_is_native_abi ; then + emake DESTDIR="${D}" install + else + local install_targets=( + install-includeHEADERS + install-libLTLIBRARIES + install-pkgconfigDATA + ) + emake DESTDIR="${D}" "${install_targets[@]}" + fi + + # Libs.private: should be used from libarchive.pc instead + find "${ED}" -type f -name "*.la" -delete || die + # https://github.com/libarchive/libarchive/issues/1766 + sed -e '/Requires\.private/s:iconv::' \ + -i "${ED}/usr/$(get_libdir)/pkgconfig/libarchive.pc" || die +} |