X-Git-Url: https://review.fuel-infra.org/gitweb?a=blobdiff_plain;f=cirros-testvm%2Fsrc-cirros%2Fbuildroot-2015.05%2Fpackage%2Ferlang%2Ferlang.mk;fp=cirros-testvm%2Fsrc-cirros%2Fbuildroot-2015.05%2Fpackage%2Ferlang%2Ferlang.mk;h=499f62c1539b497a254ddd893fb3d1f2daee17d6;hb=b0a0f15dfaa205161a7fcb20cf1b8cd4948c2ef3;hp=0000000000000000000000000000000000000000;hpb=c6ac3cd55ee2da956195eee393b0882105dfad4e;p=packages%2Ftrusty%2Fcirros-testvm.git diff --git a/cirros-testvm/src-cirros/buildroot-2015.05/package/erlang/erlang.mk b/cirros-testvm/src-cirros/buildroot-2015.05/package/erlang/erlang.mk new file mode 100644 index 0000000..499f62c --- /dev/null +++ b/cirros-testvm/src-cirros/buildroot-2015.05/package/erlang/erlang.mk @@ -0,0 +1,84 @@ +################################################################################ +# +# erlang +# +################################################################################ + +# See note below when updating Erlang +ERLANG_VERSION = 17.5 +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 +ERLANG_INSTALL_STAGING = YES + +# Touching erts/configure.in +ERLANG_AUTORECONF = YES + +# Whenever updating Erlang, this value should be updated as well, to the +# value of EI_VSN in the file lib/erl_interface/vsn.mk +ERLANG_EI_VSN = 3.7.20 + +# The configure checks for these functions fail incorrectly +ERLANG_CONF_ENV = ac_cv_func_isnan=yes ac_cv_func_isinf=yes + +# Set erl_xcomp variables. See xcomp/erl-xcomp.conf.template +# for documentation. +ERLANG_CONF_ENV += erl_xcomp_sysroot=$(STAGING_DIR) + +ERLANG_CONF_OPTS = --without-javac + +ERLANG_DEPENDENCIES += libatomic_ops +ERLANG_CONF_OPTS += --with-libatomic_ops=$(STAGING_DIR)/usr LIBS=-latomic_ops + +# 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 + +HOST_ERLANG_CONF_OPTS += --without-termcap + +ifeq ($(BR2_PACKAGE_NCURSES),y) +ERLANG_CONF_OPTS += --with-termcap +ERLANG_DEPENDENCIES += ncurses +else +ERLANG_CONF_OPTS += --without-termcap +endif + +ifeq ($(BR2_PACKAGE_OPENSSL),y) +ERLANG_CONF_OPTS += --with-ssl +ERLANG_DEPENDENCIES += openssl +else +ERLANG_CONF_OPTS += --without-ssl +endif + +ifeq ($(BR2_PACKAGE_ZLIB),y) +ERLANG_CONF_OPTS += --enable-shared-zlib +ERLANG_DEPENDENCIES += zlib +endif + +ifeq ($(BR2_PACKAGE_ERLANG_SMP),) +ERLANG_CONF_OPTS += --disable-smp-support +endif + +# 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))