diff options
Diffstat (limited to 'java')
-rw-r--r-- | java/Makefile | 1 | ||||
-rw-r--r-- | java/jflex/Makefile | 46 | ||||
-rw-r--r-- | java/jflex/distinfo | 2 | ||||
-rw-r--r-- | java/jflex/files/patch-Makefile | 29 | ||||
-rw-r--r-- | java/jflex/files/patch-jflex | 71 | ||||
-rw-r--r-- | java/jflex/pkg-descr | 6 | ||||
-rw-r--r-- | java/jflex/pkg-plist | 64 |
7 files changed, 219 insertions, 0 deletions
diff --git a/java/Makefile b/java/Makefile index 2866893c2ed7..b8235e4d9121 100644 --- a/java/Makefile +++ b/java/Makefile @@ -72,6 +72,7 @@ SUBDIR += jdk14-doc SUBDIR += jdom SUBDIR += jfc + SUBDIR += jflex SUBDIR += jfreechart SUBDIR += jikes SUBDIR += jlex diff --git a/java/jflex/Makefile b/java/jflex/Makefile new file mode 100644 index 000000000000..d4e780412026 --- /dev/null +++ b/java/jflex/Makefile @@ -0,0 +1,46 @@ +# Ports collection Makefile for: JFlex +# Date created: 27 January 2004 +# Whom: Conor McDermottroe <ports@mcdermottroe.com> +# +# $FreeBSD$ +# + +PORTNAME= jflex +PORTVERSION= 1.3.5 +CATEGORIES= java devel +MASTER_SITES= http://www.jflex.de/ + +MAINTAINER= ports@mcdermottroe.com +COMMENT= The Fast Lexical Analyser Generator for Java[tm] + +USE_JAVA= 1.1+ +NEED_JAVAC= yes +USE_REINPLACE= yes +WRKSRC= ${WRKDIR}/JFlex +BUILD_WRKSRC= ${WRKSRC}/src +MAKE_ENV+= JAVAC="${JAVAC}" JAR="${JAR}" JAVAJARDIR="${JAVAJARDIR}" \ + JAVA_CLASSES="${JAVA_CLASSES}" + +PLIST_SUB= JAVAJARDIR=${JAVAJARDIR:S|^${PREFIX}/||} +.if !defined(NOPORTDOCS) +PORTDOCS= * +.endif + +do-configure: + @${REINPLACE_CMD} -e 's|%%JAVAJARDIR%%|${JAVAJARDIR}|' \ + ${WRKSRC}/bin/jflex + +do-install: + @${INSTALL_SCRIPT} ${WRKSRC}/bin/jflex ${PREFIX}/bin/jflex + @${INSTALL_DATA} ${WRKSRC}/lib/JFlex.jar ${JAVAJARDIR}/JFlex.jar +.if !defined(NOPORTDOCS) + ${MKDIR} ${DOCSDIR} + ${INSTALL_DATA} ${WRKSRC}/doc/* ${DOCSDIR} +.endif + ${MKDIR} ${EXAMPLESDIR} +.for EXAMPLE in binary byaccj cup interpreter java simple standalone + ${MKDIR} ${EXAMPLESDIR}/${EXAMPLE} + ${INSTALL_DATA} ${WRKSRC}/examples/${EXAMPLE}/* ${EXAMPLESDIR}/${EXAMPLE} +.endfor + +.include <bsd.port.mk> diff --git a/java/jflex/distinfo b/java/jflex/distinfo new file mode 100644 index 000000000000..7550bdfce916 --- /dev/null +++ b/java/jflex/distinfo @@ -0,0 +1,2 @@ +MD5 (jflex-1.3.5.tar.gz) = c77a9656aa20979f2268d7443995700f +SIZE (jflex-1.3.5.tar.gz) = 799903 diff --git a/java/jflex/files/patch-Makefile b/java/jflex/files/patch-Makefile new file mode 100644 index 000000000000..54c816b15472 --- /dev/null +++ b/java/jflex/files/patch-Makefile @@ -0,0 +1,29 @@ +--- src/Makefile.orig Mon Oct 8 03:57:06 2001 ++++ src/Makefile Wed Feb 18 12:30:44 2004 +@@ -1,23 +1,21 @@ + # you need JFlex 1.2.2 and CUP 0.10j or later for this Makefile to work + + JFLEX = jflex -skel skeleton.nested +-CUP = java java_cup.Main ++CUP = java -classpath ${JAVAJARDIR}/java_cup.jar java_cup.Main + +-JAVAC = javac -target 1.1 -bootclasspath /usr/lib/jdk1.1/lib/classes.zip + #JAVAC = jikes +-JAR = jar + + DEST = ../lib + + # jdk 1.2 +-CLPATH = -classpath /usr/lib/java/jre/lib/rt.jar:. ++CLPATH = -classpath ${JAVA_CLASSES}:. + + # jdk 1.1 + #CLPATH = -classpath /usr/lib/java/lib/classes.zip:. + + # ------------------------------------------------------------ + +-JAVAC_FLAGS = ++JAVAC_FLAGS = -target 1.1 + JARFILE = JFlex.jar + + diff --git a/java/jflex/files/patch-jflex b/java/jflex/files/patch-jflex new file mode 100644 index 000000000000..c651365534ac --- /dev/null +++ b/java/jflex/files/patch-jflex @@ -0,0 +1,71 @@ +--- bin/jflex.orig Mon Oct 1 04:18:48 2001 ++++ bin/jflex Wed Feb 18 12:19:00 2004 +@@ -1,51 +1,19 @@ +-#! /bin/bash ++#!/bin/sh + # +-# JFlex start script $Revision: 1.16 $ +-# +-# if Java is not in your binary path, you need to supply its +-# location in this script. The script automatically finds +-# JFLEX_HOME when called directly, via binary path, or symbolic +-# link. +-# +-# Site wide installation: simply make a symlink from e.g. +-# /usr/bin/jflex to this script at its original position +-# +-#=================================================================== +-# +-# configurables: +- +-# path to the java interpreter +-JAVA=java +- +-# end configurables +-# +-#=================================================================== +-# +- +-# calculate true location +- +-PRG=`type $0` +-PRG=${PRG##* } +- +-# If PRG is a symlink, trace it to the real home directory +- +-while [ -L "$PRG" ] +-do +- newprg=$(ls -l ${PRG}) +- newprg=${newprg##*-> } +- [ ${newprg} = ${newprg#/} ] && newprg=${PRG%/*}/${newprg} +- PRG="$newprg" +-done +- +-PRG=${PRG%/*} +-JFLEX_HOME=${PRG}/.. +- +-# -------------------------------------------------------------------- +- +-export CLASSPATH +-CLASSPATH=$JFLEX_HOME/lib/JFlex.jar +- +-$JAVA JFlex.Main $@ ++# Replacement for the script that came with JFlex ++# because bash is not necessarily on a FreeBSD ++# machine. Also, we know where the jar is. ++# ++# Conor McDermottroe <ports@mcdermottroe.com> ++ ++# Allow the user to override where JFlex.jar lives ++if [ -z "$JAVAJARDIR" ]; then ++ JAVAJARDIR=%%JAVAJARDIR%% ++fi ++ ++# Allow the user to specify which java interpreter to use ++if [ -z "$JAVA" ]; then ++ JAVA="`which javavm`" ++fi + +-#for more memory: +-#$JAVA -Xmx128m JFlex.Main $@ ++$JAVA -jar $JAVAJARDIR/JFlex.jar $@ diff --git a/java/jflex/pkg-descr b/java/jflex/pkg-descr new file mode 100644 index 000000000000..6769bfdb6d6a --- /dev/null +++ b/java/jflex/pkg-descr @@ -0,0 +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. + +WWW: http://www.jflex.de/ diff --git a/java/jflex/pkg-plist b/java/jflex/pkg-plist new file mode 100644 index 000000000000..4db29dd8f78a --- /dev/null +++ b/java/jflex/pkg-plist @@ -0,0 +1,64 @@ +bin/jflex +%%JAVAJARDIR%%/JFlex.jar +%%EXAMPLESDIR%%/binary/Makefile +%%EXAMPLESDIR%%/binary/README +%%EXAMPLESDIR%%/binary/StraightStreamReader.java +%%EXAMPLESDIR%%/binary/binary.flex +@dirrm %%EXAMPLESDIR%%/binary +%%EXAMPLESDIR%%/byaccj/Makefile +%%EXAMPLESDIR%%/byaccj/README +%%EXAMPLESDIR%%/byaccj/calc.flex +%%EXAMPLESDIR%%/byaccj/calc.y +@dirrm %%EXAMPLESDIR%%/byaccj +%%EXAMPLESDIR%%/cup/Main.java +%%EXAMPLESDIR%%/cup/Makefile +%%EXAMPLESDIR%%/cup/README +%%EXAMPLESDIR%%/cup/lcalc.flex +%%EXAMPLESDIR%%/cup/output.good +%%EXAMPLESDIR%%/cup/test.txt +%%EXAMPLESDIR%%/cup/ycalc.cup +@dirrm %%EXAMPLESDIR%%/cup +%%EXAMPLESDIR%%/interpreter/AST.java +%%EXAMPLESDIR%%/interpreter/Main.java +%%EXAMPLESDIR%%/interpreter/Makefile +%%EXAMPLESDIR%%/interpreter/README +%%EXAMPLESDIR%%/interpreter/STEfun.java +%%EXAMPLESDIR%%/interpreter/STEvar.java +%%EXAMPLESDIR%%/interpreter/SymTab.java +%%EXAMPLESDIR%%/interpreter/SymtabEntry.java +%%EXAMPLESDIR%%/interpreter/Tboolexp.java +%%EXAMPLESDIR%%/interpreter/Tdekl.java +%%EXAMPLESDIR%%/interpreter/Tdekllist.java +%%EXAMPLESDIR%%/interpreter/Texp.java +%%EXAMPLESDIR%%/interpreter/Texpinfix.java +%%EXAMPLESDIR%%/interpreter/Texplist.java +%%EXAMPLESDIR%%/interpreter/Tfun.java +%%EXAMPLESDIR%%/interpreter/Tident.java +%%EXAMPLESDIR%%/interpreter/Tifthenelse.java +%%EXAMPLESDIR%%/interpreter/Tnumber.java +%%EXAMPLESDIR%%/interpreter/Tparlist.java +%%EXAMPLESDIR%%/interpreter/Tprogram.java +%%EXAMPLESDIR%%/interpreter/Tuminus.java +%%EXAMPLESDIR%%/interpreter/example.as +%%EXAMPLESDIR%%/interpreter/parser.cup +%%EXAMPLESDIR%%/interpreter/scanner.flex +@dirrm %%EXAMPLESDIR%%/interpreter +%%EXAMPLESDIR%%/java/JavaParser.java +%%EXAMPLESDIR%%/java/JavaSymbol.java +%%EXAMPLESDIR%%/java/Makefile +%%EXAMPLESDIR%%/java/README +%%EXAMPLESDIR%%/java/java.flex +%%EXAMPLESDIR%%/java/java12.cup +%%EXAMPLESDIR%%/java/unicode.flex +@dirrm %%EXAMPLESDIR%%/java +%%EXAMPLESDIR%%/simple/README +%%EXAMPLESDIR%%/simple/Utility.java +%%EXAMPLESDIR%%/simple/Yytoken.java +%%EXAMPLESDIR%%/simple/simple.flex +@dirrm %%EXAMPLESDIR%%/simple +%%EXAMPLESDIR%%/standalone/Makefile +%%EXAMPLESDIR%%/standalone/README +%%EXAMPLESDIR%%/standalone/sample.inp +%%EXAMPLESDIR%%/standalone/standalone.flex +@dirrm %%EXAMPLESDIR%%/standalone +@dirrm %%EXAMPLESDIR%% |