From patchwork Wed Aug 22 13:01:09 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Will Newton X-Patchwork-Id: 179316 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from silver.osuosl.org (silver.osuosl.org [140.211.166.136]) by ozlabs.org (Postfix) with ESMTP id 8C1452C0099 for ; Wed, 22 Aug 2012 23:01:44 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 2CF562EA96; Wed, 22 Aug 2012 13:01:42 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id mtn1kBpKEo78; Wed, 22 Aug 2012 13:01:36 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id 51E9125784; Wed, 22 Aug 2012 13:01:36 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (whitealder.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 53DE98F753 for ; Wed, 22 Aug 2012 13:01:35 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 3A8978CD66 for ; Wed, 22 Aug 2012 13:01:35 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id X1DHgY7wVL5F for ; Wed, 22 Aug 2012 13:01:11 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-qc0-f171.google.com (mail-qc0-f171.google.com [209.85.216.171]) by whitealder.osuosl.org (Postfix) with ESMTPS id 9AC4E8D389 for ; Wed, 22 Aug 2012 13:01:10 +0000 (UTC) Received: by qcad1 with SMTP id d1so1211105qca.16 for ; Wed, 22 Aug 2012 06:01:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=CL5VF4WyQwRqCcpq6od4kOVSvk2vYnDXzSKyfDDkRBA=; b=wEa3osAroNrmB11kFRYCWm//gSKAe1Dv0zfytEng7zcCwNlnZO6FD8VDm16P4vtu1e xgneKwAoO7q4ZvB7mz8IusF67mjCda0NqWKbzIUQo/USTbbCnPBB5KPgMMrgtSwmsr/E ZhKg1uNwrEMrlxFCTf9ANPCDkP3GYCxaV2aVrwYBRrchsO5w//twmogJuASQS+k06Miu IU8+Zim2HdU5qfuysLC4tp01VT0sMhlwsx/9U4MhhSRBxX+Nd0Ee2MM7hq70BT8f310i fS7b+0Az9XZVRB0rm2aq5tkRDxJ4M8ForIV4zWEWAvekVbK6f7uCyV3CGifw0gd6XKeH si1Q== MIME-Version: 1.0 Received: by 10.229.111.140 with SMTP id s12mr12537253qcp.151.1345640469643; Wed, 22 Aug 2012 06:01:09 -0700 (PDT) Received: by 10.229.222.80 with HTTP; Wed, 22 Aug 2012 06:01:09 -0700 (PDT) Date: Wed, 22 Aug 2012 14:01:09 +0100 Message-ID: From: Will Newton To: buildroot@busybox.net Subject: [Buildroot] [PATCH] erlang: New package. X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: buildroot-bounces@busybox.net Sender: buildroot-bounces@busybox.net Signed-off-by: Will Newton --- package/Config.in | 1 + package/erlang/Config.in | 17 ++++++++++ package/erlang/erlang-build-fix.patch | 13 +++++++ package/erlang/erlang.mk | 57 +++++++++++++++++++++++++++++++++ 4 files changed, 88 insertions(+), 0 deletions(-) create mode 100644 package/erlang/Config.in create mode 100644 package/erlang/erlang-build-fix.patch create mode 100644 package/erlang/erlang.mk diff --git a/package/Config.in b/package/Config.in index f308de7..57a6c31 100644 --- a/package/Config.in +++ b/package/Config.in @@ -245,6 +245,7 @@ source "package/xfsprogs/Config.in" endmenu menu "Interpreter languages and scripting" +source "package/erlang/Config.in" source "package/haserl/Config.in" source "package/lua/Config.in" source "package/luajit/Config.in" diff --git a/package/erlang/Config.in b/package/erlang/Config.in new file mode 100644 index 0000000..6dd5a39 --- /dev/null +++ b/package/erlang/Config.in @@ -0,0 +1,17 @@ +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. diff --git a/package/erlang/erlang-build-fix.patch b/package/erlang/erlang-build-fix.patch new file mode 100644 index 0000000..d2938a5 --- /dev/null +++ b/package/erlang/erlang-build-fix.patch @@ -0,0 +1,13 @@ +apply-patches.sh deletes this file from the source directory. + +--- erlang-R15B01.old/lib/tools/emacs/Makefile 2012-04-04 15:54:29.271832192 +0100 ++++ 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 diff --git a/package/erlang/erlang.mk b/package/erlang/erlang.mk new file mode 100644 index 0000000..6b90627 --- /dev/null +++ b/package/erlang/erlang.mk @@ -0,0 +1,57 @@ +############################################################# +# +# 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))