--- a/components/libarchive/Makefile Wed Jul 06 07:39:23 2016 -0700
+++ b/components/libarchive/Makefile Wed Jul 06 16:43:24 2016 -0700
@@ -23,17 +23,17 @@
include ../../make-rules/shared-macros.mk
COMPONENT_NAME= libarchive
-COMPONENT_VERSION= 3.1.2
+COMPONENT_VERSION= 3.2.1
COMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION)
COMPONENT_PROJECT_URL= http://www.libarchive.org/
COMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.gz
COMPONENT_ARCHIVE_HASH= \
- sha256:eb87eacd8fe49e8d90c8fdc189813023ccc319c5e752b01fb6ad0cc7b2c53d5e
+ sha256:72ee1a4e3fd534525f13a0ba1aa7b05b203d186e0c6072a8a4738649d0b3cfd2
COMPONENT_ARCHIVE_URL= \
$(COMPONENT_PROJECT_URL)downloads/$(COMPONENT_ARCHIVE)
COMPONENT_BUGDB= library/libarchive
-TPNO= 24584
+TPNO= 29683
include $(WS_MAKE_RULES)/prep.mk
include $(WS_MAKE_RULES)/configure.mk
@@ -52,6 +52,9 @@
CONFIGURE_OPTIONS += --with-xml2
CONFIGURE_OPTIONS += --with-zlib
+# We still have an older version of xz that doesn't support this.
+CONFIGURE_OPTIONS += "ac_cv_lzma_has_mt=no"
+
# libarchive's Makefile hard-codes some gcc-only flags in COMMON_CFLAGS, then
# appends CFLAGS to that. Reset the former here so we can build with Studio.
COMPONENT_BUILD_ARGS += COMMON_CFLAGS=''
@@ -59,6 +62,11 @@
COMPONENT_TEST_ARGS += COMMON_CFLAGS=''
COMPONENT_TEST_ARGS += CFLAGS="$(CFLAGS)"
+# Get correct libarchive.so from the proto area.
+TEST_LIBPATH.32 = $(PROTOUSRLIBDIR)
+TEST_LIBPATH.64 = $(PROTOUSRLIBDIR64)
+COMPONENT_TEST_ENV += LD_LIBRARY_PATH=$(TEST_LIBPATH.$(BITS))
+
# We need GNU awk for the following to work; hence the PATH tweak.
# We then convert BSD-style section numbers in the libarchive man pages to
# Solaris-style section numbers.
@@ -73,12 +81,19 @@
PKG_PROTO_DIRS += $(COMPONENT_SRC)/doc/man
+# Needed for "gmake test" to work successfully.
+# If SHELLOPTS is exported (as it is by the userland makefiles),
+# then all shell options get exported to child invocations of bash,
+# which results in test failures due to nounset and xtrace being
+# set unexpectedly, and errors such as "$1: unbound variable" and
+# diffs failing due to script tracing in output files.
+unexport SHELLOPTS
+
build: $(BUILD_32_and_64)
install: $(INSTALL_32_and_64)
-test: $(TEST_32_and_64)
-
+test: install $(TEST_32_and_64)
REQUIRED_PACKAGES += compress/bzip2
REQUIRED_PACKAGES += compress/xz