libarchive: update to 3.2.0; merged bsdcpio into bsdtar.

This commit is contained in:
Juan RP 2016-05-03 07:14:12 +02:00
parent f6f42a39b9
commit 3dc00e7313
3 changed files with 19 additions and 66 deletions

View file

@ -1 +0,0 @@
libarchive

View file

@ -1,39 +0,0 @@
Use lzma_stream_encoder_mt() to enable xz parallel compression in the
xz write filter.
--xtraeme
--- libarchive/archive_write_add_filter_xz.c.orig 2015-01-07 13:19:20.106417631 +0100
+++ libarchive/archive_write_add_filter_xz.c 2015-01-07 13:24:20.097461789 +0100
@@ -103,6 +103,7 @@ struct private_data {
lzma_stream stream;
lzma_filter lzmafilters[2];
lzma_options_lzma lzma_opt;
+ lzma_mt lzma_mt;
int64_t total_in;
unsigned char *compressed;
size_t compressed_buffer_size;
@@ -151,6 +152,13 @@ common_setup(struct archive_write_filter
}
f->data = data;
data->compression_level = LZMA_PRESET_DEFAULT;
+ data->lzma_mt.check = LZMA_CHECK_CRC64;
+ data->lzma_mt.filters = data->lzmafilters;
+ data->lzma_mt.preset = data->compression_level;
+ data->lzma_mt.threads = lzma_cputhreads();
+ if (data->lzma_mt.threads == 0)
+ data->lzma_mt.threads = 1;
+
f->open = &archive_compressor_xz_open;
f->close = archive_compressor_xz_close;
f->free = archive_compressor_xz_free;
@@ -226,8 +234,7 @@ archive_compressor_xz_init_stream(struct
data->stream.next_out = data->compressed;
data->stream.avail_out = data->compressed_buffer_size;
if (f->code == ARCHIVE_FILTER_XZ)
- ret = lzma_stream_encoder(&(data->stream),
- data->lzmafilters, LZMA_CHECK_CRC64);
+ ret = lzma_stream_encoder_mt(&(data->stream), &data->lzma_mt);
else if (f->code == ARCHIVE_FILTER_LZMA)
ret = lzma_alone_encoder(&(data->stream), &data->lzma_opt);
else { /* ARCHIVE_FILTER_LZIP */

View file

@ -1,7 +1,7 @@
# Template file for 'libarchive' # Template file for 'libarchive'
pkgname=libarchive pkgname=libarchive
version=3.1.2 version=3.2.0
revision=20 revision=1
bootstrap=yes bootstrap=yes
build_style=gnu-configure build_style=gnu-configure
configure_args="$(vopt_enable acl) $(vopt_enable acl xattr) configure_args="$(vopt_enable acl) $(vopt_enable acl xattr)
@ -15,7 +15,7 @@ maintainer="Juan RP <xtraeme@voidlinux.eu>"
homepage="http://www.libarchive.org/" homepage="http://www.libarchive.org/"
license="BSD" license="BSD"
distfiles="http://www.libarchive.org/downloads/libarchive-${version}.tar.gz" distfiles="http://www.libarchive.org/downloads/libarchive-${version}.tar.gz"
checksum=eb87eacd8fe49e8d90c8fdc189813023ccc319c5e752b01fb6ad0cc7b2c53d5e checksum=7bce45fd71ff01dc20d19edd78322d4965583d81b8bed8e26cacb65d6f5baa87
if [ "$CROSS_BUILD" ]; then if [ "$CROSS_BUILD" ]; then
hostmakedepends="automake libtool" hostmakedepends="automake libtool"
@ -30,31 +30,24 @@ build_options="acl expat lzo ssl"
build_options_default="acl ssl" build_options_default="acl ssl"
bsdtar_package() { bsdtar_package() {
short_desc="BSD tar(1) using libarchive" replaces="bsdcpio>=0"
short_desc="BSD utilities using libarchive"
pkg_install() { pkg_install() {
vmove usr/bin/bsdtar vmove usr/bin
vmove usr/share/man/man1/bsdtar.1 vmove usr/share/man/man1
vmove usr/share/man/man5/tar.5 vmove usr/share/man/man5
}
}
bsdcpio_package() {
short_desc="BSD cpio(1) using libarchive"
pkg_install() {
vmove usr/bin/bsdcpio
vmove usr/share/man/man1/bsdcpio.1
vmove usr/share/man/man5/cpio.5
}
}
libarchive-devel_package() {
depends="${makedepends} libarchive>=${version}_${revision}"
short_desc+=" - development files"
pkg_install() {
vmove usr/include
vmove "usr/lib/*.a"
vmove "usr/lib/*.so"
vmove usr/lib/pkgconfig
vmove usr/share
# Conflicts with mtree. # Conflicts with mtree.
mv ${PKGDESTDIR}/usr/share/man/man5/{mtree.5,libarchive-mtree.5} mv ${PKGDESTDIR}/usr/share/man/man5/{mtree.5,libarchive-mtree.5}
} }
} }
libarchive-devel_package() {
depends="${makedepends} ${sourcepkg}>=${version}_${revision}"
short_desc+=" - development files"
pkg_install() {
vmove usr/include
vmove usr/lib/*.a
vmove usr/lib/*.so
vmove usr/lib/pkgconfig
vmove usr/share
}
}