1 ################################################################################
5 ################################################################################
7 # See note below when updating Erlang
9 ERLANG_SITE
= http
://www.erlang.org
/download
10 ERLANG_SOURCE
= otp_src_
$(ERLANG_VERSION
).
tar.gz
11 ERLANG_DEPENDENCIES
= host-erlang
13 ERLANG_LICENSE
= Apache-2.0
14 ERLANG_LICENSE_FILES
= LICENSE.txt
15 ERLANG_INSTALL_STAGING
= YES
17 # Patched erts/aclocal.m4
18 ERLANG_AUTORECONF
= YES
20 # Whenever updating Erlang, this value should be updated as well, to the
21 # value of EI_VSN in the file lib/erl_interface/vsn.mk
24 # The configure checks for these functions fail incorrectly
25 ERLANG_CONF_ENV
= ac_cv_func_isnan
=yes ac_cv_func_isinf
=yes
27 # Set erl_xcomp variables. See xcomp/erl-xcomp.conf.template
29 ERLANG_CONF_ENV
+= erl_xcomp_sysroot
=$(STAGING_DIR
)
31 ERLANG_CONF_OPTS
= --without-javac
33 # Force ERL_TOP to the downloaded source directory. This prevents
34 # Erlang's configure script from inadvertantly using files from
35 # a version of Erlang installed on the host.
36 ERLANG_CONF_ENV
+= ERL_TOP
=$(@D
)
37 HOST_ERLANG_CONF_ENV
+= ERL_TOP
=$(@D
)
39 # erlang uses openssl for all things crypto. Since the host tools (such as
40 # rebar) uses crypto, we need to build host-erlang with support for openssl.
41 HOST_ERLANG_DEPENDENCIES
= host-openssl
42 HOST_ERLANG_CONF_OPTS
= --without-javac
--with-ssl
=$(HOST_DIR
)/usr
44 HOST_ERLANG_CONF_OPTS
+= --without-termcap
46 ifeq ($(BR2_TOOLCHAIN_HAS_THREADS
),)
47 ERLANG_CONF_OPTS
+= --disable-threads
50 ifeq ($(BR2_PACKAGE_NCURSES
),y
)
51 ERLANG_CONF_OPTS
+= --with-termcap
52 ERLANG_DEPENDENCIES
+= ncurses
54 ERLANG_CONF_OPTS
+= --without-termcap
57 ifeq ($(BR2_PACKAGE_OPENSSL
),y
)
58 ERLANG_CONF_OPTS
+= --with-ssl
59 ERLANG_DEPENDENCIES
+= openssl
61 ERLANG_CONF_OPTS
+= --without-ssl
64 # ODBC support in erlang requires threads
65 ifeq ($(BR2_PACKAGE_UNIXODBC
)$(BR2_TOOLCHAIN_HAS_THREADS
),yy
)
66 ERLANG_DEPENDENCIES
+= unixodbc
67 ERLANG_CONF_OPTS
+= --with-odbc
69 ERLANG_CONF_OPTS
+= --without-odbc
72 ifeq ($(BR2_PACKAGE_ZLIB
),y
)
73 ERLANG_CONF_OPTS
+= --enable-shared-zlib
74 ERLANG_DEPENDENCIES
+= zlib
77 ifeq ($(BR2_PACKAGE_ERLANG_SMP
),)
78 ERLANG_CONF_OPTS
+= --disable-smp-support
81 # Remove source, example, gs and wx files from staging and target.
82 ERLANG_REMOVE_PACKAGES
= gs wx
84 ifneq ($(BR2_PACKAGE_ERLANG_MEGACO
),y
)
85 ERLANG_REMOVE_PACKAGES
+= megaco
88 define ERLANG_REMOVE_STAGING_UNUSED
89 for package in
$(ERLANG_REMOVE_PACKAGES
); do \
90 rm -rf
$(STAGING_DIR
)/usr
/lib
/erlang
/lib
/$${package}-*; \
94 define ERLANG_REMOVE_TARGET_UNUSED
95 find
$(TARGET_DIR
)/usr
/lib
/erlang
-type d
-name src
-prune
-exec
rm -rf
{} \
;
96 find
$(TARGET_DIR
)/usr
/lib
/erlang
-type d
-name examples
-prune
-exec
rm -rf
{} \
;
97 for package in
$(ERLANG_REMOVE_PACKAGES
); do \
98 rm -rf
$(TARGET_DIR
)/usr
/lib
/erlang
/lib
/$${package}-*; \
102 ERLANG_POST_INSTALL_STAGING_HOOKS
+= ERLANG_REMOVE_STAGING_UNUSED
103 ERLANG_POST_INSTALL_TARGET_HOOKS
+= ERLANG_REMOVE_TARGET_UNUSED
105 $(eval
$(autotools-package
))
106 $(eval
$(host-autotools-package
))