python/hypothesis: update to 6.121.0
[oi-userland.git] / components / library / libarchive / Makefile
blobfb2c126905cdb830a21731476d5b08c596ff1e7f
2 # CDDL HEADER START
4 # The contents of this file are subject to the terms of the
5 # Common Development and Distribution License (the "License").
6 # You may not use this file except in compliance with the License.
8 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 # or http://www.opensolaris.org/os/licensing.
10 # See the License for the specific language governing permissions
11 # and limitations under the License.
13 # When distributing Covered Code, include this CDDL HEADER in each
14 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 # If applicable, add the following below this CDDL HEADER, with the
16 # fields enclosed by brackets "[]" replaced with your own identifying
17 # information: Portions Copyright [yyyy] [name of copyright owner]
19 # CDDL HEADER END
22 # Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
23 # Copyright (c) 2019, Michal Nowak
24 # Copyright (c) 2023, Andreas Wacknitz
27 BUILD_BITS= 64_and_32
28 USE_DEFAULT_TEST_TRANSFORMS= yes
29 include ../../../make-rules/shared-macros.mk
31 COMPONENT_NAME= libarchive
32 COMPONENT_VERSION= 3.7.7
33 COMPONENT_SUMMARY= multi-format archive and compression library
34 COMPONENT_DESCRIPTION= The libarchive(3LIB) library provides a flexible\
35 interface for reading and writing archives in various formats such as\
36 tar(1) and cpio(1). libarchive also supports reading and writing\
37 archives compressed using various compression filters such as gzip(1)\
38 and bzip2(1). The library is inherently stream-oriented;\
39 readers serially iterate through the archive, writers serially\
40 add things to the archive.
41 COMPONENT_SRC= libarchive-$(COMPONENT_VERSION)
42 COMPONENT_PROJECT_URL= https://www.libarchive.org/
43 COMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.gz
44 COMPONENT_ARCHIVE_HASH= sha256:4cc540a3e9a1eebdefa1045d2e4184831100667e6d7d5b315bb1cbc951f8ddff
45 COMPONENT_ARCHIVE_URL= https://www.libarchive.org/downloads/$(COMPONENT_ARCHIVE)
46 COMPONENT_FMRI= library/libarchive
47 COMPONENT_CLASSIFICATION= System/Libraries
48 COMPONENT_LICENSE= BSD-like
50 include $(WS_MAKE_RULES)/common.mk
52 CONFIGURE_OPTIONS += --disable-static
53 CONFIGURE_OPTIONS += --enable-shared
54 CONFIGURE_OPTIONS += --enable-largefile
55 # We don't have an iconv library and using this will make depending packages fail when trying to find it:
56 CONFIGURE_OPTIONS += --without-iconv
57 # Linking libarchive with lzo violates LZO GPL licence
58 CONFIGURE_OPTIONS += --without-lzo
59 # We prefer openssl over nettle.
60 CONFIGURE_OPTIONS += --without-nettle
61 CONFIGURE_OPTIONS += --with-openssl
62 CONFIGURE_OPTIONS += --with-pic
63 CONFIGURE_OPTIONS += --with-xml2
64 CONFIGURE_OPTIONS += --with-zlib
66 # libarchive's Makefile hard-codes some gcc-only flags in COMMON_CFLAGS, then
67 # appends CFLAGS to that. Reset the former here so we can build with Studio.
68 COMPONENT_BUILD_ARGS += COMMON_CFLAGS=''
69 COMPONENT_BUILD_ARGS += CFLAGS="$(CFLAGS)"
70 COMPONENT_TEST_ARGS += COMMON_CFLAGS=''
71 COMPONENT_TEST_ARGS += CFLAGS="$(CFLAGS)"
73 CONFIGURE_OPTIONS.64 += LDFLAGS=-L$(OPENSSL_PREFIX)/lib/$(MACH64)
74 CONFIGURE_OPTIONS.32 += LDFLAGS=-L$(OPENSSL_PREFIX)/lib
75 CONFIGURE_OPTIONS += CPPFLAGS=-I$(OPENSSL_PREFIX)/include
77 # We need GNU awk for the following to work; hence the PATH tweak.
78 # We then convert BSD-style section numbers in the libarchive man pages to
79 # Solaris-style section numbers.
80 COMPONENT_PREP_ACTION = \
81 cd $(@D)/doc ; rm -f man/*.[135] ; env PATH=/usr/gnu/bin:$$PATH $(CONFIG_SHELL) update.sh ; \
82 cd $(@D)/libarchive ; \
83 find . -name "*\.[35]" | xargs /usr/bin/gsed -i 's/\(Xr.*\|Dt.*\)3/\13ARCHIVE/' ; \
84 find . -name "*\.[35]" | xargs /usr/bin/gsed -i \
85 -e 's/Xr \(malloc\|getpwuid\|getgrgud\|strerror\|printf\|getpwnam\|getgrnam\) 3ARCHIVE/Xr \13C/' \
86 -e 's/\(Dt.*LIBARCHIVE.*\)3ARCHIVE/\13LIB/' \
87 -e 's/Xr \(libarchive\|archive\) 3ARCHIVE/Xr libarchive 3LIB/';
89 PKG_PROTO_DIRS += $(COMPONENT_SRC)/doc/man
91 ASLR_MODE = $(ASLR_NOT_APPLICABLE)
93 # Tests may fail for other locales.
94 COMPONENT_TEST_ENV += LC_ALL=C.UTF-8
96 # Build requirements
97 REQUIRED_PACKAGES += print/filter/ghostscript
98 REQUIRED_PACKAGES += text/groff
100 # Auto-generated dependencies
101 REQUIRED_PACKAGES += $(OPENSSL_PKG)
102 REQUIRED_PACKAGES += compress/bzip2
103 REQUIRED_PACKAGES += compress/xz
104 REQUIRED_PACKAGES += compress/zstd
105 REQUIRED_PACKAGES += library/libxml2
106 REQUIRED_PACKAGES += library/libxml2/32
107 REQUIRED_PACKAGES += library/lz4
108 REQUIRED_PACKAGES += library/zlib
109 REQUIRED_PACKAGES += system/library