components/libarchive/Makefile
changeset 5682 94c0ca64c022
parent 5349 aad9f1baf245
child 6261 1dda1578278c
equal deleted inserted replaced
5681:b8fe51f35344 5682:94c0ca64c022
    16 # fields enclosed by brackets "[]" replaced with your own identifying
    16 # fields enclosed by brackets "[]" replaced with your own identifying
    17 # information: Portions Copyright [yyyy] [name of copyright owner]
    17 # information: Portions Copyright [yyyy] [name of copyright owner]
    18 #
    18 #
    19 # CDDL HEADER END
    19 # CDDL HEADER END
    20 #
    20 #
       
    21 
       
    22 #
    21 # Copyright (c) 2012, 2016, Oracle and/or its affiliates. All rights reserved.
    23 # Copyright (c) 2012, 2016, Oracle and/or its affiliates. All rights reserved.
    22 #
    24 #
       
    25 BUILD_BITS= 64_and_32
    23 include ../../make-rules/shared-macros.mk
    26 include ../../make-rules/shared-macros.mk
    24 
    27 
    25 COMPONENT_NAME=		libarchive
    28 COMPONENT_NAME=		libarchive
    26 COMPONENT_VERSION=	3.1.2
    29 COMPONENT_VERSION=	3.1.2
    27 COMPONENT_SRC=		$(COMPONENT_NAME)-$(COMPONENT_VERSION)
       
    28 COMPONENT_PROJECT_URL=	http://www.libarchive.org/
    30 COMPONENT_PROJECT_URL=	http://www.libarchive.org/
    29 COMPONENT_ARCHIVE=	$(COMPONENT_SRC).tar.gz
       
    30 COMPONENT_ARCHIVE_HASH=	\
    31 COMPONENT_ARCHIVE_HASH=	\
    31 	sha256:eb87eacd8fe49e8d90c8fdc189813023ccc319c5e752b01fb6ad0cc7b2c53d5e
    32 	sha256:eb87eacd8fe49e8d90c8fdc189813023ccc319c5e752b01fb6ad0cc7b2c53d5e
    32 COMPONENT_ARCHIVE_URL=	\
    33 COMPONENT_ARCHIVE_URL=	\
    33     $(COMPONENT_PROJECT_URL)downloads/$(COMPONENT_ARCHIVE)
    34     $(COMPONENT_PROJECT_URL)downloads/$(COMPONENT_ARCHIVE)
    34 COMPONENT_BUGDB=	library/libarchive
    35 COMPONENT_BUGDB=	library/libarchive
    35 
    36 
    36 TPNO=			24584
    37 TPNO=			24584
    37 
    38 
    38 include $(WS_MAKE_RULES)/prep.mk
    39 include $(WS_MAKE_RULES)/common.mk
    39 include $(WS_MAKE_RULES)/configure.mk
       
    40 include $(WS_MAKE_RULES)/ips.mk
       
    41 
    40 
    42 # Userland default includes -mt which links with libthread which we don't need.
    41 # Userland default includes -mt which links with libthread which we don't need.
    43 studio_MT =
    42 studio_MT =
    44 
    43 
    45 CONFIGURE_OPTIONS += --disable-static
    44 CONFIGURE_OPTIONS += --disable-static
    62 
    61 
    63 # We need GNU awk for the following to work; hence the PATH tweak.
    62 # We need GNU awk for the following to work; hence the PATH tweak.
    64 # We then convert BSD-style section numbers in the libarchive man pages to
    63 # We then convert BSD-style section numbers in the libarchive man pages to
    65 # Solaris-style section numbers.
    64 # Solaris-style section numbers.
    66 COMPONENT_PREP_ACTION = \
    65 COMPONENT_PREP_ACTION = \
    67 	cd $(@D)/doc/man ; rm *.[135] ; env PATH=/usr/gnu/bin:$$PATH gmake all ; \
    66 	cd $(@D)/doc/man ; rm *.[135] ; env PATH=$(GNUBIN):$$PATH gmake all ; \
    68 	cd $(@D)/libarchive ; \
    67 	cd $(@D)/libarchive ; \
    69 	find . -name "*\.[35]" | xargs /usr/bin/gsed -i 's/\(Xr.*\|Dt.*\)3/\13ARCHIVE/' ; \
    68 	find . -name "*\.[35]" | xargs $(GSED) -i 's/\(Xr.*\|Dt.*\)3/\13ARCHIVE/' ; \
    70 	find . -name "*\.[35]" | xargs /usr/bin/gsed -i \
    69 	find . -name "*\.[35]" | xargs $(GSED) -i \
    71 	-e 's/Xr \(malloc\|getpwuid\|getgrgud\|strerror\|printf\|getpwnam\|getgrnam\) 3ARCHIVE/Xr \13C/' \
    70 	-e 's/Xr \(malloc\|getpwuid\|getgrgud\|strerror\|printf\|getpwnam\|getgrnam\) 3ARCHIVE/Xr \13C/' \
    72 	-e 's/\(Dt.*LIBARCHIVE.*\)3ARCHIVE/\13LIB/' \
    71 	-e 's/\(Dt.*LIBARCHIVE.*\)3ARCHIVE/\13LIB/' \
    73 	-e 's/Xr \(libarchive\|archive\) 3ARCHIVE/Xr libarchive 3LIB/';
    72 	-e 's/Xr \(libarchive\|archive\) 3ARCHIVE/Xr libarchive 3LIB/';
    74 
    73 
    75 PKG_PROTO_DIRS += $(COMPONENT_SRC)/doc/man
    74 PKG_PROTO_DIRS += $(COMPONENT_SRC)/doc/man
    76 
       
    77 ASLR_MODE = $(ASLR_NOT_APPLICABLE)
       
    78 
    75 
    79 COMPONENT_TEST_MASTER = $(COMPONENT_TEST_RESULTS_DIR)/results-all.master
    76 COMPONENT_TEST_MASTER = $(COMPONENT_TEST_RESULTS_DIR)/results-all.master
    80 COMPONENT_TEST_TRANSFORMS += \
    77 COMPONENT_TEST_TRANSFORMS += \
    81 	'-e "s|$(COMPONENT_TEST_BUILD_DIR).*$$|build/test|g"' \
    78 	'-e "s|$(COMPONENT_TEST_BUILD_DIR).*$$|build/test|g"' \
    82 	'-e "s|^.*$(CC).*$$|XXX_CC_XXX|"' \
    79 	'-e "s|^.*$(CC).*$$|XXX_CC_XXX|"' \
    88 	'-e "s|^make.*: Entering directory.*$$|XXX_CC_XXX|g" ' \
    85 	'-e "s|^make.*: Entering directory.*$$|XXX_CC_XXX|g" ' \
    89 	'-e "s|.*recipe for target.*failed$$|XXX_CC_XXX|g" ' \
    86 	'-e "s|.*recipe for target.*failed$$|XXX_CC_XXX|g" ' \
    90 	'-e "s|^make.*\*\*\*.*Error.*$$|XXX_CC_XXX|g" ' \
    87 	'-e "s|^make.*\*\*\*.*Error.*$$|XXX_CC_XXX|g" ' \
    91 	'-e "/^XXX_CC_XXX$$/d"'
    88 	'-e "/^XXX_CC_XXX$$/d"'
    92 
    89 
    93 configure:	$(CONFIGURE_32_and_64)
       
    94 build:		$(BUILD_32_and_64)
       
    95 install:	$(INSTALL_32_and_64)
       
    96 test:		$(TEST_32_and_64)
       
    97 
       
    98 system-test:    $(SYSTEM_TESTS_NOT_IMPLEMENTED)
       
    99 
       
   100 REQUIRED_PACKAGES += compress/bzip2
    90 REQUIRED_PACKAGES += compress/bzip2
   101 REQUIRED_PACKAGES += compress/xz
    91 REQUIRED_PACKAGES += compress/xz
   102 REQUIRED_PACKAGES += library/libxml2
    92 REQUIRED_PACKAGES += library/libxml2
   103 REQUIRED_PACKAGES += library/security/openssl
    93 REQUIRED_PACKAGES += library/security/openssl
   104 REQUIRED_PACKAGES += library/zlib
    94 REQUIRED_PACKAGES += library/zlib
   105 REQUIRED_PACKAGES += system/library