Gentoo Archives: gentoo-commits

From: NP Hardass <np-hardass@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-arch/libarchive/
Date: Tue, 29 Mar 2016 02:27:06
Message-Id: 1459218359.7d78390686d13678aae4e0d66b3c6b5168576a95.np-hardass@gentoo
1 commit: 7d78390686d13678aae4e0d66b3c6b5168576a95
2 Author: NP-Hardass <NP-Hardass <AT> gentoo <DOT> org>
3 AuthorDate: Tue Mar 29 00:25:30 2016 +0000
4 Commit: NP Hardass <np-hardass <AT> gentoo <DOT> org>
5 CommitDate: Tue Mar 29 02:25:59 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7d783906
7
8 app-arch/libarchive: Add subslot rebuild for nettle, per #562758
9
10 Package-Manager: portage-2.2.26
11
12 app-arch/libarchive/libarchive-3.1.2-r4.ebuild | 121 +++++++++++++++++++++++++
13 1 file changed, 121 insertions(+)
14
15 diff --git a/app-arch/libarchive/libarchive-3.1.2-r4.ebuild b/app-arch/libarchive/libarchive-3.1.2-r4.ebuild
16 new file mode 100644
17 index 0000000..9452b43
18 --- /dev/null
19 +++ b/app-arch/libarchive/libarchive-3.1.2-r4.ebuild
20 @@ -0,0 +1,121 @@
21 +# Copyright 1999-2016 Gentoo Foundation
22 +# Distributed under the terms of the GNU General Public License v2
23 +# $Id$
24 +
25 +EAPI=5
26 +inherit autotools eutils multilib-minimal toolchain-funcs
27 +
28 +DESCRIPTION="BSD tar command"
29 +HOMEPAGE="http://www.libarchive.org/"
30 +SRC_URI="http://www.libarchive.org/downloads/${P}.tar.gz"
31 +
32 +LICENSE="BSD BSD-2 BSD-4 public-domain"
33 +SLOT="0/13"
34 +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"
35 +IUSE="acl +bzip2 +e2fsprogs expat +iconv kernel_linux libressl +lzma lzo nettle static-libs xattr +zlib"
36 +
37 +RDEPEND="
38 + !libressl? ( dev-libs/openssl:0=[${MULTILIB_USEDEP}] )
39 + libressl? ( dev-libs/libressl:0=[${MULTILIB_USEDEP}] )
40 + acl? ( virtual/acl[${MULTILIB_USEDEP}] )
41 + bzip2? ( app-arch/bzip2[${MULTILIB_USEDEP}] )
42 + expat? ( dev-libs/expat[${MULTILIB_USEDEP}] )
43 + !expat? ( dev-libs/libxml2[${MULTILIB_USEDEP}] )
44 + iconv? ( virtual/libiconv[${MULTILIB_USEDEP}] )
45 + kernel_linux? (
46 + xattr? ( sys-apps/attr[${MULTILIB_USEDEP}] )
47 + )
48 + lzma? ( app-arch/xz-utils[${MULTILIB_USEDEP}] )
49 + lzo? ( >=dev-libs/lzo-2[${MULTILIB_USEDEP}] )
50 + nettle? ( dev-libs/nettle:0=[${MULTILIB_USEDEP}] )
51 + zlib? ( sys-libs/zlib[${MULTILIB_USEDEP}] )"
52 +DEPEND="${RDEPEND}
53 + kernel_linux? (
54 + virtual/os-headers
55 + e2fsprogs? ( sys-fs/e2fsprogs )
56 + )"
57 +
58 +DOCS=( NEWS README )
59 +
60 +src_prepare() {
61 + epatch "${FILESDIR}"/${P}-CVE-2013-0211.patch
62 + epatch "${FILESDIR}"/${P}-outofsource.patch
63 + eautoreconf
64 +}
65 +
66 +multilib_src_configure() {
67 + export ac_cv_header_ext2fs_ext2_fs_h=$(usex e2fsprogs) #354923
68 +
69 + local myconf=()
70 + myconf=(
71 + $(use_enable static-libs static)
72 + $(use_enable xattr)
73 + $(use_enable acl)
74 + $(use_with zlib)
75 + $(use_with bzip2 bz2lib)
76 + $(use_with iconv)
77 + $(use_with lzma)
78 + $(use_with lzo lzo2)
79 + $(use_with nettle)
80 + $(use_with !expat xml2)
81 + $(use_with expat)
82 + )
83 + if multilib_is_native_abi ; then myconf+=(
84 + --enable-bsdtar=$(tc-is-static-only && echo static || echo shared)
85 + --enable-bsdcpio=$(tc-is-static-only && echo static || echo shared)
86 + ); else myconf+=(
87 + --disable-bsdtar
88 + --disable-bsdcpio
89 + ); fi
90 +
91 + # We disable lzmadec because we support the newer liblzma from xz-utils
92 + # and not liblzmadec with this version.
93 + myconf+=(
94 + --without-lzmadec
95 + )
96 +
97 + ECONF_SOURCE="${S}" econf "${myconf[@]}"
98 +}
99 +
100 +multilib_src_compile() {
101 + if multilib_is_native_abi ; then
102 + emake
103 + else
104 + emake libarchive.la
105 + fi
106 +}
107 +
108 +multilib_src_test() {
109 + # Replace the default src_test so that it builds tests in parallel
110 + multilib_is_native_abi && emake check
111 +}
112 +
113 +multilib_src_install() {
114 + if multilib_is_native_abi ; then
115 + emake DESTDIR="${D}" install
116 +
117 + # Libs.private: should be used from libarchive.pc instead
118 + prune_libtool_files
119 +
120 + # Create tar symlink for FreeBSD
121 + if ! use prefix && [[ ${CHOST} == *-freebsd* ]]; then
122 + dosym bsdtar /usr/bin/tar
123 + echo '.so bsdtar.1' > "${T}"/tar.1
124 + doman "${T}"/tar.1
125 + # We may wish to switch to symlink bsdcpio to cpio too one day
126 + fi
127 + else
128 + emake DESTDIR="${D}" \
129 + install-includeHEADERS \
130 + install-libLTLIBRARIES \
131 + install-pkgconfigDATA
132 +
133 + # Libs.private: should be used from libarchive.pc instead
134 + prune_libtool_files
135 + fi
136 +}
137 +
138 +multilib_src_install_all() {
139 + cd "${S}" || die
140 + dodoc "${DOCS[@]}"
141 +}