The cirros image was rebuilt against the 3.13.0-83 kernel, drivers e1000e, igbvf...
[packages/trusty/cirros-testvm.git] / cirros-testvm / src-cirros / buildroot-2015.05 / package / erlang / erlang.mk
1 ################################################################################
2 #
3 # erlang
4 #
5 ################################################################################
6
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
12
13 ERLANG_LICENSE = EPL
14 ERLANG_LICENSE_FILES = EPLICENCE
15 ERLANG_INSTALL_STAGING = YES
16
17 # Touching erts/configure.in
18 ERLANG_AUTORECONF = YES
19
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
23
24 # The configure checks for these functions fail incorrectly
25 ERLANG_CONF_ENV = ac_cv_func_isnan=yes ac_cv_func_isinf=yes
26
27 # Set erl_xcomp variables. See xcomp/erl-xcomp.conf.template
28 # for documentation.
29 ERLANG_CONF_ENV += erl_xcomp_sysroot=$(STAGING_DIR)
30
31 ERLANG_CONF_OPTS = --without-javac
32
33 ERLANG_DEPENDENCIES += libatomic_ops
34 ERLANG_CONF_OPTS += --with-libatomic_ops=$(STAGING_DIR)/usr LIBS=-latomic_ops
35
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
40
41 HOST_ERLANG_CONF_OPTS += --without-termcap
42
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
49
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
56
57 ifeq ($(BR2_PACKAGE_ZLIB),y)
58 ERLANG_CONF_OPTS += --enable-shared-zlib
59 ERLANG_DEPENDENCIES += zlib
60 endif
61
62 ifeq ($(BR2_PACKAGE_ERLANG_SMP),)
63 ERLANG_CONF_OPTS += --disable-smp-support
64 endif
65
66 # Remove source, example, gs and wx files from the target
67 ERLANG_REMOVE_PACKAGES = gs wx
68
69 ifneq ($(BR2_PACKAGE_ERLANG_MEGACO),y)
70 ERLANG_REMOVE_PACKAGES += megaco
71 endif
72
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
80
81 ERLANG_POST_INSTALL_TARGET_HOOKS += ERLANG_REMOVE_UNUSED
82
83 $(eval $(autotools-package))
84 $(eval $(host-autotools-package))