components/libarchive/Makefile
changeset 6261 1dda1578278c
parent 5682 94c0ca64c022
child 6347 545ae06d138d
equal deleted inserted replaced
6260:c6db55d32fc3 6261:1dda1578278c
    24 #
    24 #
    25 BUILD_BITS= 64_and_32
    25 BUILD_BITS= 64_and_32
    26 include ../../make-rules/shared-macros.mk
    26 include ../../make-rules/shared-macros.mk
    27 
    27 
    28 COMPONENT_NAME=		libarchive
    28 COMPONENT_NAME=		libarchive
    29 COMPONENT_VERSION=	3.1.2
    29 COMPONENT_VERSION=	3.2.0
    30 COMPONENT_PROJECT_URL=	http://www.libarchive.org/
    30 COMPONENT_PROJECT_URL=	http://www.libarchive.org/
    31 COMPONENT_ARCHIVE_HASH=	\
    31 COMPONENT_ARCHIVE_HASH=	\
    32 	sha256:eb87eacd8fe49e8d90c8fdc189813023ccc319c5e752b01fb6ad0cc7b2c53d5e
    32 	sha256:7bce45fd71ff01dc20d19edd78322d4965583d81b8bed8e26cacb65d6f5baa87
    33 COMPONENT_ARCHIVE_URL=	\
    33 COMPONENT_ARCHIVE_URL=	\
    34     $(COMPONENT_PROJECT_URL)downloads/$(COMPONENT_ARCHIVE)
    34     $(COMPONENT_PROJECT_URL)downloads/$(COMPONENT_ARCHIVE)
    35 COMPONENT_BUGDB=	library/libarchive
    35 COMPONENT_BUGDB=	library/libarchive
    36 
    36 
    37 TPNO=			24584
    37 TPNO=			29561
    38 
    38 
       
    39 TEST_TARGET= install $(TEST_32_and_64)
    39 include $(WS_MAKE_RULES)/common.mk
    40 include $(WS_MAKE_RULES)/common.mk
    40 
    41 
    41 # Userland default includes -mt which links with libthread which we don't need.
    42 # Userland default includes -mt which links with libthread which we don't need.
    42 studio_MT =
    43 studio_MT =
    43 
    44 
    57 COMPONENT_BUILD_ARGS +=	CFLAGS="$(CFLAGS)"
    58 COMPONENT_BUILD_ARGS +=	CFLAGS="$(CFLAGS)"
    58 COMPONENT_TEST_ARGS +=	COMMON_CFLAGS=''
    59 COMPONENT_TEST_ARGS +=	COMMON_CFLAGS=''
    59 COMPONENT_TEST_ARGS +=	CFLAGS="$(CFLAGS)"
    60 COMPONENT_TEST_ARGS +=	CFLAGS="$(CFLAGS)"
    60 COMPONENT_TEST_ENV +=	TMPDIR="$(COMPONENT_TEST_BUILD_DIR)"
    61 COMPONENT_TEST_ENV +=	TMPDIR="$(COMPONENT_TEST_BUILD_DIR)"
    61 
    62 
       
    63 # Get correct libarchive.so from the proto area.
       
    64 TEST_LIBPATH.32 =       $(PROTOUSRLIBDIR)
       
    65 TEST_LIBPATH.64 =       $(PROTOUSRLIBDIR64)
       
    66 COMPONENT_TEST_ENV +=	LD_LIBRARY_PATH=$(TEST_LIBPATH.$(BITS))
       
    67 
    62 # We need GNU awk for the following to work; hence the PATH tweak.
    68 # We need GNU awk for the following to work; hence the PATH tweak.
    63 # We then convert BSD-style section numbers in the libarchive man pages to
    69 # We then convert BSD-style section numbers in the libarchive man pages to
    64 # Solaris-style section numbers.
    70 # Solaris-style section numbers.
    65 COMPONENT_PREP_ACTION = \
    71 COMPONENT_PREP_ACTION = \
    66 	cd $(@D)/doc/man ; rm *.[135] ; env PATH=$(GNUBIN):$$PATH gmake all ; \
    72 	cd $(@D)/doc/man ; rm *.[135] ; env PATH=$(GNUBIN):$$PATH gmake all ; \
    71 	-e 's/\(Dt.*LIBARCHIVE.*\)3ARCHIVE/\13LIB/' \
    77 	-e 's/\(Dt.*LIBARCHIVE.*\)3ARCHIVE/\13LIB/' \
    72 	-e 's/Xr \(libarchive\|archive\) 3ARCHIVE/Xr libarchive 3LIB/';
    78 	-e 's/Xr \(libarchive\|archive\) 3ARCHIVE/Xr libarchive 3LIB/';
    73 
    79 
    74 PKG_PROTO_DIRS += $(COMPONENT_SRC)/doc/man
    80 PKG_PROTO_DIRS += $(COMPONENT_SRC)/doc/man
    75 
    81 
       
    82 # Needed for "gmake test" to work successfully.
       
    83 # If SHELLOPTS is exported (as it is by the userland makefiles),
       
    84 # then all shell options get exported to child invocations of bash,
       
    85 # which results in test failures due to nounset and xtrace being
       
    86 # set unexpectedly, and errors such as "$1: unbound variable" and
       
    87 # diffs failing due to script tracing in output files.
       
    88 unexport SHELLOPTS
       
    89 
    76 COMPONENT_TEST_MASTER = $(COMPONENT_TEST_RESULTS_DIR)/results-all.master
    90 COMPONENT_TEST_MASTER = $(COMPONENT_TEST_RESULTS_DIR)/results-all.master
    77 COMPONENT_TEST_TRANSFORMS += \
    91 COMPONENT_TEST_TRANSFORMS += \
    78 	'-e "s|$(COMPONENT_TEST_BUILD_DIR).*$$|build/test|g"' \
    92 	'-n ' \
    79 	'-e "s|^.*$(CC).*$$|XXX_CC_XXX|"' \
    93 	'-e "/ ok/p" ' \
    80 	'-e "s/ld: warning: symbol .* has differing sizes:$$/XXX_CC_XXX/"' \
    94 	'-e "/ FAIL/p" ' \
    81 	'-e "s/.*value=0x[0-9a-f]\+.*$$/XXX_CC_XXX/"' \
    95 	'-e "/Totals:/p" ' \
    82 	'-e "s/.* definition taken$$/XXX_CC_XXX/"' \
    96 	'-e "/Tests run:/p" ' \
    83 	'-e "s|.*Assertions checked:.*$$|XXX_CC_XXX|g" ' \
    97 	'-e "/Tests failed:/p" ' \
    84 	'-e "s|^make.*: Leaving directory.*$$|XXX_CC_XXX|g" ' \
    98 	'-e "/Assertions failed:/p" ' \
    85 	'-e "s|^make.*: Entering directory.*$$|XXX_CC_XXX|g" ' \
    99 	'-e "/Skips reported:/p" ' \
    86 	'-e "s|.*recipe for target.*failed$$|XXX_CC_XXX|g" ' \
   100 	'-e "/Failing tests:/p" ' \
    87 	'-e "s|^make.*\*\*\*.*Error.*$$|XXX_CC_XXX|g" ' \
   101 	'-e "/ failure/p" ' \
    88 	'-e "/^XXX_CC_XXX$$/d"'
   102 	'-e "/TOTAL/p" ' \
       
   103 	'-e "/SKIP/p" ' \
       
   104 	'-e "/PASS/p" ' \
       
   105 	'-e "/FAIL/p" ' \
       
   106 	'-e "/ERROR/p" ' \
       
   107         '-e "/=========/p" ' \
    89 
   108 
    90 REQUIRED_PACKAGES += compress/bzip2
   109 REQUIRED_PACKAGES += compress/bzip2
    91 REQUIRED_PACKAGES += compress/xz
   110 REQUIRED_PACKAGES += compress/xz
    92 REQUIRED_PACKAGES += library/libxml2
   111 REQUIRED_PACKAGES += library/libxml2
    93 REQUIRED_PACKAGES += library/security/openssl
   112 REQUIRED_PACKAGES += library/security/openssl