Skip to contentSkip to conversation

erlang: Add new package.

PATCH New Will Newton 2 participants 4 messages Apr 4, 2012 – Aug 22, 2012

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 erlang: Add new package.

---
 package/Config.in                     |    1 +
 package/erlang/Config.in              |    9 +++++++++
 package/erlang/erlang-build-fix.patch |   13 +++++++++++++
 package/erlang/erlang.mk              |   26 ++++++++++++++++++++++++++
 4 files changed, 49 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
package/Config.in +1 -0
index b84d7f1..8c36952 100644
@@ -227,6 +227,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"
 if BR2_PACKAGE_LUA
package/erlang/Config.in new file +9 -0
new file mode 100644
index 0000000..78f34ac
@@ -0,0 +1,9 @@
+config BR2_PACKAGE_ERLANG
+	bool "erlang"
+	select BR2_PACKAGE_NCURSES
+	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.
(quoted diff) +0 -0

b/package/erlang/erlang-build-fix.patch
new file mode 100644
index 0000000..d2938a5

package/erlang/erlang-build-fix.patch new file +3 -0
@@ -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

package/erlang/erlang.mk new file +18 -0
new file mode 100644
index 0000000..e8ce8bc
@@ -0,0 +1,26 @@
+#############################################################
+#
+# erlang
+#
+#############################################################
+
+ERLANG_VERSION = R15B01
+ERLANG_SITE = http://www.erlang.org/download
+ERLANG_SOURCE = otp_src_$(ERLANG_VERSION).tar.gz
+ERLANG_DEPENDENCIES = ncurses host-erlang
+
+# The configure checks for these functions fail incorrectly
+ERLANG_CONF_ENV = ac_cv_func_isnan=yes ac_cv_func_isinf=yes
+
+# Remove source, example, gs and wx files from the target
+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 {} \;
+ rm -rf $(TARGET_DIR)/usr/lib/erlang/lib/gs-*
+ rm -rf $(TARGET_DIR)/usr/lib/erlang/lib/wx-*
+endef
+
+ERLANG_POST_INSTALL_TARGET_HOOKS += ERLANG_REMOVE_UNUSED +
+$(eval $(call AUTOTARGETS))
+$(eval $(call AUTOTARGETS,host))

Signature · 2 lines
1.7.1
-------------- next part --------------
#1 lore raw

PATCH 1/1 erlang: Add new package.

Hello Will,

Le Wed, 4 Apr 2012 17:49:07 +0100,
Will Newton <[email protected]> a ?crit :

Quoted 9 lines
---
 package/Config.in                     |    1 +
 package/erlang/Config.in              |    9 +++++++++
 package/erlang/erlang-build-fix.patch |   13 +++++++++++++
 package/erlang/erlang.mk              |   26 ++++++++++++++++++++++++++
 4 files changed, 49 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

Thanks for this.

A couple of questions/comments:

*) Could you update the patch to use autotools-package and host-autotools-package in accordance with the latest package infrastructure changes?

*) Could you add your Signed-off by line?

*) The complete Erlang stuff gets installed in /usr/lib/erlang, even the binaries (compiler, interpreter?) in /usr/lib/erlang/bin/. Is this the normal installation location? If so, then we should at least probably provide a few symlinks from /usr/bin/.

*) By default the /usr/lib/erlang/ size is 55 MB on ARM. Is this the minimal size of the standard library?

*) From the configure.in script, I see options like shared-zlib, or ssl path or things like that, but your erlang package does not depend on zlib nor OpenSSL. Can you give a few comments about this?

Thanks!

Thomas

Signature · 4 lines
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
#2 lore raw

PATCH 1/1 erlang: Add new package.

Quoted 15 lines · Thomas Petazzoni

Hello Will,

Le Wed, 4 Apr 2012 17:49:07 +0100,
Will Newton <[email protected]> a ?crit :

Quoted 9 lines
---
 package/Config.in                     |    1 +
 package/erlang/Config.in              |    9 +++++++++
 package/erlang/erlang-build-fix.patch |   13 +++++++++++++
 package/erlang/erlang.mk              |   26 ++++++++++++++++++++++++++
 4 files changed, 49 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
Quoted 7 lines

Thanks for this.

A couple of questions/comments:

*) Could you update the patch to use autotools-package and host-autotools-package in accordance with the latest package infrastructure changes?

Ok, done.

Quoted 1 line

*) Could you add your Signed-off by line?

Sure.

Quoted 4 lines

*) The complete Erlang stuff gets installed in /usr/lib/erlang, even the binaries (compiler, interpreter?) in /usr/lib/erlang/bin/. Is this the normal installation location? If so, then we should at least probably provide a few symlinks from /usr/bin/.

I get these symlinks in my build, e.g.:

[wnewton at wnewton-linux buildroot]$ ls -l output/target/usr/bin/erl* lrwxrwxrwx. 1 wnewton ldapusers 21 Aug 22 11:18 output/target/usr/bin/erl -> ../lib/erlang/bin/erl lrwxrwxrwx. 1 wnewton ldapusers 22 Aug 22 11:18 output/target/usr/bin/erlc -> ../lib/erlang/bin/erlc

Quoted 2 lines

*) By default the /usr/lib/erlang/ size is 55 MB on ARM. Is this the minimal size of the standard library?

It is quite large unfortunately. At least part of this seems to be that the bytecode files (.beam) are not very compact. It is possible to delete packages (just delete /usr/lib/erlang/lib/<package>-<version>) but it is not clear exactly what a good minimal set is. I remove gs (tk based UI) and wx (wxWidgets based UI) libs as they are not supported by buildroot.

I'll add a config option for the megaco application which is the largest by some distance.

Quoted 3 lines

*) From the configure.in script, I see options like shared-zlib, or ssl path or things like that, but your erlang package does not depend on zlib nor OpenSSL. Can you give a few comments about this?

I've added support for enabling openssl, zlib and ncurses dependencies.

I'll repost the patch with these changes.

#3 lore raw

PATCH 1/1 erlang: Add new package.

Le Wed, 22 Aug 2012 14:00:04 +0100,
Will Newton <[email protected]> a ?crit :

Quoted 5 lines
Quoted 4 lines

*) The complete Erlang stuff gets installed in /usr/lib/erlang, even the binaries (compiler, interpreter?) in /usr/lib/erlang/bin/. Is this the normal installation location? If so, then we should at least probably provide a few symlinks from /usr/bin/.

Quoted 7 lines

I get these symlinks in my build, e.g.:

[wnewton at wnewton-linux buildroot]$ ls -l output/target/usr/bin/erl* lrwxrwxrwx. 1 wnewton ldapusers 21 Aug 22 11:18 output/target/usr/bin/erl -> ../lib/erlang/bin/erl lrwxrwxrwx. 1 wnewton ldapusers 22 Aug 22 11:18 output/target/usr/bin/erlc -> ../lib/erlang/bin/erlc

Hum, ok, I might have looked improperly. I'll check again with your updated patch.

Quoted 9 lines

It is quite large unfortunately. At least part of this seems to be that the bytecode files (.beam) are not very compact. It is possible to delete packages (just delete /usr/lib/erlang/lib/<package>-<version>) but it is not clear exactly what a good minimal set is. I remove gs (tk based UI) and wx (wxWidgets based UI) libs as they are not supported by buildroot.

I'll add a config option for the megaco application which is the largest by some distance.

Ok.

Quoted 3 lines

I've added support for enabling openssl, zlib and ncurses dependencies.

I'll repost the patch with these changes.

Excellent, thanks!

Thomas

Signature · 4 lines
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com