Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
145 commits
Select commit Hold shift + click to select a range
78c869d
app-alternatives/gpg: Sync with Gentoo
Dec 15, 2025
7bcfb9b
app-arch/libarchive: Sync with Gentoo
Dec 15, 2025
a21ac3f
app-cdr/cdrtools: Sync with Gentoo
Dec 15, 2025
1b0e067
app-containers/aardvark-dns: Sync with Gentoo
Dec 15, 2025
3326ba9
app-containers/containerd: Sync with Gentoo
Dec 15, 2025
6ca1263
app-containers/crun: Sync with Gentoo
Dec 15, 2025
33010dd
app-containers/docker: Sync with Gentoo
Dec 15, 2025
0254517
app-containers/incus: Sync with Gentoo
Dec 15, 2025
b28653a
app-containers/lxc: Sync with Gentoo
Dec 15, 2025
5b087be
app-containers/netavark: Sync with Gentoo
Dec 15, 2025
324ca64
app-crypt/ccid: Sync with Gentoo
Dec 15, 2025
ec515f2
app-crypt/gnupg: Sync with Gentoo
Dec 15, 2025
340737c
app-crypt/gpgme: Sync with Gentoo
Dec 15, 2025
3810ce7
app-crypt/mit-krb5: Sync with Gentoo
Dec 15, 2025
18003b1
app-crypt/pinentry: Sync with Gentoo
Dec 15, 2025
4736ec7
app-doc/eclass-manpages: Sync with Gentoo
Dec 15, 2025
36f5058
app-emulation/qemu: Sync with Gentoo
Dec 15, 2025
a52c471
app-emulation/virt-firmware: Sync with Gentoo
Dec 15, 2025
339f23a
app-misc/pax-utils: Sync with Gentoo
Dec 15, 2025
6610ea9
app-shells/bash: Sync with Gentoo
Dec 15, 2025
2cc5b88
app-shells/bash-completion: Sync with Gentoo
Dec 15, 2025
9f4c220
dev-build/autoconf: Sync with Gentoo
Dec 15, 2025
b0e153a
dev-build/cmake: Sync with Gentoo
Dec 15, 2025
77699f8
dev-build/make: Sync with Gentoo
Dec 15, 2025
48e7403
dev-build/meson: Sync with Gentoo
Dec 15, 2025
e8f8fd9
dev-build/ninja: Sync with Gentoo
Dec 15, 2025
04e1366
dev-db/sqlite: Sync with Gentoo
Dec 15, 2025
0154f1b
dev-debug/strace: Sync with Gentoo
Dec 15, 2025
59b5844
dev-lang/go: Sync with Gentoo
Dec 15, 2025
daf0378
dev-lang/nasm: Sync with Gentoo
Dec 15, 2025
44fc488
dev-lang/perl: Sync with Gentoo
Dec 15, 2025
0cd13f9
dev-lang/python: Sync with Gentoo
Dec 15, 2025
af072dc
dev-lang/rust: Sync with Gentoo
Dec 15, 2025
adefab1
dev-lang/rust-bin: Sync with Gentoo
Dec 15, 2025
b46fbca
dev-lang/rust-common: Sync with Gentoo
Dec 15, 2025
ec79898
dev-libs/cJSON: Sync with Gentoo
Dec 15, 2025
ea90dab
dev-libs/dbus-glib: Sync with Gentoo
Dec 15, 2025
7f7f949
dev-libs/elfutils: Sync with Gentoo
Dec 15, 2025
9c8fa6b
dev-libs/glib: Sync with Gentoo
Dec 15, 2025
100ea22
dev-libs/libaio: Sync with Gentoo
Dec 15, 2025
faee2cd
dev-libs/libgpg-error: Sync with Gentoo
Dec 15, 2025
9d1f505
dev-libs/libpcre2: Sync with Gentoo
Dec 15, 2025
a4af498
dev-libs/libtraceevent: Sync with Gentoo
Dec 15, 2025
4b68cc3
dev-libs/libtracefs: Sync with Gentoo
Dec 15, 2025
a8308b5
dev-libs/libxml2: Sync with Gentoo
Dec 15, 2025
8802432
dev-libs/libxslt: Sync with Gentoo
Dec 15, 2025
7429f28
dev-libs/protobuf: Sync with Gentoo
Dec 15, 2025
6982de6
dev-libs/tree-sitter: Sync with Gentoo
Dec 15, 2025
cb36eef
dev-libs/tree-sitter-bash: Sync with Gentoo
Dec 15, 2025
d867a7b
dev-libs/userspace-rcu: Sync with Gentoo
Dec 15, 2025
5e84766
dev-libs/xxhash: Sync with Gentoo
Dec 15, 2025
7867b05
dev-python/charset-normalizer: Sync with Gentoo
Dec 15, 2025
5619c63
dev-python/cryptography: Sync with Gentoo
Dec 15, 2025
32f7623
dev-python/cython: Sync with Gentoo
Dec 15, 2025
63c6db9
dev-python/ensurepip-pip: Sync with Gentoo
Dec 15, 2025
343ef08
dev-python/hatchling: Sync with Gentoo
Dec 15, 2025
b476cf2
dev-python/idna: Sync with Gentoo
Dec 15, 2025
887d116
dev-python/lark: Sync with Gentoo
Dec 15, 2025
d0a2f52
dev-python/lazy-object-proxy: Sync with Gentoo
Dec 15, 2025
02bb875
dev-python/msgpack: Sync with Gentoo
Dec 15, 2025
7b204a3
dev-python/pip: Sync with Gentoo
Dec 15, 2025
af8797f
dev-python/platformdirs: Sync with Gentoo
Dec 15, 2025
85477be
dev-python/setuptools-scm: Sync with Gentoo
Dec 15, 2025
cb2ce92
dev-python/tree-sitter: Sync with Gentoo
Dec 15, 2025
f2b594e
dev-python/trove-classifiers: Sync with Gentoo
Dec 15, 2025
fcbb227
dev-python/urllib3: Sync with Gentoo
Dec 15, 2025
a972b2f
dev-util/gdbus-codegen: Sync with Gentoo
Dec 15, 2025
429c444
dev-util/glib-utils: Sync with Gentoo
Dec 15, 2025
854fd7a
dev-util/maturin: Sync with Gentoo
Dec 15, 2025
402c49c
dev-util/perf: Sync with Gentoo
Dec 15, 2025
1b8269e
dev-util/pkgconf: Sync with Gentoo
Dec 15, 2025
1673307
dev-vcs/git: Sync with Gentoo
Dec 15, 2025
3a81847
eclass/cmake: Sync with Gentoo
Dec 15, 2025
7e6d089
eclass/desktop: Sync with Gentoo
Dec 15, 2025
32b443c
eclass/distutils-r1: Sync with Gentoo
Dec 15, 2025
0a7146a
eclass/fcaps: Sync with Gentoo
Dec 15, 2025
c2cb84d
eclass/meson: Sync with Gentoo
Dec 15, 2025
c537f63
eclass/rust: Sync with Gentoo
Dec 15, 2025
275d5d6
eclass/selinux-policy-2: Sync with Gentoo
Dec 15, 2025
b4f55d0
eclass/toolchain: Sync with Gentoo
Dec 15, 2025
6b407c0
eclass/tree-sitter-grammar: Sync with Gentoo
Dec 15, 2025
2037fef
licenses: Sync with Gentoo
Dec 15, 2025
a6003bb
media-libs/libpng: Sync with Gentoo
Dec 15, 2025
76b1190
net-dns/bind: Sync with Gentoo
Dec 15, 2025
7c3c031
net-dns/c-ares: Sync with Gentoo
Dec 15, 2025
f43b883
net-firewall/nftables: Sync with Gentoo
Dec 15, 2025
835d823
net-fs/samba: Sync with Gentoo
Dec 15, 2025
70e146b
net-libs/gnutls: Sync with Gentoo
Dec 15, 2025
af990ea
net-libs/libnftnl: Sync with Gentoo
Dec 15, 2025
910965f
net-misc/curl: Sync with Gentoo
Dec 15, 2025
cccde5a
net-misc/iperf: Sync with Gentoo
Dec 15, 2025
e0840cf
net-misc/ntp: Sync with Gentoo
Dec 15, 2025
0fc671c
net-misc/openssh: Sync with Gentoo
Dec 15, 2025
c9ea108
net-misc/rsync: Sync with Gentoo
Dec 15, 2025
5dabc1a
net-misc/wget: Sync with Gentoo
Dec 15, 2025
6108bda
profiles: Sync with Gentoo
Dec 15, 2025
0a52de8
sys-apps/coreutils: Sync with Gentoo
Dec 15, 2025
3c3b2fd
sys-apps/iproute2: Sync with Gentoo
Dec 15, 2025
28ef617
sys-apps/kexec-tools: Sync with Gentoo
Dec 15, 2025
a1c54aa
sys-apps/keyutils: Sync with Gentoo
Dec 15, 2025
6b5f76f
sys-apps/less: Sync with Gentoo
Dec 15, 2025
14c11fe
sys-apps/nvme-cli: Sync with Gentoo
Dec 15, 2025
5eb5df3
sys-apps/pcsc-lite: Sync with Gentoo
Dec 15, 2025
563defa
sys-apps/portage: Sync with Gentoo
Dec 15, 2025
f4b627d
sys-apps/pv: Sync with Gentoo
Dec 15, 2025
5c19c36
sys-apps/sandbox: Sync with Gentoo
Dec 15, 2025
3afe30f
sys-apps/shadow: Sync with Gentoo
Dec 15, 2025
1fa17ca
sys-apps/systemd: Sync with Gentoo
Dec 15, 2025
f577e5a
sys-apps/usbutils: Sync with Gentoo
Dec 15, 2025
0f01bf5
sys-apps/util-linux: Sync with Gentoo
Dec 15, 2025
04c3cee
sys-apps/which: Sync with Gentoo
Dec 15, 2025
ad7b39e
sys-auth/pambase: Sync with Gentoo
Dec 15, 2025
ae0be8c
sys-block/thin-provisioning-tools: Sync with Gentoo
Dec 15, 2025
0d88a5e
sys-boot/gnu-efi: Sync with Gentoo
Dec 15, 2025
b6385f6
sys-boot/grub: Sync with Gentoo
Dec 15, 2025
4414a8b
sys-devel/binutils: Sync with Gentoo
Dec 15, 2025
70ff454
sys-devel/binutils-config: Sync with Gentoo
Dec 15, 2025
8d576fa
sys-devel/crossdev: Sync with Gentoo
Dec 15, 2025
2b0a4ff
sys-devel/gcc: Sync with Gentoo
Dec 15, 2025
148393e
sys-devel/gcc-config: Sync with Gentoo
Dec 15, 2025
5b5ce0d
sys-devel/gettext: Sync with Gentoo
Dec 15, 2025
a9bf621
sys-fs/btrfs-progs: Sync with Gentoo
Dec 15, 2025
958bdf0
sys-fs/cryptsetup: Sync with Gentoo
Dec 15, 2025
fbd3f6e
sys-fs/e2fsprogs: Sync with Gentoo
Dec 15, 2025
eb23b21
sys-fs/fuse: Sync with Gentoo
Dec 15, 2025
65c1eb0
sys-fs/lxcfs: Sync with Gentoo
Dec 15, 2025
298aecc
sys-fs/squashfs-tools: Sync with Gentoo
Dec 15, 2025
da2e19a
sys-fs/xfsprogs: Sync with Gentoo
Dec 15, 2025
57a0a79
sys-fs/zfs: Sync with Gentoo
Dec 15, 2025
c8b76e4
sys-fs/zfs-kmod: Sync with Gentoo
Dec 15, 2025
71415db
sys-kernel/dracut: Sync with Gentoo
Dec 15, 2025
811a1f5
sys-libs/binutils-libs: Sync with Gentoo
Dec 15, 2025
6816475
sys-libs/glibc: Sync with Gentoo
Dec 15, 2025
5b012df
sys-libs/libcap: Sync with Gentoo
Dec 15, 2025
20410ce
sys-libs/libnvme: Sync with Gentoo
Dec 15, 2025
a3d698e
sys-libs/libseccomp: Sync with Gentoo
Dec 15, 2025
ab06ef0
sys-libs/libselinux: Sync with Gentoo
Dec 15, 2025
b1214bf
sys-libs/readline: Sync with Gentoo
Dec 15, 2025
f114c9b
sys-libs/tevent: Sync with Gentoo
Dec 15, 2025
4540ea6
sys-libs/timezone-data: Sync with Gentoo
Dec 15, 2025
7934787
sys-process/procps: Sync with Gentoo
Dec 15, 2025
17548ff
virtual/perl-Exporter: Sync with Gentoo
Dec 15, 2025
e2bf808
virtual/perl-ExtUtils-MakeMaker: Sync with Gentoo
Dec 15, 2025
edddbe9
x11-drivers/nvidia-drivers: Sync with Gentoo
Dec 15, 2025
a34e795
x11-libs/pixman: Sync with Gentoo
Dec 15, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ ALTERNATIVES=(
inherit app-alternatives

DESCRIPTION="gpg symlink"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x64-solaris"
KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ppc ppc64 ~riscv ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x64-solaris"
IUSE="nls ssl"

RDEPEND="
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ ALTERNATIVES=(
inherit app-alternatives

DESCRIPTION="gpg symlink"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x64-solaris"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x64-solaris"
IUSE="nls ssl"

RDEPEND="
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,7 @@ DIST libarchive-3.8.1.tar.xz 5950428 BLAKE2B 92ce11758ea050c7f5b3b2440566b71d29d
DIST libarchive-3.8.1.tar.xz.asc 659 BLAKE2B 0965437c5087b29c356280613fba546c0f08cbe3996c885957e1424304f3ea1cb4651168b34c3389ec6119bd5ab99160dc530dced31490cd2f6e8c3850e77223 SHA512 540ea8203920c1e8e6934f20c0f6b592a309c82f82561960d9adff3a3a09cf28c7a3d92070682b6b420ef82c6e30d6e9741d8c3e5473a78390da5137e61c05bd
DIST libarchive-3.8.2.tar.xz 5853628 BLAKE2B 4f5ed9afbedccf0f754b38743259a62f45d8407ddea8955e301b79b8c9c7653e633b58998a43d7a4bf8cfd35488b20af76ea8f948267230be0557797513b71a6 SHA512 0a6796a8b9f66ebfb4ed0d03f9ef85519855fe5835c060bd9d17e3d5d70f565f74f94e7a570c4f6787557d15f1264fc55900d8a66b34b15892e2b6e4b3eecdf1
DIST libarchive-3.8.2.tar.xz.asc 659 BLAKE2B dc7183efc8e96a13d519d250194a9044c390042e1abc2257c82bc5c43453ad9fdbc5872643b6c008e8f6762356ced64304ed90c60edab034a4ef1ce3d91d26e0 SHA512 e1705acf226f14d9143efbc0b1649fcd2e10706966d21bf0c54f702db7eb64332b9f3927a7fa6c8322cb1a929af81bc584c1e6111c4d3c6523aee8ed7a8b4e1e
DIST libarchive-3.8.3.tar.xz 5990552 BLAKE2B 5be5f0e98f7582e2a34a43dd9217644defbd69532474fc07b3ac46ba7820c19dbd28cd691c1c798aed02643bbe68781cecd564127781c9b49323b9b54cebb32c SHA512 9eb6331da6cb96734a56166d2a507cb192967a57b041c8ea2e0eb295373abd72b4abaa8b0a3100d4b73ca00339569bb7b7789f882671619465f0a566750be920
DIST libarchive-3.8.3.tar.xz.asc 833 BLAKE2B 583c3b6b7626dc3de8a2e23cce23ed34fcdcd2f854bab61d0ecdae41414ff021733ceedabb006b7f128462f12065af0e66f4215fe060dd1f720de11bccfa71c9 SHA512 239e6ebaaffefee1d12f185e4e033e333feb81d5a5b985d9bfc33f883f6cbb7e7d65d480286cfaa4313e6139252eb7f3a7a1e095c251477c3a49196312c6d9a7
DIST libarchive-3.8.4.tar.xz 6065584 BLAKE2B c6cadc1dc97f79a379fa1f2fae4d791fade4513796066de8bfa32e40f8b5dc1efb4c46a9f0aefb62510c5ab428599f9cbda508e89b67cd932e160ee5377ee0e6 SHA512 088f3726de7f8e2f4b2ac6cc9c01338328493de19f5b0645157114ef3b7a0fa5213cb6d64123736cae83354a2137bba9e2187bb4208cb7848e2566c65b100489
DIST libarchive-3.8.4.tar.xz.asc 833 BLAKE2B 2b4edd5f9d5d5ca9c0f7276b9891f95621def922ceea043520460fc731e588d1acf8cfc41aa8a4df8a10285ca196411a17b886ef64722de985c7012af8adc024 SHA512 1ec7e73a5b0c02d236567f77812003276af9a499e774d2d6d322ed823a5a98f662a4dc6053eb471dcaa1317b2980937910a528f9c83d23c115a310175a23ad61
Original file line number Diff line number Diff line change
@@ -0,0 +1,174 @@
# Copyright 1999-2025 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="
virtual/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="
virtual/pkgconfig
verify-sig? ( >=sec-keys/openpgp-keys-libarchive-20251118 )
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
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,174 @@
# Copyright 1999-2025 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="
virtual/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="
virtual/pkgconfig
verify-sig? ( >=sec-keys/openpgp-keys-libarchive-20251118 )
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
}
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ DEPEND="
"

FILECAPS=(
-m u+s cap_sys_resource,cap_dac_override,cap_sys_admin,cap_sys_nice,cap_net_bind_service,cap_ipc_lock,cap_sys_rawio+ep usr/bin/cdrecord --
-m u+s cap_dac_override,cap_sys_admin,cap_sys_nice,cap_net_bind_service,cap_sys_rawio+ep usr/bin/cdda2wav --
-m u+s cap_dac_override,cap_sys_admin,cap_net_bind_service,cap_sys_rawio+ep usr/bin/readcd
-M u-s cap_sys_resource,cap_dac_override,cap_sys_admin,cap_sys_nice,cap_net_bind_service,cap_ipc_lock,cap_sys_rawio+ep usr/bin/cdrecord --
-M u-s cap_dac_override,cap_sys_admin,cap_sys_nice,cap_net_bind_service,cap_sys_rawio+ep usr/bin/cdda2wav --
-M u-s cap_dac_override,cap_sys_admin,cap_net_bind_service,cap_sys_rawio+ep usr/bin/readcd
)

cdrtools_os() {
Expand Down Expand Up @@ -278,8 +278,7 @@ src_install() {
emake -j1 CPPOPTX="${CPPFLAGS}" COPTX="${CFLAGS}" C++OPTX="${CXXFLAGS}" \
LDOPTX="${LDFLAGS}" GMAKE_NOWARN="true" install

# Let fcaps handle this
fperms 0755 /usr/bin/{cdda2wav,cdrecord,readcd}
fperms 4755 /usr/bin/{cdda2wav,cdrecord,readcd}

# These symlinks are for compat with cdrkit.
dosym schily /usr/include/scsilib
Expand Down
Loading