* [gentoo-commits] gentoo-x86 commit in app-arch/libarchive/files: libarchive-2.6.0-nolibs.patch
@ 2009-01-02 21:45 Diego Petteno (flameeyes)
0 siblings, 0 replies; only message in thread
From: Diego Petteno (flameeyes) @ 2009-01-02 21:45 UTC (permalink / raw
To: gentoo-commits
flameeyes 09/01/02 21:45:19
Added: libarchive-2.6.0-nolibs.patch
Log:
Fix building with bzip2 and zlib disabled, closes bug #253284. Thanks to Lifong Sun for the patch.
(Portage version: 2.2_rc20/cvs/Linux 2.6.28-gentoo x86_64)
Revision Changes Path
1.1 app-arch/libarchive/files/libarchive-2.6.0-nolibs.patch
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-arch/libarchive/files/libarchive-2.6.0-nolibs.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-arch/libarchive/files/libarchive-2.6.0-nolibs.patch?rev=1.1&content-type=text/plain
Index: libarchive-2.6.0-nolibs.patch
===================================================================
Patch from bug #253284 thanks to Lifong Sun
diff -urN a/cpio/cpio.c b/cpio/cpio.c
--- a/cpio/cpio.c 2008-12-29 04:08:16.000000000 +0800
+++ b/cpio/cpio.c 2009-01-01 22:23:06.000000000 +0800
@@ -321,7 +321,15 @@
"Common Options:\n"
" -v Verbose\n"
"Create: %p -o [options] < [list of files] > [archive]\n"
+#ifdef HAVE_BZLIB_H
+#ifdef HAVE_ZLIB_H
" -z, -y Compress archive with gzip/bzip2\n"
+#else
+ " -y Compress archive with bzip2\n"
+#endif
+#elif defined HAVE_ZLIB_H
+ " -z Compress archive with gzip\n"
+#endif
" --format {odc|newc|ustar} Select archive format\n"
"List: %p -it < [archive]\n"
"Extract: %p -i [options] < [archive]\n";
@@ -387,12 +395,16 @@
if (cpio->archive == NULL)
cpio_errc(1, 0, "Failed to allocate archive object");
switch (cpio->compress) {
+#ifdef HAVE_BZLIB_H
case 'j': case 'y':
archive_write_set_compression_bzip2(cpio->archive);
break;
+#endif
+#ifdef HAVE_ZLIB_H
case 'z':
archive_write_set_compression_gzip(cpio->archive);
break;
+#endif
case 'Z':
archive_write_set_compression_compress(cpio->archive);
break;
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2009-01-02 21:45 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-02 21:45 [gentoo-commits] gentoo-x86 commit in app-arch/libarchive/files: libarchive-2.6.0-nolibs.patch Diego Petteno (flameeyes)
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox