summaryrefslogtreecommitdiff
path: root/devel/libreadline-java/files/jython.sh.in
diff options
context:
space:
mode:
authorAntoine Brodin <antoine@FreeBSD.org>2013-12-16 18:01:50 +0000
committerAntoine Brodin <antoine@FreeBSD.org>2013-12-16 18:01:50 +0000
commite107c3d2641695dde16905548e329abf58045e6c (patch)
tree38a6d5750c49d2a865d1792733f974494bc11f03 /devel/libreadline-java/files/jython.sh.in
parentFinish stage support (diff)
- Fix build with clang
- Stage support - Do not hardcode /usr/local PR: ports/184751 Submitted by: Martin Kammerhofer (maintainer)
Notes
Notes: svn path=/head/; revision=336652
Diffstat (limited to 'devel/libreadline-java/files/jython.sh.in')
-rw-r--r--devel/libreadline-java/files/jython.sh.in56
1 files changed, 56 insertions, 0 deletions
diff --git a/devel/libreadline-java/files/jython.sh.in b/devel/libreadline-java/files/jython.sh.in
new file mode 100644
index 000000000000..6356a48b7717
--- /dev/null
+++ b/devel/libreadline-java/files/jython.sh.in
@@ -0,0 +1,56 @@
+#!/bin/sh
+# Invoke Jython.
+# jython.sh,v 1.5 2007/09/28 09:13:55 martin Exp
+#
+# The path names below are for Jython 2.5.3 on FreeBSD.
+#
+# NOTE: Jython >= 2.5 already includes rlcompleter,
+# see http://www.jython.org/docs/library/rlcompleter.html
+# This is useful for older Jython versions only!
+
+if [ -d "%%LOCALBASE%%/lib/jython22" ] ; then
+ _ver=22
+else
+ _ver=
+fi
+CP="%%LOCALBASE%%/lib/jython${_ver}/jython.jar"
+defs=
+wrapper=
+
+case "${JYTHON_CONSOLE:-Editline}" in
+ *[Ee]dit[Ll]ine)
+ CP="$CP:%%LOCALBASE%%/share/java/classes/libreadline-java.jar"
+ defs="-Dpython.console=org.python.util.ReadlineConsole"
+ defs="$defs -Dpython.console.readlinelib=Editline"
+ ;;
+ *[Gg]et[Ll]ine)
+ CP="$CP:%%LOCALBASE%%/share/java/classes/libreadline-java.jar"
+ defs="-Dpython.console=org.python.util.ReadlineConsole"
+ defs="$defs -Dpython.console.readlinelib=Getline"
+ ;;
+ *[Jj][Ll]ine)
+ CP="$CP:%%LOCALBASE%%/share/java/classes/jline.jar"
+ defs="-Dpython.console="
+ wrapper=jline.ConsoleRunner
+ ;;
+ *[Rr]ead[Ll]ine)
+ CP="$CP:%%LOCALBASE%%/share/java/classes/libreadline-java.jar"
+ defs="-Dpython.console=org.python.util.ReadlineConsole"
+ defs="$defs -Dpython.console.readlinelib=GnuReadline"
+ ;;
+ *)
+ echo >&2 "$0: illegal value of JYTHON_CONSOLE: $JYTHON_CONSOLE"
+ exit 64
+ ;;
+esac
+
+
+if [ -n "$CLASSPATH" ]; then
+ CP="$CP:$CLASSPATH"
+fi
+
+exec java -Dpython.home="%%LOCALBASE%%/lib/jython${_ver}" \
+ -Dpython.cachedir="${HOME}/.jython-cachedir" \
+ -classpath "$CP" $wrapper org.python.util.jython $defs "$@"
+
+#EOF#