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