summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNP-Hardass <NP-Hardass@gentoo.org>2016-07-03 03:04:30 -0400
committerNP-Hardass <NP-Hardass@gentoo.org>2016-07-03 03:05:23 -0400
commit6c9193ee55e0603fde627238a82acd02fa7010a5 (patch)
treec094f97e5d88ca60ca6e99886b2f379d83612076
parentdev-ruby/rack: add missing slot to blocker (diff)
downloadgentoo-6c9193ee55e0603fde627238a82acd02fa7010a5.tar.gz
gentoo-6c9193ee55e0603fde627238a82acd02fa7010a5.tar.bz2
gentoo-6c9193ee55e0603fde627238a82acd02fa7010a5.zip
app-arch/libarchive: Add lz4, fix up EAPI6, fix test, minor formatting
3.2.1-r2 makes bsdcat and bsdcpio the default for BSD must like bsdtar already is. Package-Manager: portage-2.2.28
-rw-r--r--app-arch/libarchive/files/libarchive-3.2.1-fix-tests-gnu99.patch47
-rw-r--r--app-arch/libarchive/libarchive-3.2.1-r1.ebuild (renamed from app-arch/libarchive/libarchive-3.2.1.ebuild)39
-rw-r--r--app-arch/libarchive/libarchive-3.2.1-r2.ebuild117
-rw-r--r--app-arch/libarchive/metadata.xml21
4 files changed, 196 insertions, 28 deletions
diff --git a/app-arch/libarchive/files/libarchive-3.2.1-fix-tests-gnu99.patch b/app-arch/libarchive/files/libarchive-3.2.1-fix-tests-gnu99.patch
new file mode 100644
index 00000000000..ec249c34102
--- /dev/null
+++ b/app-arch/libarchive/files/libarchive-3.2.1-fix-tests-gnu99.patch
@@ -0,0 +1,47 @@
+From 11f5b75c9ba12ba73b5fa34dc9d285983d99c01b Mon Sep 17 00:00:00 2001
+From: Joerg Sonnenberger <joerg@bec.de>
+Date: Wed, 22 Jun 2016 23:09:27 +0200
+Subject: [PATCH] Avoid use of C99 for-scope declarations to fix issue #729.
+
+---
+ libarchive/test/test_write_format_gnutar_filenames.c | 6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/libarchive/test/test_write_format_gnutar_filenames.c b/libarchive/test/test_write_format_gnutar_filenames.c
+index 38b4ca9..26457d3 100644
+--- a/libarchive/test/test_write_format_gnutar_filenames.c
++++ b/libarchive/test/test_write_format_gnutar_filenames.c
+@@ -42,6 +42,7 @@ DEFINE_TEST(test_write_format_gnutar_filenames)
+ struct archive_entry *ae, *template;
+ struct archive *a;
+ size_t used;
++ int i;
+
+ buff = malloc(buffsize); /* million bytes of work area */
+ assert(buff != NULL);
+@@ -55,7 +56,7 @@ DEFINE_TEST(test_write_format_gnutar_filenames)
+ archive_entry_set_mode(template, S_IFREG | 0755);
+ archive_entry_set_size(template, 8);
+
+- for (int i = 0; i < 2000; ++i) {
++ for (i = 0; i < 2000; ++i) {
+ filename[i] = 'a';
+ filename[i + 1] = '\0';
+ archive_entry_copy_pathname(template, filename);
+@@ -97,6 +98,7 @@ DEFINE_TEST(test_write_format_gnutar_linknames)
+ struct archive_entry *ae, *template;
+ struct archive *a;
+ size_t used;
++ int i;
+
+ buff = malloc(buffsize); /* million bytes of work area */
+ assert(buff != NULL);
+@@ -110,7 +112,7 @@ DEFINE_TEST(test_write_format_gnutar_linknames)
+ archive_entry_set_mode(template, S_IFLNK | 0755);
+ archive_entry_copy_pathname(template, "link");
+
+- for (int i = 0; i < 2000; ++i) {
++ for (i = 0; i < 2000; ++i) {
+ filename[i] = 'a';
+ filename[i + 1] = '\0';
+ archive_entry_copy_symlink(template, filename);
diff --git a/app-arch/libarchive/libarchive-3.2.1.ebuild b/app-arch/libarchive/libarchive-3.2.1-r1.ebuild
index 956699196d4..ccdafb6a1ed 100644
--- a/app-arch/libarchive/libarchive-3.2.1.ebuild
+++ b/app-arch/libarchive/libarchive-3.2.1-r1.ebuild
@@ -12,11 +12,9 @@ SRC_URI="http://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 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~x86-interix ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
-IUSE="acl +bzip2 +e2fsprogs expat +iconv kernel_linux libressl +lzma lzo nettle static-libs xattr +zlib"
+IUSE="acl +bzip2 +e2fsprogs expat +iconv kernel_linux libressl lz4 +lzma lzo nettle static-libs xattr +zlib"
RDEPEND="
- !libressl? ( dev-libs/openssl:0=[${MULTILIB_USEDEP}] )
- libressl? ( dev-libs/libressl:0=[${MULTILIB_USEDEP}] )
acl? ( virtual/acl[${MULTILIB_USEDEP}] )
bzip2? ( app-arch/bzip2[${MULTILIB_USEDEP}] )
expat? ( dev-libs/expat[${MULTILIB_USEDEP}] )
@@ -24,7 +22,10 @@ RDEPEND="
iconv? ( virtual/libiconv[${MULTILIB_USEDEP}] )
kernel_linux? (
xattr? ( sys-apps/attr[${MULTILIB_USEDEP}] )
- )
+ )
+ !libressl? ( dev-libs/openssl:0=[${MULTILIB_USEDEP}] )
+ libressl? ( dev-libs/libressl:0=[${MULTILIB_USEDEP}] )
+ lz4? ( >=app-arch/lz4-0_p131:0=[${MULTILIB_USEDEP}] )
lzma? ( app-arch/xz-utils[${MULTILIB_USEDEP}] )
lzo? ( >=dev-libs/lzo-2[${MULTILIB_USEDEP}] )
nettle? ( dev-libs/nettle:0=[${MULTILIB_USEDEP}] )
@@ -33,9 +34,9 @@ DEPEND="${RDEPEND}
kernel_linux? (
virtual/os-headers
e2fsprogs? ( sys-fs/e2fsprogs )
- )"
+ )"
-DOCS=( NEWS README )
+PATCHES=( "${FILESDIR}/${P}-fix-tests-gnu99.patch" )
src_prepare() {
default
@@ -47,24 +48,27 @@ multilib_src_configure() {
local myconf=()
myconf=(
+ $(use_enable acl)
$(use_enable static-libs static)
$(use_enable xattr)
- $(use_enable acl)
- $(use_with zlib)
$(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 !expat xml2)
- $(use_with expat)
+ $(use_with zlib)
)
if multilib_is_native_abi ; then myconf+=(
- --enable-bsdtar=$(tc-is-static-only && echo static || echo shared)
+ --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)
); else myconf+=(
- --disable-bsdtar
+ --disable-bsdcat
--disable-bsdcpio
+ --disable-bsdtar
); fi
# We disable lzmadec because we support the newer liblzma from xz-utils
@@ -93,9 +97,6 @@ multilib_src_install() {
if multilib_is_native_abi ; then
emake DESTDIR="${D}" install
- # Libs.private: should be used from libarchive.pc instead
- prune_libtool_files
-
# Create tar symlink for FreeBSD
if ! use prefix && [[ ${CHOST} == *-freebsd* ]]; then
dosym bsdtar /usr/bin/tar
@@ -108,13 +109,13 @@ multilib_src_install() {
install-includeHEADERS \
install-libLTLIBRARIES \
install-pkgconfigDATA
-
- # Libs.private: should be used from libarchive.pc instead
- prune_libtool_files
fi
+
+ # Libs.private: should be used from libarchive.pc instead
+ prune_libtool_files
}
multilib_src_install_all() {
cd "${S}" || die
- dodoc "${DOCS[@]}"
+ einstalldocs
}
diff --git a/app-arch/libarchive/libarchive-3.2.1-r2.ebuild b/app-arch/libarchive/libarchive-3.2.1-r2.ebuild
new file mode 100644
index 00000000000..3b514eb67af
--- /dev/null
+++ b/app-arch/libarchive/libarchive-3.2.1-r2.ebuild
@@ -0,0 +1,117 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+inherit autotools eutils multilib-minimal toolchain-funcs
+
+DESCRIPTION="BSD tar command"
+HOMEPAGE="http://www.libarchive.org/"
+SRC_URI="http://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 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~x86-interix ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE="acl +bzip2 +e2fsprogs expat +iconv kernel_linux libressl lz4 +lzma lzo nettle static-libs xattr +zlib"
+
+RDEPEND="
+ acl? ( virtual/acl[${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}] )
+ kernel_linux? (
+ xattr? ( sys-apps/attr[${MULTILIB_USEDEP}] )
+ )
+ !libressl? ( dev-libs/openssl:0=[${MULTILIB_USEDEP}] )
+ libressl? ( dev-libs/libressl:0=[${MULTILIB_USEDEP}] )
+ lz4? ( >=app-arch/lz4-0_p131:0=[${MULTILIB_USEDEP}] )
+ lzma? ( app-arch/xz-utils[${MULTILIB_USEDEP}] )
+ lzo? ( >=dev-libs/lzo-2[${MULTILIB_USEDEP}] )
+ nettle? ( dev-libs/nettle:0=[${MULTILIB_USEDEP}] )
+ zlib? ( sys-libs/zlib[${MULTILIB_USEDEP}] )"
+DEPEND="${RDEPEND}
+ kernel_linux? (
+ virtual/os-headers
+ e2fsprogs? ( sys-fs/e2fsprogs )
+ )"
+
+PATCHES=( "${FILESDIR}/${P}-fix-tests-gnu99.patch" )
+
+multilib_src_configure() {
+ export ac_cv_header_ext2fs_ext2_fs_h=$(usex e2fsprogs) #354923
+
+ local myconf=()
+ myconf=(
+ $(use_enable acl)
+ $(use_enable static-libs static)
+ $(use_enable xattr)
+ $(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)
+ )
+ 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)
+ ); else myconf+=(
+ --disable-bsdcat
+ --disable-bsdcpio
+ --disable-bsdtar
+ ); fi
+
+ # We disable lzmadec because we support the newer liblzma from xz-utils
+ # and not liblzmadec with this version.
+ myconf+=(
+ --without-lzmadec
+ )
+
+ ECONF_SOURCE="${S}" econf "${myconf[@]}"
+}
+
+multilib_src_compile() {
+ if multilib_is_native_abi ; then
+ emake
+ else
+ emake libarchive.la
+ fi
+}
+
+multilib_src_test() {
+ # Replace the default src_test so that it builds tests in parallel
+ multilib_is_native_abi && emake check
+}
+
+multilib_src_install() {
+ if multilib_is_native_abi ; then
+ emake DESTDIR="${D}" install
+
+ # Create symlinks for FreeBSD
+ if ! use prefix && [[ ${CHOST} == *-freebsd* ]]; then
+ for bin in cat cpio tar; do
+ dosym bsd${bin} /usr/bin/${bin}
+ echo '.so bsd${bin}.1' > "${T}"/${bin}.1
+ doman "${T}"/${bin}.1
+ done
+ fi
+ else
+ emake DESTDIR="${D}" \
+ install-includeHEADERS \
+ install-libLTLIBRARIES \
+ install-pkgconfigDATA
+ fi
+
+ # Libs.private: should be used from libarchive.pc instead
+ prune_libtool_files
+}
+
+multilib_src_install_all() {
+ cd "${S}" || die
+ einstalldocs
+}
diff --git a/app-arch/libarchive/metadata.xml b/app-arch/libarchive/metadata.xml
index 174e5bed4a9..4222988b218 100644
--- a/app-arch/libarchive/metadata.xml
+++ b/app-arch/libarchive/metadata.xml
@@ -14,24 +14,27 @@
It has a number of advantages over previous tar implementations.
</longdescription>
<use>
- <flag name="zlib">
- Allow accessing gzip-compressed archives through
- <pkg>sys-libs/zlib</pkg>. This only affects libarchive's native
- support: bsdtar will keep using gunzip as a filter if that's not
- built-in. It's also needed for supporting extraction of ZIP
- files.
- </flag>
<flag name="bzip2">
Allow accessing bzip2-compressed archives through libbz2 (which
comes with <pkg>app-arch/bzip2</pkg>). This only affects
libarchive's native support: bsdtar will keep using bunzip2 as a
filter if that's not built-in.
</flag>
+ <flag name="e2fsprogs">
+ Use file flags from <pkg>sys-fs/e2fsprogs</pkg> headers instead of <pkg>virtual/os-headers</pkg> headers
+ </flag>
+ <flag name="lz4">
+ Enable support for LZ4 compression using <pkg>app-arch/lz4</pkg>
+ </flag>
<flag name="nettle">
Use <pkg>dev-libs/nettle</pkg> as crypto backend
</flag>
- <flag name="e2fsprogs">
- Use file flags from <pkg>sys-fs/e2fsprogs</pkg> headers instead of <pkg>virtual/os-headers</pkg> headers
+ <flag name="zlib">
+ Allow accessing gzip-compressed archives through
+ <pkg>sys-libs/zlib</pkg>. This only affects libarchive's native
+ support: bsdtar will keep using gunzip as a filter if that's not
+ built-in. It's also needed for supporting extraction of ZIP
+ files.
</flag>
</use>
</pkgmetadata>