mirror of
https://git.FreeBSD.org/ports.git
synced 2025-01-30 10:38:37 +00:00
Add lang/erlang-runtime17, an Erlang runtime for version 17.
This commit is contained in:
parent
800509ac8c
commit
03bbb043b2
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=350789
@ -61,6 +61,7 @@
|
||||
SUBDIR += erlang
|
||||
SUBDIR += erlang-runtime15
|
||||
SUBDIR += erlang-runtime16
|
||||
SUBDIR += erlang-runtime17
|
||||
SUBDIR += execline
|
||||
SUBDIR += expect
|
||||
SUBDIR += ezm3
|
||||
|
206
lang/erlang-runtime17/Makefile
Normal file
206
lang/erlang-runtime17/Makefile
Normal file
@ -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>
|
6
lang/erlang-runtime17/distinfo
Normal file
6
lang/erlang-runtime17/distinfo
Normal file
@ -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
|
25
lang/erlang-runtime17/files/epmd.in
Normal file
25
lang/erlang-runtime17/files/epmd.in
Normal file
@ -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"
|
23
lang/erlang-runtime17/files/patch-Makefile.in
Normal file
23
lang/erlang-runtime17/files/patch-Makefile.in
Normal file
@ -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)
|
||||
|
13
lang/erlang-runtime17/files/patch-erts_etc_common_erlc.c
Normal file
13
lang/erlang-runtime17/files/patch-erts_etc_common_erlc.c
Normal file
@ -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");
|
15
lang/erlang-runtime17/files/patch-erts_etc_unix_run__erl.c
Normal file
15
lang/erlang-runtime17/files/patch-erts_etc_unix_run__erl.c
Normal file
@ -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
|
@ -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
|
@ -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 ->
|
6
lang/erlang-runtime17/files/pkg-message.in
Normal file
6
lang/erlang-runtime17/files/pkg-message.in
Normal 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.
|
||||
|
||||
===========================================================================
|
10
lang/erlang-runtime17/pkg-descr
Normal file
10
lang/erlang-runtime17/pkg-descr
Normal 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 R16
|
||||
to be used during the development of OTP applications.
|
||||
|
||||
WWW: http://www.erlang.org/
|
4
lang/erlang-runtime17/pkg-plist
Normal file
4
lang/erlang-runtime17/pkg-plist
Normal file
@ -0,0 +1,4 @@
|
||||
@comment Insert PLIST here
|
||||
@comment -=[ begin PLIST.lib-erlang ]=-
|
||||
@comment -=[ end PLIST.lib-erlang ]=-
|
||||
@dirrmtry lib/%%ERLANG_LIB%%
|
Loading…
Reference in New Issue
Block a user