--- /dev/null
+config BR2_PACKAGE_ERLANG
+ bool "erlang"
+ help
+ Erlang is a programming language used to build massively scalable
+ soft real-time systems with requirements on high availability.
+ Some of its uses are in telecoms, banking, e-commerce, computer
+ telephony and instant messaging. Erlang's runtime system has
+ built-in support for concurrency, distribution and fault tolerance.
+
+config BR2_PACKAGE_ERLANG_MEGACO
+ bool "install megaco application"
+ depends on BR2_PACKAGE_ERLANG
+ help
+ The Megaco application is a framework for building applications
+ on top of the Megaco/H.248 protocol. It is approximately 14MB in
+ size so if you do not need it then it is recommended not to
+ enable it.
--- /dev/null
+apply-patches.sh deletes this file from the source directory.
+
+--- erlang-R15B01.old/lib/tools/emacs/Makefile 2012-04-04
++++ erlang-R15B01/lib/tools/emacs/Makefile 2012-04-04 15:55:16.978957307 +0100
+@@ -51,7 +51,7 @@
+
+ ELC_FILES = $(EMACS_FILES:%=%.elc)
+
+-TEST_FILES = test.erl.indented test.erl.orig
++TEST_FILES = test.erl.indented
+
+ # ----------------------------------------------------
+ # Targets
--- /dev/null
+#############################################################
+#
+# erlang
+#
+#############################################################
+
+ERLANG_VERSION = R15B01
+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
+
+# The configure checks for these functions fail incorrectly
+ERLANG_CONF_ENV = ac_cv_func_isnan=yes ac_cv_func_isinf=yes
+
+ERLANG_CONF_OPT = --without-javac
+
+ifeq ($(BR2_PACKAGE_NCURSES),y)
+ERLANG_CONF_OPT += --with-termcap
+ERLANG_DEPENDENCIES += ncurses
+else
+ERLANG_CONF_OPT += --without-termcap
+endif
+
+ifeq ($(BR2_PACKAGE_OPENSSL),y)
+ERLANG_CONF_OPT += --with-ssl
+ERLANG_DEPENDENCIES += openssl
+else
+ERLANG_CONF_OPT += --without-ssl
+endif
+
+ifeq ($(BR2_PACKAGE_ZLIB),y)
+ERLANG_CONF_OPT += --enable-shared-zlib
+ERLANG_DEPENDENCIES += zlib
+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))