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/files/, app-arch/libarchive/
Date: Sun, 03 Jul 2016 07:05:42
Message-Id: 1467529523.6c9193ee55e0603fde627238a82acd02fa7010a5.np-hardass@gentoo
1 commit: 6c9193ee55e0603fde627238a82acd02fa7010a5
2 Author: NP-Hardass <NP-Hardass <AT> gentoo <DOT> org>
3 AuthorDate: Sun Jul 3 07:04:30 2016 +0000
4 Commit: NP Hardass <np-hardass <AT> gentoo <DOT> org>
5 CommitDate: Sun Jul 3 07:05:23 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6c9193ee
7
8 app-arch/libarchive: Add lz4, fix up EAPI6, fix test, minor formatting
9
10 3.2.1-r2 makes bsdcat and bsdcpio the default for BSD must like bsdtar
11 already is.
12
13 Package-Manager: portage-2.2.28
14
15 .../files/libarchive-3.2.1-fix-tests-gnu99.patch | 47 ++++++++++++++++++
16 ...ive-3.2.1.ebuild => libarchive-3.2.1-r1.ebuild} | 39 +++++++--------
17 ...ive-3.2.1.ebuild => libarchive-3.2.1-r2.ebuild} | 55 ++++++++++------------
18 app-arch/libarchive/metadata.xml | 21 +++++----
19 4 files changed, 105 insertions(+), 57 deletions(-)
20
21 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
22 new file mode 100644
23 index 0000000..ec249c3
24 --- /dev/null
25 +++ b/app-arch/libarchive/files/libarchive-3.2.1-fix-tests-gnu99.patch
26 @@ -0,0 +1,47 @@
27 +From 11f5b75c9ba12ba73b5fa34dc9d285983d99c01b Mon Sep 17 00:00:00 2001
28 +From: Joerg Sonnenberger <joerg@×××.de>
29 +Date: Wed, 22 Jun 2016 23:09:27 +0200
30 +Subject: [PATCH] Avoid use of C99 for-scope declarations to fix issue #729.
31 +
32 +---
33 + libarchive/test/test_write_format_gnutar_filenames.c | 6 ++++--
34 + 1 file changed, 4 insertions(+), 2 deletions(-)
35 +
36 +diff --git a/libarchive/test/test_write_format_gnutar_filenames.c b/libarchive/test/test_write_format_gnutar_filenames.c
37 +index 38b4ca9..26457d3 100644
38 +--- a/libarchive/test/test_write_format_gnutar_filenames.c
39 ++++ b/libarchive/test/test_write_format_gnutar_filenames.c
40 +@@ -42,6 +42,7 @@ DEFINE_TEST(test_write_format_gnutar_filenames)
41 + struct archive_entry *ae, *template;
42 + struct archive *a;
43 + size_t used;
44 ++ int i;
45 +
46 + buff = malloc(buffsize); /* million bytes of work area */
47 + assert(buff != NULL);
48 +@@ -55,7 +56,7 @@ DEFINE_TEST(test_write_format_gnutar_filenames)
49 + archive_entry_set_mode(template, S_IFREG | 0755);
50 + archive_entry_set_size(template, 8);
51 +
52 +- for (int i = 0; i < 2000; ++i) {
53 ++ for (i = 0; i < 2000; ++i) {
54 + filename[i] = 'a';
55 + filename[i + 1] = '\0';
56 + archive_entry_copy_pathname(template, filename);
57 +@@ -97,6 +98,7 @@ DEFINE_TEST(test_write_format_gnutar_linknames)
58 + struct archive_entry *ae, *template;
59 + struct archive *a;
60 + size_t used;
61 ++ int i;
62 +
63 + buff = malloc(buffsize); /* million bytes of work area */
64 + assert(buff != NULL);
65 +@@ -110,7 +112,7 @@ DEFINE_TEST(test_write_format_gnutar_linknames)
66 + archive_entry_set_mode(template, S_IFLNK | 0755);
67 + archive_entry_copy_pathname(template, "link");
68 +
69 +- for (int i = 0; i < 2000; ++i) {
70 ++ for (i = 0; i < 2000; ++i) {
71 + filename[i] = 'a';
72 + filename[i + 1] = '\0';
73 + archive_entry_copy_symlink(template, filename);
74
75 diff --git a/app-arch/libarchive/libarchive-3.2.1.ebuild b/app-arch/libarchive/libarchive-3.2.1-r1.ebuild
76 similarity index 87%
77 copy from app-arch/libarchive/libarchive-3.2.1.ebuild
78 copy to app-arch/libarchive/libarchive-3.2.1-r1.ebuild
79 index 9566991..ccdafb6 100644
80 --- a/app-arch/libarchive/libarchive-3.2.1.ebuild
81 +++ b/app-arch/libarchive/libarchive-3.2.1-r1.ebuild
82 @@ -12,11 +12,9 @@ SRC_URI="http://www.libarchive.org/downloads/${P}.tar.gz"
83 LICENSE="BSD BSD-2 BSD-4 public-domain"
84 SLOT="0/13"
85 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"
86 -IUSE="acl +bzip2 +e2fsprogs expat +iconv kernel_linux libressl +lzma lzo nettle static-libs xattr +zlib"
87 +IUSE="acl +bzip2 +e2fsprogs expat +iconv kernel_linux libressl lz4 +lzma lzo nettle static-libs xattr +zlib"
88
89 RDEPEND="
90 - !libressl? ( dev-libs/openssl:0=[${MULTILIB_USEDEP}] )
91 - libressl? ( dev-libs/libressl:0=[${MULTILIB_USEDEP}] )
92 acl? ( virtual/acl[${MULTILIB_USEDEP}] )
93 bzip2? ( app-arch/bzip2[${MULTILIB_USEDEP}] )
94 expat? ( dev-libs/expat[${MULTILIB_USEDEP}] )
95 @@ -24,7 +22,10 @@ RDEPEND="
96 iconv? ( virtual/libiconv[${MULTILIB_USEDEP}] )
97 kernel_linux? (
98 xattr? ( sys-apps/attr[${MULTILIB_USEDEP}] )
99 - )
100 + )
101 + !libressl? ( dev-libs/openssl:0=[${MULTILIB_USEDEP}] )
102 + libressl? ( dev-libs/libressl:0=[${MULTILIB_USEDEP}] )
103 + lz4? ( >=app-arch/lz4-0_p131:0=[${MULTILIB_USEDEP}] )
104 lzma? ( app-arch/xz-utils[${MULTILIB_USEDEP}] )
105 lzo? ( >=dev-libs/lzo-2[${MULTILIB_USEDEP}] )
106 nettle? ( dev-libs/nettle:0=[${MULTILIB_USEDEP}] )
107 @@ -33,9 +34,9 @@ DEPEND="${RDEPEND}
108 kernel_linux? (
109 virtual/os-headers
110 e2fsprogs? ( sys-fs/e2fsprogs )
111 - )"
112 + )"
113
114 -DOCS=( NEWS README )
115 +PATCHES=( "${FILESDIR}/${P}-fix-tests-gnu99.patch" )
116
117 src_prepare() {
118 default
119 @@ -47,24 +48,27 @@ multilib_src_configure() {
120
121 local myconf=()
122 myconf=(
123 + $(use_enable acl)
124 $(use_enable static-libs static)
125 $(use_enable xattr)
126 - $(use_enable acl)
127 - $(use_with zlib)
128 $(use_with bzip2 bz2lib)
129 + $(use_with expat)
130 + $(use_with !expat xml2)
131 $(use_with iconv)
132 + $(use_with lz4)
133 $(use_with lzma)
134 $(use_with lzo lzo2)
135 $(use_with nettle)
136 - $(use_with !expat xml2)
137 - $(use_with expat)
138 + $(use_with zlib)
139 )
140 if multilib_is_native_abi ; then myconf+=(
141 - --enable-bsdtar=$(tc-is-static-only && echo static || echo shared)
142 + --enable-bsdcat=$(tc-is-static-only && echo static || echo shared)
143 --enable-bsdcpio=$(tc-is-static-only && echo static || echo shared)
144 + --enable-bsdtar=$(tc-is-static-only && echo static || echo shared)
145 ); else myconf+=(
146 - --disable-bsdtar
147 + --disable-bsdcat
148 --disable-bsdcpio
149 + --disable-bsdtar
150 ); fi
151
152 # We disable lzmadec because we support the newer liblzma from xz-utils
153 @@ -93,9 +97,6 @@ multilib_src_install() {
154 if multilib_is_native_abi ; then
155 emake DESTDIR="${D}" install
156
157 - # Libs.private: should be used from libarchive.pc instead
158 - prune_libtool_files
159 -
160 # Create tar symlink for FreeBSD
161 if ! use prefix && [[ ${CHOST} == *-freebsd* ]]; then
162 dosym bsdtar /usr/bin/tar
163 @@ -108,13 +109,13 @@ multilib_src_install() {
164 install-includeHEADERS \
165 install-libLTLIBRARIES \
166 install-pkgconfigDATA
167 -
168 - # Libs.private: should be used from libarchive.pc instead
169 - prune_libtool_files
170 fi
171 +
172 + # Libs.private: should be used from libarchive.pc instead
173 + prune_libtool_files
174 }
175
176 multilib_src_install_all() {
177 cd "${S}" || die
178 - dodoc "${DOCS[@]}"
179 + einstalldocs
180 }
181
182 diff --git a/app-arch/libarchive/libarchive-3.2.1.ebuild b/app-arch/libarchive/libarchive-3.2.1-r2.ebuild
183 similarity index 81%
184 rename from app-arch/libarchive/libarchive-3.2.1.ebuild
185 rename to app-arch/libarchive/libarchive-3.2.1-r2.ebuild
186 index 9566991..3b514eb 100644
187 --- a/app-arch/libarchive/libarchive-3.2.1.ebuild
188 +++ b/app-arch/libarchive/libarchive-3.2.1-r2.ebuild
189 @@ -12,11 +12,9 @@ SRC_URI="http://www.libarchive.org/downloads/${P}.tar.gz"
190 LICENSE="BSD BSD-2 BSD-4 public-domain"
191 SLOT="0/13"
192 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"
193 -IUSE="acl +bzip2 +e2fsprogs expat +iconv kernel_linux libressl +lzma lzo nettle static-libs xattr +zlib"
194 +IUSE="acl +bzip2 +e2fsprogs expat +iconv kernel_linux libressl lz4 +lzma lzo nettle static-libs xattr +zlib"
195
196 RDEPEND="
197 - !libressl? ( dev-libs/openssl:0=[${MULTILIB_USEDEP}] )
198 - libressl? ( dev-libs/libressl:0=[${MULTILIB_USEDEP}] )
199 acl? ( virtual/acl[${MULTILIB_USEDEP}] )
200 bzip2? ( app-arch/bzip2[${MULTILIB_USEDEP}] )
201 expat? ( dev-libs/expat[${MULTILIB_USEDEP}] )
202 @@ -24,7 +22,10 @@ RDEPEND="
203 iconv? ( virtual/libiconv[${MULTILIB_USEDEP}] )
204 kernel_linux? (
205 xattr? ( sys-apps/attr[${MULTILIB_USEDEP}] )
206 - )
207 + )
208 + !libressl? ( dev-libs/openssl:0=[${MULTILIB_USEDEP}] )
209 + libressl? ( dev-libs/libressl:0=[${MULTILIB_USEDEP}] )
210 + lz4? ( >=app-arch/lz4-0_p131:0=[${MULTILIB_USEDEP}] )
211 lzma? ( app-arch/xz-utils[${MULTILIB_USEDEP}] )
212 lzo? ( >=dev-libs/lzo-2[${MULTILIB_USEDEP}] )
213 nettle? ( dev-libs/nettle:0=[${MULTILIB_USEDEP}] )
214 @@ -33,38 +34,36 @@ DEPEND="${RDEPEND}
215 kernel_linux? (
216 virtual/os-headers
217 e2fsprogs? ( sys-fs/e2fsprogs )
218 - )"
219 + )"
220
221 -DOCS=( NEWS README )
222 -
223 -src_prepare() {
224 - default
225 - eautoreconf
226 -}
227 +PATCHES=( "${FILESDIR}/${P}-fix-tests-gnu99.patch" )
228
229 multilib_src_configure() {
230 export ac_cv_header_ext2fs_ext2_fs_h=$(usex e2fsprogs) #354923
231
232 local myconf=()
233 myconf=(
234 + $(use_enable acl)
235 $(use_enable static-libs static)
236 $(use_enable xattr)
237 - $(use_enable acl)
238 - $(use_with zlib)
239 $(use_with bzip2 bz2lib)
240 + $(use_with expat)
241 + $(use_with !expat xml2)
242 $(use_with iconv)
243 + $(use_with lz4)
244 $(use_with lzma)
245 $(use_with lzo lzo2)
246 $(use_with nettle)
247 - $(use_with !expat xml2)
248 - $(use_with expat)
249 + $(use_with zlib)
250 )
251 if multilib_is_native_abi ; then myconf+=(
252 - --enable-bsdtar=$(tc-is-static-only && echo static || echo shared)
253 + --enable-bsdcat=$(tc-is-static-only && echo static || echo shared)
254 --enable-bsdcpio=$(tc-is-static-only && echo static || echo shared)
255 + --enable-bsdtar=$(tc-is-static-only && echo static || echo shared)
256 ); else myconf+=(
257 - --disable-bsdtar
258 + --disable-bsdcat
259 --disable-bsdcpio
260 + --disable-bsdtar
261 ); fi
262
263 # We disable lzmadec because we support the newer liblzma from xz-utils
264 @@ -93,28 +92,26 @@ multilib_src_install() {
265 if multilib_is_native_abi ; then
266 emake DESTDIR="${D}" install
267
268 - # Libs.private: should be used from libarchive.pc instead
269 - prune_libtool_files
270 -
271 - # Create tar symlink for FreeBSD
272 + # Create symlinks for FreeBSD
273 if ! use prefix && [[ ${CHOST} == *-freebsd* ]]; then
274 - dosym bsdtar /usr/bin/tar
275 - echo '.so bsdtar.1' > "${T}"/tar.1
276 - doman "${T}"/tar.1
277 - # We may wish to switch to symlink bsdcpio to cpio too one day
278 + for bin in cat cpio tar; do
279 + dosym bsd${bin} /usr/bin/${bin}
280 + echo '.so bsd${bin}.1' > "${T}"/${bin}.1
281 + doman "${T}"/${bin}.1
282 + done
283 fi
284 else
285 emake DESTDIR="${D}" \
286 install-includeHEADERS \
287 install-libLTLIBRARIES \
288 install-pkgconfigDATA
289 -
290 - # Libs.private: should be used from libarchive.pc instead
291 - prune_libtool_files
292 fi
293 +
294 + # Libs.private: should be used from libarchive.pc instead
295 + prune_libtool_files
296 }
297
298 multilib_src_install_all() {
299 cd "${S}" || die
300 - dodoc "${DOCS[@]}"
301 + einstalldocs
302 }
303
304 diff --git a/app-arch/libarchive/metadata.xml b/app-arch/libarchive/metadata.xml
305 index 174e5be..4222988 100644
306 --- a/app-arch/libarchive/metadata.xml
307 +++ b/app-arch/libarchive/metadata.xml
308 @@ -14,24 +14,27 @@
309 It has a number of advantages over previous tar implementations.
310 </longdescription>
311 <use>
312 - <flag name="zlib">
313 - Allow accessing gzip-compressed archives through
314 - <pkg>sys-libs/zlib</pkg>. This only affects libarchive's native
315 - support: bsdtar will keep using gunzip as a filter if that's not
316 - built-in. It's also needed for supporting extraction of ZIP
317 - files.
318 - </flag>
319 <flag name="bzip2">
320 Allow accessing bzip2-compressed archives through libbz2 (which
321 comes with <pkg>app-arch/bzip2</pkg>). This only affects
322 libarchive's native support: bsdtar will keep using bunzip2 as a
323 filter if that's not built-in.
324 </flag>
325 + <flag name="e2fsprogs">
326 + Use file flags from <pkg>sys-fs/e2fsprogs</pkg> headers instead of <pkg>virtual/os-headers</pkg> headers
327 + </flag>
328 + <flag name="lz4">
329 + Enable support for LZ4 compression using <pkg>app-arch/lz4</pkg>
330 + </flag>
331 <flag name="nettle">
332 Use <pkg>dev-libs/nettle</pkg> as crypto backend
333 </flag>
334 - <flag name="e2fsprogs">
335 - Use file flags from <pkg>sys-fs/e2fsprogs</pkg> headers instead of <pkg>virtual/os-headers</pkg> headers
336 + <flag name="zlib">
337 + Allow accessing gzip-compressed archives through
338 + <pkg>sys-libs/zlib</pkg>. This only affects libarchive's native
339 + support: bsdtar will keep using gunzip as a filter if that's not
340 + built-in. It's also needed for supporting extraction of ZIP
341 + files.
342 </flag>
343 </use>
344 </pkgmetadata>