2013-01-31 00:42:11 +01:00
|
|
|
# Created by: ruslan@shevchenko.kiev.ua
|
1999-08-25 08:35:40 +02:00
|
|
|
# $FreeBSD$
|
1998-12-24 19:11:50 +01:00
|
|
|
|
2000-04-12 08:21:15 +02:00
|
|
|
PORTNAME= erlang
|
2012-12-07 22:49:46 +01:00
|
|
|
PORTVERSION= 15.b.03.1
|
2013-04-24 20:03:50 +02:00
|
|
|
PORTREVISION= 1
|
2013-01-10 15:42:50 +01:00
|
|
|
PORTEPOCH= 3
|
2007-12-23 22:57:50 +01:00
|
|
|
CATEGORIES= lang parallel java
|
2010-08-14 14:40:33 +02:00
|
|
|
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 \
|
|
|
|
http://www.erlang.se/doc/:erlangse \
|
|
|
|
http://www.erlang.se/publications/:publications \
|
|
|
|
http://www.sics.se/~joe/thesis/:joe \
|
2010-09-29 12:57:54 +02:00
|
|
|
${MASTER_SITE_LOCAL:S/$/:local/:S,%SUBDIR%/,olgeni/,}
|
2012-08-18 12:18:27 +02:00
|
|
|
DISTNAME= otp_src_${ERL_RELEASE}
|
2010-08-14 14:40:33 +02:00
|
|
|
DISTFILES= ${DISTNAME}${EXTRACT_SUFX}:erlangorg \
|
2013-04-24 20:03:50 +02:00
|
|
|
${ERLANG_MAN}:erlangorg
|
2004-02-29 17:52:37 +01:00
|
|
|
DIST_SUBDIR= erlang
|
2001-01-23 21:50:38 +01:00
|
|
|
EXTRACT_ONLY= ${DISTNAME}${EXTRACT_SUFX}
|
1998-12-24 19:11:50 +01:00
|
|
|
|
2012-07-01 18:00:59 +02:00
|
|
|
PATCH_SITES= http://www.erlang.org/download
|
2007-12-23 22:57:50 +01:00
|
|
|
|
2001-06-10 22:35:08 +02:00
|
|
|
MAINTAINER= olgeni@FreeBSD.org
|
2003-02-23 11:51:29 +01:00
|
|
|
COMMENT= A functional programming language from Ericsson
|
1999-12-31 21:34:37 +01:00
|
|
|
|
2012-12-07 22:49:46 +01:00
|
|
|
WRKSRC= ${WRKDIR}/otp_src_R15B03
|
|
|
|
|
2013-05-05 14:20:16 +02:00
|
|
|
ERLANG_LIB= ${PORTNAME}
|
|
|
|
|
2006-12-12 14:49:02 +01:00
|
|
|
SUB_FILES= pkg-message
|
2007-05-29 01:49:30 +02:00
|
|
|
SUB_LIST= TOOLS_VSN=${TOOLS_VSN}
|
2013-05-05 14:20:16 +02:00
|
|
|
PLIST_SUB= ERLANG_LIB=${ERLANG_LIB}
|
2006-12-12 14:49:02 +01:00
|
|
|
|
2012-07-20 20:35:12 +02:00
|
|
|
MAKE_JOBS_UNSAFE=yes
|
|
|
|
|
2012-09-10 21:09:48 +02:00
|
|
|
OPTIONS_DEFINE= GCC46 DOCS GS HIPE JAVA KQUEUE ODBC OPENSSL SCTP SMP THREADS WX DTRACE
|
2012-07-01 18:00:59 +02:00
|
|
|
OPTIONS_SINGLE= ODBC
|
|
|
|
OPTIONS_SINGLE_ODBC= IODBC UNIXODBC
|
|
|
|
|
2012-09-10 21:09:48 +02:00
|
|
|
GCC46_DESC= Use gcc 4.6
|
2012-07-01 18:00:59 +02:00
|
|
|
HIPE_DESC= Build native HiPE compiler
|
|
|
|
KQUEUE_DESC= Enable Kernel Poll (kqueue) support
|
|
|
|
SCTP_DESC= Enable SCTP support
|
|
|
|
SMP_DESC= Enable SMP support
|
2012-08-15 22:01:14 +02:00
|
|
|
WX_DESC= Enable WX application
|
|
|
|
GS_DESC= Enable GS application (deprecated)
|
2012-08-17 15:16:43 +02:00
|
|
|
DTRACE_DESC= Enable DTrace support (experimental)
|
2012-07-01 18:00:59 +02:00
|
|
|
|
2012-08-15 22:01:14 +02:00
|
|
|
OPTIONS_DEFAULT=SMP OPENSSL THREADS SCTP KQUEUE
|
2012-07-01 18:00:59 +02:00
|
|
|
|
2012-12-07 22:49:46 +01:00
|
|
|
ERL_RELEASE= R${PORTVERSION:S/.//g:U:S/1$/-1/}
|
2012-08-18 12:18:27 +02:00
|
|
|
|
2012-07-01 18:00:59 +02:00
|
|
|
.include <bsd.port.options.mk>
|
|
|
|
|
2013-04-24 14:48:08 +02:00
|
|
|
.if ${PORT_OPTIONS:MDOCS}
|
2013-04-24 20:03:50 +02:00
|
|
|
DISTFILES+= ${ERLANG_DOCS}:erlangorg \
|
|
|
|
${DOC_DISTFILES}
|
|
|
|
DOC_DISTFILES= armstrong_thesis_2003.pdf:joe \
|
2013-04-24 14:48:08 +02:00
|
|
|
bjarnelic.pdf:publications \
|
|
|
|
erlang-book-part1.pdf:erlangorg \
|
|
|
|
master_thesis_patterns.pdf:local \
|
|
|
|
mnesia_overview.pdf:publications \
|
|
|
|
programming_rules.pdf:erlangse
|
|
|
|
.endif
|
|
|
|
|
2012-08-17 15:16:43 +02:00
|
|
|
# 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.
|
|
|
|
|
2012-09-11 22:16:20 +02:00
|
|
|
.if ${ARCH} == "amd64" && ${PORT_OPTIONS:MDTRACE} && ! ${PORT_OPTIONS:MGCC46}
|
|
|
|
IGNORE= DTRACE support on amd64 requires GCC46 option
|
|
|
|
.endif
|
|
|
|
|
2012-09-10 21:09:48 +02:00
|
|
|
.if ${PORT_OPTIONS:MGCC46}
|
|
|
|
USE_GCC?= 4.6+
|
|
|
|
.endif
|
|
|
|
|
2012-08-17 15:16:43 +02:00
|
|
|
.if ${PORT_OPTIONS:MDTRACE}
|
|
|
|
CONFIGURE_ARGS+=--with-dynamic-trace=dtrace
|
|
|
|
.else
|
|
|
|
CONFIGURE_ARGS+=--without-dynamic-trace
|
|
|
|
.endif
|
|
|
|
|
2012-07-01 18:00:59 +02:00
|
|
|
.if ${PORT_OPTIONS:MOPENSSL}
|
2012-08-15 22:01:14 +02:00
|
|
|
USE_OPENSSL= yes
|
|
|
|
CONFIGURE_ARGS+=--with-ssl=${OPENSSLBASE}
|
2012-07-01 18:00:59 +02:00
|
|
|
.else
|
2012-08-15 22:01:14 +02:00
|
|
|
CONFIGURE_ARGS+=--without-ssl
|
2012-07-01 18:00:59 +02:00
|
|
|
.endif
|
2010-01-28 13:27:01 +01:00
|
|
|
|
2012-07-01 18:00:59 +02:00
|
|
|
.if ${PORT_OPTIONS:MJAVA}
|
2006-02-13 19:53:33 +01:00
|
|
|
USE_JAVA= yes
|
2012-08-15 22:01:14 +02:00
|
|
|
CONFIGURE_ARGS+=--with-javac
|
|
|
|
CONFIGURE_ENV+= ac_cv_prog_JAVAC="${JAVAC}"
|
2012-07-01 18:00:59 +02:00
|
|
|
.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
|
2006-02-05 00:52:18 +01:00
|
|
|
.endif
|
|
|
|
|
2012-08-15 22:01:14 +02:00
|
|
|
.if ${PORT_OPTIONS:MGS}
|
2007-04-03 00:56:15 +02:00
|
|
|
USE_TK_RUN= yes
|
2012-08-15 22:01:14 +02:00
|
|
|
.endif
|
|
|
|
|
2012-07-01 18:00:59 +02:00
|
|
|
.if ${PORT_OPTIONS:MWX}
|
2009-06-03 15:47:15 +02:00
|
|
|
USE_WX= 2.8+
|
|
|
|
WX_COMPS= wx contrib
|
|
|
|
WX_UNICODE= yes
|
2010-01-28 13:27:01 +01:00
|
|
|
CONFIGURE_ARGS+=--with-wx-config=${WX_CONFIG}
|
2009-06-03 15:47:15 +02:00
|
|
|
.endif
|
2006-02-05 00:52:18 +01:00
|
|
|
|
2007-09-08 19:14:55 +02:00
|
|
|
USE_GMAKE= yes
|
2012-07-01 18:00:59 +02:00
|
|
|
USE_CSTD= gnu89
|
2007-09-08 19:14:55 +02:00
|
|
|
USE_PERL5= yes
|
2012-08-06 01:19:36 +02:00
|
|
|
USE_RC_SUBR= epmd
|
2007-09-08 19:14:55 +02:00
|
|
|
GNU_CONFIGURE= yes
|
2010-09-30 14:40:48 +02:00
|
|
|
|
2012-07-01 18:00:59 +02:00
|
|
|
.if ${PORT_OPTIONS:MODBC}
|
|
|
|
CONFIGURE_ARGS+=--with-odbc
|
|
|
|
.if ${PORT_OPTIONS:MUNIXODBC}
|
2012-08-15 22:01:14 +02:00
|
|
|
LIB_DEPENDS+= odbc:${PORTSDIR}/databases/unixODBC
|
2012-07-01 18:00:59 +02:00
|
|
|
.elif ${PORT_OPTIONS:MIODBC}
|
2012-08-15 22:01:14 +02:00
|
|
|
LIB_DEPENDS+= iodbc:${PORTSDIR}/databases/libiodbc
|
2005-06-28 14:21:59 +02:00
|
|
|
.endif
|
2012-07-01 18:00:59 +02:00
|
|
|
.else
|
|
|
|
CONFIGURE_ARGS+=--without-odbc
|
2005-06-28 14:21:59 +02:00
|
|
|
.endif
|
|
|
|
|
2012-08-18 12:18:27 +02:00
|
|
|
ERLANG_MAN= otp_doc_man_${ERL_RELEASE}.tar.gz
|
|
|
|
ERLANG_DOCS= otp_doc_html_${ERL_RELEASE}.tar.gz
|
2006-02-05 00:52:18 +01:00
|
|
|
ERLANG_PLIST= ${WRKDIR}/pkg-plist
|
1998-12-24 19:11:50 +01:00
|
|
|
|
2012-07-01 18:00:59 +02:00
|
|
|
.if ${PORT_OPTIONS:MTHREADS}
|
|
|
|
CONFIGURE_ARGS+=--enable-threads
|
|
|
|
.else
|
|
|
|
CONFIGURE_ARGS+=--disable-threads
|
|
|
|
.endif
|
|
|
|
|
|
|
|
.if ${PORT_OPTIONS:MSCTP}
|
2012-08-15 22:01:14 +02:00
|
|
|
CONFIGURE_ARGS+=--enable-sctp
|
2012-07-01 18:00:59 +02:00
|
|
|
.else
|
2012-08-15 22:01:14 +02:00
|
|
|
CONFIGURE_ARGS+=--disable-sctp
|
2012-07-01 18:00:59 +02:00
|
|
|
.endif
|
|
|
|
|
2009-06-03 15:47:15 +02:00
|
|
|
# enabling --enable-smp-support crashes the OS when
|
|
|
|
# net_kernel:start([node_name, shortnames]) invoked repeatedly
|
2012-08-15 22:01:14 +02:00
|
|
|
# TODO verify if it still applies
|
2009-06-03 15:47:15 +02:00
|
|
|
|
2012-07-01 18:00:59 +02:00
|
|
|
.if ${PORT_OPTIONS:MSMP}
|
|
|
|
CONFIGURE_ARGS+=--enable-smp-support
|
2010-01-28 13:27:01 +01:00
|
|
|
.else
|
2012-07-01 18:00:59 +02:00
|
|
|
CONFIGURE_ARGS+=--disable-smp-support
|
2010-01-28 13:27:01 +01:00
|
|
|
.endif
|
2002-11-03 21:16:29 +01:00
|
|
|
|
2009-09-06 15:29:38 +02:00
|
|
|
.if ${ARCH} == i386
|
|
|
|
MAKE_ARGS+= ARCH=x86
|
|
|
|
.endif
|
|
|
|
|
2003-06-23 17:51:31 +02:00
|
|
|
# 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).
|
|
|
|
|
2009-12-29 11:25:55 +01:00
|
|
|
NO_MANCOMPRESS= yes
|
2003-06-23 17:51:31 +02:00
|
|
|
|
2013-05-05 14:20:16 +02:00
|
|
|
MAN1PREFIX= ${PREFIX}/lib/${ERLANG_LIB}
|
|
|
|
MAN3PREFIX= ${PREFIX}/lib/${ERLANG_LIB}
|
|
|
|
MAN4PREFIX= ${PREFIX}/lib/${ERLANG_LIB}
|
|
|
|
MAN6PREFIX= ${PREFIX}/lib/${ERLANG_LIB}
|
2003-06-23 17:51:31 +02:00
|
|
|
|
1999-12-31 21:34:37 +01:00
|
|
|
# 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:
|
2013-05-05 14:20:16 +02:00
|
|
|
@${LN} -sf ${PREFIX}/lib/${ERLANG_LIB}/lib/erl_interface-*/bin/erl_call ${PREFIX}/bin/erl_call
|
2009-11-27 14:21:58 +01:00
|
|
|
@for SECTION in 1 3 4 6; do \
|
|
|
|
${TAR} --unlink -xzpf ${DISTDIR}/${DIST_SUBDIR}/${ERLANG_MAN} \
|
2013-05-05 14:20:16 +02:00
|
|
|
-C ${PREFIX}/lib/${ERLANG_LIB} \
|
2009-11-27 14:21:58 +01:00
|
|
|
"man/man$${SECTION}/*.$${SECTION}" || ${TRUE}; \
|
|
|
|
done
|
2013-05-05 14:20:16 +02:00
|
|
|
@${RM} -rf ${PREFIX}/lib/${ERLANG_LIB}/man/cat?
|
2012-08-15 22:01:14 +02:00
|
|
|
.if ${PORT_OPTIONS:MDOCS}
|
2001-02-20 15:15:33 +01:00
|
|
|
@${TAR} --unlink -xzpf ${DISTDIR}/${DIST_SUBDIR}/${ERLANG_DOCS} \
|
2013-05-05 14:20:16 +02:00
|
|
|
-C ${PREFIX}/lib/${ERLANG_LIB}
|
2006-11-25 17:47:07 +01:00
|
|
|
@${INSTALL_DATA} ${WRKSRC}/lib/dialyzer/doc/*.txt \
|
2013-05-05 14:20:16 +02:00
|
|
|
${PREFIX}/lib/${ERLANG_LIB}/lib/dialyzer-*/doc/
|
2010-08-14 14:40:33 +02:00
|
|
|
|
2013-05-06 22:18:32 +02:00
|
|
|
@${MKDIR} ${DOCSDIR}
|
2013-05-07 06:55:44 +02:00
|
|
|
.for FILE in ${DOC_DISTFILES}
|
2013-01-31 13:49:24 +01:00
|
|
|
@${INSTALL_DATA} ${DISTDIR}/${DIST_SUBDIR}/$$(expr ${FILE} : '\([^:]*\)') ${DOCSDIR}
|
2010-08-14 14:40:33 +02:00
|
|
|
.endfor
|
1999-12-31 21:34:37 +01:00
|
|
|
.endif
|
2013-05-05 14:20:16 +02:00
|
|
|
@${CHOWN} -R ${SHAREOWN}:${SHAREGRP} ${PREFIX}/lib/${ERLANG_LIB}
|
|
|
|
@${CHMOD} -R o+rX-w,g+rX-w ${PREFIX}/lib/${ERLANG_LIB}
|
2002-11-13 11:38:23 +01:00
|
|
|
|
|
|
|
# All non-library files.
|
|
|
|
|
2013-05-05 14:20:16 +02:00
|
|
|
@cd ${PREFIX}; ${FIND} lib/${ERLANG_LIB}/* -type d -empty \
|
|
|
|
| ${GREP} -v "^lib/${ERLANG_LIB}/lib" \
|
2008-11-02 14:50:08 +01:00
|
|
|
| ${SORT} \
|
|
|
|
| ${SED} -e 's#^#@exec ${MKDIR} %D/#g' \
|
|
|
|
> ${ERLANG_PLIST}
|
|
|
|
|
2013-05-05 14:20:16 +02:00
|
|
|
@cd ${PREFIX}; ${FIND} lib/${ERLANG_LIB}/* -type f -o -type l \
|
|
|
|
| ${GREP} -v "^lib/${ERLANG_LIB}/man" \
|
|
|
|
| ${GREP} -v "^lib/${ERLANG_LIB}/lib" \
|
2004-01-22 12:06:02 +01:00
|
|
|
| ${SORT} \
|
2008-11-02 14:50:08 +01:00
|
|
|
>> ${ERLANG_PLIST}
|
2002-11-13 11:38:23 +01:00
|
|
|
|
|
|
|
# Stock OTP libraries.
|
|
|
|
|
2002-11-16 01:20:07 +01:00
|
|
|
@for LIBRARY in ${OTP_LIBS}; do \
|
2013-05-05 14:20:16 +02:00
|
|
|
cd ${PREFIX}; ${TEST} -d lib/${ERLANG_LIB}/lib/$${LIBRARY} \
|
|
|
|
&& ${FIND} lib/${ERLANG_LIB}/lib/$${LIBRARY} -type f -o -type l; \
|
2006-02-05 00:52:18 +01:00
|
|
|
done | ${SORT} >> ${ERLANG_PLIST}
|
2002-11-13 11:38:23 +01:00
|
|
|
|
|
|
|
# Stock OTP library directories.
|
|
|
|
|
2005-01-29 14:51:43 +01:00
|
|
|
@for LIBRARY in ${OTP_LIBS}; do \
|
2013-05-05 14:20:16 +02:00
|
|
|
cd ${PREFIX}; ${TEST} -d lib/${ERLANG_LIB}/lib/$${LIBRARY} \
|
|
|
|
&& ${FIND} lib/${ERLANG_LIB}/lib/$${LIBRARY} -type d -empty \
|
2010-01-03 15:41:32 +01:00
|
|
|
| ${SED} -e 's#^#@exec ${MKDIR} %D/#g'; \
|
2006-02-05 00:52:18 +01:00
|
|
|
done | ${SORT} >> ${ERLANG_PLIST}
|
2005-01-29 14:51:43 +01:00
|
|
|
|
2002-11-16 01:20:07 +01:00
|
|
|
@for LIBRARY in ${OTP_LIBS}; do \
|
2013-05-05 14:20:16 +02:00
|
|
|
cd ${PREFIX}; ${TEST} -d lib/${ERLANG_LIB}/lib/$${LIBRARY} \
|
|
|
|
&& ${FIND} lib/${ERLANG_LIB}/lib/$${LIBRARY} -type d \
|
2010-01-03 15:41:32 +01:00
|
|
|
| ${SED} -e 's/^/@dirrm /g'; \
|
2006-02-05 00:52:18 +01:00
|
|
|
done | ${SORT} -r >> ${ERLANG_PLIST}
|
2002-11-13 11:38:23 +01:00
|
|
|
|
|
|
|
# Other directories.
|
|
|
|
|
2013-05-05 14:20:16 +02:00
|
|
|
@cd ${PREFIX}; ${FIND} lib/${ERLANG_LIB}/* -type d | ${SORT} -r \
|
|
|
|
| ${GREP} -v "^lib/${ERLANG_LIB}/man" \
|
|
|
|
| ${GREP} -v "^lib/${ERLANG_LIB}/lib" \
|
2010-01-03 15:41:32 +01:00
|
|
|
| ${SED} -e 's/^/@dirrm /g' \
|
2006-02-05 00:52:18 +01:00
|
|
|
>> ${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
|
2010-08-14 14:38:26 +02:00
|
|
|
@cd ${WRKDIR}; ex < ex.script
|
2010-08-14 14:39:08 +02:00
|
|
|
@${CAT} ${PKGMESSAGE}
|
1999-12-31 21:34:37 +01:00
|
|
|
|
2009-09-06 15:34:11 +02:00
|
|
|
buildplt:
|
|
|
|
@${ECHO_CMD} =====================================================
|
|
|
|
@${ECHO_CMD} WARNING: building a full PLT may literally take hours
|
|
|
|
@${ECHO_CMD}
|
|
|
|
@${ECHO_CMD} You may wish to settle for the standard PLT built by
|
|
|
|
@${ECHO_CMD} dialyzer on the first run.
|
|
|
|
@${ECHO_CMD} =====================================================
|
2013-05-05 14:20:16 +02:00
|
|
|
@cd ${PREFIX}/lib/${ERLANG_LIB}/lib; ${PREFIX}/bin/dialyzer --verbose --build_plt --output_plt ${HOME}/.dialyzer_plt -c $$(find ${OTP_LIBS} -name ebin -maxdepth 1) || true
|
2009-09-06 15:34:11 +02:00
|
|
|
|
2002-11-13 11:38:23 +01:00
|
|
|
.include "Makefile.lib"
|
2002-11-02 19:40:49 +01:00
|
|
|
.include "Makefile.man"
|
2002-11-13 11:38:23 +01:00
|
|
|
|
2012-08-15 22:01:14 +02:00
|
|
|
.include <bsd.port.mk>
|