summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjoerg <joerg@pkgsrc.org>2016-01-21 18:11:31 +0000
committerjoerg <joerg@pkgsrc.org>2016-01-21 18:11:31 +0000
commitf92bcf307703143c51fd70621d91d428d71293a8 (patch)
tree0dd147a6d1e3403d302b66d832c6c2c3a7acd573
parent19cfe5c217b28b2506e583ba8449a8bcb88a1b86 (diff)
downloadpkgsrc-f92bcf307703143c51fd70621d91d428d71293a8.tar.gz
Explicitly disable libarchive's LZMA support if no builtin XZ was found
or if the user requested it to be disabled. Helps on systems with lzma.h and no usable library.
-rw-r--r--pkgtools/pkg_install/Makefile10
1 files changed, 9 insertions, 1 deletions
diff --git a/pkgtools/pkg_install/Makefile b/pkgtools/pkg_install/Makefile
index 91f4bb5eeaa..ea57f6b42d8 100644
--- a/pkgtools/pkg_install/Makefile
+++ b/pkgtools/pkg_install/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.213 2016/01/21 18:10:19 joerg Exp $
+# $NetBSD: Makefile,v 1.214 2016/01/21 18:11:31 joerg Exp $
# Notes to package maintainers:
#
@@ -107,6 +107,7 @@ VERSION!= ${AWK} '/PKGTOOLS_VERSION/ {print $$3}' \
BUILDLINK_API_DEPENDS.libarchive+= libarchive>=2.8.0
.include "../../archivers/bzip2/builtin.mk"
+.include "../../archivers/xz/builtin.mk"
.include "../../archivers/libarchive/builtin.mk"
.include "../../devel/zlib/builtin.mk"
.include "../../security/openssl/builtin.mk"
@@ -148,6 +149,13 @@ LDFLAGS+= -L${WRKDIR}/libarchive/.libs
LIBARCHIVE_CONFIGURE_ARGS+= --without-openssl
. endif
+# Only use XZ if we actually have builtin support for it. Some systems
+# install the header, but without usable library or prefer to not use
+# the system version, so give them some control.
+. if empty(USE_BUILTIN.xz:M[Yy][Ee][Ss])
+LIBARCHIVE_CONFIGURE_ARGS+= --without-lzma
+ . endif
+
LIBARCHIVE_LIBS= ${SED} -n -e 's/^Libs.private://p' \
${WRKDIR}/libarchive/build/pkgconfig/libarchive.pc 2>/dev/null || echo
LIBS+= ${LIBARCHIVE_LIBS:sh}