From ce54a58903c066ec0b732f778119683a23943b0f Mon Sep 17 00:00:00 2001 From: Juan RP Date: Thu, 5 May 2016 08:01:48 +0200 Subject: [PATCH] libarchive: fix autoconf lzma_stream_encoder_mt detection properly. https://github.com/libarchive/libarchive/pull/700 --- ...ine-HAVE_LZMA_STREAM_ENCODER_MT-if-i.patch | 29 +++++++++++++++++++ srcpkgs/libarchive/template | 15 ++++------ 2 files changed, 34 insertions(+), 10 deletions(-) create mode 100644 srcpkgs/libarchive/patches/0001-configure.ac-define-HAVE_LZMA_STREAM_ENCODER_MT-if-i.patch diff --git a/srcpkgs/libarchive/patches/0001-configure.ac-define-HAVE_LZMA_STREAM_ENCODER_MT-if-i.patch b/srcpkgs/libarchive/patches/0001-configure.ac-define-HAVE_LZMA_STREAM_ENCODER_MT-if-i.patch new file mode 100644 index 00000000000..6e721eb73e9 --- /dev/null +++ b/srcpkgs/libarchive/patches/0001-configure.ac-define-HAVE_LZMA_STREAM_ENCODER_MT-if-i.patch @@ -0,0 +1,29 @@ +From 9690ea4f3b79d07860f3ea55b6fab571721849b5 Mon Sep 17 00:00:00 2001 +From: Juan RP +Date: Thu, 5 May 2016 07:55:57 +0200 +Subject: [PATCH] configure.ac: define HAVE_LZMA_STREAM_ENCODER_MT if it is + detected properly. + +... otherwise HAVE_LZMA_STREAM_ENCODER_MT is undefined and the code +for multithreaded xz compression is skipped completely. +--- + configure.ac | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/configure.ac b/configure.ac +index 1ab54cb..cb6943f 100644 +--- configure.ac ++++ configure.ac +@@ -377,6 +377,9 @@ if test "x$with_lzma" != "xno"; then + AC_LANG_PROGRAM([[#include ]], + [[lzma_stream_encoder_mt(0, 0);]])], + [ac_cv_lzma_has_mt=yes], [ac_cv_lzma_has_mt=no])]) ++ if test "x$ac_cv_lzma_has_mt" != xno; then ++ AC_DEFINE([HAVE_LZMA_STREAM_ENCODER_MT], [1], [Define to 1 if you have the `lzma_stream_encoder_mt' function.]) ++ fi + fi + + AC_ARG_WITH([lzo2], +-- +2.8.2 + diff --git a/srcpkgs/libarchive/template b/srcpkgs/libarchive/template index f8322847eb5..20beccfae00 100644 --- a/srcpkgs/libarchive/template +++ b/srcpkgs/libarchive/template @@ -1,12 +1,13 @@ # Template file for 'libarchive' pkgname=libarchive version=3.2.0 -revision=4 +revision=5 bootstrap=yes build_style=gnu-configure configure_args="$(vopt_enable acl) $(vopt_enable acl xattr) $(vopt_with expat) $(vopt_with lzo lzo2) $(vopt_with ssl openssl) --without-xml2 --without-nettle --disable-rpath ac_cv_func_lchmod=no" +hostmakedepends="automake libtool pkg-config" makedepends="zlib-devel bzip2-devel liblzma-devel $(vopt_if acl acl-devel) $(vopt_if expat expat-devel) $(vopt_if lzo lzo-devel) $(vopt_if ssl libressl-devel)" @@ -17,15 +18,9 @@ license="BSD" distfiles="http://www.libarchive.org/downloads/libarchive-${version}.tar.gz" checksum=7bce45fd71ff01dc20d19edd78322d4965583d81b8bed8e26cacb65d6f5baa87 -# XXX wtf, configure.ac does not set this! -CFLAGS="-DHAVE_LZMA_STREAM_ENCODER_MT" - -if [ "$CROSS_BUILD" ]; then - hostmakedepends="automake libtool pkg-config" - pre_configure() { - autoreconf -if - } -fi +pre_configure() { + autoreconf -if +} # Package build options build_options="acl expat lzo ssl"