Makefile revision 6162
1773N/A#
1773N/A# CDDL HEADER START
1773N/A#
1773N/A# The contents of this file are subject to the terms of the
1773N/A# Common Development and Distribution License (the "License").
1773N/A# You may not use this file except in compliance with the License.
1773N/A#
1773N/A# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
1773N/A# or http://www.opensolaris.org/os/licensing.
1773N/A# See the License for the specific language governing permissions
1773N/A# and limitations under the License.
1773N/A#
1773N/A# When distributing Covered Code, include this CDDL HEADER in each
1773N/A# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
1773N/A# If applicable, add the following below this CDDL HEADER, with the
1773N/A# fields enclosed by brackets "[]" replaced with your own identifying
1773N/A# information: Portions Copyright [yyyy] [name of copyright owner]
1773N/A#
1773N/A# CDDL HEADER END
1773N/A#
6162N/A# Copyright (c) 2012, 2016, Oracle and/or its affiliates. All rights reserved.
1773N/A#
1773N/Ainclude ../../make-rules/shared-macros.mk
1773N/A
1773N/ACOMPONENT_NAME= libarchive
6162N/ACOMPONENT_VERSION= 3.1.2
1773N/ACOMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION)
6162N/ACOMPONENT_PROJECT_URL= http://www.libarchive.org/
1773N/ACOMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.gz
1773N/ACOMPONENT_ARCHIVE_HASH= \
6162N/A sha256:eb87eacd8fe49e8d90c8fdc189813023ccc319c5e752b01fb6ad0cc7b2c53d5e
1773N/ACOMPONENT_ARCHIVE_URL= \
6162N/A $(COMPONENT_PROJECT_URL)downloads/$(COMPONENT_ARCHIVE)
1773N/ACOMPONENT_BUGDB= library/libarchive
1773N/A
6162N/ATPNO= 24584
3661N/A
3996N/Ainclude $(WS_MAKE_RULES)/prep.mk
3996N/Ainclude $(WS_MAKE_RULES)/configure.mk
3996N/Ainclude $(WS_MAKE_RULES)/ips.mk
1773N/A
1773N/A# Userland default includes -mt which links with libthread which we don't need.
1773N/Astudio_MT =
1773N/A
6162N/ACONFIGURE_OPTIONS += --disable-static
6162N/ACONFIGURE_OPTIONS += --enable-shared
6162N/ACONFIGURE_OPTIONS += --enable-largefile
6162N/A# We prefer openssl over nettle.
6162N/ACONFIGURE_OPTIONS += --without-nettle
6162N/ACONFIGURE_OPTIONS += --with-openssl
6162N/ACONFIGURE_OPTIONS += --with-pic
6162N/ACONFIGURE_OPTIONS += --with-xml2
6162N/ACONFIGURE_OPTIONS += --with-zlib
4991N/A
1773N/A# libarchive's Makefile hard-codes some gcc-only flags in COMMON_CFLAGS, then
1773N/A# appends CFLAGS to that. Reset the former here so we can build with Studio.
1773N/ACOMPONENT_BUILD_ARGS += COMMON_CFLAGS=''
1773N/ACOMPONENT_BUILD_ARGS += CFLAGS="$(CFLAGS)"
1773N/ACOMPONENT_TEST_ARGS += COMMON_CFLAGS=''
1773N/ACOMPONENT_TEST_ARGS += CFLAGS="$(CFLAGS)"
1773N/A
1773N/A# We need GNU awk for the following to work; hence the PATH tweak.
6162N/A# We then convert BSD-style section numbers in the libarchive man pages to
6162N/A# Solaris-style section numbers.
1773N/ACOMPONENT_PREP_ACTION = \
6162N/A cd $(@D)/doc/man ; rm *.[135] ; env PATH=$(GNUBIN):$$PATH gmake all ; \
6162N/A cd $(@D)/libarchive ; \
6162N/A find . -name "*\.[35]" | xargs $(GSED) -i 's/\(Xr.*\|Dt.*\)3/\13ARCHIVE/' ; \
6162N/A find . -name "*\.[35]" | xargs $(GSED) -i \
6162N/A -e 's/Xr \(malloc\|getpwuid\|getgrgud\|strerror\|printf\|getpwnam\|getgrnam\) 3ARCHIVE/Xr \13C/' \
6162N/A -e 's/\(Dt.*LIBARCHIVE.*\)3ARCHIVE/\13LIB/' \
6162N/A -e 's/Xr \(libarchive\|archive\) 3ARCHIVE/Xr libarchive 3LIB/';
6162N/A
1773N/APKG_PROTO_DIRS += $(COMPONENT_SRC)/doc/man
1773N/A
1773N/Abuild: $(BUILD_32_and_64)
1773N/A
1773N/Ainstall: $(INSTALL_32_and_64)
1773N/A
1773N/Atest: $(TEST_32_and_64)
1773N/A
1773N/A
3996N/AREQUIRED_PACKAGES += compress/bzip2
3996N/AREQUIRED_PACKAGES += compress/xz
3996N/AREQUIRED_PACKAGES += library/libxml2
3996N/AREQUIRED_PACKAGES += library/security/openssl
3996N/AREQUIRED_PACKAGES += library/zlib
3996N/AREQUIRED_PACKAGES += system/library