libarchive: fix autoconf lzma_stream_encoder_mt detection properly.

https://github.com/libarchive/libarchive/pull/700
This commit is contained in:
Juan RP 2016-05-05 08:01:48 +02:00
parent fedfb63ffe
commit ce54a58903
2 changed files with 34 additions and 10 deletions

View File

@ -0,0 +1,29 @@
From 9690ea4f3b79d07860f3ea55b6fab571721849b5 Mon Sep 17 00:00:00 2001
From: Juan RP <xtraeme@voidlinux.eu>
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.h>]],
[[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

View File

@ -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
# Package build options
build_options="acl expat lzo ssl"