1 |
commit: e7190087b79b1685765ab683bf3ad23edb229950 |
2 |
Author: NP-Hardass <NP-Hardass <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Jul 26 17:47:44 2016 +0000 |
4 |
Commit: NP Hardass <np-hardass <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Jul 26 17:56:29 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e7190087 |
7 |
|
8 |
app-arch/libarchive: Add explicit dep on xz threads=, backport detecction |
9 |
|
10 |
Package-Manager: portage-2.2.28 |
11 |
|
12 |
...ibarchive-3.2.1-xz-utils-thread-detection.patch | 27 +++++ |
13 |
app-arch/libarchive/libarchive-3.2.1-r4.ebuild | 126 +++++++++++++++++++++ |
14 |
2 files changed, 153 insertions(+) |
15 |
|
16 |
diff --git a/app-arch/libarchive/files/libarchive-3.2.1-xz-utils-thread-detection.patch b/app-arch/libarchive/files/libarchive-3.2.1-xz-utils-thread-detection.patch |
17 |
new file mode 100644 |
18 |
index 0000000..dda2359 |
19 |
--- /dev/null |
20 |
+++ b/app-arch/libarchive/files/libarchive-3.2.1-xz-utils-thread-detection.patch |
21 |
@@ -0,0 +1,27 @@ |
22 |
+From 7c3148ec0a2fed4834c6f9869ff7d2da77ba804c Mon Sep 17 00:00:00 2001 |
23 |
+From: Joerg Sonnenberger <joerg@×××.de> |
24 |
+Date: Wed, 22 Jun 2016 23:03:43 +0200 |
25 |
+Subject: [PATCH] Ignore the MT encoder in XZ 5.2 prerelease versions. |
26 |
+ |
27 |
+--- |
28 |
+ configure.ac | 7 +++++-- |
29 |
+ 1 file changed, 5 insertions(+), 2 deletions(-) |
30 |
+ |
31 |
+diff --git a/configure.ac b/configure.ac |
32 |
+index 64775fa..4f7f432 100644 |
33 |
+--- a/configure.ac |
34 |
++++ b/configure.ac |
35 |
+@@ -374,8 +374,11 @@ if test "x$with_lzma" != "xno"; then |
36 |
+ AC_CACHE_CHECK( |
37 |
+ [whether we have multithread support in lzma], |
38 |
+ ac_cv_lzma_has_mt, |
39 |
+- [AC_COMPILE_IFELSE([ |
40 |
+- AC_LANG_PROGRAM([[#include <lzma.h>]], |
41 |
++ [AC_LINK_IFELSE([ |
42 |
++ AC_LANG_PROGRAM([[#include <lzma.h>] |
43 |
++ [#if LZMA_VERSION < 50020000] |
44 |
++ [#error unsupported] |
45 |
++ [#endif]], |
46 |
+ [[lzma_stream_encoder_mt(0, 0);]])], |
47 |
+ [ac_cv_lzma_has_mt=yes], [ac_cv_lzma_has_mt=no])]) |
48 |
+ if test "x$ac_cv_lzma_has_mt" != xno; then |
49 |
|
50 |
diff --git a/app-arch/libarchive/libarchive-3.2.1-r4.ebuild b/app-arch/libarchive/libarchive-3.2.1-r4.ebuild |
51 |
new file mode 100644 |
52 |
index 0000000..0ef480c |
53 |
--- /dev/null |
54 |
+++ b/app-arch/libarchive/libarchive-3.2.1-r4.ebuild |
55 |
@@ -0,0 +1,126 @@ |
56 |
+# Copyright 1999-2016 Gentoo Foundation |
57 |
+# Distributed under the terms of the GNU General Public License v2 |
58 |
+# $Id$ |
59 |
+ |
60 |
+EAPI=6 |
61 |
+inherit autotools eutils multilib-minimal toolchain-funcs |
62 |
+ |
63 |
+DESCRIPTION="BSD tar command" |
64 |
+HOMEPAGE="http://www.libarchive.org/" |
65 |
+SRC_URI="http://www.libarchive.org/downloads/${P}.tar.gz" |
66 |
+ |
67 |
+LICENSE="BSD BSD-2 BSD-4 public-domain" |
68 |
+SLOT="0/13" |
69 |
+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" |
70 |
+IUSE="acl +bzip2 +e2fsprogs expat +iconv kernel_linux libressl lz4 +lzma lzo nettle static-libs +threads xattr +zlib" |
71 |
+ |
72 |
+RDEPEND=" |
73 |
+ acl? ( virtual/acl[${MULTILIB_USEDEP}] ) |
74 |
+ bzip2? ( app-arch/bzip2[${MULTILIB_USEDEP}] ) |
75 |
+ expat? ( dev-libs/expat[${MULTILIB_USEDEP}] ) |
76 |
+ !expat? ( dev-libs/libxml2[${MULTILIB_USEDEP}] ) |
77 |
+ iconv? ( virtual/libiconv[${MULTILIB_USEDEP}] ) |
78 |
+ kernel_linux? ( |
79 |
+ xattr? ( sys-apps/attr[${MULTILIB_USEDEP}] ) |
80 |
+ ) |
81 |
+ !libressl? ( dev-libs/openssl:0=[${MULTILIB_USEDEP}] ) |
82 |
+ libressl? ( dev-libs/libressl:0=[${MULTILIB_USEDEP}] ) |
83 |
+ lz4? ( >=app-arch/lz4-0_p131:0=[${MULTILIB_USEDEP}] ) |
84 |
+ lzma? ( app-arch/xz-utils[threads=,${MULTILIB_USEDEP}] ) |
85 |
+ lzo? ( >=dev-libs/lzo-2[${MULTILIB_USEDEP}] ) |
86 |
+ nettle? ( dev-libs/nettle:0=[${MULTILIB_USEDEP}] ) |
87 |
+ zlib? ( sys-libs/zlib[${MULTILIB_USEDEP}] )" |
88 |
+DEPEND="${RDEPEND} |
89 |
+ kernel_linux? ( |
90 |
+ virtual/os-headers |
91 |
+ e2fsprogs? ( sys-fs/e2fsprogs ) |
92 |
+ )" |
93 |
+ |
94 |
+PATCHES=( |
95 |
+ "${FILESDIR}/${P}-fix-tests-gnu99.patch" |
96 |
+ "${FILESDIR}/${P}-osx-fix-acl.patch" #587890 |
97 |
+ "${FILESDIR}/${P}-xz-utils-thread-detection.patch" #589654 |
98 |
+) |
99 |
+ |
100 |
+src_prepare() { |
101 |
+ default |
102 |
+ eautoreconf # elibtoolize is required for Solaris sol2_ld linker fix |
103 |
+} |
104 |
+ |
105 |
+multilib_src_configure() { |
106 |
+ export ac_cv_header_ext2fs_ext2_fs_h=$(usex e2fsprogs) #354923 |
107 |
+ |
108 |
+ local myconf=() |
109 |
+ myconf=( |
110 |
+ $(use_enable acl) |
111 |
+ $(use_enable static-libs static) |
112 |
+ $(use_enable xattr) |
113 |
+ $(use_with bzip2 bz2lib) |
114 |
+ $(use_with expat) |
115 |
+ $(use_with !expat xml2) |
116 |
+ $(use_with iconv) |
117 |
+ $(use_with lz4) |
118 |
+ $(use_with lzma) |
119 |
+ $(use_with lzo lzo2) |
120 |
+ $(use_with nettle) |
121 |
+ $(use_with zlib) |
122 |
+ ) |
123 |
+ if multilib_is_native_abi ; then myconf+=( |
124 |
+ --enable-bsdcat=$(tc-is-static-only && echo static || echo shared) |
125 |
+ --enable-bsdcpio=$(tc-is-static-only && echo static || echo shared) |
126 |
+ --enable-bsdtar=$(tc-is-static-only && echo static || echo shared) |
127 |
+ ); else myconf+=( |
128 |
+ --disable-bsdcat |
129 |
+ --disable-bsdcpio |
130 |
+ --disable-bsdtar |
131 |
+ ); fi |
132 |
+ |
133 |
+ # We disable lzmadec because we support the newer liblzma from xz-utils |
134 |
+ # and not liblzmadec with this version. |
135 |
+ myconf+=( |
136 |
+ --without-lzmadec |
137 |
+ ) |
138 |
+ |
139 |
+ ECONF_SOURCE="${S}" econf "${myconf[@]}" |
140 |
+} |
141 |
+ |
142 |
+multilib_src_compile() { |
143 |
+ if multilib_is_native_abi ; then |
144 |
+ emake |
145 |
+ else |
146 |
+ emake libarchive.la |
147 |
+ fi |
148 |
+} |
149 |
+ |
150 |
+multilib_src_test() { |
151 |
+ # Replace the default src_test so that it builds tests in parallel |
152 |
+ multilib_is_native_abi && emake check |
153 |
+} |
154 |
+ |
155 |
+multilib_src_install() { |
156 |
+ if multilib_is_native_abi ; then |
157 |
+ emake DESTDIR="${D}" install |
158 |
+ |
159 |
+ # Create symlinks for FreeBSD |
160 |
+ if ! use prefix && [[ ${CHOST} == *-freebsd* ]]; then |
161 |
+ for bin in cat cpio tar; do |
162 |
+ dosym bsd${bin} /usr/bin/${bin} |
163 |
+ echo '.so bsd${bin}.1' > "${T}"/${bin}.1 |
164 |
+ doman "${T}"/${bin}.1 |
165 |
+ done |
166 |
+ fi |
167 |
+ else |
168 |
+ emake DESTDIR="${D}" \ |
169 |
+ install-includeHEADERS \ |
170 |
+ install-libLTLIBRARIES \ |
171 |
+ install-pkgconfigDATA |
172 |
+ fi |
173 |
+ |
174 |
+ # Libs.private: should be used from libarchive.pc instead |
175 |
+ prune_libtool_files |
176 |
+} |
177 |
+ |
178 |
+multilib_src_install_all() { |
179 |
+ cd "${S}" || die |
180 |
+ einstalldocs |
181 |
+} |