diff options
author | Diego Elio Pettenò <flameeyes@gentoo.org> | 2008-11-13 01:38:49 +0000 |
---|---|---|
committer | Diego Elio Pettenò <flameeyes@gentoo.org> | 2008-11-13 01:38:49 +0000 |
commit | 9842dbe564d363e599699e9c10f3f8cad84966d5 (patch) | |
tree | 28bdf846495d4c73e1d35cb824ccac9ffdb9db0a /app-arch/libarchive | |
parent | Add patch to fix building with --as-needed (bug #238262). (diff) | |
download | gentoo-2-9842dbe564d363e599699e9c10f3f8cad84966d5.tar.gz gentoo-2-9842dbe564d363e599699e9c10f3f8cad84966d5.tar.bz2 gentoo-2-9842dbe564d363e599699e9c10f3f8cad84966d5.zip |
Add the newest pre-release for libarchive, now supporting lzma. It comes with a patch that allows to disable lzma and bz2 libraries.
(Portage version: 2.2_rc14/cvs/Linux 2.6.27-gentoo-r2 x86_64)
Diffstat (limited to 'app-arch/libarchive')
-rw-r--r-- | app-arch/libarchive/ChangeLog | 10 | ||||
-rw-r--r-- | app-arch/libarchive/files/libarchive-2.5.902a-automagic.patch | 98 | ||||
-rw-r--r-- | app-arch/libarchive/libarchive-2.5.902a.ebuild | 83 | ||||
-rw-r--r-- | app-arch/libarchive/metadata.xml | 29 |
4 files changed, 213 insertions, 7 deletions
diff --git a/app-arch/libarchive/ChangeLog b/app-arch/libarchive/ChangeLog index 881abf42d0cc..b0e371008cc7 100644 --- a/app-arch/libarchive/ChangeLog +++ b/app-arch/libarchive/ChangeLog @@ -1,6 +1,14 @@ # ChangeLog for app-arch/libarchive # Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/app-arch/libarchive/ChangeLog,v 1.32 2008/10/28 20:22:49 ranger Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-arch/libarchive/ChangeLog,v 1.33 2008/11/13 01:38:48 flameeyes Exp $ + +*libarchive-2.5.902a (13 Nov 2008) + + 13 Nov 2008; Diego Pettenò <flameeyes@gentoo.org> + +files/libarchive-2.5.902a-automagic.patch, metadata.xml, + +libarchive-2.5.902a.ebuild: + Add the newest pre-release for libarchive, now supporting lzma. It comes + with a patch that allows to disable lzma and bz2 libraries. 28 Oct 2008; Brent Baude <ranger@gentoo.org> libarchive-2.5.5.ebuild: Marking libarchive-2.5.5.ebuild ~ppc64 to support gnome stablizations diff --git a/app-arch/libarchive/files/libarchive-2.5.902a-automagic.patch b/app-arch/libarchive/files/libarchive-2.5.902a-automagic.patch new file mode 100644 index 000000000000..8c802f3769cb --- /dev/null +++ b/app-arch/libarchive/files/libarchive-2.5.902a-automagic.patch @@ -0,0 +1,98 @@ +Index: libarchive-2.5.902a/configure.ac +=================================================================== +--- libarchive-2.5.902a.orig/configure.ac ++++ libarchive-2.5.902a/configure.ac +@@ -162,17 +162,37 @@ AM_CONDITIONAL([STATIC_BSDCPIO], [ test + AC_HEADER_STDC + AC_HEADER_DIRENT + AC_HEADER_SYS_WAIT +-AC_CHECK_HEADERS([bzlib.h errno.h ext2fs/ext2_fs.h fcntl.h grp.h]) ++AC_CHECK_HEADERS([errno.h ext2fs/ext2_fs.h fcntl.h grp.h]) + AC_CHECK_HEADERS([inttypes.h langinfo.h limits.h linux/fs.h]) +-AC_CHECK_HEADERS([locale.h lzmadec.h paths.h poll.h pwd.h regex.h stdarg.h]) ++AC_CHECK_HEADERS([locale.h paths.h poll.h pwd.h regex.h stdarg.h]) + AC_CHECK_HEADERS([stdint.h stdlib.h string.h sys/acl.h sys/ioctl.h]) + AC_CHECK_HEADERS([sys/param.h sys/poll.h sys/select.h sys/time.h sys/utime.h]) +-AC_CHECK_HEADERS([time.h unistd.h utime.h wchar.h zlib.h]) ++AC_CHECK_HEADERS([time.h unistd.h utime.h wchar.h]) + + # Checks for libraries. +-AC_CHECK_LIB(bz2,BZ2_bzDecompressInit) +-AC_CHECK_LIB(z,inflate) +-AC_CHECK_LIB(lzmadec,lzmadec_decode) ++AC_ARG_WITH([zlib], ++ AS_HELP_STRING([--without-zlib], [Don't build support for gzip through zlib])) ++ ++if test "x$with_zlib" != "xno"; then ++ AC_CHECK_HEADERS([zlib.h]) ++ AC_CHECK_LIB(z,inflate) ++fi ++ ++AC_ARG_WITH([bz2lib], ++ AS_HELP_STRING([--without-bz2lib], [Don't build support for bzip2 through bz2lib])) ++ ++if test "x$with_bz2lib" != "xno"; then ++ AC_CHECK_HEADERS([bzlib.h]) ++ AC_CHECK_LIB(bz2,BZ2_bzDecompressInit) ++fi ++ ++AC_ARG_WITH([lzmadec], ++ AS_HELP_STRING([--without-lzmadec], [Don't build support for lzma through lzmadec])) ++ ++if test "x$with_lzmadec" != "xno"; then ++ AC_CHECK_HEADERS([lzmadec.h]) ++ AC_CHECK_LIB(lzmadec,lzmadec_decode) ++fi + + # TODO: Give the user the option of using a pre-existing system + # libarchive. This will define HAVE_LIBARCHIVE which will cause +Index: libarchive-2.5.902a/libarchive/archive_read_support_compression_bzip2.c +=================================================================== +--- libarchive-2.5.902a.orig/libarchive/archive_read_support_compression_bzip2.c ++++ libarchive-2.5.902a/libarchive/archive_read_support_compression_bzip2.c +@@ -171,7 +171,7 @@ bzip2_reader_bid(struct archive_reader * + * decompression. We can, however, still detect compressed archives + * and emit a useful message. + */ +-static int ++static struct archive_read_source * + bzip2_reader_init(struct archive_read *a, struct archive_reader *reader, + struct archive_read_source *upstream, const void *buff, size_t n) + { +@@ -183,7 +183,7 @@ bzip2_reader_init(struct archive_read *a + + archive_set_error(&a->archive, -1, + "This version of libarchive was compiled without bzip2 support"); +- return (ARCHIVE_FATAL); ++ return (NULL); + } + + +Index: libarchive-2.5.902a/libarchive/archive_read_support_compression_gzip.c +=================================================================== +--- libarchive-2.5.902a.orig/libarchive/archive_read_support_compression_gzip.c ++++ libarchive-2.5.902a/libarchive/archive_read_support_compression_gzip.c +@@ -163,17 +163,19 @@ gzip_reader_bid(struct archive_reader *s + * decompression. We can, however, still detect compressed archives + * and emit a useful message. + */ +-static int +-gzip_reader_init(struct archive_read *a, struct archive_read_source *upstream, +- const void *buff, size_t n) ++static struct archive_read_source * ++gzip_reader_init(struct archive_read *a, struct archive_reader *reader, ++ struct archive_read_source *upstream, const void *buff, size_t n) + { + (void)a; /* UNUSED */ ++ (void)reader; /* UNUSED */ ++ (void)upstream; /* UNUSED */ + (void)buff; /* UNUSED */ + (void)n; /* UNUSED */ + + archive_set_error(&a->archive, -1, + "This version of libarchive was compiled without gzip support"); +- return (ARCHIVE_FATAL); ++ return NULL; + } + + #else diff --git a/app-arch/libarchive/libarchive-2.5.902a.ebuild b/app-arch/libarchive/libarchive-2.5.902a.ebuild new file mode 100644 index 000000000000..223e9737cb4d --- /dev/null +++ b/app-arch/libarchive/libarchive-2.5.902a.ebuild @@ -0,0 +1,83 @@ +# Copyright 1999-2008 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/app-arch/libarchive/libarchive-2.5.902a.ebuild,v 1.1 2008/11/13 01:38:48 flameeyes Exp $ + +EAPI=1 + +inherit eutils libtool toolchain-funcs autotools + +DESCRIPTION="BSD tar command" +HOMEPAGE="http://people.freebsd.org/~kientzle/libarchive" +SRC_URI="http://people.freebsd.org/~kientzle/libarchive/src/${P}.tar.gz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~sparc-fbsd ~x86 ~x86-fbsd" +IUSE="static acl xattr kernel_linux +bzip2 +lzma" + +COMPRESS_LIBS_DEPEND="lzma? ( app-arch/lzma-utils ) + bzip2? ( app-arch/bzip2 ) + sys-libs/zlib" + +RDEPEND="!dev-libs/libarchive + kernel_linux? ( + acl? ( sys-apps/acl ) + xattr? ( sys-apps/attr ) + ) + !static? ( ${COMPRESS_LIBS_DEPEND} )" +DEPEND="${RDEPEND} + ${COMPRESS_LIBS_DEPEND} + kernel_linux? ( sys-fs/e2fsprogs + virtual/os-headers )" + +src_unpack() { + unpack ${A} + cd "${S}" + + epatch "${FILESDIR}"/${P}-automagic.patch + + eautoreconf + + elibtoolize + epunt_cxx +} + +src_compile() { + local myconf + + if ! use static ; then + myconf="--enable-bsdtar=shared --enable-bsdcpio=shared" + fi + + econf --bindir=/bin \ + --enable-bsdtar --enable-bsdcpio \ + $(use_enable acl) $(use_enable xattr) \ + $(use_with bzip2 bz2lib) $(use_with lzma lzmadec) \ + ${myconf} \ + --disable-dependency-tracking || die "econf failed." + + emake || die "emake failed." +} + +src_install() { + emake DESTDIR="${D}" install || die "emake install failed." + + # Create tar symlink for FreeBSD + if [[ ${CHOST} == *-freebsd* ]]; then + dosym bsdtar /bin/tar + dosym bsdtar.1 /usr/share/man/man1/tar.1 + # We may wish to switch to symlink bsdcpio to cpio too one day + fi + + dodoc NEWS README + + if use build; then + rm -rf "${D}"/usr + rm -rf "${D}"/lib/*.so* + return 0 + fi + + dodir /$(get_libdir) + mv "${D}"/usr/$(get_libdir)/*.so* "${D}"/$(get_libdir) + gen_usr_ldscript libarchive.so +} diff --git a/app-arch/libarchive/metadata.xml b/app-arch/libarchive/metadata.xml index 19248baa1230..1f7460becace 100644 --- a/app-arch/libarchive/metadata.xml +++ b/app-arch/libarchive/metadata.xml @@ -1,10 +1,27 @@ <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> <pkgmetadata> -<herd>bsd</herd> -<longdescription lang="en"> -The bsdtar program creates and manipulates streaming archive files. -It has a number of advantages over previous tar implementations. -</longdescription> + <herd>bsd</herd> + <maintainer> + <email>flameeyes@gentoo.org</email> + </maintainer> + <longdescription lang="en"> + The bsdtar program creates and manipulates streaming archive files. + It has a number of advantages over previous tar implementations. + </longdescription> + <use> + <flag name="static"> + Build bsdtar and bsdcpio as static archives, removing + dependencies over the enabled compression libraries (lzmadec, + libbz2, zlib). + </flag> + <flag name="bzip2"> + Allow accessing bzip2-compressed archives through libbz2 (which + comes with bzip2). + </flag> + <flag name="lzma"> + Allow accessing lzma-compressed archives through the lzmadec + library. + </flag> + </use> </pkgmetadata> - |