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