diff options
author | olgeni <olgeni@FreeBSD.org> | 2015-06-24 22:11:21 +0800 |
---|---|---|
committer | olgeni <olgeni@FreeBSD.org> | 2015-06-24 22:11:21 +0800 |
commit | 08ac65c9abbb5603968515a7073a14b0f2a7a898 (patch) | |
tree | d4c3135e937f020b67256b7db1ef0169969a1f25 /lang/erlang-runtime18 | |
parent | b2b0d3800065b58c66ec8e1423616724fd094ebd (diff) | |
download | freebsd-ports-gnome-08ac65c9abbb5603968515a7073a14b0f2a7a898.tar.gz freebsd-ports-gnome-08ac65c9abbb5603968515a7073a14b0f2a7a898.tar.zst freebsd-ports-gnome-08ac65c9abbb5603968515a7073a14b0f2a7a898.zip |
Add lang/erlang-runtime18, an Erlang runtime for version 18.
- Copied from lang/erlang-runtime17.
Diffstat (limited to 'lang/erlang-runtime18')
-rw-r--r-- | lang/erlang-runtime18/Makefile | 233 | ||||
-rw-r--r-- | lang/erlang-runtime18/distinfo | 6 | ||||
-rw-r--r-- | lang/erlang-runtime18/files/epmd.in | 25 | ||||
-rw-r--r-- | lang/erlang-runtime18/files/patch-Makefile.in | 20 | ||||
-rw-r--r-- | lang/erlang-runtime18/files/patch-erts_etc_unix_run__erl.c | 12 | ||||
-rw-r--r-- | lang/erlang-runtime18/files/patch-lib_erl__interface_src_connect_ei__resolve.c | 12 | ||||
-rw-r--r-- | lang/erlang-runtime18/files/patch-lib_stdlib_src_calendar.erl | 26 | ||||
-rw-r--r-- | lang/erlang-runtime18/files/pkg-message.in | 6 | ||||
-rw-r--r-- | lang/erlang-runtime18/pkg-descr | 10 |
9 files changed, 350 insertions, 0 deletions
diff --git a/lang/erlang-runtime18/Makefile b/lang/erlang-runtime18/Makefile new file mode 100644 index 000000000000..9a10ad9312b6 --- /dev/null +++ b/lang/erlang-runtime18/Makefile @@ -0,0 +1,233 @@ +# Created by: ruslan@shevchenko.kiev.ua +# $FreeBSD$ + +PORTNAME= erlang +PORTVERSION= 18.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= -runtime18 +DISTNAME= otp_src_${ERL_RELEASE} +DISTFILES= ${DISTNAME}${EXTRACT_SUFX}:erlangorg \ + ${ERLANG_MAN}:erlangorg +DIST_SUBDIR= erlang +EXTRACT_ONLY= ${DISTNAME}${EXTRACT_SUFX} + +PATCH_SITES= http://olgeni.olgeni.com/~olgeni/distfiles/ \ + LOCAL/olgeni +PATCHFILES= + +MAINTAINER= olgeni@FreeBSD.org +COMMENT= Functional programming language from Ericsson + +LICENSE= APACHE20 + +WRKSRC= ${WRKDIR}/otp_src_${ERL_RELEASE} + +ERLANG_LIB= ${PORTNAME}${PORTVERSION:C/\..*//} + +SUB_FILES= pkg-message +SUB_LIST= ERLANG_LIB=${ERLANG_LIB} + +MAKE_JOBS_UNSAFE=yes + +OPTIONS_DEFINE= DOCS DTRACE GCC GS HIPE JAVA KQUEUE ODBC OPENSSL SCTP SMP THREADS WX DIRTY + +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 +DIRTY_DESC= Enable Dirty schedulers (experimental) + +OPTIONS_DEFAULT=KQUEUE OPENSSL SCTP SMP THREADS +OPTIONS_EXCLUDE_DragonFly= SCTP + +ERL_RELEASE= 18.0 + +USES= autoreconf gmake perl5 +USES= gmake perl5 +USE_PERL5= build +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 ${OSVERSION} < 1000000 +.if ${ARCH} == "amd64" && ${PORT_OPTIONS:MDTRACE} && ! ${PORT_OPTIONS:MGCC} +IGNORE= DTRACE support on amd64 requires GCC option +.endif +.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 +LIB_DEPENDS+= libodbc.so:${PORTSDIR}/databases/unixODBC +.else +CONFIGURE_ARGS+=--without-odbc +.endif + +ERLANG_MAN= otp_doc_man_${ERL_RELEASE}.tar.gz +ERLANG_DOCS= otp_doc_html_${ERL_RELEASE}.tar.gz + +.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 ${PORT_OPTIONS:MDIRTY} +CONFIGURE_ARGS+=--enable-dirty-schedulers +.endif + +.if ${ARCH} == i386 +MAKE_ARGS+= ARCH=x86 +.endif + +.if ${ARCH} == armv6 +MAKE_ARGS+= ARCH=arm +.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. + +pre-configure: +.if ${PORT_OPTIONS:MDTRACE} + @if ! /sbin/kldstat | ${GREP} dtraceall >/dev/null 2>&1; then \ + ${ECHO_CMD}; \ + ${ECHO_CMD} "DTRACE option requires kernel module \"dtraceall\" to be loaded."; \ + ${ECHO_CMD}; \ + exit 1; \ + fi +.endif +.if ! ${PORT_OPTIONS:MWX} + echo "disabled by port options" > ${WRKSRC}/lib/wx/SKIP +.endif + +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 +.if ! ${PORT_OPTIONS:MGS} + ${RM} -r ${STAGEDIR}${PREFIX}/lib/erlang/lib/gs-* +.endif +.if ! ${PORT_OPTIONS:MJAVA} + ${RM} -r ${STAGEDIR}${PREFIX}/lib/erlang/lib/jinterface-* +.endif +.if ! ${PORT_OPTIONS:MODBC} + ${RM} -r ${STAGEDIR}${PREFIX}/lib/erlang/lib/odbc-* +.endif +.if ! ${PORT_OPTIONS:MOPENSSL} + ${RM} -r ${STAGEDIR}${PREFIX}/lib/erlang/lib/crypto-* + ${RM} -r ${STAGEDIR}${PREFIX}/lib/erlang/lib/ssh-* + ${RM} -r ${STAGEDIR}${PREFIX}/lib/erlang/lib/ssl-* +.endif +.if ! ${PORT_OPTIONS:MWX} + ${RM} -r ${STAGEDIR}${PREFIX}/lib/erlang/lib/wx-* +.endif + + @cd ${STAGEDIR}${PREFIX}; ${FIND} lib/${ERLANG_LIB}/* -type d -empty \ + | ${SORT} \ + | ${SED} -e 's#^#@dir #g' \ + > ${TMPPLIST} + + @cd ${STAGEDIR}${PREFIX}; ${FIND} lib/${ERLANG_LIB}/* -type f -o -type l \ + | ${SORT} \ + >> ${TMPPLIST} + +.include <bsd.port.mk> diff --git a/lang/erlang-runtime18/distinfo b/lang/erlang-runtime18/distinfo new file mode 100644 index 000000000000..c22078dfc196 --- /dev/null +++ b/lang/erlang-runtime18/distinfo @@ -0,0 +1,6 @@ +SHA256 (erlang/otp_src_18.0.tar.gz) = a0b69da34b4f218eb7d63d9e96fc120aa7257bb6c37a0f40fb388e188b4111aa +SIZE (erlang/otp_src_18.0.tar.gz) = 68124710 +SHA256 (erlang/otp_doc_man_18.0.tar.gz) = e44f0ec36ee0683867bc2aa9cc7fbb020d9dfd57338f37b98dcd0771f5b95673 +SIZE (erlang/otp_doc_man_18.0.tar.gz) = 1389178 +SHA256 (erlang/otp_doc_html_18.0.tar.gz) = e5a766f68406f5025f921ec32e8959937189ed1245e24b03a74156a8898b03b2 +SIZE (erlang/otp_doc_html_18.0.tar.gz) = 33857396 diff --git a/lang/erlang-runtime18/files/epmd.in b/lang/erlang-runtime18/files/epmd.in new file mode 100644 index 000000000000..acf9c58443bd --- /dev/null +++ b/lang/erlang-runtime18/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-runtime18/files/patch-Makefile.in b/lang/erlang-runtime18/files/patch-Makefile.in new file mode 100644 index 000000000000..e5cd983b6a7e --- /dev/null +++ b/lang/erlang-runtime18/files/patch-Makefile.in @@ -0,0 +1,20 @@ +--- Makefile.in.orig 2015-06-23 18:56:21 UTC ++++ Makefile.in +@@ -60,7 +60,7 @@ bindir = @bindir@ + libdir = @libdir@ + + # Where Erlang/OTP is located +-libdir_suffix = /erlang ++libdir_suffix = /erlang18 + erlang_libdir = $(libdir)$(libdir_suffix) + erlang_bindir = $(erlang_libdir)/bin + +@@ -1013,7 +1013,7 @@ $(TEST_DIRS): + # + # 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-runtime18/files/patch-erts_etc_unix_run__erl.c b/lang/erlang-runtime18/files/patch-erts_etc_unix_run__erl.c new file mode 100644 index 000000000000..b76c5127d2a8 --- /dev/null +++ b/lang/erlang-runtime18/files/patch-erts_etc_unix_run__erl.c @@ -0,0 +1,12 @@ +--- erts/etc/unix/run_erl.c.orig 2015-03-31 12:32:52 UTC ++++ erts/etc/unix/run_erl.c +@@ -73,9 +73,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-runtime18/files/patch-lib_erl__interface_src_connect_ei__resolve.c b/lang/erlang-runtime18/files/patch-lib_erl__interface_src_connect_ei__resolve.c new file mode 100644 index 000000000000..16046e8e4934 --- /dev/null +++ b/lang/erlang-runtime18/files/patch-lib_erl__interface_src_connect_ei__resolve.c @@ -0,0 +1,12 @@ +--- lib/erl_interface/src/connect/ei_resolve.c.orig 2015-03-31 12:32:52 UTC ++++ lib/erl_interface/src/connect/ei_resolve.c +@@ -649,7 +649,8 @@ struct hostent *ei_gethostbyname_r(const + + 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-runtime18/files/patch-lib_stdlib_src_calendar.erl b/lang/erlang-runtime18/files/patch-lib_stdlib_src_calendar.erl new file mode 100644 index 000000000000..34b753d85b27 --- /dev/null +++ b/lang/erlang-runtime18/files/patch-lib_stdlib_src_calendar.erl @@ -0,0 +1,26 @@ +--- lib/stdlib/src/calendar.erl.orig 2015-03-31 12:32:52 UTC ++++ lib/stdlib/src/calendar.erl +@@ -279,11 +279,19 @@ local_time_to_universal_time(DateTime, I + DateTime1 :: datetime1970(), + DateTime :: 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-runtime18/files/pkg-message.in b/lang/erlang-runtime18/files/pkg-message.in new file mode 100644 index 000000000000..fe91d05701d4 --- /dev/null +++ b/lang/erlang-runtime18/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-runtime18/pkg-descr b/lang/erlang-runtime18/pkg-descr new file mode 100644 index 000000000000..bfdcf2803343 --- /dev/null +++ b/lang/erlang-runtime18/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 R17 +to be used during the development of OTP applications. + +WWW: http://www.erlang.org/ |