app-arch/libarchive: Sync with Gentoo upstream; updates to 3.5.1

Signed-off-by: Sayan Chowdhury <sayan.chowdhury2012@gmail.com>
This commit is contained in:
Sayan Chowdhury 2021-07-30 10:11:20 +00:00
parent f3cf8d4f41
commit 4edec94842
4 changed files with 48 additions and 26 deletions

View File

@ -1 +1 @@
DIST libarchive-3.4.2.tar.gz 6979481 BLAKE2B eea90e4751ae487cd1a9b0eecd16598d1b81ffff665ae97a160e3858c8ffe60b82003f081af644f3f32260d0e1d3f3077240125e8279bf8111a79d93c68ac25d SHA512 a8922e54f2e985889d205ee8a0594c1d30dad950438b602a5be6bb1b274a735ad20a48ed484efd458013a0810d26ee4ae76e3a6c820823243d24ea0593ed7021
DIST libarchive-3.5.1.tar.gz 7008338 BLAKE2B 243dfda2bd4582bbc20679328b89aae0c530475c822dcf9ff25c65df2017b8f18bb616142d6ab016ccea4a5aa1b410d46b913c2ee0afefd2fdb1a41cf51585d9 SHA512 08ddd74bef4cef0981739da202879f36cf7ca33a8f6d438724588efe3ab8477f2f1d0cccf7b8ed0bedfc0c8d0cab16ee3ae5c0c6e83b6811bc650d7d7471a996

View File

@ -1,12 +0,0 @@
--- a/libarchive/archive_openssl_evp_private.h
+++ b/libarchive/archive_openssl_evp_private.h
@@ -28,7 +28,8 @@
#include <openssl/evp.h>
#include <openssl/opensslv.h>
-#if OPENSSL_VERSION_NUMBER < 0x10100000L
+#if OPENSSL_VERSION_NUMBER < 0x10100000L || \
+(defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x20700000L)
#include <stdlib.h> /* malloc, free */
#include <string.h> /* memset */
static inline EVP_MD_CTX *EVP_MD_CTX_new(void)

View File

@ -0,0 +1,27 @@
https://github.com/macports/macports-ports/blob/master/archivers/libarchive/files/patch-libarchive-3.5-strnlen.diff
next release should have a fix for this
--- a/libarchive/archive_read_support_format_mtree.c
+++ b/libarchive/archive_read_support_format_mtree.c
@@ -65,6 +65,20 @@ __FBSDID("$FreeBSD: head/lib/libarchive/archive_read_support_format_mtree.c 2011
#define O_CLOEXEC 0
#endif
+#ifdef __APPLE__
+#if __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1070
+static size_t strnlen(const char *s, size_t maxlen) {
+ size_t l = 0;
+ while (l < maxlen && *s) {
+ l++;
+ s++;
+ }
+ return l;
+}
+#endif
+#endif
+
+
#define MTREE_HAS_DEVICE 0x0001
#define MTREE_HAS_FFLAGS 0x0002
#define MTREE_HAS_GID 0x0004

View File

@ -1,4 +1,4 @@
# Copyright 1999-2020 Gentoo Authors
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@ -10,8 +10,8 @@ SRC_URI="https://www.libarchive.org/downloads/${P}.tar.gz"
LICENSE="BSD BSD-2 BSD-4 public-domain"
SLOT="0/13"
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
IUSE="acl blake2 +bzip2 +e2fsprogs expat +iconv kernel_linux libressl lz4 +lzma lzo nettle static-libs +threads xattr +zlib zstd"
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
IUSE="acl blake2 +bzip2 +e2fsprogs expat +iconv kernel_linux lz4 +lzma lzo nettle static-libs xattr +zlib zstd"
RDEPEND="
acl? ( virtual/acl[${MULTILIB_USEDEP}] )
@ -23,10 +23,9 @@ RDEPEND="
kernel_linux? (
xattr? ( sys-apps/attr[${MULTILIB_USEDEP}] )
)
!libressl? ( dev-libs/openssl:0=[${MULTILIB_USEDEP}] )
libressl? ( dev-libs/libressl:0=[${MULTILIB_USEDEP}] )
dev-libs/openssl:0=[${MULTILIB_USEDEP}]
lz4? ( >=app-arch/lz4-0_p131:0=[${MULTILIB_USEDEP}] )
lzma? ( app-arch/xz-utils[threads=,${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}] )
zlib? ( sys-libs/zlib[${MULTILIB_USEDEP}] )
@ -38,13 +37,9 @@ DEPEND="${RDEPEND}
)"
PATCHES=(
"${FILESDIR}"/${PN}-3.3.3-libressl.patch
"${FILESDIR}"/${PN}-3.5.0-darwin-strnlen.patch # drop on next release
)
# Various test problems, starting with the fact that sandbox
# explodes on long paths. https://bugs.gentoo.org/598806
RESTRICT="test"
src_prepare() {
default
elibtoolize # is required for Solaris sol2_ld linker fix
@ -97,9 +92,21 @@ multilib_src_compile() {
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() {
# Replace the default src_test so that it builds tests in parallel
multilib_is_native_abi && emake check
# 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() {