aboutsummaryrefslogtreecommitdiff
path: root/java/jflex
diff options
context:
space:
mode:
authorHerve Quiroz <hq@FreeBSD.org>2004-12-20 14:36:39 +0000
committerHerve Quiroz <hq@FreeBSD.org>2004-12-20 14:36:39 +0000
commit958b51028ae38e3b73ddc77ae30bd2c3bdfff178 (patch)
tree3bc382de774d363ef92d1f68f7f5460ab85d670c /java/jflex
parent96281f84f1295719adf53cd3933b595791ed8014 (diff)
downloadports-958b51028ae38e3b73ddc77ae30bd2c3bdfff178.tar.gz
ports-958b51028ae38e3b73ddc77ae30bd2c3bdfff178.zip
- Update to version 1.4.1 [1]
- Use USE_ANT [1] - No longer add %%JAVAJARDIR%% to PLIST_SUB [1] - Update to bsd.java.mk 2.0 - No longer patch the distribution shell script but rather use a FreeBSD specific one [1] - Use SUB_FILES/SUB_LIST to perform substitutions on the launcher shell script - Minor cosmetic improvements - Use JAVALIBDIR rather than JAVAJARDIR for JAR dependencies - Moved the BUILD_DEPENDS statement to calm portlint PR: 75198 [1] Submitted by: maintainer [1]
Notes
Notes: svn path=/head/; revision=124594
Diffstat (limited to 'java/jflex')
-rw-r--r--java/jflex/Makefile28
-rw-r--r--java/jflex/distinfo8
-rw-r--r--java/jflex/files/jflex.sh.in14
-rw-r--r--java/jflex/files/patch-Makefile7
-rw-r--r--java/jflex/files/patch-jflex68
-rw-r--r--java/jflex/pkg-plist2
6 files changed, 32 insertions, 95 deletions
diff --git a/java/jflex/Makefile b/java/jflex/Makefile
index 3d918ef0071f..61c4b30970a2 100644
--- a/java/jflex/Makefile
+++ b/java/jflex/Makefile
@@ -6,39 +6,35 @@
#
PORTNAME= jflex
-PORTVERSION= 1.4
+PORTVERSION= 1.4.1
CATEGORIES= java devel
MASTER_SITES= http://www.jflex.de/:jflexde \
http://jflex.sourceforge.net/jar/devel/:jflexsf
-DISTFILES= jflex-1.4.tar.gz:jflexde \
+DISTFILES= ${PORTNAME}-${PORTVERSION}.tar.gz:jflexde \
JFlex.jar:jflexsf \
java_cup.jar:jflexsf
-EXTRACT_ONLY= jflex-1.4.tar.gz
+EXTRACT_ONLY= ${PORTNAME}-${PORTVERSION}.tar.gz
MAINTAINER= ports@mcdermottroe.com
COMMENT= The Fast Lexical Analyser Generator for Java[tm]
-USE_JAVA= 1.1+
-NEED_JAVAC= yes
-USE_REINPLACE= yes
+BUILD_DEPENDS= ${JAVALIBDIR}/junit.jar:${PORTSDIR}/java/junit
+
+USE_JAVA= yes
+USE_ANT= yes
BUILD_WRKSRC= ${WRKSRC}/src
-BUILD_DEPENDS= ${LOCALBASE}/bin/ant:${PORTSDIR}/devel/apache-ant \
- ${JAVAJARDIR}/junit.jar:${PORTSDIR}/java/junit
-MAKE_ENV+= DISTDIR="${DISTDIR}" JAVAJARDIR="${JAVAJARDIR}" \
- LOCALBASE="${LOCALBASE}" SETENV="${SETENV}"
+ALL_TARGET= jar
+MAKE_ENV+= CLASSPATH="${DISTDIR}/JFlex.jar:${DISTDIR}/java_cup.jar:${JAVALIBDIR}/junit.jar"
-PLIST_SUB= JAVAJARDIR=${JAVAJARDIR:S|^${PREFIX}/||}
.if !defined(NOPORTDOCS)
PORTDOCS= *
.endif
-do-configure:
- @${REINPLACE_CMD} -e 's|%%JAVAJARDIR%%|${JAVAJARDIR}|' \
- ${WRKSRC}/bin/jflex
+SUB_FILES= jflex.sh
do-install:
- @${INSTALL_SCRIPT} ${WRKSRC}/bin/jflex ${PREFIX}/bin/jflex
- @${INSTALL_DATA} ${WRKSRC}/lib/JFlex.jar ${JAVAJARDIR}/JFlex.jar
+ ${INSTALL_SCRIPT} ${WRKDIR}/jflex.sh ${PREFIX}/bin/jflex
+ ${INSTALL_DATA} ${WRKSRC}/lib/JFlex.jar ${JAVAJARDIR}/JFlex.jar
.if !defined(NOPORTDOCS)
${MKDIR} ${DOCSDIR}
${INSTALL_DATA} ${WRKSRC}/doc/* ${DOCSDIR}
diff --git a/java/jflex/distinfo b/java/jflex/distinfo
index 8398af83acf1..826ea9ba7f88 100644
--- a/java/jflex/distinfo
+++ b/java/jflex/distinfo
@@ -1,6 +1,6 @@
-MD5 (jflex-1.4.tar.gz) = 120cedc76b278a476682edfa6828841f
-SIZE (jflex-1.4.tar.gz) = 912690
-MD5 (JFlex.jar) = da256e01b8ef7d87fb02b10554c15d0e
-SIZE (JFlex.jar) = 171538
+MD5 (jflex-1.4.1.tar.gz) = 9e4be6e826e6b344e84c0434d6fd4b46
+SIZE (jflex-1.4.1.tar.gz) = 986546
+MD5 (JFlex.jar) = 626c0c66135a48c042d3b35af95d274d
+SIZE (JFlex.jar) = 169629
MD5 (java_cup.jar) = 26aef43b31cf3e0b581017e75a325b7b
SIZE (java_cup.jar) = 97241
diff --git a/java/jflex/files/jflex.sh.in b/java/jflex/files/jflex.sh.in
new file mode 100644
index 000000000000..7d90f63d7ab0
--- /dev/null
+++ b/java/jflex/files/jflex.sh.in
@@ -0,0 +1,14 @@
+#!/bin/sh
+#
+# 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>
+#
+# $FreeBSD$
+
+# Allow the user to override where JFlex.jar lives
+JAVAJARDIR="${JAVAJARDIR:-"%%JAVAJARDIR%%"}"
+
+"%%LOCALBASE%%/bin/java" -jar "${JAVAJARDIR}/JFlex.jar" "$@"
diff --git a/java/jflex/files/patch-Makefile b/java/jflex/files/patch-Makefile
deleted file mode 100644
index 86a6f4679b92..000000000000
--- a/java/jflex/files/patch-Makefile
+++ /dev/null
@@ -1,7 +0,0 @@
---- src/Makefile.orig Mon May 3 23:23:09 2004
-+++ src/Makefile Mon May 3 23:20:03 2004
-@@ -0,0 +1,4 @@
-+# Makefile to wrap a call to ant
-+
-+all:
-+ ${SETENV} CLASSPATH=${DISTDIR}/JFlex.jar:${DISTDIR}/java_cup.jar:${JAVAJARDIR}/junit.jar:. ${LOCALBASE}/bin/ant jar
diff --git a/java/jflex/files/patch-jflex b/java/jflex/files/patch-jflex
deleted file mode 100644
index 3ea64aef137a..000000000000
--- a/java/jflex/files/patch-jflex
+++ /dev/null
@@ -1,68 +0,0 @@
---- bin/jflex.orig Mon May 3 23:06:29 2004
-+++ bin/jflex Mon May 3 23:11:12 2004
-@@ -1,51 +1,19 @@
--#! /bin/bash
-+#!/bin/sh
- #
--# JFlex start script $Revision: 2.0 $
-+# Replacement for the script that came with JFlex
-+# because bash is not necessarily on a FreeBSD
-+# machine. Also, we know where the jar is.
- #
--# 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}/..
--
--# --------------------------------------------------------------------
-+# Conor McDermottroe <ports@mcdermottroe.com>
-
--export CLASSPATH
--CLASSPATH=$JFLEX_HOME/lib/JFlex.jar
-+# Allow the user to override where JFlex.jar lives
-+if [ -z "$JAVAJARDIR" ]; then
-+ JAVAJARDIR=%%JAVAJARDIR%%
-+fi
-
--$JAVA JFlex.Main $@
-+# 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-plist b/java/jflex/pkg-plist
index 0cf411b947ef..9cbe97e6ee45 100644
--- a/java/jflex/pkg-plist
+++ b/java/jflex/pkg-plist
@@ -1,3 +1,4 @@
+@comment $FreeBSD$
bin/jflex
%%JAVAJARDIR%%/JFlex.jar
%%EXAMPLESDIR%%/binary/Makefile
@@ -49,6 +50,7 @@ bin/jflex
%%EXAMPLESDIR%%/java/Makefile
%%EXAMPLESDIR%%/java/README
%%EXAMPLESDIR%%/java/TestLexer.java
+%%EXAMPLESDIR%%/java/build.xml
%%EXAMPLESDIR%%/java/java.flex
%%EXAMPLESDIR%%/java/java12.cup
%%EXAMPLESDIR%%/java/lexer-output.good