aboutsummaryrefslogtreecommitdiff
path: root/devel/antlr
diff options
context:
space:
mode:
authorSam Lawrance <lawrance@FreeBSD.org>2006-05-03 13:06:32 +0000
committerSam Lawrance <lawrance@FreeBSD.org>2006-05-03 13:06:32 +0000
commit24da0384c0a2d158f4c2edbe3da81051ae184658 (patch)
tree3860a922c313ebcb86c2b2b5a66387fdbd0eaf31 /devel/antlr
parentde334b1326100f2e131a64825dc8696c45556398 (diff)
downloadports-24da0384c0a2d158f4c2edbe3da81051ae184658.tar.gz
ports-24da0384c0a2d158f4c2edbe3da81051ae184658.zip
Update to 2.7.6.
Add OPTIONS for Python support. Portlint cleanups. Submitter takes maintainership. PR: ports/93609 Submitted by: Rainer Alves <rainer.alves@gmail.com>
Notes
Notes: svn path=/head/; revision=161272
Diffstat (limited to 'devel/antlr')
-rw-r--r--devel/antlr/Makefile56
-rw-r--r--devel/antlr/distinfo6
-rw-r--r--devel/antlr/pkg-descr5
-rw-r--r--devel/antlr/pkg-plist9
4 files changed, 48 insertions, 28 deletions
diff --git a/devel/antlr/Makefile b/devel/antlr/Makefile
index 3ab84ccce1df..3524156cd04f 100644
--- a/devel/antlr/Makefile
+++ b/devel/antlr/Makefile
@@ -6,22 +6,24 @@
#
PORTNAME= antlr
-PORTVERSION= 2.7.5
+PORTVERSION= 2.7.6
CATEGORIES= devel java
MASTER_SITES= http://www.antlr.org/download/
-MAINTAINER= ports@FreeBSD.org
+MAINTAINER= rainer.alves@gmail.com
COMMENT= ANother Tool for Language Recognition
RUN_DEPENDS= java:${PORTSDIR}/java/javavmwrapper
-CONFLICTS= pccts*
+CONFLICTS= pccts-[0-9]*
USE_GCC= 3.2+
USE_GMAKE= yes
USE_JAVA= yes
JAVA_VERSION= 1.4+
+OPTIONS= PYTHON "Include Python runtime support" off
+
HAS_CONFIGURE= yes
CONFIGURE_ENV= JAVAC="${JAVAC}" JAR="${JAR}" JAVA="${JAVA}" CLASSPATH="${PORT_CLASSPATH}"
@@ -38,16 +40,31 @@ PORTDOCS= ANTLRException.gif closure.gif cpp-runtime.html \
stream.splitter.gif streams.html subrule.gif trees.html \
vocab.html
.endif
-PLIST_FILES= bin/antlr %%JAVAJARDIR%%/antlr.jar
.include <bsd.port.pre.mk>
+.if defined(WITH_PYTHON)
+USE_PYTHON= 2.2+
+# we need to manually include this, because USE_PYTHON is defined
+# after including bsd.port.pre.mk
+.include "${PORTSDIR}/Mk/bsd.python.mk"
+PORTDOCS+= python-runtime.html
+ANTLR_PYTHON= ${WRKSRC}/lib/python
+PLIST_SUB+= WITH_PYTHON=""
+.else
+PLIST_SUB+= WITH_PYTHON="@comment "
+.endif
+
post-extract:
- (cd ${WRKSRC} && ${CP} antlr-${PORTVERSION}.jar antlrall.jar)
- ${CHMOD} -R +w ${WRKSRC}
+ (cd ${WRKSRC} && ${CP} antlr.jar antlrall.jar)
post-configure:
- @${SED} "s|%%JAVAJARDIR%%|${JAVAJARDIR}| ; s|%%LOCALBASE%%|${LOCALBASE}| ; s|%%JAVA_VERSION%%|${JAVA_VERSION}|" ${FILESDIR}/antlr.sh >${WRKDIR}/antlr.sh
+ ${SED} -e 's|%%JAVAJARDIR%%|${JAVAJARDIR}|' \
+ -e 's|%%LOCALBASE%%|${LOCALBASE}|' \
+ -e 's|%%JAVA_VERSION%%|${JAVA_VERSION}|' ${FILESDIR}/antlr.sh > ${WRKDIR}/antlr.sh
+.if defined(WITH_PYTHON)
+ (cd ${ANTLR_PYTHON} && ${PYTHON_CMD} setup.py config)
+.endif
.if defined(WITH_BUILT_JAVA_LIB)
pre-build:
@@ -55,10 +72,16 @@ pre-build:
(cd ${WRKSRC} && ${JAVA} -classpath "${PORT_CLASSPATH}" antlr.build.Tool jar)
.endif
+.if defined(WITH_PYTHON)
+post-build:
+ (cd ${ANTLR_PYTHON} && ${PYTHON_CMD} setup.py build && \
+ ${PYTHON_CMD} ${PYTHON_LIBDIR}/compileall.py ${ANTLR_PYTHON})
+.endif
+
do-install:
@${ECHO_MSG} -n ">> Installing JAR as ${JAVAJARDIR}/${PORTNAME}.jar..."
@${MKDIR} ${JAVAJARDIR}
- @${INSTALL_DATA} ${WRKSRC}/antlr-${PORTVERSION}.jar ${JAVAJARDIR}/${PORTNAME}.jar
+ @${INSTALL_DATA} ${WRKSRC}/antlr.jar ${JAVAJARDIR}/${PORTNAME}.jar
@${ECHO_MSG} " [ DONE ]"
@${ECHO_MSG} -n ">> Installing antlr script as ${PREFIX}/bin/${PORTNAME}..."
@${INSTALL_SCRIPT} ${WRKDIR}/antlr.sh ${PREFIX}/bin/antlr
@@ -66,23 +89,16 @@ do-install:
@${ECHO_MSG} ">> Installing native files..."
@(cd ${WRKSRC}/lib/cpp && ${GMAKE} install)
@${ECHO_MSG} " [ DONE ]"
+.if defined(WITH_PYTHON)
+ @${ECHO_MSG} -n ">> Installing Python runtime files..."
+ @(cd ${ANTLR_PYTHON} && ${PYTHON_CMD} setup.py install)
+ @${ECHO_MSG} " [ DONE ]"
+.endif
.if !defined(NOPORTDOCS)
@${ECHO_MSG} -n ">> Installing documentation in ${DOCSDIR}..."
@${MKDIR} ${DOCSDIR}
@cd ${WRKSRC}/doc && ${INSTALL_DATA} ${PORTDOCS} ${DOCSDIR}/
@${ECHO_MSG} " [ DONE ]"
.endif
- @${ECHO_MSG} -n ">> Installing examples in ${EXAMPLESDIR}..."
- @${MKDIR} ${EXAMPLESDIR}
- @cd ${WRKSRC}/examples && ${FIND} ${EXAMPLES} \
- | ${CPIO} -pdmu -R ${SHAREOWN}:${SHAREGRP} ${EXAMPLESDIR} > /dev/null 2>&1
- @${ECHO_MSG} " [ DONE ]"
-
-post-install:
- @${FIND} -s ${EXAMPLES:S,^,${WRKSRC}/examples/,} -not -type d | \
- ${SED} -ne 's,^${WRKSRC}/examples,${EXAMPLESDIR:S,${PREFIX}/,,},p' >> ${TMPPLIST}
- @${FIND} -s -d ${EXAMPLES:S,^,${WRKSRC}/examples/,} -type d | \
- ${SED} -ne 's,^${WRKSRC}/examples,@dirrm ${EXAMPLESDIR:S,${PREFIX}/,,},p' >> ${TMPPLIST}
- @${ECHO} "@dirrm ${EXAMPLESDIR:S,${PREFIX}/,,}" >> ${TMPPLIST}
.include <bsd.port.post.mk>
diff --git a/devel/antlr/distinfo b/devel/antlr/distinfo
index 4cbd415b25f4..ae7a5584fdb7 100644
--- a/devel/antlr/distinfo
+++ b/devel/antlr/distinfo
@@ -1,3 +1,3 @@
-MD5 (antlr-2.7.5.tar.gz) = 1ef201f29283179c8e5ab618529cac78
-SHA256 (antlr-2.7.5.tar.gz) = 744d8f3a8206fbc45a5558d92163d5ef7e5e0cc0700283bb6a617fb1201629f9
-SIZE (antlr-2.7.5.tar.gz) = 1636304
+MD5 (antlr-2.7.6.tar.gz) = 17d8bf2e814f0a26631aadbbda8d7324
+SHA256 (antlr-2.7.6.tar.gz) = 574c179a8baeeac2e45576dd136342080313825fb333758384ec41df996f7205
+SIZE (antlr-2.7.6.tar.gz) = 1808870
diff --git a/devel/antlr/pkg-descr b/devel/antlr/pkg-descr
index 4ddd2ec773f8..59e8d74ad1c2 100644
--- a/devel/antlr/pkg-descr
+++ b/devel/antlr/pkg-descr
@@ -3,7 +3,4 @@ language tool that provides a framework for constructing recognizers,
compilers, and translators from grammatical descriptions containing
C++ or Java actions.
-WWW: http://www.antlr.org/
-
-- Geoffrey Mainland
-mainland@apeiron.net
+WWW: http://www.antlr.org
diff --git a/devel/antlr/pkg-plist b/devel/antlr/pkg-plist
index fbdabc96d00c..82d9484a1948 100644
--- a/devel/antlr/pkg-plist
+++ b/devel/antlr/pkg-plist
@@ -1,3 +1,4 @@
+bin/antlr
include/antlr/ANTLRException.hpp
include/antlr/ANTLRUtil.hpp
include/antlr/AST.hpp
@@ -18,7 +19,6 @@ include/antlr/CommonAST.hpp
include/antlr/CommonASTWithHiddenTokens.hpp
include/antlr/CommonHiddenStreamToken.hpp
include/antlr/CommonToken.hpp
-include/antlr/Parser.hpp
include/antlr/IOException.hpp
include/antlr/InputBuffer.hpp
include/antlr/LLkParser.hpp
@@ -27,6 +27,7 @@ include/antlr/MismatchedCharException.hpp
include/antlr/MismatchedTokenException.hpp
include/antlr/NoViableAltException.hpp
include/antlr/NoViableAltForCharException.hpp
+include/antlr/Parser.hpp
include/antlr/ParserSharedInputState.hpp
include/antlr/RecognitionException.hpp
include/antlr/RefCount.hpp
@@ -49,4 +50,10 @@ include/antlr/TokenStreamSelector.hpp
include/antlr/TreeParserSharedInputState.hpp
include/antlr/config.hpp
lib/libantlr.a
+%%JAVAJARDIR%%/antlr.jar
+%%WITH_PYTHON%%%%PYTHON_SITELIBDIR%%/antlr/__init__.py
+%%WITH_PYTHON%%%%PYTHON_SITELIBDIR%%/antlr/__init__.pyc
+%%WITH_PYTHON%%%%PYTHON_SITELIBDIR%%/antlr/antlr.py
+%%WITH_PYTHON%%%%PYTHON_SITELIBDIR%%/antlr/antlr.pyc
+%%WITH_PYTHON%%@dirrm %%PYTHON_SITELIBDIR%%/antlr
@dirrm include/antlr