Date: Sat, 5 Apr 2014 08:01:27 +0000 (UTC) From: Pawel Pekala <pawel@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r350206 - in head/devel/antlr: . files Message-ID: <201404050801.s3581Rvs065771@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: pawel Date: Sat Apr 5 08:01:26 2014 New Revision: 350206 URL: http://svnweb.freebsd.org/changeset/ports/350206 QAT: https://qat.redports.org/buildarchive/r350206/ Log: - Add staging support - Remove dependency on javavmwrapper, pulled in by java - Convert to USES=gmake - Use SUB_FILES instead of sed substitutions, move antlr.sh to antlr.sh.in - Use options subs for PYTHON option Added: head/devel/antlr/files/antlr.sh.in - copied unchanged from r349860, head/devel/antlr/files/antlr.sh Deleted: head/devel/antlr/files/antlr.sh Modified: head/devel/antlr/Makefile head/devel/antlr/pkg-plist Modified: head/devel/antlr/Makefile ============================================================================== --- head/devel/antlr/Makefile Sat Apr 5 07:42:09 2014 (r350205) +++ head/devel/antlr/Makefile Sat Apr 5 08:01:26 2014 (r350206) @@ -9,27 +9,20 @@ MASTER_SITES= http://www.antlr2.org/down 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 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> Copied: head/devel/antlr/files/antlr.sh.in (from r349860, head/devel/antlr/files/antlr.sh) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/devel/antlr/files/antlr.sh.in Sat Apr 5 08:01:26 2014 (r350206, copy of r349860, head/devel/antlr/files/antlr.sh) @@ -0,0 +1,5 @@ +#! /bin/sh +# +# $FreeBSD$ + +JAVA_VERSION="%%JAVA_VERSION%%" "%%LOCALBASE%%/bin/java" -classpath "%%JAVAJARDIR%%/antlr.jar" antlr.Tool "$@" Modified: head/devel/antlr/pkg-plist ============================================================================== --- head/devel/antlr/pkg-plist Sat Apr 5 07:42:09 2014 (r350205) +++ head/devel/antlr/pkg-plist Sat Apr 5 08:01:26 2014 (r350206) @@ -51,9 +51,9 @@ include/antlr/TreeParserSharedInputState 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201404050801.s3581Rvs065771>