1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-26 09:46:09 +00:00

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>
This commit is contained in:
Sam Lawrance 2006-05-03 13:06:32 +00:00
parent de334b1326
commit 24da0384c0
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=161272
4 changed files with 48 additions and 28 deletions

View File

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

View File

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

View File

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

View File

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