Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions app-arch/libarchive/Manifest
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
DIST libarchive-3.7.7.tar.gz 7743708 BLAKE2B 5af01df371d37a024357e4f1c7986cb04615b6d20064ab45d19a5dc90adb3244f2d18dc13c962357b1851f02c36373dac96e2f483ebce16e50f79296a2b1d029 SHA512 cce6eecfcd33d228bd1b1162a90bad63750adb53ac4edcaed34e2fdc30b6ba211cf1fd25d4b8761373949ceec266478b09bd70ffa4e374803a29e8573d6d149e
DIST libarchive-3.7.8.tar.gz 7755999 BLAKE2B fef1e6d3580023131c8ce4c1cc3026270542fac3722a19ad00d5b86f964a343e41fd2a1e8d714b6080228f5d997f321116cd0af013b1f9a7a65802ad86f59ea9 SHA512 dcc90cc0597c14867c094aaf13bb1ec4d6b2fee7f0d6d714a909f42085cc99f7e49ac78a51e312df39b5db57aa8d17bc794f1d8d7b1c8fb65bc598ff88eb5158
DIST libarchive-3.7.9.tar.gz 7757174 BLAKE2B 2962b553ce848c8daf7c1dbc3275ef562a48f3914e6a0b1bec3c12efa91ee29ef6131b2f472a1ecc63b5a16ab6c25e567fccbbb4220095a8767653ff8724c6d3 SHA512 c5a4a117f2f5e7c304ff5c7d87aa636a5302dd27ddeb42a86f3f7ef54219a3ea5cf2a535b400de7c541c8ecd2a6c8cc7da50b9be1a7db8f7f24e05671f36796d
DIST libarchive-3.8.0.tar.gz 8226029 BLAKE2B e5465ac78a21958871866e958172bb3f288cd8a6835fd6c034ad63e31c9ced0cd4a4655f4eaf8bfe85bfb8812a54de5d2eae81f278f011d9c6e1d3190709a747 SHA512 e563cd10cd447daf7c5d11c657cbc3d8971add4440264fb4754ea7670a249e8b7b1c31f62f78259867960392623dba73c2d20efc57dc02564c8f55841dc8f2cc
103 changes: 103 additions & 0 deletions app-arch/libarchive/libarchive-3.8.0.ebuild
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
# Distributed under the terms of the GNU General Public License v2

EAPI=7
inherit libtool

DESCRIPTION="Multi-format archive and compression library"
HOMEPAGE="https://www.libarchive.org/"
SRC_URI="https://github.com/libarchive/libarchive/releases/download/v3.8.0/libarchive-3.8.0.tar.gz -> libarchive-3.8.0.tar.gz"

LICENSE="BSD BSD-2 BSD-4 public-domain"
SLOT="0/13"
KEYWORDS="*"
IUSE="acl blake2 +bzip2 +e2fsprogs expat +iconv kernel_linux libressl lz4 +lzma lzo nettle static-libs +threads xattr +zlib zstd"

RDEPEND="
acl? ( virtual/acl )
blake2? ( app-crypt/libb2 )
bzip2? ( app-arch/bzip2 )
expat? ( dev-libs/expat )
!expat? ( dev-libs/libxml2 )
iconv? ( virtual/libiconv )
kernel_linux? (
xattr? ( sys-apps/attr )
)
!libressl? ( dev-libs/openssl:0= )
libressl? ( dev-libs/libressl:0= )
lz4? ( >=app-arch/lz4-0_p131:0= )
lzma? ( app-arch/xz-utils )
lzo? ( >=dev-libs/lzo-2 )
nettle? ( dev-libs/nettle:0= )
zlib? ( sys-libs/zlib )
zstd? ( app-arch/zstd )"
DEPEND="${RDEPEND}
kernel_linux? (
virtual/os-headers
e2fsprogs? ( sys-fs/e2fsprogs )
)"

post_src_unpack() {
if [ ! -d "${S}" ]; then
mv libarchive-libarchive* "${S}"
fi
}

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)
$(use_with zlib)
$(use_with zstd)
--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)

# Windows-specific
--without-cng
)

ECONF_SOURCE="${S}" econf "${myconf[@]}"
}

src_compile() {
emake
}

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}
minimal_src_test
}

src_test() {
# sandbox is breaking long symlink behavior
local -x SANDBOX_ON=0
local -x LD_PRELOAD=
emake check
}

src_install() {
emake DESTDIR="${D}" install

# Libs.private: should be used from libarchive.pc instead
find "${ED}" -type f -name "*.la" -delete || die
}

src_install_all() {
cd "${S}" || die
einstalldocs
}