summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFabian Groffen <grobian@gentoo.org>2020-12-18 19:15:58 +0100
committerFabian Groffen <grobian@gentoo.org>2020-12-18 19:16:23 +0100
commit3e712656018c3fa11f523aec26ebea7b32161e98 (patch)
treeb6a7cbd2a768f55e7d6b90ed56afb819979b634c /app-arch/libarchive
parentdev-libs/icu-layoutex: Bump to version 68.2 (diff)
downloadgentoo-3e712656018c3fa11f523aec26ebea7b32161e98.tar.gz
gentoo-3e712656018c3fa11f523aec26ebea7b32161e98.tar.bz2
gentoo-3e712656018c3fa11f523aec26ebea7b32161e98.zip
app-arch/libarchive-3.5.0: fix for ppc-macos
Package-Manager: Portage-3.0.9, Repoman-3.0.2 Signed-off-by: Fabian Groffen <grobian@gentoo.org>
Diffstat (limited to 'app-arch/libarchive')
-rw-r--r--app-arch/libarchive/files/libarchive-3.5.0-darwin-strnlen.patch27
-rw-r--r--app-arch/libarchive/libarchive-3.5.0.ebuild1
2 files changed, 28 insertions, 0 deletions
diff --git a/app-arch/libarchive/files/libarchive-3.5.0-darwin-strnlen.patch b/app-arch/libarchive/files/libarchive-3.5.0-darwin-strnlen.patch
new file mode 100644
index 000000000000..8f540e4aa07b
--- /dev/null
+++ b/app-arch/libarchive/files/libarchive-3.5.0-darwin-strnlen.patch
@@ -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
diff --git a/app-arch/libarchive/libarchive-3.5.0.ebuild b/app-arch/libarchive/libarchive-3.5.0.ebuild
index dde837017a82..d59eb05c046f 100644
--- a/app-arch/libarchive/libarchive-3.5.0.ebuild
+++ b/app-arch/libarchive/libarchive-3.5.0.ebuild
@@ -39,6 +39,7 @@ DEPEND="${RDEPEND}
PATCHES=(
"${FILESDIR}"/${PN}-3.3.3-libressl.patch
+ "${FILESDIR}"/${PN}-3.5.0-darwin-strnlen.patch # drop on next release
)
src_prepare() {