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]
23 # Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
26 include ..
/..
/make-rules
/shared-macros.mk
28 PATH
=$(JAVA_HOME
)/bin
:/usr
/bin
30 COMPONENT_NAME
= erlang
31 COMPONENT_VERSION
= 17.5
32 COMPONENT_PROJECT_URL
= http
://www.erlang.org
/
33 COMPONENT_SRC_NAME
= otp_src
34 COMPONENT_SRC
= $(COMPONENT_SRC_NAME
)_
$(COMPONENT_VERSION
)
35 COMPONENT_ARCHIVE
= $(COMPONENT_SRC
).
tar.gz
36 COMPONENT_ARCHIVE_HASH
= \
37 sha256
:3c28820c981b30c50df8ac2a4a238e5813454fa3ed2ad530bc7948a282846474
38 COMPONENT_ARCHIVE_URL
= $(COMPONENT_PROJECT_URL
)download
/$(COMPONENT_ARCHIVE
)
39 COMPONENT_BUGDB
= utility
/erlang
42 COMPONENT_NAME_1
= otp_doc_man
43 COMPONENT_SRC_1
= $(COMPONENT_NAME_1
)_
$(COMPONENT_VERSION
)
44 COMPONENT_ARCHIVE_1
= $(COMPONENT_SRC_1
).
tar.gz
45 COMPONENT_ARCHIVE_HASH_1
= \
46 sha256
:85b1b2a1011fc01af550f1fe9e5a599a4c5f2a35d264d2804af1d05590a857c3
47 COMPONENT_ARCHIVE_URL_1
= $(COMPONENT_PROJECT_URL
)download
/$(COMPONENT_ARCHIVE_1
)
48 UNPACK_ARGS_1
= -r
$(COMPONENT_SRC_1
)
49 PKG_PROTO_DIRS
+= $(COMPONENT_SRC_1
)
52 COMPONENT_NAME_2
= otp_doc_html
53 COMPONENT_SRC_2
= $(COMPONENT_NAME_2
)_
$(COMPONENT_VERSION
)
54 COMPONENT_ARCHIVE_2
= $(COMPONENT_SRC_2
).
tar.gz
55 COMPONENT_ARCHIVE_HASH_2
= \
56 sha256
:baba1d373c1faacf4a1a6ec1220d57d0cb2b977edb74f32cd58dc786361c6cf5
57 COMPONENT_ARCHIVE_URL_2
= $(COMPONENT_PROJECT_URL
)download
/$(COMPONENT_ARCHIVE_2
)
58 UNPACK_ARGS_2
= -r
$(COMPONENT_SRC_2
)
59 PKG_PROTO_DIRS
+= $(COMPONENT_SRC_2
)
61 include ..
/..
/make-rules
/prep.mk
62 include ..
/..
/make-rules
/configure.mk
63 include ..
/..
/make-rules
/ips.mk
65 # Built in SFW with gcc and builds cleanly now only with gcc
68 COMPONENT_BUILD_ENV
+= "HOME=/tmp"
70 CONFIGURE_OPTIONS
+= CPPFLAGS
="$(CPPFLAGS) -I/usr/include/gd2"
71 CONFIGURE_OPTIONS
+= --enable-smp-support
72 CONFIGURE_OPTIONS
+= --enable-threads
73 # The HiPE portion is a bit sensitive, and only seems to work 64-bit on
74 # amd64 (thus the variant.arch tagging in erlang.p5m). erts/config.log
75 # can be very interesting if issues occur.
76 CONFIGURE_OPTIONS
+= --enable-hipe
77 CONFIGURE_OPTIONS
+= --with-ssl
78 CONFIGURE_OPTIONS
+= --enable-dynamic-ssl-lib
80 CONFIGURE_OPTIONS
.64 += LIBS
="-m64"
81 CONFIGURE_OPTIONS
.64 += --with-wx-config
=/usr
/bin
/$(MACH64
)/wx-config
83 # Needed for 'set name=info.source-url' action in erlang-doc.p5m
84 PKG_MACROS
+= COMPONENT_ARCHIVE_URL_2
=$(COMPONENT_ARCHIVE_URL_2
)
86 # Use cp(1) instead of cloney because erlang's 'install' target uses 'tar'
87 # to copy files and our tar doesn't handle long links by default. Between
88 # the use of 'tar' and 'ld', a path adjustment wasn't an option due to the
89 # need for /usr/bin/ld and /usr/gnu/bin/tar. Perhaps this can be looked
90 # at when we upgrade to a more current version.
91 COMPONENT_PRE_CONFIGURE_ACTION
= \
92 ($(CP
) -rp
$(SOURCE_DIR
)/.
$(@D
))
93 CONFIGURE_SCRIPT
= $(@D
)/configure
95 # Always show the build and link lines for easier debugging.
96 COMPONENT_BUILD_ARGS
+= V
=1
98 COMPONENT_INSTALL_ARGS
+= INSTALL_PREFIX
=$(PROTO_DIR
)
100 COMPONENT_TEST_ENV
+= ERL_TOP
=$(BUILD_DIR_
$(BITS
))
101 COMPONENT_TEST_TARGETS
= tests
103 ASLR_MODE
= $(ASLR_ENABLE
)
106 build
: $(BUILD_32_and_64
)
108 ifdef USERLAND_ARCHIVES
109 EXTRA_ARCHIVE_PATH
=$(USERLAND_ARCHIVES
)
111 EXTRA_ARCHIVE_PATH
=..
/
114 install: $(INSTALL_32_and_64
)
115 # Undelivered useless files:
116 # erlang/lib/crypto-*/priv/obj
117 # erlang/lib/ssl-*/priv/obj
121 # manpages: start.1 werl.1
122 $(RM
) -r documentation
123 $(MKDIR
) documentation
&& cd documentation
&& \
124 $(UNPACK
) $(UNPACK_ARGS
) $(EXTRA_ARCHIVE_PATH
)$(COMPONENT_ARCHIVE_1
) && \
125 $(UNPACK
) $(UNPACK_ARGS
) $(EXTRA_ARCHIVE_PATH
)$(COMPONENT_ARCHIVE_2
)
126 # remove INSTALL_PREFIX from path
127 $(PERL
) -pi
-e
"s|$(PROTO_DIR)||g" $(PROTO_DIR
)/usr
/lib
/erlang
/bin
/erl \
128 $(PROTO_DIR
)/usr
/lib
/$(MACH64
)/erlang
/bin
/erl \
129 $(PROTO_DIR
)/usr
/lib
/erlang
/releases
/RELEASES \
130 $(PROTO_DIR
)/usr
/lib
/$(MACH64
)/erlang
/releases
/RELEASES
133 $(RM
) -r documentation
135 test: $(TEST_32_and_64
)
137 BUILD_PKG_DEPENDENCIES
= $(BUILD_TOOLS
)
139 include ..
/..
/make-rules
/depend.mk