From 2a0cd7fb57680fc1401c711822304dcd3b87cdad Mon Sep 17 00:00:00 2001 From: Michał Górny Date: Sat, 21 Sep 2024 07:27:45 +0200 Subject: app-arch/libarchive: Avoid the unnecessary dep on sys-apps/attr MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Michał Górny --- .../files/libarchive-3.7.5-attr-dep.patch | 28 ++++++++++++++++++++++ app-arch/libarchive/libarchive-3.7.5.ebuild | 4 ++-- 2 files changed, 30 insertions(+), 2 deletions(-) create mode 100644 app-arch/libarchive/files/libarchive-3.7.5-attr-dep.patch (limited to 'app-arch') diff --git a/app-arch/libarchive/files/libarchive-3.7.5-attr-dep.patch b/app-arch/libarchive/files/libarchive-3.7.5-attr-dep.patch new file mode 100644 index 000000000000..3b26c51ea9d9 --- /dev/null +++ b/app-arch/libarchive/files/libarchive-3.7.5-attr-dep.patch @@ -0,0 +1,28 @@ +From 44b8e3b676746352cb3e08f76e58510c78209091 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= +Date: Wed, 18 Sep 2024 14:10:58 +0200 +Subject: [PATCH] tar/write.c: Support `sys/xattr.h` + +Synchronize the last use of `attr/xattr.h` to support using +`sys/xattr.h` instead. The former header is deprecated on GNU/Linux, +and this replacement makes it possible to build libarchive without +the `attr` package. +--- + tar/write.c | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/tar/write.c b/tar/write.c +index 1d1139f4c..43cd70233 100644 +--- a/tar/write.c ++++ b/tar/write.c +@@ -32,7 +32,9 @@ + #ifdef HAVE_SYS_STAT_H + #include + #endif +-#ifdef HAVE_ATTR_XATTR_H ++#if HAVE_SYS_XATTR_H ++#include ++#elif HAVE_ATTR_XATTR_H + #include + #endif + #ifdef HAVE_ERRNO_H diff --git a/app-arch/libarchive/libarchive-3.7.5.ebuild b/app-arch/libarchive/libarchive-3.7.5.ebuild index dbe3b684bfbd..4a367180b758 100644 --- a/app-arch/libarchive/libarchive-3.7.5.ebuild +++ b/app-arch/libarchive/libarchive-3.7.5.ebuild @@ -38,12 +38,10 @@ RDEPEND=" nettle? ( dev-libs/nettle:=[${MULTILIB_USEDEP}] ) zstd? ( app-arch/zstd:=[${MULTILIB_USEDEP}] ) " -# TODO: fix attr/xattr.h includes and remove sys-apps/attr dep DEPEND="${RDEPEND} kernel_linux? ( virtual/os-headers e2fsprogs? ( sys-fs/e2fsprogs[${MULTILIB_USEDEP}] ) - xattr? ( sys-apps/attr[${MULTILIB_USEDEP}] ) ) test? ( app-arch/lrzip @@ -75,6 +73,8 @@ PATCHES=( "${FILESDIR}/${PN}-3.7.2-lrzip.patch" # https://github.com/libarchive/libarchive/pull/2330 "${FILESDIR}/${P}-iso9660-times.patch" + # https://github.com/libarchive/libarchive/pull/2335 + "${FILESDIR}/${P}-attr-dep.patch" ) src_prepare() { -- cgit v1.2.3-65-gdbad