summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOyvind Repvik <nail@nslu2-linux.org>2006-09-20 20:39:45 +0000
committerOyvind Repvik <nail@nslu2-linux.org>2006-09-20 20:39:45 +0000
commite9a890a3b696e6bb09ee32f40b667e7ca3eba863 (patch)
tree83c89260177e7abe341400a626a7ae1617dac757
parenta511f4faba25d7817f2ff01b0080254d24b65bc8 (diff)
erlang: Add erlang package. Add to slugos feeds
-rw-r--r--packages/erlang/.mtn2git_empty0
-rw-r--r--packages/erlang/erlang-R11B.1/.mtn2git_empty0
-rw-r--r--packages/erlang/erlang-R11B.1/Makefile.in.patch14
-rw-r--r--packages/erlang/erlang-R11B.1/erts-configure.in.patch23
-rw-r--r--packages/erlang/erlang-R11B.1/erts-emulator-Makefile.in.patch14
-rw-r--r--packages/erlang/erlang-R11B.1/erts-etc-unix-Install.src.patch11
-rw-r--r--packages/erlang/erlang-R11B.1/lib-crypto-c_src-Makefile.in.patch11
-rw-r--r--packages/erlang/erlang-R11B.1/lib-erl_interface-src-Makefile.in.patch16
-rw-r--r--packages/erlang/erlang-R11B.1/lib-ssl-c_src-Makefile.in.patch11
-rw-r--r--packages/erlang/erlang-native_R11B.1.bb24
-rw-r--r--packages/erlang/erlang.inc14
-rw-r--r--packages/erlang/erlang_R11B.1.bb72
-rw-r--r--packages/meta/slugos-packages.bb3
13 files changed, 212 insertions, 1 deletions
diff --git a/packages/erlang/.mtn2git_empty b/packages/erlang/.mtn2git_empty
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/packages/erlang/.mtn2git_empty
diff --git a/packages/erlang/erlang-R11B.1/.mtn2git_empty b/packages/erlang/erlang-R11B.1/.mtn2git_empty
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/packages/erlang/erlang-R11B.1/.mtn2git_empty
diff --git a/packages/erlang/erlang-R11B.1/Makefile.in.patch b/packages/erlang/erlang-R11B.1/Makefile.in.patch
new file mode 100644
index 0000000000..5b74ce77cd
--- /dev/null
+++ b/packages/erlang/erlang-R11B.1/Makefile.in.patch
@@ -0,0 +1,14 @@
+--- erlang/Makefile.in.orig 2006-05-12 07:43:44.000000000 -0700
++++ erlang/Makefile.in 2006-05-20 13:42:29.000000000 -0700
+@@ -545,9 +545,10 @@
+ # Install erlang base public files
+ #
+ install.bin:
++ cd $(BINDIR); \
+ for file in $(ERL_BASE_PUB_FILES); do \
+ rm -f $(BINDIR)/$$file; \
+- ${LN_S} $(ERLANG_BINDIR)/$$file $(BINDIR)/$$file; \
++ ${LN_S} ../lib/erlang/bin/$$file .; \
+ done
+
+ #
diff --git a/packages/erlang/erlang-R11B.1/erts-configure.in.patch b/packages/erlang/erlang-R11B.1/erts-configure.in.patch
new file mode 100644
index 0000000000..6266c2fef7
--- /dev/null
+++ b/packages/erlang/erlang-R11B.1/erts-configure.in.patch
@@ -0,0 +1,23 @@
+--- otp_src_R10B-6-orig/erts/configure.in 2005-06-21 09:37:14.000000000 -0700
++++ erlang/erts/configure.in 2005-06-23 22:09:58.055415000 -0700
+@@ -1277,7 +1277,7 @@
+ exit(0);
+ #endif
+ }
+-], poll_works=true, poll_works=false, poll_works=false)
++], poll_works=true, poll_works=false, poll_works=true)
+ case $poll_works in
+ true)
+ AC_MSG_RESULT(ok)
+@@ -1325,7 +1325,11 @@
+ DED_CFLAGS="$ETHR_DEFS $DED_CFLAGS"
+ fi
+
++if test "x$LD" = x; then
+ DED_LD=ld
++else
++DED_LD=$LD
++fi
+ DED_LD_FLAG_RUNTIME_LIBRARY_PATH="-R"
+ STATIC_CFLAGS=""
+
diff --git a/packages/erlang/erlang-R11B.1/erts-emulator-Makefile.in.patch b/packages/erlang/erlang-R11B.1/erts-emulator-Makefile.in.patch
new file mode 100644
index 0000000000..1c98ed81e9
--- /dev/null
+++ b/packages/erlang/erlang-R11B.1/erts-emulator-Makefile.in.patch
@@ -0,0 +1,14 @@
+--- otp_src_R11B-1/erts/emulator/Makefile.in.orig 2006-08-29 02:46:47.000000000 -0700
++++ otp_src_R11B-1/erts/emulator/Makefile.in 2006-08-31 21:46:25.000000000 -0700
+@@ -792,9 +792,10 @@
+ $(CC) $(subst O2,O3, $(CFLAGS)) $(INCLUDES) -c $< -o $@
+
+ $(BINDIR)/hipe_mkliterals$(TF_MARKER): $(OBJDIR)/hipe_mkliterals.o
+- $(CC) $(CFLAGS) $(INCLUDES) -o $@ $<
++ $(BUILD_CC) $(CFLAGS) $(INCLUDES) -o $@ hipe/hipe_mkliterals.c
+
+ $(OBJDIR)/hipe_mkliterals.o: $(TTF_DIR)/hipe_x86_asm.h $(TTF_DIR)/hipe_ppc_asm.h
++ $(BUILD_CC) $(CFLAGS) $(INCLUDES) -c hipe/hipe_mkliterals.c
+
+ $(TTF_DIR)/hipe_literals.h: $(BINDIR)/hipe_mkliterals$(TF_MARKER)
+ $(BINDIR)/hipe_mkliterals$(TF_MARKER) -c > $@
diff --git a/packages/erlang/erlang-R11B.1/erts-etc-unix-Install.src.patch b/packages/erlang/erlang-R11B.1/erts-etc-unix-Install.src.patch
new file mode 100644
index 0000000000..9da1f7fe32
--- /dev/null
+++ b/packages/erlang/erlang-R11B.1/erts-etc-unix-Install.src.patch
@@ -0,0 +1,11 @@
+--- otp_src_R10B-9/erts/etc/unix/Install.src 2005-12-02 07:07:40.000000000 -0800
++++ erlang/erts/etc/unix/Install.src 2005-12-24 11:44:51.000000000 -0800
+@@ -84,7 +84,7 @@
+ /bin/rm -f epmd
+ fi
+
+-ln -s $ERL_ROOT/erts-%I_VSN%/bin/epmd epmd
++ln -s ../erts-%I_VSN%/bin/epmd epmd
+
+ cp -p $ERL_ROOT/erts-%I_VSN%/bin/run_erl .
+ cp -p $ERL_ROOT/erts-%I_VSN%/bin/to_erl .
diff --git a/packages/erlang/erlang-R11B.1/lib-crypto-c_src-Makefile.in.patch b/packages/erlang/erlang-R11B.1/lib-crypto-c_src-Makefile.in.patch
new file mode 100644
index 0000000000..a649c09bde
--- /dev/null
+++ b/packages/erlang/erlang-R11B.1/lib-crypto-c_src-Makefile.in.patch
@@ -0,0 +1,11 @@
+--- erlang/lib/crypto/c_src/Makefile.in-orig 2005-05-16 20:03:56.000000000 -0700
++++ erlang/lib/crypto/c_src/Makefile.in 2005-05-16 20:02:19.000000000 -0700
+@@ -97,7 +97,7 @@
+ ifeq ($(strip $(LD_R_FLAG)),)
+ LD_R_OPT =
+ else
+-LD_R_OPT = $(LD_R_FLAG)$(SSL_LIBDIR)
++LD_R_OPT = -Wl,$(LD_R_FLAG)/opt/lib
+ endif
+
+ # ----------------------------------------------------
diff --git a/packages/erlang/erlang-R11B.1/lib-erl_interface-src-Makefile.in.patch b/packages/erlang/erlang-R11B.1/lib-erl_interface-src-Makefile.in.patch
new file mode 100644
index 0000000000..285012e0bd
--- /dev/null
+++ b/packages/erlang/erlang-R11B.1/lib-erl_interface-src-Makefile.in.patch
@@ -0,0 +1,16 @@
+--- erlang/lib/erl_interface/src/Makefile.in.orig 2006-08-29 02:47:48.000000000 -0700
++++ erlang/lib/erl_interface/src/Makefile.in 2006-09-06 12:58:07.000000000 -0700
+@@ -709,11 +709,11 @@
+ ifdef THR_DEFS
+ $(ERL_CALL): $(ERLCALL) ../include/ei.h $(MT_EILIB)
+ $(PURIFY) $(CC) $(PROG_CFLAGS) $(THR_DEFS) -o $@ $(ERLCALL) \
+- -L$(OBJDIR) -lei $(THR_LIBS) $(LIBS)
++ -L$(OBJDIR) -lei $(THR_LIBS) $(LIBS) $(LDFLAGS)
+ else
+ $(ERL_CALL): $(ERLCALL) ../include/ei.h $(ST_EILIB)
+ $(PURIFY) $(CC) $(PROG_CFLAGS) -o $@ $(ERLCALL) \
+- -L$(OBJDIR) -lei $(LIBS)
++ -L$(OBJDIR) -lei $(LIBS) $(LDFLAGS)
+ endif
+ endif
+ endif
diff --git a/packages/erlang/erlang-R11B.1/lib-ssl-c_src-Makefile.in.patch b/packages/erlang/erlang-R11B.1/lib-ssl-c_src-Makefile.in.patch
new file mode 100644
index 0000000000..cb91a79f2d
--- /dev/null
+++ b/packages/erlang/erlang-R11B.1/lib-ssl-c_src-Makefile.in.patch
@@ -0,0 +1,11 @@
+--- erlang/lib/ssl/c_src/Makefile.in.orig 2006-09-06 08:59:55.000000000 -0700
++++ erlang/lib/ssl/c_src/Makefile.in 2006-09-06 09:00:41.000000000 -0700
+@@ -115,7 +115,7 @@
+ ifeq ($(strip $(CC_R_FLAG)),)
+ CC_R_OPT =
+ else
+-CC_R_OPT = $(CC_R_FLAG)$(SSL_LIBDIR)
++CC_R_OPT = $(CC_R_FLAG)/opt/lib
+ endif
+
+
diff --git a/packages/erlang/erlang-native_R11B.1.bb b/packages/erlang/erlang-native_R11B.1.bb
new file mode 100644
index 0000000000..bc0e343b42
--- /dev/null
+++ b/packages/erlang/erlang-native_R11B.1.bb
@@ -0,0 +1,24 @@
+include erlang.inc
+
+inherit native
+
+# EXTRA_OEMAKE = 'OTP_SMALL_BUILD=true'
+EXTRA_OECONF = '--without-ssl'
+
+do_configure() {
+ TARGET=${HOST_SYS} \
+ ac_cv_prog_javac_ver_1_2=no \
+ oe_runconf
+}
+
+do_compile_prepend() {
+ export TARGET=${HOST_SYS}
+}
+
+do_stage_prepend() {
+ export TARGET=${HOST_SYS}
+}
+
+do_install_prepend() {
+ export TARGET=${HOST_SYS}
+}
diff --git a/packages/erlang/erlang.inc b/packages/erlang/erlang.inc
new file mode 100644
index 0000000000..e9204a9d3b
--- /dev/null
+++ b/packages/erlang/erlang.inc
@@ -0,0 +1,14 @@
+DESCRIPTION = "A dynamic programming language and runtime environment, \
+with built-in support for concurrency, distribution and fault tolerance"
+SECTION = "devel/erlang"
+DEPENDS = "ncurses"
+PRIORITY = "optional"
+MAINTAINER = "Brian Zhou <bzhou@nslu2-linux.org>"
+LICENSE = "ERLANG PUBLIC LICENSE"
+
+UPSTREAM_VERSION = "${@bb.data.getVar('PV', d, 1).replace('.', '-')}"
+
+SRC_URI = "http://erlang.org/download/otp_src_${UPSTREAM_VERSION}.tar.gz"
+S = "${WORKDIR}/otp_src_${UPSTREAM_VERSION}"
+
+inherit autotools
diff --git a/packages/erlang/erlang_R11B.1.bb b/packages/erlang/erlang_R11B.1.bb
new file mode 100644
index 0000000000..4c754f6c3e
--- /dev/null
+++ b/packages/erlang/erlang_R11B.1.bb
@@ -0,0 +1,72 @@
+include erlang.inc
+DEPENDS += "erlang-native openssl"
+
+SRC_URI += "file://erts-configure.in.patch;patch=1 \
+ file://erts-emulator-Makefile.in.patch;patch=1 \
+ file://erts-etc-unix-Install.src.patch;patch=1 \
+ file://lib-crypto-c_src-Makefile.in.patch;patch=1 \
+ file://lib-erl_interface-src-Makefile.in.patch;patch=1 \
+ file://Makefile.in.patch;patch=1 \
+ "
+
+EXTRA_OEMAKE = "BUILD_CC='${BUILD_CC}'"
+
+EXTRA_OECONF = "--with-ssl=${STAGING_DIR}/${HOST_SYS}"
+
+EXTRA_OECONF_append_arm = " --disable-smp-support --disable-hipe"
+EXTRA_OECONF_append_armeb = " --disable-smp-support --disable-hipe"
+EXTRA_OECONF_append_mipsel = " --disable-smp-support --disable-hipe"
+EXTRA_OECONF_append_sh3 = " --disable-smp-support --disable-hipe"
+EXTRA_OECONF_append_sh4 = " --disable-smp-support --disable-hipe"
+
+NATIVE_BIN = "${TMPDIR}/work/erlang-native-${PV}-${PR}/otp_src_${UPSTREAM_VERSION}/bin"
+
+do_configure() {
+
+ cd ${S}/erts; autoreconf; cd -
+
+ . ${CONFIG_SITE}
+
+ ac_cv_prog_javac_ver_1_2=no \
+ SHLIB_LD='${CC}' \
+ oe_runconf
+
+ sed -i -e 's|$(ERL_TOP)/bin/dialyzer|${NATIVE_BIN}/dialyzer --output_plt $@ -pa $(ERL_TOP)/lib/kernel/ebin -pa $(ERL_TOP)/lib/stdlib/ebin|' lib/dialyzer/src/Makefile
+}
+
+do_compile() {
+ TARGET=${TARGET_SYS} \
+ PATH=${NATIVE_BIN}:$PATH \
+ oe_runmake noboot
+}
+
+do_install() {
+ TARGET=${TARGET_SYS} \
+ PATH=${NATIVE_BIN}:$PATH \
+ oe_runmake 'INSTALL_PREFIX=${D}' install
+ for f in erl start
+ do sed -i -e 's:ROOTDIR=.*:ROOTDIR=/usr/lib/erlang:' \
+ ${D}/usr/lib/erlang/erts-*/bin/$f ${D}/usr/lib/erlang/bin/$f
+ done
+}
+
+def get_erlang_libs(d):
+ import os, bb
+ install_root = bb.data.getVar('D', d, 1)
+ libdir = bb.data.getVar('libdir', d, 1)[1:]
+ libs = ["${bindir}/dialyzer", "${libdir}/erlang/bin/dialyzer"]
+ erlang_lib = os.path.join(install_root, libdir, "erlang/lib")
+ for fname in os.listdir(erlang_lib):
+ if not "-" in fname: continue
+ if fname.startswith("compiler-"): continue
+ if fname.startswith("kernel-"): continue
+ if fname.startswith("sasl-"): continue
+ if fname.startswith("stdlib-"): continue
+ if fname.startswith("tools-"): continue
+ libs.append(os.path.join("${libdir}", "erlang/lib", fname))
+ libs.sort()
+ return libs
+
+FILES_${PN}-dbg += " ${libdir}/erlang/bin/.debug ${libdir}/erlang/*/bin/.debug ${libdir}/erlang/lib/*/bin/.debug"
+FILES_${PN}-libs += " ${@' '.join(get_erlang_libs(d))}"
+PACKAGES =+ "${PN}-libs"
diff --git a/packages/meta/slugos-packages.bb b/packages/meta/slugos-packages.bb
index 6bb72d5325..ebcc367cba 100644
--- a/packages/meta/slugos-packages.bb
+++ b/packages/meta/slugos-packages.bb
@@ -46,7 +46,6 @@ SLUGOS_PACKAGES = "\
cron \
ctorrent \
cvs \
- cyrus-imapd \
cyrus-sasl \
db \
devlabel \
@@ -56,6 +55,7 @@ SLUGOS_PACKAGES = "\
e2fsprogs \
e2fsprogs-libs \
eciadsl \
+ erlang \
expat \
ez-ipupdate \
fetchmail \
@@ -187,6 +187,7 @@ SLUGOS_BROKEN_PACKAGES = "\
unionfs-modules \
unionfs-utils \
icecast \
+ cyrus-imapd \
"
# These packages will never build because uclibc lacks (and always will lack)