gst1-plugins-base: bump version to 1.6.0
[buildroot-gz.git] / package / erlang / erlang.mk
blob499f62c1539b497a254ddd893fb3d1f2daee17d6
1 ################################################################################
3 # erlang
5 ################################################################################
7 # See note below when updating Erlang
8 ERLANG_VERSION = 17.5
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 = EPL
14 ERLANG_LICENSE_FILES = EPLICENCE
15 ERLANG_INSTALL_STAGING = YES
17 # Touching erts/configure.in
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
22 ERLANG_EI_VSN = 3.7.20
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
28 # for documentation.
29 ERLANG_CONF_ENV += erl_xcomp_sysroot=$(STAGING_DIR)
31 ERLANG_CONF_OPTS = --without-javac
33 ERLANG_DEPENDENCIES += libatomic_ops
34 ERLANG_CONF_OPTS += --with-libatomic_ops=$(STAGING_DIR)/usr LIBS=-latomic_ops
36 # erlang uses openssl for all things crypto. Since the host tools (such as
37 # rebar) uses crypto, we need to build host-erlang with support for openssl.
38 HOST_ERLANG_DEPENDENCIES = host-openssl
39 HOST_ERLANG_CONF_OPTS = --without-javac --with-ssl=$(HOST_DIR)/usr
41 HOST_ERLANG_CONF_OPTS += --without-termcap
43 ifeq ($(BR2_PACKAGE_NCURSES),y)
44 ERLANG_CONF_OPTS += --with-termcap
45 ERLANG_DEPENDENCIES += ncurses
46 else
47 ERLANG_CONF_OPTS += --without-termcap
48 endif
50 ifeq ($(BR2_PACKAGE_OPENSSL),y)
51 ERLANG_CONF_OPTS += --with-ssl
52 ERLANG_DEPENDENCIES += openssl
53 else
54 ERLANG_CONF_OPTS += --without-ssl
55 endif
57 ifeq ($(BR2_PACKAGE_ZLIB),y)
58 ERLANG_CONF_OPTS += --enable-shared-zlib
59 ERLANG_DEPENDENCIES += zlib
60 endif
62 ifeq ($(BR2_PACKAGE_ERLANG_SMP),)
63 ERLANG_CONF_OPTS += --disable-smp-support
64 endif
66 # Remove source, example, gs and wx files from the target
67 ERLANG_REMOVE_PACKAGES = gs wx
69 ifneq ($(BR2_PACKAGE_ERLANG_MEGACO),y)
70 ERLANG_REMOVE_PACKAGES += megaco
71 endif
73 define ERLANG_REMOVE_UNUSED
74 find $(TARGET_DIR)/usr/lib/erlang -type d -name src -prune -exec rm -rf {} \;
75 find $(TARGET_DIR)/usr/lib/erlang -type d -name examples -prune -exec rm -rf {} \;
76 for package in $(ERLANG_REMOVE_PACKAGES); do \
77 rm -rf $(TARGET_DIR)/usr/lib/erlang/lib/$${package}-*; \
78 done
79 endef
81 ERLANG_POST_INSTALL_TARGET_HOOKS += ERLANG_REMOVE_UNUSED
83 $(eval $(autotools-package))
84 $(eval $(host-autotools-package))