commit:     6c9193ee55e0603fde627238a82acd02fa7010a5
Author:     NP-Hardass <NP-Hardass <AT> gentoo <DOT> org>
AuthorDate: Sun Jul  3 07:04:30 2016 +0000
Commit:     NP Hardass <np-hardass <AT> gentoo <DOT> org>
CommitDate: Sun Jul  3 07:05:23 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6c9193ee

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

 .../files/libarchive-3.2.1-fix-tests-gnu99.patch   | 47 ++++++++++++++++++
 ...ive-3.2.1.ebuild => libarchive-3.2.1-r1.ebuild} | 39 +++++++--------
 ...ive-3.2.1.ebuild => libarchive-3.2.1-r2.ebuild} | 55 ++++++++++------------
 app-arch/libarchive/metadata.xml                   | 21 +++++----
 4 files changed, 105 insertions(+), 57 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 0000000..ec249c3
--- /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 <[email protected]>
+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
similarity index 87%
copy from app-arch/libarchive/libarchive-3.2.1.ebuild
copy to app-arch/libarchive/libarchive-3.2.1-r1.ebuild
index 9566991..ccdafb6 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.ebuild 
b/app-arch/libarchive/libarchive-3.2.1-r2.ebuild
similarity index 81%
rename from app-arch/libarchive/libarchive-3.2.1.ebuild
rename to app-arch/libarchive/libarchive-3.2.1-r2.ebuild
index 9566991..3b514eb 100644
--- a/app-arch/libarchive/libarchive-3.2.1.ebuild
+++ b/app-arch/libarchive/libarchive-3.2.1-r2.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,38 +34,36 @@ DEPEND="${RDEPEND}
        kernel_linux? (
                virtual/os-headers
                e2fsprogs? ( sys-fs/e2fsprogs )
-               )"
+       )"
 
-DOCS=( NEWS README )
-
-src_prepare() {
-       default
-       eautoreconf
-}
+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_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,28 +92,26 @@ 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
+               # Create symlinks for FreeBSD
                if ! use prefix && [[ ${CHOST} == *-freebsd* ]]; then
-                       dosym bsdtar /usr/bin/tar
-                       echo '.so bsdtar.1' > "${T}"/tar.1
-                       doman "${T}"/tar.1
-                       # We may wish to switch to symlink bsdcpio to cpio too 
one day
+                       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
-
-               # 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/metadata.xml b/app-arch/libarchive/metadata.xml
index 174e5be..4222988 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>

Reply via email to