commit | author | age
|
236357
|
1 |
# |
G |
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 |
|
|
22 |
# |
|
23 |
# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved. |
b6be1c
|
24 |
# Copyright 2021 Andreas Grueninger, Grueninger GmbH, (grueni). All rights reserved. |
b4f9b7
|
25 |
# Copyright 2023 Carsten Grzemba |
f0fa34
|
26 |
# Copyright 2024 Goetz Fischer, R-A-C. All rights reserved. |
236357
|
27 |
# |
G |
28 |
|
b6be1c
|
29 |
BUILD_BITS= 64 |
236357
|
30 |
include ../../../make-rules/shared-macros.mk |
G |
31 |
|
f0fa34
|
32 |
COMPONENT_FMRI= runtime/erlang |
R |
33 |
COMPONENT_NAME= erlang |
9959c8
|
34 |
COMPONENT_VERSION= 26.2.3 |
f0fa34
|
35 |
COMPONENT_PROJECT_URL= https://erlang.org/ |
b6be1c
|
36 |
COMPONENT_SRC_NAME= otp_src |
f0fa34
|
37 |
COMPONENT_SRC= $(COMPONENT_SRC_NAME)_$(COMPONENT_VERSION) |
R |
38 |
COMPONENT_ARCHIVE= ${COMPONENT_SRC}.tar.gz |
b6be1c
|
39 |
COMPONENT_ARCHIVE_HASH= \ |
9959c8
|
40 |
sha256:2c4e61b24fb1c131d9f30cfe2415320899180debdb71fb59195c72bd9a4ab625 |
f0fa34
|
41 |
COMPONENT_ARCHIVE_URL= https://github.com/erlang/otp/releases/download/OTP-${COMPONENT_VERSION}/${COMPONENT_ARCHIVE} |
R |
42 |
COMPONENT_POST_UNPACK_ACTION= ( $(RM) -r $(COMPONENT_SRC)/lib/wx ) |
b6be1c
|
43 |
COMPONENT_VERSION_SHORT= $(shell echo $(COMPONENT_VERSION) | cut -d'.' -f1-2) |
236357
|
44 |
COMPONENT_CLASSIFICATION= Development/Other Languages |
f0fa34
|
45 |
COMPONENT_LICENSE= Apache-2.0 |
R |
46 |
COMPONENT_LICENSE_FILE= LICENSE.txt |
236357
|
47 |
COMPONENT_SUMMARY= Erlang/OTP |
G |
48 |
COMPONENT_DESCRIPTION= Erlang programming language and OTP libraries |
|
49 |
|
|
50 |
# manpages |
b6be1c
|
51 |
COMPONENT_NAME_1= otp_doc_man |
f0fa34
|
52 |
COMPONENT_SRC_1= $(COMPONENT_NAME_1)_$(COMPONENT_VERSION) |
R |
53 |
COMPONENT_ARCHIVE_1= $(COMPONENT_SRC_1).tar.gz |
b6be1c
|
54 |
COMPONENT_ARCHIVE_HASH_1= \ |
9959c8
|
55 |
sha256:2341f5e062755542e651fce0ee50664822802b30b71a0b70d8cbdfaa5c81748b |
f0fa34
|
56 |
COMPONENT_ARCHIVE_URL_1= https://github.com/erlang/otp/releases/download/OTP-$(COMPONENT_VERSION)/$(COMPONENT_ARCHIVE_1) |
R |
57 |
UNPACK_ARGS_1= -r $(COMPONENT_SRC_1) |
236357
|
58 |
|
b6be1c
|
59 |
include $(WS_MAKE_RULES)/common.mk |
236357
|
60 |
|
G |
61 |
SYSTEM_TEST_TARGET= configure $(SYSTEM_TEST_64) |
|
62 |
|
|
63 |
# Fix 64-bit linking. |
|
64 |
LDFLAGS += $(CC_BITS) |
|
65 |
|
f0fa34
|
66 |
# testing these with gcc 13. can safely be omitted in doubt. |
R |
67 |
CFLAGS += -finline-functions -funroll-loops |
|
68 |
CXXFLAGS += -finline-functions -funroll-loops -fno-exceptions -fno-rtti |
236357
|
69 |
|
G |
70 |
CONFIGURE_OPTIONS += --enable-smp-support |
|
71 |
CONFIGURE_OPTIONS += --enable-threads |
b4f9b7
|
72 |
CONFIGURE_OPTIONS += --with-ssl=$(OPENSSL_PREFIX) |
f0fa34
|
73 |
CONFIGURE_OPTIONS += --with-ssl-lib-subdir=/amd64 |
b6be1c
|
74 |
CONFIGURE_OPTIONS += --enable-dynamic-ssl-lib |
f0fa34
|
75 |
CONFIGURE_OPTIONS += --disable-silent-rules |
R |
76 |
CONFIGURE_OPTIONS += --without-javac |
b6be1c
|
77 |
|
236357
|
78 |
# The HiPE portion is a bit sensitive, and only seems to work 64-bit on |
G |
79 |
# amd64 (thus the variant.arch tagging in erlang.p5m). erts/config.log |
|
80 |
# can be very interesting if issues occur. |
b6be1c
|
81 |
CONFIGURE_OPTIONS.i386 = --enable-hipe |
G |
82 |
CONFIGURE_OPTIONS.sparc = --disable-hipe |
|
83 |
# Disable kernel poll on sparc to avoid hangs in erl_child_setup (bug 31443512). |
|
84 |
CONFIGURE_OPTIONS.sparc += --disable-kernel-poll |
b4f9b7
|
85 |
CONFIGURE_OPTIONS += $(CONFIGURE_OPTIONS.$(MACH)) |
236357
|
86 |
|
G |
87 |
# Erlang doesn't appear to like ASLR: it uses mmap() with MAP_FIXED, and |
|
88 |
# makes assumptions about memory layout that aren't true on Solaris x86, |
|
89 |
# leading to segmentation faults in erlc. |
|
90 |
ASLR_MODE = $(ASLR_DISABLE) |
|
91 |
|
|
92 |
# Use cp(1) instead of cloney because erlang's 'install' target uses 'tar' |
|
93 |
# to copy files and our tar doesn't handle long links by default. Between |
|
94 |
# the use of 'tar' and 'ld', a path adjustment wasn't an option due to the |
|
95 |
# need for /usr/bin/ld and /usr/gnu/bin/tar. This is still the case with |
|
96 |
# erlang version 17.5. |
|
97 |
COMPONENT_PRE_CONFIGURE_ACTION = \ |
|
98 |
($(CP) -rp $(SOURCE_DIR)/. $(@D)) |
f0fa34
|
99 |
CONFIGURE_SCRIPT = $(@D)/configure |
236357
|
100 |
|
7a78f9
|
101 |
# fix build on jenkins |
AP |
102 |
COMPONENT_BUILD_ENV += HOME=/tmp |
|
103 |
COMPONENT_INSTALL_ENV += HOME=/tmp |
|
104 |
COMPONENT_TEST_ENV += HOME=/tmp |
236357
|
105 |
COMPONENT_INSTALL_ARGS += INSTALL_PREFIX=$(PROTO_DIR) |
f0fa34
|
106 |
COMPONENT_TEST_ENV += ERL_TOP=$(BUILD_DIR_64) |
R |
107 |
COMPONENT_TEST_TARGETS = tests |
|
108 |
COMPONENT_SYSTEM_TEST_ENV += ERL_TOP=$(BUILD_DIR_64) |
236357
|
109 |
COMPONENT_SYSTEM_TEST_TARGETS = tests |
G |
110 |
COMPONENT_TEST_TRANSFORMS += \ |
|
111 |
'-e "/^gmake.*release_tests_spec/d" ' |
|
112 |
|
|
113 |
# remove INSTALL_PREFIX from path |
|
114 |
COMPONENT_POST_INSTALL_ACTION += \ |
|
115 |
$(PERL) -pi -e "s|$(PROTO_DIR)||g" \ |
|
116 |
$(PROTOUSRLIBDIR64)/erlang/bin/erl \ |
f0fa34
|
117 |
$(PROTOUSRLIBDIR64)/erlang/releases/RELEASES ; |
R |
118 |
COMPONENT_POST_INSTALL_ACTION += ( $(MKDIR) $(PROTO_DIR)/usr/share ) ; |
|
119 |
COMPONENT_POST_INSTALL_ACTION += ( $(MV) $(COMPONENT_SRC_1)/man $(PROTO_DIR)/usr/share/ ) |
236357
|
120 |
|
G |
121 |
# common targets |
|
122 |
build: $(BUILD_64) |
|
123 |
install: $(INSTALL_64) |
|
124 |
test: $(TEST_64) |
b6be1c
|
125 |
|
483212
|
126 |
# Auto-generated dependencies |
b6be1c
|
127 |
REQUIRED_PACKAGES += $(GCC_RUNTIME_PKG) |
G |
128 |
REQUIRED_PACKAGES += $(GXX_RUNTIME_PKG) |
b4f9b7
|
129 |
REQUIRED_PACKAGES += SUNWcs |
236357
|
130 |
REQUIRED_PACKAGES += library/ncurses |
b4f9b7
|
131 |
REQUIRED_PACKAGES += library/security/openssl-31 |
236357
|
132 |
REQUIRED_PACKAGES += library/zlib |
b6be1c
|
133 |
REQUIRED_PACKAGES += shell/ksh93 |
236357
|
134 |
REQUIRED_PACKAGES += system/library |
G |
135 |
REQUIRED_PACKAGES += system/library/math |