commit | author | age
|
e28f4f
|
1 |
# |
AP |
2 |
# CDDL HEADER START |
|
3 |
# |
|
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. |
|
7 |
# |
|
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. |
|
12 |
# |
|
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] |
|
18 |
# |
|
19 |
# CDDL HEADER END |
|
20 |
# |
|
21 |
# Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved. |
b1b371
|
22 |
# Copyright (c) 2018, Michal Nowak |
e28f4f
|
23 |
# |
AP |
24 |
|
|
25 |
UNPACK = $(WS_TOOLS)/userland-unpack |
|
26 |
|
|
27 |
# |
|
28 |
# Anything that we downloaded and want to unpack must have a |
|
29 |
# COMPONENT_ARCHIVE{_[0-9]+} macro. |
|
30 |
# |
|
31 |
PCK_SUFFIXES = $(subst COMPONENT_ARCHIVE_,, \ |
|
32 |
$(filter COMPONENT_ARCHIVE_%, $(.VARIABLES))) |
|
33 |
|
|
34 |
# Template for unpacking rules. |
|
35 |
define unpack-rules |
|
36 |
ifdef COMPONENT_ARCHIVE$(1) |
|
37 |
ifdef COMPONENT_SRC$(1) |
|
38 |
|
818f75
|
39 |
CLEAN_PATHS += $$(COMPONENT_SRC$(1)) |
AW |
40 |
SOURCE_DIR$(1) = $$(COMPONENT_DIR)/$$(COMPONENT_SRC$(1)) |
e28f4f
|
41 |
|
AP |
42 |
UNPACK_STAMP$(1) = $$(SOURCE_DIR$(1))/.unpacked |
|
43 |
|
1e5ead
|
44 |
# RUBY_VERSION is passed on to ensure userland-unpack uses the |
AP |
45 |
# correct gem command for the ruby version specified |
4a2f20
|
46 |
$$(UNPACK_STAMP$(1)): $$(USERLAND_ARCHIVES)$$(COMPONENT_ARCHIVE$(1)) $(MAKEFILE_PREREQ) download |
e28f4f
|
47 |
$$(RM) -r $$(SOURCE_DIR$(1)) |
1e5ead
|
48 |
$(ENV) RUBY_VERSION=$(RUBY_VERSION) \ |
e28f4f
|
49 |
$$(UNPACK) $$(UNPACK_ARGS$(1)) $$(USERLAND_ARCHIVES)$$(COMPONENT_ARCHIVE$(1)) |
AP |
50 |
$$(COMPONENT_POST_UNPACK_ACTION$(1)) |
|
51 |
$$(TOUCH) $$@ |
|
52 |
|
|
53 |
unpack:: $$(UNPACK_STAMP$(1)) |
|
54 |
|
1349f8
|
55 |
USERLAND_REQUIRED_PACKAGES += archiver/gnu-tar |
AL |
56 |
USERLAND_REQUIRED_PACKAGES += compress/bzip2 |
|
57 |
USERLAND_REQUIRED_PACKAGES += compress/gzip |
|
58 |
USERLAND_REQUIRED_PACKAGES += compress/p7zip |
|
59 |
USERLAND_REQUIRED_PACKAGES += compress/unzip |
|
60 |
USERLAND_REQUIRED_PACKAGES += compress/lzip |
|
61 |
USERLAND_REQUIRED_PACKAGES += compress/xz |
|
62 |
USERLAND_REQUIRED_PACKAGES += compress/zip |
|
63 |
USERLAND_REQUIRED_PACKAGES += compress/zstd |
aaa369
|
64 |
USERLAND_REQUIRED_PACKAGES += developer/java/openjdk8 |
1349f8
|
65 |
USERLAND_REQUIRED_PACKAGES += runtime/ruby |
e28f4f
|
66 |
|
AP |
67 |
endif |
|
68 |
endif |
|
69 |
endef |
|
70 |
|
|
71 |
# |
|
72 |
# Define the rules required to download any source archives and augment any |
|
73 |
# cleanup macros. |
|
74 |
# |
|
75 |
$(eval $(call unpack-rules,)) |
|
76 |
$(foreach suffix, $(PCK_SUFFIXES), $(eval $(call unpack-rules,_$(suffix)))) |