1998-12-24 19:11:50 +01:00
|
|
|
# New ports collection makefile for: erlang
|
|
|
|
# Date created: 11 Dec 1998
|
|
|
|
# Whom: 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
|
2011-05-25 23:04:58 +02:00
|
|
|
PORTVERSION= r14b03
|
2006-12-12 11:57:59 +01:00
|
|
|
PORTEPOCH= 1
|
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/,}
|
2011-05-25 23:04:58 +02:00
|
|
|
DISTNAME= otp_src_R14B03
|
2010-08-14 14:40:33 +02:00
|
|
|
DISTFILES= ${DISTNAME}${EXTRACT_SUFX}:erlangorg \
|
|
|
|
${ERLANG_MAN}:erlangorg \
|
|
|
|
${ERLANG_DOCS}:erlangorg \
|
|
|
|
${DOC_DISTFILES}
|
|
|
|
DOC_DISTFILES= armstrong_thesis_2003.pdf:joe \
|
|
|
|
bjarnelic.pdf:publications \
|
|
|
|
erlang-book-part1.pdf:erlangorg \
|
|
|
|
master_thesis_patterns.pdf:local \
|
|
|
|
mnesia_overview.pdf:publications \
|
|
|
|
programming_rules.pdf:erlangse
|
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
|
|
|
|
2007-12-23 22:57:50 +01:00
|
|
|
PATCH_SITES= http://www.erlang.org/download/
|
|
|
|
|
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
|
|
|
|
2006-05-09 14:12:25 +02:00
|
|
|
CONFLICTS?= erlang-lite-r[0-9]*
|
|
|
|
|
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}
|
2006-12-12 14:49:02 +01:00
|
|
|
|
2010-08-14 14:38:26 +02:00
|
|
|
OPTIONS= JAVA "Enable Java applications" on \
|
|
|
|
X11 "Enable X11 support" on \
|
2010-12-15 14:52:59 +01:00
|
|
|
WX "Enable WX extensions" on \
|
2010-08-14 14:38:26 +02:00
|
|
|
ODBC "Enable ODBC" on \
|
|
|
|
SMP "Enable SMP" on
|
2010-01-28 13:27:01 +01:00
|
|
|
|
|
|
|
.include <bsd.port.pre.mk>
|
|
|
|
|
2006-02-05 00:52:18 +01:00
|
|
|
# The Java applications that are part of the Erlang distribution are
|
|
|
|
# not strictly necessary - it is included for completeness sake. A
|
|
|
|
# problem with the Erlang build procedure is that it only checks if
|
|
|
|
# javac is in the regular path - and then assumes that all of the jdk
|
|
|
|
# utilities is in the path as well. The only way to make sure that
|
|
|
|
# this is the case (that I could think of at least) was to make sure
|
|
|
|
# ${JAVA_HOME}/bin is added to the PATH, using the *_ENV macros.
|
|
|
|
|
|
|
|
.if !defined(WITHOUT_JAVA)
|
2006-02-13 19:53:33 +01:00
|
|
|
USE_JAVA= yes
|
|
|
|
JAVA_VERSION= 1.4+
|
2006-02-05 00:52:18 +01:00
|
|
|
# Make sure ${JAVA_HOME}/bin is in the path
|
2006-12-12 11:57:16 +01:00
|
|
|
CONFIGURE_ENV+= PATH=${PATH}:${JAVA_HOME}/bin
|
|
|
|
MAKE_ENV+= PATH=${PATH}:${JAVA_HOME}/bin
|
|
|
|
SCRIPT_ENV+= PATH=${PATH}:${JAVA_HOME}/bin
|
2006-02-05 00:52:18 +01:00
|
|
|
.endif
|
|
|
|
|
2004-02-29 17:52:37 +01:00
|
|
|
.if !defined(WITHOUT_X11)
|
2007-04-03 00:56:15 +02:00
|
|
|
USE_TK_RUN= yes
|
2009-06-03 15:47:15 +02:00
|
|
|
.if !defined(WITHOUT_WX)
|
|
|
|
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
|
|
|
.endif
|
|
|
|
|
2007-09-08 19:14:55 +02:00
|
|
|
USE_GMAKE= yes
|
|
|
|
USE_PERL5= yes
|
2008-06-06 01:50:18 +02:00
|
|
|
USE_RC_SUBR= epmd.sh
|
2007-09-08 19:14:55 +02:00
|
|
|
GNU_CONFIGURE= yes
|
2010-10-29 12:43:18 +02:00
|
|
|
ONLY_FOR_ARCHS= i386 amd64 sparc64 powerpc
|
2007-09-08 19:14:55 +02:00
|
|
|
REINPLACE_ARGS= -i
|
2009-06-11 18:32:24 +02:00
|
|
|
MAKE_JOBS_UNSAFE= yes
|
2007-09-08 19:14:55 +02:00
|
|
|
|
2010-09-30 14:40:48 +02:00
|
|
|
.if (${OSVERSION} < 700000)
|
|
|
|
USE_GCC= 4.2+
|
|
|
|
.endif
|
|
|
|
|
2005-06-28 14:21:59 +02:00
|
|
|
.if !defined(WITHOUT_ODBC)
|
2006-12-12 11:57:16 +01:00
|
|
|
DRIVER_MANAGER?= iodbc
|
2005-06-28 14:21:59 +02:00
|
|
|
.if ${DRIVER_MANAGER} == "unixodbc"
|
2006-12-12 11:57:16 +01:00
|
|
|
LIB_DEPENDS+= odbc.1:${PORTSDIR}/databases/unixODBC
|
2006-02-05 00:52:18 +01:00
|
|
|
.else # assume we're using iodbc
|
2006-12-12 11:57:16 +01:00
|
|
|
LIB_DEPENDS+= iodbc.3:${PORTSDIR}/databases/libiodbc
|
2005-06-28 14:21:59 +02:00
|
|
|
.endif
|
|
|
|
.endif
|
|
|
|
|
2011-05-25 23:04:58 +02:00
|
|
|
ERLANG_MAN= otp_doc_man_R14B03.tar.gz
|
2001-01-23 21:50:38 +01:00
|
|
|
.if !defined(NOPORTDOCS)
|
2011-05-25 23:04:58 +02:00
|
|
|
ERLANG_DOCS= otp_doc_html_R14B03.tar.gz
|
2001-01-23 21:50:38 +01:00
|
|
|
.endif
|
2006-02-05 00:52:18 +01:00
|
|
|
ERLANG_PLIST= ${WRKDIR}/pkg-plist
|
1998-12-24 19:11:50 +01:00
|
|
|
|
2009-06-03 15:47:15 +02:00
|
|
|
# enabling --enable-smp-support crashes the OS when
|
|
|
|
# net_kernel:start([node_name, shortnames]) invoked repeatedly
|
|
|
|
|
2010-01-28 13:27:01 +01:00
|
|
|
.if !defined(WITHOUT_SMP)
|
|
|
|
CONFIGURE_ARGS+=--enable-threads --enable-dynamic-ssl-lib --enable-sctp --enable-smp-support
|
|
|
|
.else
|
|
|
|
CONFIGURE_ARGS+=--enable-threads --enable-dynamic-ssl-lib --enable-sctp
|
|
|
|
.endif
|
2002-11-03 21:16:29 +01:00
|
|
|
|
2006-12-12 11:57:16 +01:00
|
|
|
CFLAGS+= -I${LOCALBASE}/include
|
|
|
|
LDFLAGS+= -L${LOCALBASE}/lib
|
2009-09-06 15:20:07 +02:00
|
|
|
CONFIGURE_ENV+= CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}"
|
2006-12-12 14:49:02 +01:00
|
|
|
PLIST_SUB+= ERTS_VSN=${ERTS_VSN} TOOLS_VSN=${TOOLS_VSN}
|
2001-01-23 21:50:38 +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
|
|
|
|
2007-08-04 13:41:30 +02:00
|
|
|
MAN1PREFIX= ${PREFIX}/lib/erlang
|
|
|
|
MAN3PREFIX= ${PREFIX}/lib/erlang
|
|
|
|
MAN4PREFIX= ${PREFIX}/lib/erlang
|
|
|
|
MAN6PREFIX= ${PREFIX}/lib/erlang
|
2003-06-23 17:51:31 +02:00
|
|
|
|
2001-02-20 15:15:33 +01:00
|
|
|
pre-configure:
|
2009-06-10 17:57:29 +02:00
|
|
|
@${REINPLACE_CMD} -e 's#%%CFLAGS%%#${CFLAGS}#g' ${WRKSRC}/lib/wx/configure
|
|
|
|
|
2006-02-05 00:52:18 +01:00
|
|
|
# Check if ${JAVAC} exists.
|
2001-02-20 15:15:33 +01:00
|
|
|
.if !defined(WITHOUT_JAVA)
|
2006-02-05 00:52:18 +01:00
|
|
|
@if [ ! -x ${JAVAC} ]; then \
|
|
|
|
${ECHO_MSG} ">> Error: cannot find ${JAVAC}."; \
|
2001-02-20 15:15:33 +01:00
|
|
|
exit 1; \
|
|
|
|
fi
|
|
|
|
.endif
|
|
|
|
|
2003-06-01 11:28:09 +02:00
|
|
|
# If X11 is not used, skip the gs application.
|
2002-03-31 12:23:43 +02:00
|
|
|
.if defined(WITHOUT_X11)
|
|
|
|
@${ECHO_CMD} "WITHOUT_X11 defined" > ${WRKSRC}/lib/gs/SKIP
|
|
|
|
.endif
|
|
|
|
|
2006-02-05 00:52:18 +01:00
|
|
|
# If ODBC is not used, skip the odbc application.
|
|
|
|
.if defined(WITHOUT_ODBC)
|
|
|
|
@${ECHO_CMD} "WITHOUT_ODBC defined" > ${WRKSRC}/lib/odbc/SKIP
|
|
|
|
.endif
|
|
|
|
|
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:
|
2010-08-14 15:15:03 +02:00
|
|
|
@${LN} -sf ${PREFIX}/lib/erlang/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} \
|
|
|
|
-C ${PREFIX}/lib/erlang \
|
|
|
|
"man/man$${SECTION}/*.$${SECTION}" || ${TRUE}; \
|
|
|
|
done
|
2002-03-31 12:23:43 +02:00
|
|
|
@${RM} -rf ${PREFIX}/lib/erlang/man/cat?
|
1999-12-31 21:34:37 +01:00
|
|
|
.if !defined(NOPORTDOCS)
|
2001-02-20 15:15:33 +01:00
|
|
|
@${TAR} --unlink -xzpf ${DISTDIR}/${DIST_SUBDIR}/${ERLANG_DOCS} \
|
2002-03-31 12:23:43 +02:00
|
|
|
-C ${PREFIX}/lib/erlang
|
2006-11-25 17:47:07 +01:00
|
|
|
@${INSTALL_DATA} ${WRKSRC}/lib/dialyzer/doc/*.txt \
|
2010-08-14 15:15:03 +02:00
|
|
|
${PREFIX}/lib/erlang/lib/dialyzer-*/doc/
|
2010-08-14 14:40:33 +02:00
|
|
|
|
|
|
|
@${MKDIR} ${PREFIX}/share/doc/erlang
|
|
|
|
.for FILE in ${DOC_DISTFILES}
|
|
|
|
@${INSTALL_DATA} ${DISTDIR}/${DIST_SUBDIR}/$$(expr ${FILE} : '\([^:]*\)') ${PREFIX}/share/doc/erlang
|
|
|
|
.endfor
|
1999-12-31 21:34:37 +01:00
|
|
|
.endif
|
2002-11-02 19:40:49 +01:00
|
|
|
@${CHOWN} -R ${SHAREOWN}:${SHAREGRP} ${PREFIX}/lib/erlang
|
2002-07-15 10:56:26 +02:00
|
|
|
@${CHMOD} -R o+rX-w,g+rX-w ${PREFIX}/lib/erlang
|
2002-11-13 11:38:23 +01:00
|
|
|
|
|
|
|
# All non-library files.
|
|
|
|
|
2010-08-14 14:38:26 +02:00
|
|
|
@cd ${PREFIX}; ${FIND} lib/erlang/* -type d -empty \
|
2008-11-02 14:50:08 +01:00
|
|
|
| ${GREP} -v "^lib/erlang/lib" \
|
|
|
|
| ${SORT} \
|
|
|
|
| ${SED} -e 's#^#@exec ${MKDIR} %D/#g' \
|
|
|
|
> ${ERLANG_PLIST}
|
|
|
|
|
2010-08-14 14:38:26 +02:00
|
|
|
@cd ${PREFIX}; ${FIND} lib/erlang/* -type f -o -type l \
|
2001-09-28 13:31:59 +02:00
|
|
|
| ${GREP} -v "^lib/erlang/man" \
|
2002-11-13 11:38:23 +01:00
|
|
|
| ${GREP} -v "^lib/erlang/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 \
|
2010-08-14 14:38:26 +02:00
|
|
|
cd ${PREFIX}; ${TEST} -d lib/erlang/lib/$${LIBRARY} \
|
2009-06-11 18:35:12 +02:00
|
|
|
&& ${FIND} lib/erlang/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 \
|
2010-08-14 14:38:26 +02:00
|
|
|
cd ${PREFIX}; ${TEST} -d lib/erlang/lib/$${LIBRARY} \
|
2009-06-11 18:35:12 +02:00
|
|
|
&& ${FIND} lib/erlang/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 \
|
2010-08-14 14:38:26 +02:00
|
|
|
cd ${PREFIX}; ${TEST} -d lib/erlang/lib/$${LIBRARY} \
|
2009-06-11 18:35:12 +02:00
|
|
|
&& ${FIND} lib/erlang/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.
|
|
|
|
|
2010-08-14 14:38:26 +02:00
|
|
|
@cd ${PREFIX}; ${FIND} lib/erlang/* -type d | ${SORT} -r \
|
2001-09-28 13:31:59 +02:00
|
|
|
| ${GREP} -v "^lib/erlang/man" \
|
2002-11-13 11:38:23 +01:00
|
|
|
| ${GREP} -v "^lib/erlang/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} =====================================================
|
2010-08-14 14:38:26 +02:00
|
|
|
@cd ${PREFIX}/lib/erlang/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
|
|
|
|
2003-06-23 17:51:31 +02:00
|
|
|
.include <bsd.port.post.mk>
|