summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app-arch/libarchive/Manifest2
-rw-r--r--app-arch/libarchive/libarchive-3.7.6.ebuild173
2 files changed, 175 insertions, 0 deletions
diff --git a/app-arch/libarchive/Manifest b/app-arch/libarchive/Manifest
index 56e85afbaa09..f44273cc39bc 100644
--- a/app-arch/libarchive/Manifest
+++ b/app-arch/libarchive/Manifest
@@ -2,3 +2,5 @@ DIST libarchive-3.7.4.tar.xz 5417660 BLAKE2B 128f72235da61e112201046c0cfe62a8c58
DIST libarchive-3.7.4.tar.xz.asc 659 BLAKE2B 77e705194f6e9a9f97da0ac43c9b3157e1a8a490d26da34079e4ef3f2bcf98d6f6e95567e110287fab0ec26d3fc27e5bbeff7569c9ca138de2caf47af737c6d0 SHA512 82caa18a78661ea717ce93cdcb0806eed48450c20fb4d45cb4c33001f2d4d0fb5a791552acbb24ad8c41772e1d0b66c76c9cb86946bc862109721a0c986f5331
DIST libarchive-3.7.5.tar.xz 5437940 BLAKE2B e1cf8490b2db64e912bd181391310653b4e3524e74f35557e1ddb8c5eb53dcde307da945d393921acf7549ef0d4a6bf228d8f42ab4d795d06dd2248196a11c85 SHA512 b9cfb0a147bf0f77cca9e2bdea173f47a78dcba5df1d97a8e0e7b14a15039ac6d5467e325423b2a05741848f73ca7ab4fece922153f24f934f9370cb521d20df
DIST libarchive-3.7.5.tar.xz.asc 659 BLAKE2B 7310b8d7e3f07b8c75910ff3355ffda653402ca2d6db9cdf7d669b9a4ac5f3fb4c4c4482e85184fd68a23c96bce587a95b56efb88ae971399e130e533bd0969a SHA512 7494518b61a58a9aa1e991a2cf6b16340e34d7aa2c25a3c531799785e165541781d1a915437260bc536fe8267140cc69abb2670e8c0576e975a5a2b7ecf8e20d
+DIST libarchive-3.7.6.tar.xz 5458552 BLAKE2B 3251dc4d59867d1c9b43e78ac7735c27670e819a1aba4f4a76372b8509e2427ff24e379f6102a4cc3c92b965d182c8939bb6df4c82d4d1141cdd1db13bf039a2 SHA512 3ca90d665772418b9ac444044511989e81e785a13db3c101851390ba7c2ba0793c799cedb9df990e900ab78c98207f70ecee7e21829578555dde99424950ae2a
+DIST libarchive-3.7.6.tar.xz.asc 659 BLAKE2B 9f6a621dd4aa20f06dff71225723e60a6cee1f2a54ff07d2d19670153105f2f75d6439320f49eb46c28a4416828af7dc4f0d827e46ec9aeb5b703f06eb329d77 SHA512 2840b13f910f47d34daeed9680beb4b3cdde2d7de26ab8453756261c51fb7a39b727454f370b0ee60f8e1646c65544331a22558cbe8faf79a201b1d1346b37c1
diff --git a/app-arch/libarchive/libarchive-3.7.6.ebuild b/app-arch/libarchive/libarchive-3.7.6.ebuild
new file mode 100644
index 000000000000..1d2552f15f40
--- /dev/null
+++ b/app-arch/libarchive/libarchive-3.7.6.ebuild
@@ -0,0 +1,173 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+inherit libtool 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 ~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 test xattr +zstd
+"
+RESTRICT="!test? ( test )"
+
+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}] )
+ dev-libs/openssl:=[${MULTILIB_USEDEP}]
+ lz4? ( >=app-arch/lz4-0_p131:=[${MULTILIB_USEDEP}] )
+ lzma? ( >=app-arch/xz-utils-5.2.5-r1:=[${MULTILIB_USEDEP}] )
+ lzo? ( >=dev-libs/lzo-2:=[${MULTILIB_USEDEP}] )
+ nettle? ( dev-libs/nettle:=[${MULTILIB_USEDEP}] )
+ zstd? ( app-arch/zstd:=[${MULTILIB_USEDEP}] )
+"
+DEPEND="${RDEPEND}
+ kernel_linux? (
+ virtual/os-headers
+ e2fsprogs? ( sys-fs/e2fsprogs[${MULTILIB_USEDEP}] )
+ )
+ test? (
+ app-arch/lrzip
+ app-arch/lz4
+ app-arch/lzip
+ app-arch/lzop
+ app-arch/xz-utils
+ app-arch/zstd
+ lzma? ( app-arch/xz-utils[extra-filters(+)] )
+ )
+"
+BDEPEND="
+ verify-sig? ( >=sec-keys/openpgp-keys-libarchive-20221209 )
+ elibc_musl? ( sys-libs/queue-standalone )
+"
+
+VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/libarchive.org.asc
+
+# 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/2069
+ # (we can simply update the command since we don't support old lrzip)
+ "${FILESDIR}/${PN}-3.7.2-lrzip.patch"
+)
+
+src_prepare() {
+ default
+
+ # Needed for flags to be respected w/ LTO
+ elibtoolize
+}
+
+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
+ # workaround lrzip broken on 32-bit arches with >= 10 threads
+ # https://bugs.gentoo.org/927766
+ cat > "${T}"/bin/lrzip <<-EOF || die
+ #!/bin/sh
+ exec "$(type -P lrzip)" -p1 "\${@}"
+ EOF
+ chmod +x "${T}/bin/lrzip" || 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.UTF-8
+ 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
+}