Add lang/erlang-runtime19, Erlang runtime for version 19.

This commit is contained in:
Jimmy Olgeni 2016-08-08 08:07:15 +00:00
parent 5e9abe473c
commit 4122188df7
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=419799
11 changed files with 382 additions and 0 deletions

View File

@ -66,6 +66,7 @@
SUBDIR += erlang-runtime16
SUBDIR += erlang-runtime17
SUBDIR += erlang-runtime18
SUBDIR += erlang-runtime19
SUBDIR += erlang-wx
SUBDIR += execline
SUBDIR += expect

View File

@ -0,0 +1,262 @@
# Created by: ruslan@shevchenko.kiev.ua
# $FreeBSD$
PORTNAME= erlang
PORTVERSION= 19.0.2
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= -runtime19
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= patch-otp-19.0.1 patch-otp-19.0.2
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
DIRTY_DESC= Enable Dirty schedulers (experimental)
DTRACE_DESC= Enable DTrace support
GS_DESC= Enable GS application (deprecated)
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
OPTIONS_DEFAULT=HIPE KQUEUE OPENSSL SCTP SMP THREADS
OPTIONS_EXCLUDE_DragonFly= HIPE SCTP
ERL_RELEASE= 19.0
USES= gmake ncurses 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
# 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= support for DTrace 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
CFLAGS+= -fno-omit-frame-pointer
STRIP=
.else
CONFIGURE_ARGS+=--without-dynamic-trace
.endif
.if ${PORT_OPTIONS:MOPENSSL}
USES+= ssl
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: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-configure:
.if ${PORT_OPTIONS:MODBC}
${RM} ${WRKSRC}/lib/odbc/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}
${MV} ${STAGEDIR}${PREFIX}/lib/${ERLANG_LIB}/erts-8.0/* \
${STAGEDIR}${PREFIX}/lib/${ERLANG_LIB}/erts-8.0.2
${RMDIR} ${STAGEDIR}${PREFIX}/lib/${ERLANG_LIB}/erts-8.0
${MV} ${STAGEDIR}${PREFIX}/lib/${ERLANG_LIB}/lib/compiler-7.0/* \
${STAGEDIR}${PREFIX}/lib/${ERLANG_LIB}/lib/compiler-7.0.1
${RMDIR} ${STAGEDIR}${PREFIX}/lib/${ERLANG_LIB}/lib/compiler-7.0
${MV} ${STAGEDIR}${PREFIX}/lib/${ERLANG_LIB}/lib/dialyzer-3.0/* \
${STAGEDIR}${PREFIX}/lib/${ERLANG_LIB}/lib/dialyzer-3.0.1
${RMDIR} ${STAGEDIR}${PREFIX}/lib/${ERLANG_LIB}/lib/dialyzer-3.0
${MV} ${STAGEDIR}${PREFIX}/lib/${ERLANG_LIB}/lib/inets-6.3/* \
${STAGEDIR}${PREFIX}/lib/${ERLANG_LIB}/lib/inets-6.3.1
${RMDIR} ${STAGEDIR}${PREFIX}/lib/${ERLANG_LIB}/lib/inets-6.3
${MV} ${STAGEDIR}${PREFIX}/lib/${ERLANG_LIB}/lib/observer-2.2/* \
${STAGEDIR}${PREFIX}/lib/${ERLANG_LIB}/lib/observer-2.2.1
${RMDIR} ${STAGEDIR}${PREFIX}/lib/${ERLANG_LIB}/lib/observer-2.2
${MV} ${STAGEDIR}${PREFIX}/lib/${ERLANG_LIB}/lib/ssh-4.3/* \
${STAGEDIR}${PREFIX}/lib/${ERLANG_LIB}/lib/ssh-4.3.1
${RMDIR} ${STAGEDIR}${PREFIX}/lib/${ERLANG_LIB}/lib/ssh-4.3
${MV} ${STAGEDIR}${PREFIX}/lib/${ERLANG_LIB}/lib/stdlib-3.0/* \
${STAGEDIR}${PREFIX}/lib/${ERLANG_LIB}/lib/stdlib-3.0.1
${RMDIR} ${STAGEDIR}${PREFIX}/lib/${ERLANG_LIB}/lib/stdlib-3.0
${MV} ${STAGEDIR}${PREFIX}/lib/${ERLANG_LIB}/lib/tools-2.8.4/* \
${STAGEDIR}${PREFIX}/lib/${ERLANG_LIB}/lib/tools-2.8.5
${RMDIR} ${STAGEDIR}${PREFIX}/lib/${ERLANG_LIB}/lib/tools-2.8.4
${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
${FIND} ${STAGEDIR}${PREFIX}/lib/${ERLANG_LIB}/* -type d -empty -delete
@cd ${STAGEDIR}${PREFIX}; ${FIND} lib/${ERLANG_LIB}/* -type f -o -type l \
| ${SORT} \
>> ${TMPPLIST}
.include <bsd.port.mk>

View File

@ -0,0 +1,11 @@
TIMESTAMP = 1470572356
SHA256 (erlang/otp_src_19.0.tar.gz) = 3fdc27a2a826e7f3d9cda43302d27d98704d6b41ce29a8a5df747a161da53bb1
SIZE (erlang/otp_src_19.0.tar.gz) = 68022550
SHA256 (erlang/otp_doc_man_19.0.tar.gz) = c7a3d6d85a5a2b96d844297a3fa1bee448c3dd86237734688466249fd5a1401e
SIZE (erlang/otp_doc_man_19.0.tar.gz) = 1405918
SHA256 (erlang/otp_doc_html_19.0.tar.gz) = b6f7c4e964673333f6c3eea8530dd988b41339b8912ae293f6f1b429489159ff
SIZE (erlang/otp_doc_html_19.0.tar.gz) = 34550919
SHA256 (erlang/patch-otp-19.0.1) = e5090928dfbcd1f7064bc50cf4230ad9b21853a649a9c88fc38ed994f1099161
SIZE (erlang/patch-otp-19.0.1) = 46724
SHA256 (erlang/patch-otp-19.0.2) = dc1da716bef342d56ec68afaad240680926c68b9503b1ebfe239d6ddd4d49f49
SIZE (erlang/patch-otp-19.0.2) = 16791

View File

@ -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 = /erlang19
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)

View File

@ -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

View File

@ -0,0 +1,11 @@
--- lib/crypto/c_src/Makefile.in.orig 2016-03-14 20:11:15 UTC
+++ lib/crypto/c_src/Makefile.in
@@ -90,7 +90,7 @@ endif
DYNAMIC_CRYPTO_LIB=@SSL_DYNAMIC_ONLY@
ifeq ($(DYNAMIC_CRYPTO_LIB),yes)
-SSL_DED_LD_RUNTIME_LIBRARY_PATH = @SSL_DED_LD_RUNTIME_LIBRARY_PATH@
+SSL_DED_LD_RUNTIME_LIBRARY_PATH =
CRYPTO_LINK_LIB=$(SSL_DED_LD_RUNTIME_LIBRARY_PATH) -L$(SSL_LIBDIR) -l$(SSL_CRYPTO_LIBNAME)
EXTRA_FLAGS = -DHAVE_DYNAMIC_CRYPTO_LIB
else

View File

@ -0,0 +1,11 @@
--- lib/crypto/priv/Makefile.orig 2016-03-14 20:11:15 UTC
+++ lib/crypto/priv/Makefile
@@ -61,7 +61,7 @@ OBJS = $(OBJDIR)/crypto.o
# ----------------------------------------------------
$(SO_NIFLIB): $(OBJS)
- $(SO_LD) $(SO_LDFLAGS) -L$(SO_SSL_LIBDIR) -Wl,-R$(SO_SSL_LIBDIR) \
+ $(SO_LD) $(SO_LDFLAGS) -L$(SO_SSL_LIBDIR) \
-o $@ $^ -lcrypto
$(DLL_NIFLIB): $(OBJS)

View File

@ -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

View File

@ -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 ->

View File

@ -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.
===========================================================================

View File

@ -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 19
to be used during the development of OTP applications.
WWW: http://www.erlang.org/