diff options
author | Pawel Pekala <pawel@FreeBSD.org> | 2014-04-05 08:01:26 +0000 |
---|---|---|
committer | Pawel Pekala <pawel@FreeBSD.org> | 2014-04-05 08:01:26 +0000 |
commit | c40ec5a9e0297826e4202c970b3a8e9b110750e3 (patch) | |
tree | 7ddbefd1264cbf98b7396edfa066fbaed5228e0e /devel/antlr | |
parent | 8714f565f148f3201311e2b2c089527301d2b7de (diff) | |
download | ports-c40ec5a9e0297826e4202c970b3a8e9b110750e3.tar.gz ports-c40ec5a9e0297826e4202c970b3a8e9b110750e3.zip |
Notes
Diffstat (limited to 'devel/antlr')
-rw-r--r-- | devel/antlr/Makefile | 52 | ||||
-rw-r--r-- | devel/antlr/files/antlr.sh.in (renamed from devel/antlr/files/antlr.sh) | 0 | ||||
-rw-r--r-- | devel/antlr/pkg-plist | 10 |
3 files changed, 22 insertions, 40 deletions
diff --git a/devel/antlr/Makefile b/devel/antlr/Makefile index 41cc50ed9165..f8187e6e13a8 100644 --- a/devel/antlr/Makefile +++ b/devel/antlr/Makefile @@ -9,27 +9,20 @@ MASTER_SITES= http://www.antlr2.org/download/ MAINTAINER= ports@FreeBSD.org COMMENT= ANother Tool for Language Recognition -RUN_DEPENDS= java:${PORTSDIR}/java/javavmwrapper - CONFLICTS= pccts-[0-9]* -USE_GMAKE= yes +USES= gmake USE_JAVA= yes JAVA_VERSION= 1.6+ -OPTIONS_DEFINE= PYTHON DOCS - HAS_CONFIGURE= yes CONFIGURE_ENV= JAVAC="${JAVAC}" JAR="${JAR}" JAVA="${JAVA}" CLASSPATH="${PORT_CLASSPATH}" CONFIGURE_ARGS= --disable-csharp --prefix=${PREFIX} PORT_CLASSPATH= ${WRKSRC}/antlrall.jar:. -EXAMPLES= cpp java +SUB_FILES= antlr.sh -NO_STAGE= yes -.include <bsd.port.options.mk> -.if ${PORT_OPTIONS:MDOCS} PORTDOCS= ANTLRException.gif closure.gif cpp-runtime.html \ csharp-runtime.html err.html glossary.html hidden.stream.gif \ index.html inheritance.html j-guru-blue.jpg jguru-logo.gif \ @@ -38,24 +31,22 @@ PORTDOCS= ANTLRException.gif closure.gif cpp-runtime.html \ stream.perspectives.gif stream.selector.gif \ stream.splitter.gif streams.html subrule.gif trees.html \ vocab.html -.endif + +OPTIONS_DEFINE= PYTHON DOCS +OPTIONS_SUB= yes + +.include <bsd.port.options.mk> .if ${PORT_OPTIONS:MPYTHON} USE_PYTHON= yes 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.jar antlrall.jar) post-configure: - ${SED} -e 's|%%JAVAJARDIR%%|${JAVAJARDIR}|' \ - -e 's|%%LOCALBASE%%|${LOCALBASE}|' \ - -e 's|%%JAVA_VERSION%%|${JAVA_VERSION}|' ${FILESDIR}/antlr.sh > ${WRKDIR}/antlr.sh .if ${PORT_OPTIONS:MPYTHON} (cd ${ANTLR_PYTHON} && ${PYTHON_CMD} setup.py config) .endif @@ -73,26 +64,17 @@ post-build: .endif do-install: - @${ECHO_MSG} -n ">> Installing JAR as ${JAVAJARDIR}/${PORTNAME}.jar..." - @${MKDIR} ${JAVAJARDIR} - @${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 - @${ECHO_MSG} " [ DONE ]" - @${ECHO_MSG} ">> Installing native files..." - @(cd ${WRKSRC}/lib/cpp && ${GMAKE} install) - @${ECHO_MSG} " [ DONE ]" + @${MKDIR} ${STAGEDIR}${JAVAJARDIR} + ${INSTALL_DATA} ${WRKSRC}/antlr.jar ${STAGEDIR}${JAVAJARDIR} + ${INSTALL_SCRIPT} ${WRKDIR}/antlr.sh ${STAGEDIR}${PREFIX}/bin/antlr + @${MKDIR} ${STAGEDIR}${PREFIX}/include/${PORTNAME} + ${INSTALL_DATA} ${WRKSRC}/lib/cpp/antlr/*.hpp \ + ${STAGEDIR}${PREFIX}/include/${PORTNAME} + ${INSTALL_DATA} ${WRKSRC}/lib/cpp/src/libantlr.a ${STAGEDIR}${PREFIX}/lib + @${MKDIR} ${STAGEDIR}${DOCSDIR} + (cd ${WRKSRC}/doc && ${INSTALL_DATA} ${PORTDOCS} ${STAGEDIR}${DOCSDIR}) .if ${PORT_OPTIONS:MPYTHON} - @${ECHO_MSG} -n ">> Installing Python runtime files..." - @(cd ${ANTLR_PYTHON} && ${PYTHON_CMD} setup.py install) - @${ECHO_MSG} " [ DONE ]" -.endif -.if ${PORT_OPTIONS:MDOCS} - @${ECHO_MSG} -n ">> Installing documentation in ${DOCSDIR}..." - @${MKDIR} ${DOCSDIR} - @cd ${WRKSRC}/doc && ${INSTALL_DATA} ${PORTDOCS} ${DOCSDIR}/ - @${ECHO_MSG} " [ DONE ]" + @(cd ${ANTLR_PYTHON} && ${PYTHON_CMD} setup.py install --root=${STAGEDIR}) .endif .include <bsd.port.mk> diff --git a/devel/antlr/files/antlr.sh b/devel/antlr/files/antlr.sh.in index 1065d73c14fb..1065d73c14fb 100644 --- a/devel/antlr/files/antlr.sh +++ b/devel/antlr/files/antlr.sh.in diff --git a/devel/antlr/pkg-plist b/devel/antlr/pkg-plist index 82d9484a1948..01f3913febd4 100644 --- a/devel/antlr/pkg-plist +++ b/devel/antlr/pkg-plist @@ -51,9 +51,9 @@ 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 +%%PYTHON%%%%PYTHON_SITELIBDIR%%/antlr/__init__.py +%%PYTHON%%%%PYTHON_SITELIBDIR%%/antlr/__init__.pyc +%%PYTHON%%%%PYTHON_SITELIBDIR%%/antlr/antlr.py +%%PYTHON%%%%PYTHON_SITELIBDIR%%/antlr/antlr.pyc +%%PYTHON%%@dirrm %%PYTHON_SITELIBDIR%%/antlr @dirrm include/antlr |