From: | "Samuli Suominen (ssuominen)" <ssuominen@g.o> |
---|---|
To: | gentoo-commits@l.g.o |
Subject: | [gentoo-commits] gentoo-x86 commit in app-arch/libarchive/files: libarchive-3.0.3-nozlib.patch |
Date: | Mon, 05 Mar 2012 08:59:36 |
Message-Id: | 20120305085926.BA5FD2004B@flycatcher.gentoo.org |
1 | ssuominen 12/03/05 08:59:26 |
2 | |
3 | Added: libarchive-3.0.3-nozlib.patch |
4 | Log: |
5 | Fix building with USE="-zlib" wrt #403733 by Ben Kohler |
6 | |
7 | (Portage version: 2.2.0_alpha89/cvs/Linux x86_64) |
8 | |
9 | Revision Changes Path |
10 | 1.1 app-arch/libarchive/files/libarchive-3.0.3-nozlib.patch |
11 | |
12 | file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-arch/libarchive/files/libarchive-3.0.3-nozlib.patch?rev=1.1&view=markup |
13 | plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-arch/libarchive/files/libarchive-3.0.3-nozlib.patch?rev=1.1&content-type=text/plain |
14 | |
15 | Index: libarchive-3.0.3-nozlib.patch |
16 | =================================================================== |
17 | http://code.google.com/p/libarchive/issues/detail?id=242 |
18 | http://bugs.gentoo.org/403733 |
19 | |
20 | --- a/libarchive/archive_write_set_format_7zip.c |
21 | +++ b/libarchive/archive_write_set_format_7zip.c |
22 | @@ -1585,7 +1585,8 @@ file_init_register_empty(struct _7zip *zip) |
23 | zip->empty_list.last = &(zip->empty_list.first); |
24 | } |
25 | |
26 | -#if !defined(HAVE_BZLIB_H) || !defined(BZ_CONFIG_ERROR) || !defined(HAVE_LZMA_H) |
27 | +#if !defined(HAVE_ZLIB_H) || !defined(HAVE_BZLIB_H) ||\ |
28 | + !defined(BZ_CONFIG_ERROR) || !defined(HAVE_LZMA_H) |
29 | static int |
30 | compression_unsupported_encoder(struct archive *a, |
31 | struct la_zstream *lastrm, const char *name) |
32 | |
33 | --- a/libarchive/test/test_write_compress_program.c |
34 | +++ b/libarchive/test/test_write_compress_program.c |
35 | @@ -40,6 +40,15 @@ DEFINE_TEST(test_write_compress_program) |
36 | skipping("Cannot run 'gzip'"); |
37 | return; |
38 | } |
39 | + /* NOTE: Setting blocksize=1024 will cause gunzip failure because |
40 | + * it add extra bytes that gunzip ignores with its warning and |
41 | + * exit code 1. So we should set blocksize=1 in order not to |
42 | + * yield the extra bytes when using gunzip. */ |
43 | + assert((a = archive_read_new()) != NULL); |
44 | + r = archive_read_support_filter_gzip(a); |
45 | + if (r != ARCHIVE_OK && canGunzip()) |
46 | + blocksize = 1; |
47 | + assertEqualInt(ARCHIVE_OK, archive_read_free(a)); |
48 | |
49 | /* Create a new archive in memory. */ |
50 | /* Write it through an external "gzip" program. */ |