2013-06-06 01:53:30 +02:00
|
|
|
################################################################################
|
2012-08-24 23:39:26 +02:00
|
|
|
#
|
|
|
|
# erlang
|
|
|
|
#
|
2013-06-06 01:53:30 +02:00
|
|
|
################################################################################
|
2012-08-24 23:39:26 +02:00
|
|
|
|
2014-09-21 19:08:59 +02:00
|
|
|
ERLANG_VERSION = 17.3
|
2012-08-24 23:39:26 +02:00
|
|
|
ERLANG_SITE = http://www.erlang.org/download
|
|
|
|
ERLANG_SOURCE = otp_src_$(ERLANG_VERSION).tar.gz
|
|
|
|
ERLANG_DEPENDENCIES = host-erlang
|
|
|
|
|
|
|
|
ERLANG_LICENSE = EPL
|
|
|
|
ERLANG_LICENSE_FILES = EPLICENCE
|
2013-08-09 03:37:24 +02:00
|
|
|
ERLANG_INSTALL_STAGING = YES
|
2012-08-24 23:39:26 +02:00
|
|
|
|
|
|
|
# The configure checks for these functions fail incorrectly
|
|
|
|
ERLANG_CONF_ENV = ac_cv_func_isnan=yes ac_cv_func_isinf=yes
|
|
|
|
|
2013-09-13 17:46:01 +02:00
|
|
|
# Set erl_xcomp variables. See xcomp/erl-xcomp.conf.template
|
|
|
|
# for documentation.
|
|
|
|
ERLANG_CONF_ENV += erl_xcomp_sysroot=$(STAGING_DIR)
|
|
|
|
|
2014-09-27 21:32:44 +02:00
|
|
|
ERLANG_CONF_OPTS = --without-javac
|
2014-08-15 17:49:15 +02:00
|
|
|
|
|
|
|
# erlang uses openssl for all things crypto. Since the host tools (such as
|
|
|
|
# rebar) uses crypto, we need to build host-erlang with support for openssl.
|
|
|
|
HOST_ERLANG_DEPENDENCIES = host-openssl
|
|
|
|
HOST_ERLANG_CONF_OPTS = --without-javac --with-ssl=$(HOST_DIR)/usr
|
2012-08-24 23:39:26 +02:00
|
|
|
|
2014-11-17 23:33:16 +01:00
|
|
|
HOST_ERLANG_CONF_OPTS += --without-termcap
|
|
|
|
|
2012-08-24 23:39:26 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_NCURSES),y)
|
2014-09-27 21:32:44 +02:00
|
|
|
ERLANG_CONF_OPTS += --with-termcap
|
2012-08-24 23:39:26 +02:00
|
|
|
ERLANG_DEPENDENCIES += ncurses
|
|
|
|
else
|
2014-09-27 21:32:44 +02:00
|
|
|
ERLANG_CONF_OPTS += --without-termcap
|
2012-08-24 23:39:26 +02:00
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(BR2_PACKAGE_OPENSSL),y)
|
2014-09-27 21:32:44 +02:00
|
|
|
ERLANG_CONF_OPTS += --with-ssl
|
2012-08-24 23:39:26 +02:00
|
|
|
ERLANG_DEPENDENCIES += openssl
|
|
|
|
else
|
2014-09-27 21:32:44 +02:00
|
|
|
ERLANG_CONF_OPTS += --without-ssl
|
2012-08-24 23:39:26 +02:00
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(BR2_PACKAGE_ZLIB),y)
|
2014-09-27 21:32:44 +02:00
|
|
|
ERLANG_CONF_OPTS += --enable-shared-zlib
|
2012-08-24 23:39:26 +02:00
|
|
|
ERLANG_DEPENDENCIES += zlib
|
|
|
|
endif
|
|
|
|
|
2013-12-13 15:56:11 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_ERLANG_SMP),)
|
2014-09-27 21:32:44 +02:00
|
|
|
ERLANG_CONF_OPTS += --disable-smp-support
|
2013-12-13 15:56:11 +01:00
|
|
|
endif
|
|
|
|
|
2012-08-24 23:39:26 +02:00
|
|
|
# Remove source, example, gs and wx files from the target
|
|
|
|
ERLANG_REMOVE_PACKAGES = gs wx
|
|
|
|
|
|
|
|
ifneq ($(BR2_PACKAGE_ERLANG_MEGACO),y)
|
|
|
|
ERLANG_REMOVE_PACKAGES += megaco
|
|
|
|
endif
|
|
|
|
|
|
|
|
define ERLANG_REMOVE_UNUSED
|
|
|
|
find $(TARGET_DIR)/usr/lib/erlang -type d -name src -prune -exec rm -rf {} \;
|
|
|
|
find $(TARGET_DIR)/usr/lib/erlang -type d -name examples -prune -exec rm -rf {} \;
|
|
|
|
for package in $(ERLANG_REMOVE_PACKAGES); do \
|
|
|
|
rm -rf $(TARGET_DIR)/usr/lib/erlang/lib/$${package}-*; \
|
|
|
|
done
|
|
|
|
endef
|
|
|
|
|
|
|
|
ERLANG_POST_INSTALL_TARGET_HOOKS += ERLANG_REMOVE_UNUSED
|
|
|
|
|
|
|
|
$(eval $(autotools-package))
|
|
|
|
$(eval $(host-autotools-package))
|