diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
commit | 4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch) | |
tree | ba5f07bf3f9d22d82e54a462313f5d244036c768 /app-arch/libarchive |
reinit the tree, so we can have metadata
Diffstat (limited to 'app-arch/libarchive')
-rw-r--r-- | app-arch/libarchive/Manifest | 11 | ||||
-rw-r--r-- | app-arch/libarchive/files/CVE-2017-5601.patch | 24 | ||||
-rw-r--r-- | app-arch/libarchive/files/libarchive-3.3.1-libressl.patch | 22 | ||||
-rw-r--r-- | app-arch/libarchive/libarchive-3.2.2-r1.ebuild | 124 | ||||
-rw-r--r-- | app-arch/libarchive/libarchive-3.3.1.ebuild | 118 | ||||
-rw-r--r-- | app-arch/libarchive/libarchive-3.3.2.ebuild | 120 | ||||
-rw-r--r-- | app-arch/libarchive/metadata.xml | 36 |
7 files changed, 455 insertions, 0 deletions
diff --git a/app-arch/libarchive/Manifest b/app-arch/libarchive/Manifest new file mode 100644 index 000000000000..ec3ca9d873bf --- /dev/null +++ b/app-arch/libarchive/Manifest @@ -0,0 +1,11 @@ +AUX CVE-2017-5601.patch 979 SHA256 e6177bd052090a2111d62c7c68157df71cebf4ad359aad02ce89d5585c9e64a4 SHA512 a2c8507698166b3d4bbd197323a15cb82d53a647f2d0c74e17e9b229e4f1fd44c3f0468b674c0dfb693ddad7fc7c5cc4f00fbce1e607d0c02fb90d59cc9e09a0 WHIRLPOOL 032ecd55d3464bd39751f906d2ca2b3dd3d95a8dad8020ab474971b7e013399faa9089c3ca728627e309b96b51e6839d35e558ebb05425afaeecd043bb6ebcd4 +AUX libarchive-3.3.1-libressl.patch 825 SHA256 78eb2693cd7d8b3a8e942f41a5485541bb93911e05364ae02f4355aac8aac4ee SHA512 2418a281562ee5f0e4f54ca181c68265f6b72a80786d17f45547222a3fde83597a17d88075e5f9c5d52a2688d8890006f592a129ddc634397a9160d16724a12c WHIRLPOOL 1f1a6d98cf9f5d639e4630b002f2dcc3ea50a027ba1a08b461173bac3254b9f7fe4f0f70a05e944ca736c9121cf1e02a01670d3bf99a5c645b1a35f423cefb70 +DIST libarchive-3.2.2.tar.gz 5458241 SHA256 691c194ee132d1f0f7a42541f091db811bc2e56f7107e9121be2bc8c04f1060f SHA512 a67920c37d49cf9478032d77fc4fa21827cebb96e9b83d9ecb8466328834052e4ab3d3a9bc4e2edf405d6cb14ffd648c9fa100b578257f6e5842c99bbea558a7 WHIRLPOOL 8fdc2e9245db27a7da3cfdeecb6283b170a25fc6ea8201fe5a414b4c1b523ae6b05745246f867f24062d91b7a040780b687b1a44a95503c4e252f9836218ffef +DIST libarchive-3.3.1.tar.gz 6219943 SHA256 29ca5bd1624ca5a007aa57e16080262ab4379dbf8797f5c52f7ea74a3b0424e7 SHA512 90702b393b6f0943f42438e277b257af45eee4fa82420431f6a4f5f48bb846f2a72c8ff084dc3ee9c87bdf8b57f4d8dddf7814870fe2604fe86c55d8d744c164 WHIRLPOOL 07a8a5f700c62d61e82d6bb123b5e720041b1ea296c17f189d4494ef4dab58b2c4d428c12fe8221602c7ec5d8eca859f8c288fc9b9a51d8a511fb01051dc17ca +DIST libarchive-3.3.2.tar.gz 6236562 SHA256 ed2dbd6954792b2c054ccf8ec4b330a54b85904a80cef477a1c74643ddafa0ce SHA512 1e538cd7d492f54b11c16c56f12c1632ba14302a3737ec0db786272aec0c8020f1e27616a7654d57e26737e5ed9bfc9a62f1fdda61a95c39eb726aa7c2f673e4 WHIRLPOOL 6afc8dfca6474933383619e15c750b08ecd1553f3ff244c60cd43502b3d177be9633a2d2c80d9ea7846af21ae7dc59f32fd79cface4258a1b7b00e60e3a5f7a9 +EBUILD libarchive-3.2.2-r1.ebuild 3429 SHA256 bfb49ef2389a9d6f7dcfb0b889b01041b088a3c9013ba3fccd6aa08e7439580b SHA512 0b3e1059ff5b1118934591f2a8c9c00c36c4104c72eddc9d831a66e6ce0254db04513c05e3856e53b27e5ba422b6e5ded6238da56f9d9c23f66dfa7f4907feef WHIRLPOOL f1ca36937cf1d53ad000a034b49a95b81c09901ae441a13bf2bf31a76f1a16c0b14a69ed400603aef2cd60f3dbc65d242f0c1df2f27c4dacb225845046510107 +EBUILD libarchive-3.3.1.ebuild 3301 SHA256 0861967230ff5fbab418f7fe0f885183660ccb5eb07ae30782f284df8e53622d SHA512 9ca60ce4e691485881875f4ac3f00798e3e055a2524f67d0bdc02d86a62951efa8db6a35b5b907c9cb54882cc1a986dee5883ca47828a39e4edfe5a6a7eaf4ab WHIRLPOOL 60a80c9af648a4ac2a5a01931cd840a73b12099bb192299a5b96ecae82ea9424cc04ed1b75328c767cb103a389a509a47902052a94d6a630db09a826512fd678 +EBUILD libarchive-3.3.2.ebuild 3314 SHA256 4058bf6b9e1b49bdd8583f20dade4ad04b6c56bb44bcec3d0c7241ea8481053b SHA512 465cedc1ad9b10c83a8a218af0b4fc50207dbf9593a25bb0292781a8b7f141950496b1909ce355174020a97c63b88322c41806f9215765b7a8e5fa6743bbb5e2 WHIRLPOOL 7455e915a3e1d5d053d547dd39c8a941bc6a8b1fe8a2043811bb9d3c969f61b57c200d391eaef84affdefa298a6415319b960bb890a109a040fd3a9875a63dc1 +MISC ChangeLog 11118 SHA256 d4ade993917b5c234392da6ce565f0a2a74e60ec197c1ed09cfa82f58cc3fedd SHA512 2b972dbdf28111b28d188aabbc5c5362892ebd8882b3e2678efd603a7f0b438d2873bb98cdabf72b8089b4c4ec1f1bcef31af1b928ce93f361cfc5f16d6cc466 WHIRLPOOL 6d1efe322aab7c029ef0db51a2c6105f1e93c582465240da9471dca97dc2fa50149eb1acc84c8de80bebc4f2f81bfb76089dd9ea5ef6237ca162eac86e044cc6 +MISC ChangeLog-2015 35658 SHA256 5d6739081fe3df492178d0522b91f02761d0956ffe6cff8ea716b93519bd0310 SHA512 28edd8ebd92704e8e6388c261b82cbac5ffc33185c8b8666b44cc06b75186036c7e04cde6c7637411f717590aa41350dd588932c1474ceda1c5b9ad23828b02d WHIRLPOOL c7d02fd3c18ecff0ecd32d7865080c096e9469e07b3810c74c5d8894044e8df4088cc8ef8d898d3452cb86d760f59715bb41f58286b8cd4292fb2d8699f8202f +MISC metadata.xml 1382 SHA256 7e969629dbfb9592985ff032f0c1beabccfc026c34a61a4541dc4bd234603c10 SHA512 2fc0f4507ed02a226dcfcd174026c55ddcf3d22b2ca59c5a2bc5b7e9e9f2943089196267aab7c4292d1782d954123571656ec15c5d24fe19d5b01557c18013b8 WHIRLPOOL a11b206a996385d7c538736655f347019ef4410b12701cb00b77292cd8d8e03a8db81949a3e4c1ae47616044b58a98a593bc0832a4f6ff072a629ca11de7ee8b diff --git a/app-arch/libarchive/files/CVE-2017-5601.patch b/app-arch/libarchive/files/CVE-2017-5601.patch new file mode 100644 index 000000000000..4ba85ff9072f --- /dev/null +++ b/app-arch/libarchive/files/CVE-2017-5601.patch @@ -0,0 +1,24 @@ +From 98dcbbf0bf4854bf987557e55e55fff7abbf3ea9 Mon Sep 17 00:00:00 2001 +From: Martin Matuska <martin@matuska.org> +Date: Thu, 19 Jan 2017 22:00:18 +0100 +Subject: [PATCH] Fail with negative lha->compsize in lha_read_file_header_1() + Fixes a heap buffer overflow reported in Secunia SA74169 + +--- + libarchive/archive_read_support_format_lha.c | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/libarchive/archive_read_support_format_lha.c b/libarchive/archive_read_support_format_lha.c +index 52a5531..d77a7c2 100644 +--- a/libarchive/archive_read_support_format_lha.c ++++ b/libarchive/archive_read_support_format_lha.c +@@ -924,6 +924,9 @@ lha_read_file_header_1(struct archive_read *a, struct lha *lha) + /* Get a real compressed file size. */ + lha->compsize -= extdsize - 2; + ++ if (lha->compsize < 0) ++ goto invalid; /* Invalid compressed file size */ ++ + if (sum_calculated != headersum) { + archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC, + "LHa header sum error"); diff --git a/app-arch/libarchive/files/libarchive-3.3.1-libressl.patch b/app-arch/libarchive/files/libarchive-3.3.1-libressl.patch new file mode 100644 index 000000000000..8078bc09210d --- /dev/null +++ b/app-arch/libarchive/files/libarchive-3.3.1-libressl.patch @@ -0,0 +1,22 @@ +--- a/libarchive/archive_openssl_evp_private.h ++++ b/libarchive/archive_openssl_evp_private.h +@@ -28,7 +28,7 @@ + #include <openssl/evp.h> + #include <openssl/opensslv.h> + +-#if OPENSSL_VERSION_NUMBER < 0x10100000L ++#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER) + #include <stdlib.h> /* malloc, free */ + #include <string.h> /* memset */ + static inline EVP_MD_CTX *EVP_MD_CTX_new(void) +--- a/libarchive/archive_openssl_hmac_private.h ++++ b/libarchive/archive_openssl_hmac_private.h +@@ -28,7 +28,7 @@ + #include <openssl/hmac.h> + #include <openssl/opensslv.h> + +-#if OPENSSL_VERSION_NUMBER < 0x10100000L ++#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER) + #include <stdlib.h> /* malloc, free */ + #include <string.h> /* memset */ + static inline HMAC_CTX *HMAC_CTX_new(void) diff --git a/app-arch/libarchive/libarchive-3.2.2-r1.ebuild b/app-arch/libarchive/libarchive-3.2.2-r1.ebuild new file mode 100644 index 000000000000..34485b16533b --- /dev/null +++ b/app-arch/libarchive/libarchive-3.2.2-r1.ebuild @@ -0,0 +1,124 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 +inherit eutils libtool 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 ~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 +threads 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[threads=,${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}"/CVE-2017-5601.patch +) + +src_prepare() { + default + elibtoolize # is required for Solaris sol2_ld linker fix +} + +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 + # Exclude cat for the time being #589876 + for bin in 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/libarchive-3.3.1.ebuild b/app-arch/libarchive/libarchive-3.3.1.ebuild new file mode 100644 index 000000000000..a7a6d960e76f --- /dev/null +++ b/app-arch/libarchive/libarchive-3.3.1.ebuild @@ -0,0 +1,118 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 +inherit eutils libtool 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 ~x64-cygwin ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~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 +threads 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[threads=,${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}"/${PN}-3.3.1-libressl.patch +) + +src_prepare() { + default + elibtoolize # is required for Solaris sol2_ld linker fix +} + +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 + + 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 + # Exclude cat for the time being #589876 + for bin in 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/libarchive-3.3.2.ebuild b/app-arch/libarchive/libarchive-3.3.2.ebuild new file mode 100644 index 000000000000..880de9e8b234 --- /dev/null +++ b/app-arch/libarchive/libarchive-3.3.2.ebuild @@ -0,0 +1,120 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 +inherit eutils libtool 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 ~x64-cygwin ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~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 +threads 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[threads=,${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 ) + )" + +src_prepare() { + default + elibtoolize # is required for Solaris sol2_ld linker fix +} + +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 + + 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 + # Exclude cat for the time being #589876 + for bin in cpio tar; do + dosym bsd${bin} /usr/bin/${bin} + echo '.so bsd${bin}.1' > "${T}"/${bin}.1 + doman "${T}"/${bin}.1 + done + fi + else + local install_targets=( + install-includeHEADERS + install-libLTLIBRARIES + install-pkgconfigDATA + ) + emake DESTDIR="${D}" "${install_targets[@]}" + 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 new file mode 100644 index 000000000000..9ae27e81711e --- /dev/null +++ b/app-arch/libarchive/metadata.xml @@ -0,0 +1,36 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>bsd@gentoo.org</email> + <name>BSD Project</name> + </maintainer> + <longdescription lang="en"> + The bsdtar program creates and manipulates streaming archive files. + It has a number of advantages over previous tar implementations. + </longdescription> + <use> + <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="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> |