java/jflex: undeprecate and update to 1.8.1

Further changes:
- use a prebuilt jar file to avoid depending on Maven or Bazel
- swith MASTER_SITES to GitHub
- add BSD3CLAUSE license
- rewrap pkg-descr

PR:		245447
Submitted by:	Jashank Jeremy
Approved by:	maintainer
MFH:		2020Q2
This commit is contained in:
Rene Ladan 2020-05-24 11:26:26 +00:00
parent 673c6dd7a4
commit dc2f027f30
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=536386
5 changed files with 135 additions and 104 deletions

View file

@ -2,50 +2,42 @@
# $FreeBSD$
PORTNAME= jflex
PORTVERSION= 1.4.2
PORTVERSION= 1.8.1
CATEGORIES= java devel
MASTER_SITES= http://www.jflex.de/:jflexde \
http://jflex.sourceforge.net/jar/devel/:jflexsf
DISTFILES= ${DISTNAME}${EXTRACT_SUFX}:jflexde \
JFlex.jar:jflexsf \
java_cup.jar:jflexsf
EXTRACT_ONLY= ${DISTNAME}${EXTRACT_SUFX}
MASTER_SITES= https://github.com/jflex-de/jflex/releases/download/v${PORTVERSION}/
MAINTAINER= eg@fbsd.lt
COMMENT= The Fast Lexical Analyser Generator for Java[tm]
COMMENT= Fast Lexical Analyser Generator for Java[tm]
BROKEN= unfetchable
DEPRECATED= Broken for more than 6 months
EXPIRATION_DATE= 2020-05-05
BUILD_DEPENDS= ${JAVALIBDIR}/junit.jar:java/junit
LICENSE= BSD3CLAUSE
USE_JAVA= yes
USE_ANT= yes
BUILD_WRKSRC= ${WRKSRC}/src
ALL_TARGET= jar
MAKE_ENV+= CLASSPATH="${JAVALIBDIR}/junit.jar"
PORTDOCS= *
SUB_FILES= jflex.sh
#
# JFlex has two build options --- Maven and Bazel --- and neither of
# them are easy within the Ports tree framework. If you *really* want
# to build it from source, grab the distfile (which includes the source)
# or the entire repo, and have fun! -- ~jashankj, 2020-04-08
#
NO_BUILD= yes
OPTIONS_DEFINE= DOCS EXAMPLES
post-extract:
${MKDIR} ${WRKSRC}/tools
${CP} ${DISTDIR}/JFlex.jar ${WRKSRC}/tools/
${CP} ${DISTDIR}/java_cup.jar ${WRKSRC}/tools/
SUB_FILES= jflex.sh
SUB_LIST+= PORTVERSION=${PORTVERSION}
PLIST_SUB+= PORTVERSION=${PORTVERSION}
do-install:
${INSTALL_SCRIPT} ${WRKDIR}/jflex.sh ${STAGEDIR}${PREFIX}/bin/jflex
${INSTALL_DATA} ${WRKSRC}/lib/JFlex.jar ${STAGEDIR}${JAVAJARDIR}/JFlex.jar
${INSTALL_DATA} ${WRKSRC}/lib/${PORTNAME}-full-${PORTVERSION}.jar \
${STAGEDIR}${JAVAJARDIR}/${PORTNAME}-${PORTVERSION}.jar
${LN} -s ${PORTNAME}-${PORTVERSION}.jar ${STAGEDIR}${JAVAJARDIR}/${PORTNAME}.jar
do-install-DOCS-on:
${MKDIR} ${STAGEDIR}${DOCSDIR}
${INSTALL_DATA} ${WRKSRC}/doc/* ${STAGEDIR}${DOCSDIR}
(cd ${WRKSRC}/doc && ${COPYTREE_SHARE} . ${STAGEDIR}${DOCSDIR} "! -name \.* ")
do-install-EXAMPLES-on:
${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
.for EXAMPLE in binary byaccj cup interpreter java simple standalone
${MKDIR} ${STAGEDIR}${EXAMPLESDIR}/${EXAMPLE}
${INSTALL_DATA} ${WRKSRC}/examples/${EXAMPLE}/* ${STAGEDIR}${EXAMPLESDIR}/${EXAMPLE}
.endfor
(cd ${WRKSRC}/examples && ${COPYTREE_SHARE} . ${STAGEDIR}${EXAMPLESDIR} "! -name \.*")
.include <bsd.port.mk>

View file

@ -1,6 +1,3 @@
SHA256 (jflex-1.4.2.tar.gz) = ce443d51bdcedfd77c12c75a8301d57b5eb903b156c33806d1eedc466a5f84e9
SIZE (jflex-1.4.2.tar.gz) = 1210149
SHA256 (JFlex.jar) = a2f173e32886bf257e5bd76255dc8e0912ce8c9a540a6a3a744620d6ccb5f265
SIZE (JFlex.jar) = 178885
SHA256 (java_cup.jar) = 9afcfd0996dcc9a933e66749988428ad964d8c1b678107fe688a6fa55325e17e
SIZE (java_cup.jar) = 96121
TIMESTAMP = 1586321566
SHA256 (jflex-1.8.1.tar.gz) = 3d9d63f4940f8452885bc63048b8b621a1a3a6e99d406f6d0b8c9f183ee15743
SIZE (jflex-1.8.1.tar.gz) = 4922831

View file

@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/sh
#
# Replacement for the script that came with JFlex
# because bash is not necessarily on a FreeBSD
@ -11,4 +11,4 @@
# Allow the user to override where JFlex.jar lives
JAVAJARDIR="${JAVAJARDIR:-"%%JAVAJARDIR%%"}"
"%%LOCALBASE%%/bin/java" -jar "${JAVAJARDIR}/JFlex.jar" "$@"
exec "%%LOCALBASE%%/bin/java" -jar "${JAVAJARDIR}/jflex-%%PORTVERSION%%.jar" "$@"

View file

@ -1,6 +1,6 @@
JFlex is a lexical analyzer generator for Java written in Java.
It is also a rewrite of the very useful tool JLex which was developed
by Elliot Berk at Princeton University. As Vern Paxon states for his C/C++
tool flex: They do not share any code though.
JFlex is a lexical analyser generator for Java written in Java. It is
also a rewrite of the tool JLex (Berk 1996) which was developed by
Elliot Berk at Princeton University. As Vern Paxson states for his
C/C++ tool flex (Paxson 1995): they do not share any code though.
WWW: http://www.jflex.de/
WWW: https://www.jflex.de/

View file

@ -1,64 +1,106 @@
bin/jflex
%%JAVAJARDIR%%/JFlex.jar
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/binary/Makefile
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/binary/README
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/binary/StraightStreamReader.java
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/binary/binary.flex
%%JAVAJARDIR%%/jflex.jar
%%JAVAJARDIR%%/jflex-%%PORTVERSION%%.jar
%%PORTDOCS%%%%DOCSDIR%%/COPYRIGHT
%%PORTDOCS%%%%DOCSDIR%%/fig/jflex-black.png
%%PORTDOCS%%%%DOCSDIR%%/manual.css
%%PORTDOCS%%%%DOCSDIR%%/manual.html
%%PORTDOCS%%%%DOCSDIR%%/manual.pdf
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/byaccj/Makefile
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/byaccj/README
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/byaccj/calc.flex
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/byaccj/calc.y
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/cup/Main.java
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/cup/Makefile
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/cup/README
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/cup/lcalc.flex
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/cup/output.good
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/cup/test.txt
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/cup/ycalc.cup
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/interpreter/AST.java
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/interpreter/Main.java
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/interpreter/Makefile
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/interpreter/README
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/interpreter/STEfun.java
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/interpreter/STEvar.java
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/interpreter/SymTab.java
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/interpreter/SymtabEntry.java
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/interpreter/Tboolexp.java
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/interpreter/Tdekl.java
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/interpreter/Tdekllist.java
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/interpreter/Texp.java
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/interpreter/Texpinfix.java
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/interpreter/Texplist.java
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/interpreter/Tfun.java
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/interpreter/Tident.java
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/interpreter/Tifthenelse.java
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/interpreter/Tnumber.java
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/interpreter/Tparlist.java
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/interpreter/Tprogram.java
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/interpreter/Tuminus.java
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/interpreter/build.xml
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/interpreter/example.as
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/interpreter/parser.cup
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/interpreter/scanner.flex
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/java/JavaParser.java
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/java/JavaSymbol.java
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/java/Makefile
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/java/README
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/java/TestLexer.java
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/java/build.xml
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/java/java.flex
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/java/java12.cup
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/java/lexer-output.good
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/java/unicode.flex
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/byaccj/README.md
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/byaccj/src/main/jflex/calc.flex
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/byaccj/src/main/yacc/calc.y
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/common/include.xml
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/common/ivy.xml
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/common/Makefile.inc
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/common/README.md
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/cup-interpreter/build.xml
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/cup-interpreter/Makefile
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/cup-interpreter/pom.xml
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/cup-interpreter/README.md
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/cup-interpreter/src/main/cup/parser.cup
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/cup-interpreter/src/main/java/AST.java
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/cup-interpreter/src/main/java/Main.java
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/cup-interpreter/src/main/java/STEfun.java
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/cup-interpreter/src/main/java/STEvar.java
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/cup-interpreter/src/main/java/SymTab.java
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/cup-interpreter/src/main/java/SymtabEntry.java
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/cup-interpreter/src/main/java/Tboolexp.java
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/cup-interpreter/src/main/java/Tdekl.java
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/cup-interpreter/src/main/java/Tdekllist.java
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/cup-interpreter/src/main/java/Texp.java
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/cup-interpreter/src/main/java/Texpinfix.java
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/cup-interpreter/src/main/java/Texplist.java
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/cup-interpreter/src/main/java/Tfun.java
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/cup-interpreter/src/main/java/Tident.java
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/cup-interpreter/src/main/java/Tifthenelse.java
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/cup-interpreter/src/main/java/Tnumber.java
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/cup-interpreter/src/main/java/Tparlist.java
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/cup-interpreter/src/main/java/Tprogram.java
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/cup-interpreter/src/main/java/Tuminus.java
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/cup-interpreter/src/main/jflex/scanner.flex
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/cup-interpreter/src/test/data/example.as
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/cup-interpreter/src/test/data/output.good
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/cup-interpreter/src/test/java/CalcTest.java
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/cup-java-minijava/BUILD.bazel
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/cup-java-minijava/build.xml
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/cup-java-minijava/pom.xml
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/cup-java-minijava/README.md
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/cup-java-minijava/src/main/cup/minijava.cup
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/cup-java-minijava/src/main/java/jflex/examples/minijava/UnknownCharacterException.java
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/cup-java-minijava/src/main/jflex/minijava.flex
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/cup-java-minijava/src/test/java/jflex/examples/minijava/LexerTest.java
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/cup-java/build.xml
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/cup-java/Makefile
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/cup-java/pom.xml
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/cup-java/README.md
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/cup-java/src/main/cup/java12.cup
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/cup-java/src/main/java/JavaParser.java
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/cup-java/src/main/java/JavaSymbol.java
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/cup-java/src/main/java/TestLexer.java
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/cup-java/src/main/jflex/java.flex
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/cup-java/src/main/jflex/unicode.flex
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/cup-java/src/test/data/lexer-output.good
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/cup-java/src/test/java/JavaParserTest.java
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/cup-lcalc/build.xml
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/cup-lcalc/Makefile
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/cup-lcalc/pom.xml
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/cup-lcalc/README.md
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/cup-lcalc/src/main/cup/ycalc.cup
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/cup-lcalc/src/main/java/Main.java
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/cup-lcalc/src/main/jflex/lcalc.flex
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/cup-lcalc/src/test/data/output.good
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/cup-lcalc/src/test/data/test.txt
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/cup-lcalc/src/test/java/LexerTest.java
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/pom.xml
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/README.md
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/simple/BUILD.bazel
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/simple/build.xml
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/simple/Makefile
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/simple/README
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/simple/Utility.java
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/simple/Yytoken.java
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/simple/output.good
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/simple/simple.flex
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/simple/test.txt
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/standalone/Makefile
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/standalone/README
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/simple/pom.xml
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/simple/README.md
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/simple/src/main/java/Utility.java
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/simple/src/main/java/Yytoken.java
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/simple/src/main/jflex/simple.flex
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/simple/src/test/BUILD.bazel
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/simple/src/test/data/output.good
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/simple/src/test/data/test.txt
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/simple/src/test/java/YylexTest.java
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/standalone/build.xml
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/standalone/sample.inp
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/standalone/standalone.flex
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/standalone/Makefile
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/standalone/pom.xml
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/standalone/README.md
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/standalone/src/main/jflex/standalone.flex
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/standalone/src/test/data/sample.expected
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/standalone/src/test/data/sample.in
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/standalone/src/test/java/de/jflex/example/standalone/SubstTest.java
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/zero-reader/build.xml
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/zero-reader/Makefile
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/zero-reader/pom.xml
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/zero-reader/README.md
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/zero-reader/src/main/java/FunkyReader.java
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/zero-reader/src/main/java/ZeroReader.java
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/zero-reader/src/main/jflex/zero-lexer.jflex
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/zero-reader/src/test/data/lexer-output.good
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/zero-reader/src/test/data/test-input.txt
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/zero-reader/src/test/java/ZeroTest.java