aboutsummaryrefslogtreecommitdiff
path: root/lang
diff options
context:
space:
mode:
authorJimmy Olgeni <olgeni@FreeBSD.org>2014-04-10 08:57:56 +0000
committerJimmy Olgeni <olgeni@FreeBSD.org>2014-04-10 08:57:56 +0000
commit03bbb043b2e63b2c9eae4e7094b0919c41a5bb10 (patch)
tree8d7574b82842ad924ed9629246e31c69158de090 /lang
parent800509ac8c8534ca86d2215c0c371bf9c349330a (diff)
downloadports-03bbb043b2e63b2c9eae4e7094b0919c41a5bb10.tar.gz
ports-03bbb043b2e63b2c9eae4e7094b0919c41a5bb10.zip
Notes
Diffstat (limited to 'lang')
-rw-r--r--lang/Makefile1
-rw-r--r--lang/erlang-runtime17/Makefile206
-rw-r--r--lang/erlang-runtime17/distinfo6
-rw-r--r--lang/erlang-runtime17/files/epmd.in25
-rw-r--r--lang/erlang-runtime17/files/patch-Makefile.in23
-rw-r--r--lang/erlang-runtime17/files/patch-erts_etc_common_erlc.c13
-rw-r--r--lang/erlang-runtime17/files/patch-erts_etc_unix_run__erl.c15
-rw-r--r--lang/erlang-runtime17/files/patch-lib_erl__interface_src_connect_ei__resolve.c15
-rw-r--r--lang/erlang-runtime17/files/patch-lib_stdlib_src_calendar.erl29
-rw-r--r--lang/erlang-runtime17/files/pkg-message.in6
-rw-r--r--lang/erlang-runtime17/pkg-descr10
-rw-r--r--lang/erlang-runtime17/pkg-plist4
12 files changed, 353 insertions, 0 deletions
diff --git a/lang/Makefile b/lang/Makefile
index f895d8283a05..0034dfe567f8 100644
--- a/lang/Makefile
+++ b/lang/Makefile
@@ -61,6 +61,7 @@
SUBDIR += erlang
SUBDIR += erlang-runtime15
SUBDIR += erlang-runtime16
+ SUBDIR += erlang-runtime17
SUBDIR += execline
SUBDIR += expect
SUBDIR += ezm3
diff --git a/lang/erlang-runtime17/Makefile b/lang/erlang-runtime17/Makefile
new file mode 100644
index 000000000000..82f45fb0d6b8
--- /dev/null
+++ b/lang/erlang-runtime17/Makefile
@@ -0,0 +1,206 @@
+# Created by: ruslan@shevchenko.kiev.ua
+# $FreeBSD$
+
+PORTNAME= erlang
+PORTVERSION= 17.0
+CATEGORIES= lang parallel java
+MASTER_SITES= http://www.erlang.org/download/:erlangorg \
+ http://erlang.stacken.kth.se/download/:erlangorg \
+ http://www.csd.uu.se/ftp/mirror/erlang/download/:erlangorg
+PKGNAMESUFFIX= -runtime17
+DISTNAME= otp_src_${ERL_RELEASE}
+DISTFILES= ${DISTNAME}${EXTRACT_SUFX}:erlangorg \
+ ${ERLANG_MAN}:erlangorg
+DIST_SUBDIR= erlang
+EXTRACT_ONLY= ${DISTNAME}${EXTRACT_SUFX}
+
+PATCH_SITES= http://www.erlang.org/download
+
+MAINTAINER= olgeni@FreeBSD.org
+COMMENT= A functional programming language from Ericsson
+
+WRKSRC= ${WRKDIR}/otp_src_${ERL_RELEASE}
+
+ERLANG_LIB= ${PORTNAME}${PORTVERSION:C/\..*//}
+
+SUB_FILES= pkg-message
+SUB_LIST= ERLANG_LIB=${ERLANG_LIB}
+PLIST_SUB= ERLANG_LIB=${ERLANG_LIB}
+
+MAKE_JOBS_UNSAFE=yes
+
+OPTIONS_DEFINE= GCC DOCS GS HIPE JAVA KQUEUE ODBC OPENSSL SCTP SMP THREADS WX DTRACE
+OPTIONS_SINGLE= ODBC
+OPTIONS_SINGLE_ODBC= IODBC UNIXODBC
+
+GCC_DESC= Use current GCC
+HIPE_DESC= Build native HiPE compiler
+KQUEUE_DESC= Enable Kernel Poll (kqueue) support
+SCTP_DESC= Enable SCTP support
+SMP_DESC= Enable SMP support
+WX_DESC= Enable WX application
+GS_DESC= Enable GS application (deprecated)
+DTRACE_DESC= Enable DTrace support (experimental)
+
+OPTIONS_DEFAULT=SMP OPENSSL THREADS SCTP KQUEUE
+
+ERL_RELEASE= ${PORTVERSION}
+
+USES= gmake perl5
+USE_AUTOTOOLS= autoconf:env
+GNU_CONFIGURE= yes
+LDFLAGS+= -L${LOCALBASE}/lib
+
+.include <bsd.port.options.mk>
+
+.if ${PORT_OPTIONS:MDOCS}
+DISTFILES+= ${ERLANG_DOCS}:erlangorg
+.endif
+
+# See http://wiki.freebsd.org/DTrace to learn how to enable DTrace
+# on your system. You will need to configure STRIP, WITH_CTF and
+# CFLAGS in your make.conf before building.
+
+# If you run Erlang and get a message resembling "WARNING: number of
+# probes fixed does not match the number of defined probes (54 != 132,
+# respectively)" you probably misconfigured DTrace in some way.
+
+.if ${ARCH} == "amd64" && ${PORT_OPTIONS:MDTRACE} && ! ${PORT_OPTIONS:MGCC}
+IGNORE= DTRACE support on amd64 requires GCC option
+.endif
+
+.if ${PORT_OPTIONS:MGCC}
+USE_GCC?= yes
+.endif
+
+.if ${PORT_OPTIONS:MDTRACE}
+CONFIGURE_ARGS+=--with-dynamic-trace=dtrace
+.else
+CONFIGURE_ARGS+=--without-dynamic-trace
+.endif
+
+.if ${PORT_OPTIONS:MOPENSSL}
+USE_OPENSSL= yes
+CONFIGURE_ARGS+=--with-ssl=${OPENSSLBASE}
+.else
+CONFIGURE_ARGS+=--without-ssl
+.endif
+
+.if ${PORT_OPTIONS:MJAVA}
+USE_JAVA= yes
+CONFIGURE_ARGS+=--with-javac
+CONFIGURE_ENV+= ac_cv_prog_JAVAC="${JAVAC}"
+.else
+CONFIGURE_ARGS+=--without-javac
+.endif
+
+.if ${PORT_OPTIONS:MHIPE}
+CONFIGURE_ARGS+=--enable-hipe
+.else
+CONFIGURE_ARGS+=--disable-hipe
+.endif
+
+.if ${PORT_OPTIONS:MKQUEUE}
+CONFIGURE_ARGS+=--enable-kernel-poll
+.else
+CONFIGURE_ARGS+=--disable-kernel-poll
+.endif
+
+.if ${PORT_OPTIONS:MGS}
+USES+= tk:run
+.endif
+
+.if ${PORT_OPTIONS:MWX}
+USE_WX= 2.8+
+WX_COMPS= wx contrib
+WX_UNICODE= yes
+CONFIGURE_ARGS+=--with-wx-config=${WX_CONFIG}
+.endif
+
+.if ${PORT_OPTIONS:MODBC}
+CONFIGURE_ARGS+=--with-odbc
+.if ${PORT_OPTIONS:MUNIXODBC}
+LIB_DEPENDS+= odbc:${PORTSDIR}/databases/unixODBC
+.elif ${PORT_OPTIONS:MIODBC}
+LIB_DEPENDS+= iodbc:${PORTSDIR}/databases/libiodbc
+.endif
+.else
+CONFIGURE_ARGS+=--without-odbc
+.endif
+
+ERLANG_MAN= otp_doc_man_${ERL_RELEASE}.tar.gz
+ERLANG_DOCS= otp_doc_html_${ERL_RELEASE}.tar.gz
+ERLANG_PLIST= ${WRKDIR}/pkg-plist
+
+.if ${PORT_OPTIONS:MTHREADS}
+CONFIGURE_ARGS+=--enable-threads
+.else
+CONFIGURE_ARGS+=--disable-threads
+.endif
+
+.if ${PORT_OPTIONS:MSCTP}
+CONFIGURE_ARGS+=--enable-sctp
+.else
+CONFIGURE_ARGS+=--disable-sctp
+.endif
+
+# enabling --enable-smp-support crashes the OS when
+# net_kernel:start([node_name, shortnames]) invoked repeatedly
+# TODO verify if it still applies
+
+.if ${PORT_OPTIONS:MSMP}
+CONFIGURE_ARGS+=--enable-smp-support
+.else
+CONFIGURE_ARGS+=--disable-smp-support
+.endif
+
+.if ${ARCH} == i386
+MAKE_ARGS+= ARCH=x86
+.endif
+
+# The man-pages are put (in spite of FreeBSD's port convention) in a private
+# subdir. This is to avoid cluttering up the man page name space. Also the
+# Erlang man pages are more of internal documentation using the man format than
+# actual system man pages. (erl.1 and epmd.1 perhaps being the exception).
+
+# Install documentation. (HTML docs need to be in same dir as the
+# rest, not in share/doc/erlang as it should, because of relative
+# links in the documentation.
+
+post-install:
+ for SECTION in 1 3 4 6 7; do \
+ ${TAR} --unlink -xzpf ${DISTDIR}/${DIST_SUBDIR}/${ERLANG_MAN} \
+ -C ${STAGEDIR}${PREFIX}/lib/${ERLANG_LIB} \
+ "man/man$${SECTION}/*.$${SECTION}" || ${TRUE}; \
+ done
+ @${RM} -rf ${STAGEDIR}${PREFIX}/lib/${ERLANG_LIB}/man/cat?
+
+.if ${PORT_OPTIONS:MDOCS}
+ @${TAR} --unlink -xzpf ${DISTDIR}/${DIST_SUBDIR}/${ERLANG_DOCS} \
+ -C ${STAGEDIR}${PREFIX}/lib/${ERLANG_LIB}
+ @${INSTALL_DATA} ${WRKSRC}/lib/dialyzer/doc/*.txt \
+ ${STAGEDIR}${PREFIX}/lib/${ERLANG_LIB}/lib/dialyzer-*/doc/
+.endif
+
+ @cd ${STAGEDIR}${PREFIX}; ${FIND} lib/${ERLANG_LIB}/* -type d -empty \
+ | ${SORT} \
+ | ${SED} -e 's#^#@exec ${MKDIR} %D/#g' \
+ > ${ERLANG_PLIST}
+
+ @cd ${STAGEDIR}${PREFIX}; ${FIND} lib/${ERLANG_LIB}/* -type f -o -type l \
+ | ${SORT} \
+ >> ${ERLANG_PLIST}
+
+ @cd ${STAGEDIR}${PREFIX}; ${FIND} lib/${ERLANG_LIB}/* -type d \
+ | ${SORT} -r \
+ | ${SED} -e 's/^/@dirrm /g' \
+ >> ${ERLANG_PLIST}
+
+ @${ECHO_CMD} "r ${TMPPLIST}" > ${WRKDIR}/ex.script
+ @${ECHO_CMD} "/Insert PLIST here" >> ${WRKDIR}/ex.script
+ @${ECHO_CMD} "d" >> ${WRKDIR}/ex.script
+ @${ECHO_CMD} "r ${ERLANG_PLIST}" >> ${WRKDIR}/ex.script
+ @${ECHO_CMD} "x!" >> ${WRKDIR}/ex.script
+ @cd ${WRKDIR}; ex < ex.script
+
+.include <bsd.port.mk>
diff --git a/lang/erlang-runtime17/distinfo b/lang/erlang-runtime17/distinfo
new file mode 100644
index 000000000000..094f40a87a03
--- /dev/null
+++ b/lang/erlang-runtime17/distinfo
@@ -0,0 +1,6 @@
+SHA256 (erlang/otp_src_17.0.tar.gz) = 361cae4466b4b3ef8d8762b3a8ebe278e0c7ba0c34cb281402988754183e2ba6
+SIZE (erlang/otp_src_17.0.tar.gz) = 66633305
+SHA256 (erlang/otp_doc_man_17.0.tar.gz) = acf72b5876c6f505191a3fb57b7e672733f911141929c4cef050111cf8f8b399
+SIZE (erlang/otp_doc_man_17.0.tar.gz) = 1353215
+SHA256 (erlang/otp_doc_html_17.0.tar.gz) = 4a9edba2e5b8ca2e35e5080c1c30a2674aafa39b51d7268383b6e326d397f8dd
+SIZE (erlang/otp_doc_html_17.0.tar.gz) = 33168721
diff --git a/lang/erlang-runtime17/files/epmd.in b/lang/erlang-runtime17/files/epmd.in
new file mode 100644
index 000000000000..acf9c58443bd
--- /dev/null
+++ b/lang/erlang-runtime17/files/epmd.in
@@ -0,0 +1,25 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+# PROVIDE: epmd
+# REQUIRE: LOGIN
+#
+# Add the following line to /etc/rc.conf to enable epmd:
+#
+# epmd_enable="YES"
+#
+
+epmd_enable=${epmd_enable:-"NO"}
+
+. /etc/rc.subr
+
+name=epmd
+rcvar=epmd_enable
+
+procname=%%PREFIX%%/bin/epmd
+start_cmd="%%PREFIX%%/bin/epmd -daemon"
+stop_cmd="%%PREFIX%%/bin/epmd -kill >/dev/null"
+
+load_rc_config ${name}
+run_rc_command "$1"
diff --git a/lang/erlang-runtime17/files/patch-Makefile.in b/lang/erlang-runtime17/files/patch-Makefile.in
new file mode 100644
index 000000000000..05893c303e13
--- /dev/null
+++ b/lang/erlang-runtime17/files/patch-Makefile.in
@@ -0,0 +1,23 @@
+
+$FreeBSD$
+
+--- Makefile.in.orig
++++ Makefile.in
+@@ -59,7 +59,7 @@
+ libdir = @libdir@
+
+ # Where Erlang/OTP is located
+-libdir_suffix = /erlang
++libdir_suffix = /erlang17
+ erlang_libdir = $(libdir)$(libdir_suffix)
+ erlang_bindir = $(erlang_libdir)/bin
+
+@@ -1007,7 +1007,7 @@
+ #
+ # Order is important here, don't change it!
+ #
+-INST_DEP += install.dirs install.emulator install.libs install.Install install.otp_version install.bin
++INST_DEP += install.dirs install.emulator install.libs install.Install install.otp_version
+
+ install: $(INST_DEP)
+
diff --git a/lang/erlang-runtime17/files/patch-erts_etc_common_erlc.c b/lang/erlang-runtime17/files/patch-erts_etc_common_erlc.c
new file mode 100644
index 000000000000..ae65f91225ca
--- /dev/null
+++ b/lang/erlang-runtime17/files/patch-erts_etc_common_erlc.c
@@ -0,0 +1,13 @@
+
+$FreeBSD$
+
+--- erts/etc/common/erlc.c.orig
++++ erts/etc/common/erlc.c
+@@ -186,6 +186,7 @@
+ */
+
+ PUSH("-noinput");
++ PUSH2("-smp", "disable");
+ PUSH2("-mode", "minimal");
+ PUSH2("-boot", "start_clean");
+ PUSH3("-s", "erl_compile", "compile_cmdline");
diff --git a/lang/erlang-runtime17/files/patch-erts_etc_unix_run__erl.c b/lang/erlang-runtime17/files/patch-erts_etc_unix_run__erl.c
new file mode 100644
index 000000000000..451b3c3e66fe
--- /dev/null
+++ b/lang/erlang-runtime17/files/patch-erts_etc_unix_run__erl.c
@@ -0,0 +1,15 @@
+
+$FreeBSD$
+
+--- erts/etc/unix/run_erl.c.orig
++++ erts/etc/unix/run_erl.c
+@@ -69,9 +69,6 @@
+ #ifdef HAVE_UTMP_H
+ # include <utmp.h>
+ #endif
+-#ifdef HAVE_UTIL_H
+-# include <util.h>
+-#endif
+ #ifdef HAVE_SYS_IOCTL_H
+ # include <sys/ioctl.h>
+ #endif
diff --git a/lang/erlang-runtime17/files/patch-lib_erl__interface_src_connect_ei__resolve.c b/lang/erlang-runtime17/files/patch-lib_erl__interface_src_connect_ei__resolve.c
new file mode 100644
index 000000000000..d8454c710f69
--- /dev/null
+++ b/lang/erlang-runtime17/files/patch-lib_erl__interface_src_connect_ei__resolve.c
@@ -0,0 +1,15 @@
+
+$FreeBSD$
+
+--- lib/erl_interface/src/connect/ei_resolve.c.orig
++++ lib/erl_interface/src/connect/ei_resolve.c
+@@ -621,7 +621,8 @@
+
+ return result;
+ #else
+- return gethostbyname_r(name,hostp,buffer,buflen,h_errnop);
++ struct hostent *dummy;
++ return gethostbyname_r(name,hostp,buffer,buflen,&dummy,h_errnop);
+ #endif
+ #endif
+ #endif
diff --git a/lang/erlang-runtime17/files/patch-lib_stdlib_src_calendar.erl b/lang/erlang-runtime17/files/patch-lib_stdlib_src_calendar.erl
new file mode 100644
index 000000000000..1ab956512316
--- /dev/null
+++ b/lang/erlang-runtime17/files/patch-lib_stdlib_src_calendar.erl
@@ -0,0 +1,29 @@
+
+$FreeBSD$
+
+--- lib/stdlib/src/calendar.erl.orig
++++ lib/stdlib/src/calendar.erl
+@@ -215,11 +215,19 @@
+
+ -spec local_time_to_universal_time_dst(t_datetime1970()) -> [t_datetime1970()].
+ local_time_to_universal_time_dst(DateTime) ->
+- UtDst = erlang:localtime_to_universaltime(DateTime, true),
+- Ut = erlang:localtime_to_universaltime(DateTime, false),
+ %% Reverse check the universal times
+- LtDst = erlang:universaltime_to_localtime(UtDst),
+- Lt = erlang:universaltime_to_localtime(Ut),
++ {UtDst, LtDst} =
++ try
++ UtDst0 = erlang:localtime_to_universaltime(DateTime, true),
++ {UtDst0, erlang:universaltime_to_localtime(UtDst0)}
++ catch error:badarg -> {error, error}
++ end,
++ {Ut, Lt} =
++ try
++ Ut0 = erlang:localtime_to_universaltime(DateTime, false),
++ {Ut0, erlang:universaltime_to_localtime(Ut0)}
++ catch error:badarg -> {error, error}
++ end,
+ %% Return the valid universal times
+ case {LtDst,Lt} of
+ {DateTime,DateTime} when UtDst =/= Ut ->
diff --git a/lang/erlang-runtime17/files/pkg-message.in b/lang/erlang-runtime17/files/pkg-message.in
new file mode 100644
index 000000000000..fe91d05701d4
--- /dev/null
+++ b/lang/erlang-runtime17/files/pkg-message.in
@@ -0,0 +1,6 @@
+===========================================================================
+
+To use this runtime port for development or testing, just prepend
+its binary path ("%%LOCALBASE%%/lib/%%ERLANG_LIB%%/bin") to your PATH variable.
+
+===========================================================================
diff --git a/lang/erlang-runtime17/pkg-descr b/lang/erlang-runtime17/pkg-descr
new file mode 100644
index 000000000000..abcc9d8753b1
--- /dev/null
+++ b/lang/erlang-runtime17/pkg-descr
@@ -0,0 +1,10 @@
+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.
+
+This port contains a standalone runtime environment of Erlang R16
+to be used during the development of OTP applications.
+
+WWW: http://www.erlang.org/
diff --git a/lang/erlang-runtime17/pkg-plist b/lang/erlang-runtime17/pkg-plist
new file mode 100644
index 000000000000..c9aaa67c5538
--- /dev/null
+++ b/lang/erlang-runtime17/pkg-plist
@@ -0,0 +1,4 @@
+@comment Insert PLIST here
+@comment -=[ begin PLIST.lib-erlang ]=-
+@comment -=[ end PLIST.lib-erlang ]=-
+@dirrmtry lib/%%ERLANG_LIB%%