Makefile revision 6345
363N/A#
363N/A# CDDL HEADER START
363N/A#
363N/A# The contents of this file are subject to the terms of the
363N/A# Common Development and Distribution License (the "License").
363N/A# You may not use this file except in compliance with the License.
363N/A#
363N/A# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
363N/A# or http://www.opensolaris.org/os/licensing.
363N/A# See the License for the specific language governing permissions
363N/A# and limitations under the License.
363N/A#
363N/A# When distributing Covered Code, include this CDDL HEADER in each
363N/A# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
363N/A# If applicable, add the following below this CDDL HEADER, with the
363N/A# fields enclosed by brackets "[]" replaced with your own identifying
363N/A# information: Portions Copyright [yyyy] [name of copyright owner]
363N/A#
363N/A# CDDL HEADER END
363N/A#
7161N/A
7161N/A#
7161N/A# Copyright (c) 2012, 2016, Oracle and/or its affiliates. All rights reserved.
363N/A#
363N/ABUILD_BITS= 64_and_32
363N/Ainclude ../../make-rules/shared-macros.mk
2369N/A
2369N/ACOMPONENT_NAME= libarchive
363N/ACOMPONENT_VERSION= 3.2.1
363N/ACOMPONENT_PROJECT_URL= http://www.libarchive.org/
364N/ACOMPONENT_ARCHIVE_HASH= \
363N/A sha256:72ee1a4e3fd534525f13a0ba1aa7b05b203d186e0c6072a8a4738649d0b3cfd2
363N/ACOMPONENT_ARCHIVE_URL= \
7161N/A $(COMPONENT_PROJECT_URL)downloads/$(COMPONENT_ARCHIVE)
2369N/ACOMPONENT_BUGDB= library/libarchive
363N/A
844N/ATPNO= 29683
7161N/A
363N/ATEST_TARGET= install $(TEST_32_and_64)
3182N/Ainclude $(WS_MAKE_RULES)/common.mk
363N/A
3996N/A# Userland default includes -mt which links with libthread which we don't need.
3996N/Astudio_MT =
363N/A
695N/ACONFIGURE_OPTIONS += --disable-static
365N/ACONFIGURE_OPTIONS += --enable-shared
363N/ACONFIGURE_OPTIONS += --enable-largefile
363N/A# We prefer openssl over nettle.
363N/ACONFIGURE_OPTIONS += --without-nettle
363N/ACONFIGURE_OPTIONS += --with-openssl
363N/ACONFIGURE_OPTIONS += --with-pic
2369N/ACONFIGURE_OPTIONS += --with-xml2
363N/ACONFIGURE_OPTIONS += --with-zlib
363N/A
363N/A# libarchive's Makefile hard-codes some gcc-only flags in COMMON_CFLAGS, then
695N/A# appends CFLAGS to that. Reset the former here so we can build with Studio.
363N/ACOMPONENT_BUILD_ARGS += COMMON_CFLAGS=''
363N/ACOMPONENT_BUILD_ARGS += CFLAGS="$(CFLAGS)"
363N/ACOMPONENT_TEST_ARGS += COMMON_CFLAGS=''
7161N/ACOMPONENT_TEST_ARGS += CFLAGS="$(CFLAGS)"
814N/ACOMPONENT_TEST_ENV += TMPDIR="$(COMPONENT_TEST_BUILD_DIR)"
363N/A
7161N/A# Get correct libarchive.so from the proto area.
791N/ATEST_LIBPATH.32 = $(PROTOUSRLIBDIR)
791N/ATEST_LIBPATH.64 = $(PROTOUSRLIBDIR64)
791N/ACOMPONENT_TEST_ENV += LD_LIBRARY_PATH=$(TEST_LIBPATH.$(BITS))
791N/A
363N/A# We need GNU awk for the following to work; hence the PATH tweak.
3091N/A# We then convert BSD-style section numbers in the libarchive man pages to
3091N/A# Solaris-style section numbers.
3091N/ACOMPONENT_PREP_ACTION = \
3091N/A cd $(@D)/doc/man ; rm *.[135] ; env PATH=$(GNUBIN):$$PATH gmake all ; \
363N/A cd $(@D)/libarchive ; \
7161N/A find . -name "*\.[35]" | xargs $(GSED) -i 's/\(Xr.*\|Dt.*\)3/\13ARCHIVE/' ; \
363N/A find . -name "*\.[35]" | xargs $(GSED) -i \
363N/A -e 's/Xr \(malloc\|getpwuid\|getgrgud\|strerror\|printf\|getpwnam\|getgrnam\) 3ARCHIVE/Xr \13C/' \
363N/A -e 's/\(Dt.*LIBARCHIVE.*\)3ARCHIVE/\13LIB/' \
363N/A -e 's/Xr \(libarchive\|archive\) 3ARCHIVE/Xr libarchive 3LIB/';
363N/A
363N/APKG_PROTO_DIRS += $(COMPONENT_SRC)/doc/man
363N/A
363N/A# Needed for "gmake test" to work successfully.
363N/A# If SHELLOPTS is exported (as it is by the userland makefiles),
363N/A# then all shell options get exported to child invocations of bash,
363N/A# which results in test failures due to nounset and xtrace being
2369N/A# set unexpectedly, and errors such as "$1: unbound variable" and
2369N/A# diffs failing due to script tracing in output files.
2369N/Aunexport SHELLOPTS
2369N/A
2369N/ACOMPONENT_TEST_MASTER = $(COMPONENT_TEST_RESULTS_DIR)/results-all.master
2369N/ACOMPONENT_TEST_TRANSFORMS += \
2369N/A '-n ' \
363N/A '-e "/ ok/p" ' \
2369N/A '-e "/ FAIL/p" ' \
2369N/A '-e "/Totals:/p" ' \
363N/A '-e "/Tests run:/p" ' \
2369N/A '-e "/Tests failed:/p" ' \
363N/A '-e "/Assertions failed:/p" ' \
363N/A '-e "/Skips reported:/p" ' \
363N/A '-e "/Failing tests:/p" ' \
363N/A '-e "/ failure/p" ' \
7161N/A '-e "/TOTAL/p" ' \
7161N/A '-e "/SKIP/p" ' \
7161N/A '-e "/PASS/p" ' \
7161N/A '-e "/FAIL/p" ' \
363N/A '-e "/ERROR/p" ' \
695N/A '-e "/=========/p" ' \
695N/A
363N/AREQUIRED_PACKAGES += compress/bzip2
363N/AREQUIRED_PACKAGES += compress/xz
363N/AREQUIRED_PACKAGES += library/libxml2
363N/AREQUIRED_PACKAGES += library/security/openssl
363N/AREQUIRED_PACKAGES += library/zlib
363N/A