summaryrefslogtreecommitdiff
path: root/java/jflex/files/patch-jflex
diff options
context:
space:
mode:
Diffstat (limited to 'java/jflex/files/patch-jflex')
-rw-r--r--java/jflex/files/patch-jflex71
1 files changed, 71 insertions, 0 deletions
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 $@