summaryrefslogtreecommitdiff
path: root/pkgtools
diff options
context:
space:
mode:
authorjoerg <joerg>2016-01-21 18:11:31 +0000
committerjoerg <joerg>2016-01-21 18:11:31 +0000
commita87f48295b7921fef264272f233943be72223527 (patch)
tree0dd147a6d1e3403d302b66d832c6c2c3a7acd573 /pkgtools
parente48ca496b7d04333eddaa8e81709ebfc75bf847e (diff)
downloadpkgsrc-a87f48295b7921fef264272f233943be72223527.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.
Diffstat (limited to 'pkgtools')
-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}