python/stevedore: update to 5.4.0
[oi-userland.git] / components / archiver / p7zip / Makefile
blobcf404a39ee6cecb861ec1bda98b40ec090aa78a4
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
23 # Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
24 # Copyright (c) 2016, Jim Klimov
27 BUILD_STYLE= justmake
28 include ../../../make-rules/shared-macros.mk
29 ENV = /usr/bin/env
31 COMPONENT_NAME= p7zip
32 COMPONENT_VERSION= 17.5
33 HUMAN_VERSION= 17.05
34 COMPONENT_REVISION= 2
35 COMPONENT_SUMMARY= The p7zip compression and archiving utility
36 COMPONENT_PROJECT_URL= https://github.com/p7zip-project/p7zip
37 COMPONENT_SRC= $(COMPONENT_NAME)-$(HUMAN_VERSION)
38 COMPONENT_ARCHIVE= v$(HUMAN_VERSION).tar.gz
39 COMPONENT_ARCHIVE_HASH= sha256:d2788f892571058c08d27095c22154579dfefb807ebe357d145ab2ddddefb1a6
40 COMPONENT_ARCHIVE_URL= https://github.com/p7zip-project/p7zip/archive/refs/tags/$(COMPONENT_ARCHIVE)
41 COMPONENT_FMRI= compress/p7zip
42 COMPONENT_CLASSIFICATION= System/Core
44 include $(WS_MAKE_RULES)/common.mk
46 COMPONENT_TEST_DIR = $(@D)
47 COMPONENT_TEST_ENV = P7ZIP_HOME_DIR=$(BUILD_DIR)/$(MACH$(BITS))/bin
48 COMPONENT_TEST_TARGETS = test test_7z test_7zr
50 COMPONENT_PREP_ACTION = (cd $(@D) && \
51 $(GSED) -e 's,^CC=,\#CC=,' -e 's,^CXX=,\#CXX=,' -e 's,-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE,$$(BUILD_FLAGS),' < makefile.solaris_x86 > makefile.machine && \
52 ( echo 'CC=$$(BUILD_CC) $$(ALLFLAGS)'; echo 'CXX=$$(BUILD_CXX) $$(ALLFLAGS)' ) >> makefile.machine )
54 COMPONENT_BUILD_TARGETS = all3
55 COMPONENT_INSTALL_ARGS += DEST_HOME=/usr DEST_DIR=$(PROTO_DIR)
57 COMPONENT_BUILD_ARGS += BUILD_CC="$(CC)"
58 COMPONENT_BUILD_ARGS += BUILD_CXX="$(CXX)"
59 COMPONENT_BUILD_ARGS += LDFLAGS="$(LDFLAGS)"
60 COMPONENT_BUILD_ARGS += BUILD_FLAGS="$(CPP_LARGEFILES) $(CFLAGS) $(CXXFLAGS) $(CPPFLAGS)"
62 $(SOURCE_DIR)/DOC/copying.txt $(SOURCE_DIR)/DOC/unRarLicense.txt: prep
64 $(BUILD_DIR)/%: $(SOURCE_DIR)/DOC/%
65 $(CP) $< $@
67 EXTRATARGETS = \
68 $(BUILD_DIR)/copying.txt $(BUILD_DIR)/unRarLicense.txt
70 COMPONENT_POST_INSTALL_ACTION = \
71 ( $(MKDIR) $(PROTOUSRLIBDIR)/p7zip/$(MACH$(BITS)) \
72 && $(MV) $(PROTOUSRLIBDIR)/p7zip/7z* $(PROTOUSRLIBDIR)/p7zip/$(MACH$(BITS))/ \
73 && $(MV) $(PROTOUSRLIBDIR)/p7zip/Codecs $(PROTOUSRLIBDIR)/p7zip/$(MACH$(BITS))/ \
74 ) ;
76 install: build $(INSTALL_64) $(EXTRATARGETS)
78 # When p7zip's install target is run, it creates all its directories mode 555,
79 # so they're impossible to remove without adding the write bit first.
80 COMPONENT_POST_INSTALL_ACTION += $(CHMOD) -R u+w $(PROTO_DIR) ;
82 COMPONENT_TEST_TRANSFORMS += '-e "/^REP=/d" '
83 COMPONENT_TEST_TRANSFORMS += '-e "/^Comment = /d" '
84 COMPONENT_TEST_TRANSFORMS += '-e "/^Modified = /d" '
85 COMPONENT_TEST_TRANSFORMS += '-e "/^Created = /d" '
86 COMPONENT_TEST_TRANSFORMS += '-e "/^Compressed: /d" '
87 COMPONENT_TEST_TRANSFORMS += '-e "/^Headers Size = /d" '
88 COMPONENT_TEST_TRANSFORMS += '-e "/^Physical Size = /d" '
89 COMPONENT_TEST_TRANSFORMS += '-e "/^1 file,/d" '
90 COMPONENT_TEST_TRANSFORMS += '-e "/^Archive size: /d" '
93 ifeq ($(strip $(MACH)),sparc)
94 REQUIRED_PACKAGES += system/library/math
95 endif
97 # Auto-generated dependencies
98 REQUIRED_PACKAGES += $(GCC_RUNTIME_PKG)
99 REQUIRED_PACKAGES += $(GXX_RUNTIME_PKG)
100 REQUIRED_PACKAGES += shell/ksh93
101 REQUIRED_PACKAGES += system/library
102 REQUIRED_PACKAGES += system/library/math