summaryrefslogtreecommitdiff
path: root/lang/scala
diff options
context:
space:
mode:
authoryyamano <yyamano@pkgsrc.org>2011-09-30 07:56:13 +0000
committeryyamano <yyamano@pkgsrc.org>2011-09-30 07:56:13 +0000
commitab9687356ae78eff9ee7534231e6760fb086f38d (patch)
treed49cbafab4a5ca334f83e133b1cb85851b197dc4 /lang/scala
parent47f00f034b570637c8bdf9af1089559977132056 (diff)
downloadpkgsrc-ab9687356ae78eff9ee7534231e6760fb086f38d.tar.gz
Apply patches provided by ryoon@ with some modifications to upgrade to
Scala 2.9.1 from 2.8.1. PR pkg/45379 Scala 2.9.0 final The Scala 2.9.0 codebase includes several additions, notably the new Parallel Collections, but it also introduces improvements on many existing features, and contains many bug fixes: * Parallel Collections * The App Trait * The DelayedInit Trait * Repl Improvements * Scala Runner * Java Interop * Generalized try-catch-finally * New packages: scala.sys and scala.sys.process, which are imported from sbt.Process. * New methods in collections: collectFirst, maxBy, minBy, span, inits, tails, permutations, combinations, subsets * AnyRef specialization: See http://www.scala-lang.org/node/9483 for more details. Scala 2.9.1 final The 2.9.1 release of Scala includes many bug fixes and improvements, in particular to the interpreter: most of the interpreter changes available in the development mainline have been ported to the 2.9.x release branch. See http://www.scala-lang.org/node/10780 for more details. Note: the interpreter option '-i' may behave incorrectly in this version. In case you require it, please just add the option '-Yrepl-sync' to your command line as well.
Diffstat (limited to 'lang/scala')
-rw-r--r--lang/scala/Makefile22
-rw-r--r--lang/scala/distinfo21
-rw-r--r--lang/scala/patches/patch-ac37
-rw-r--r--lang/scala/patches/patch-bin_fsc (renamed from lang/scala/patches/patch-ae)17
-rw-r--r--lang/scala/patches/patch-bin_sbaz (renamed from lang/scala/patches/patch-aa)14
-rw-r--r--lang/scala/patches/patch-bin_sbaz-setup (renamed from lang/scala/patches/patch-ab)22
-rw-r--r--lang/scala/patches/patch-bin_scala (renamed from lang/scala/patches/patch-af)17
-rw-r--r--lang/scala/patches/patch-bin_scalac (renamed from lang/scala/patches/patch-ad)17
-rw-r--r--lang/scala/patches/patch-bin_scaladoc40
-rw-r--r--lang/scala/patches/patch-bin_scalap40
10 files changed, 151 insertions, 96 deletions
diff --git a/lang/scala/Makefile b/lang/scala/Makefile
index abcb30a2203..6c10319ea4e 100644
--- a/lang/scala/Makefile
+++ b/lang/scala/Makefile
@@ -1,11 +1,10 @@
-# $NetBSD: Makefile,v 1.4 2010/11/12 20:20:33 yyamano Exp $
+# $NetBSD: Makefile,v 1.5 2011/09/30 07:56:13 yyamano Exp $
-DISTNAME= scala-2.8.1
+DISTNAME= scala-2.9.1
CATEGORIES= lang
MASTER_SITES= http://www.scala-lang.org/downloads/distrib/files/
EXTRACT_SUFX= .tgz
DISTFILES= ${DISTNAME}.final${EXTRACT_SUFX}
-WRKSRC= ${WRKDIR}/${DISTNAME}.final
MAINTAINER= yyamano@NetBSD.org
HOMEPAGE= http://www.scala-lang.org/
@@ -13,17 +12,24 @@ COMMENT= Scala is a multi-paradigm programming language
PKG_DESTDIR_SUPPORT= user-destdir
+WRKSRC= ${WRKDIR}/${DISTNAME}.final
+
USE_JAVA= run
USE_JAVA2= 1.5
NO_BUILD= yes
-SCALA_HOME= ${DESTDIR}${PREFIX}/share/${DISTNAME}
+USE_TOOLS+= bash:run
+REPLACE_BASH+= bin/fsc bin/sbaz-setup bin/scala bin/scalac \
+ bin/scaladoc bin/scalap
+
+SCALA_HOME= ${PREFIX}/share/${DISTNAME}
SUBST_CLASSES+= scala
SUBST_FILES.scala= bin/fsc bin/sbaz bin/sbaz-setup
-SUBST_FILES.scala+= bin/scala bin/scalac bin/scaladoc
+SUBST_FILES.scala+= bin/scala bin/scalac bin/scaladoc bin/scalap
SUBST_STAGE.scala= pre-configure
-SUBST_SED.scala= -e 's,@JAVA_HOME@,${PKG_JAVA_HOME},g'
+SUBST_SED.scala= -e 's,@PREFIX@,${PREFIX},g'
+SUBST_SED.scala+= -e 's,@JAVA_HOME@,${PKG_JAVA_HOME},g'
SUBST_SED.scala+= -e 's,@SCALA_HOME@,${SCALA_HOME},g'
PLIST_SUBST+= DISTNAME=${DISTNAME}
@@ -36,8 +42,8 @@ post-extract:
do-install:
@${RM} ${WRKSRC}/bin/*.orig
${INSTALL_SCRIPT} ${WRKSRC}/bin/* ${DESTDIR}${PREFIX}/bin
- ${INSTALL_MAN} ${WRKSRC}/man/man1/* ${DESTDIR}${PREFIX}/man/man1
- @cd ${WRKSRC} && ${TAR} cf - doc lib meta misc src | ${TAR} xf - -C ${SCALA_HOME}
+ ${INSTALL_MAN} ${WRKSRC}/man/man1/* ${DESTDIR}${PREFIX}/${PKGMANDIR}/man1
+ @cd ${WRKSRC} && ${TAR} cf - doc lib meta misc src | ${TAR} xf - -C ${DESTDIR}${SCALA_HOME}
.include "../../mk/java-vm.mk"
.include "../../mk/bsd.pkg.mk"
diff --git a/lang/scala/distinfo b/lang/scala/distinfo
index 7ae217eb634..c755b694781 100644
--- a/lang/scala/distinfo
+++ b/lang/scala/distinfo
@@ -1,11 +1,12 @@
-$NetBSD: distinfo,v 1.3 2010/11/12 20:20:33 yyamano Exp $
+$NetBSD: distinfo,v 1.4 2011/09/30 07:56:13 yyamano Exp $
-SHA1 (scala-2.8.1.final.tgz) = b225e97652e06a3881de64321a46a488eaa3a15e
-RMD160 (scala-2.8.1.final.tgz) = 92e063f0f7ca71d0353b155ba86f018e4d024abe
-Size (scala-2.8.1.final.tgz) = 20203153 bytes
-SHA1 (patch-aa) = bfacfb3d88cc8358859970af80d04a22c7e8f5c8
-SHA1 (patch-ab) = 56a0f61f5123c34c4ed5cb3b5c1390189fc0c3c1
-SHA1 (patch-ac) = 2555f20cc67eefdd0b63fb08f9fd7c46ad21763a
-SHA1 (patch-ad) = ba9f67babef90bb5b518a2b04a39a7186d5f8583
-SHA1 (patch-ae) = 358abd34055d208ce3df5a81408ff9239577707f
-SHA1 (patch-af) = c9be38ccf7fe34e0637f3d90a289f3df4f621982
+SHA1 (scala-2.9.1.final.tgz) = 2e75559e6b9215cbee2bc71e53495bdefdb48b69
+RMD160 (scala-2.9.1.final.tgz) = 5056577f06fdb6a19a217a20f72d3dd9aa54ddb6
+Size (scala-2.9.1.final.tgz) = 24993458 bytes
+SHA1 (patch-bin_fsc) = 2a207a1aed392d27b9afa0bb801952428be98e24
+SHA1 (patch-bin_sbaz) = b262a0890078e53e5cb7ead283b31ec171ff8e28
+SHA1 (patch-bin_sbaz-setup) = 88a4e3d61c02d04010773c9fae6512a80f116f3d
+SHA1 (patch-bin_scala) = da6d1a8d4b1a2ccc2e8a031816d37e5b8c31987c
+SHA1 (patch-bin_scalac) = 9f94052187549a5cd7d37c21cfae811fcbb73d9e
+SHA1 (patch-bin_scaladoc) = e95eb071692f5f938433fd864cf84c89ede3bc38
+SHA1 (patch-bin_scalap) = 183119ec731733a923514f372e68d47cf187586b
diff --git a/lang/scala/patches/patch-ac b/lang/scala/patches/patch-ac
deleted file mode 100644
index 668b72a7ddc..00000000000
--- a/lang/scala/patches/patch-ac
+++ /dev/null
@@ -1,37 +0,0 @@
-$NetBSD: patch-ac,v 1.2 2010/08/12 12:31:47 asau Exp $
-
-Hardwire paths to installed files and Java binary.
-
---- bin/sbaz.orig 2010-07-13 19:48:47.000000000 +0400
-+++ bin/sbaz 2010-08-12 16:22:14.000000000 +0400
-@@ -14,23 +14,7 @@
- esac
-
- # Finding the root folder for this Scala distribution
--SOURCE=$0;
--SCRIPT=`basename "$SOURCE"`;
--while [ -h "$SOURCE" ]; do
-- SCRIPT=`basename "$SOURCE"`;
-- LOOKUP=`ls -ld "$SOURCE"`;
-- TARGET=`expr "$LOOKUP" : '.*-> \(.*\)$'`;
-- if expr "${TARGET:-.}/" : '/.*/$' > /dev/null; then
-- SOURCE=${TARGET:-.};
-- else
-- SOURCE=`dirname "$SOURCE"`/${TARGET:-.};
-- fi;
--done;
--
--# see #2092
--SCALA_HOME=`dirname "$SOURCE"`
--SCALA_HOME=`cd "$SCALA_HOME"; pwd -P`
--SCALA_HOME=`cd "$SCALA_HOME"/..; pwd`
-+SCALA_HOME=@SCALA_HOME@
-
- # Remove spaces from SCALA_HOME on windows
- if $cygwin; then
-@@ -83,4 +67,4 @@
- JAVACMD="$JAVA_HOME/bin/java"
- fi
-
--exec "${JAVACMD:=java}" $JAVA_OPTS -cp "$TOOL_CLASSPATH" -Dscala.home="$SCALA_HOME" -Denv.classpath="$CLASSPATH" -Denv.emacs="$EMACS" sbaz.clui.CommandLine "$@"
-+exec ${JAVACMD:=@JAVA_HOME@/bin/java} $JAVA_OPTS -cp "$TOOL_CLASSPATH" -Dscala.home="$SCALA_HOME" -Denv.classpath="$CLASSPATH" -Denv.emacs="$EMACS" sbaz.clui.CommandLine "$@"
diff --git a/lang/scala/patches/patch-ae b/lang/scala/patches/patch-bin_fsc
index 4ccd4f0d526..e9fcc89d591 100644
--- a/lang/scala/patches/patch-ae
+++ b/lang/scala/patches/patch-bin_fsc
@@ -1,10 +1,10 @@
-$NetBSD: patch-ae,v 1.2 2010/08/12 12:31:47 asau Exp $
+$NetBSD: patch-bin_fsc,v 1.1 2011/09/30 07:56:14 yyamano Exp $
Hardwire paths to installed files and Java binary.
---- bin/scalac.orig 2010-07-13 19:48:47.000000000 +0400
-+++ bin/scalac 2010-08-12 16:24:05.000000000 +0400
-@@ -14,23 +14,7 @@
+--- bin/fsc.orig 2011-08-29 16:44:20.000000000 +0000
++++ bin/fsc
+@@ -48,23 +48,7 @@ case "`uname`" in
esac
# Finding the root folder for this Scala distribution
@@ -29,9 +29,12 @@ Hardwire paths to installed files and Java binary.
# Remove spaces from SCALA_HOME on windows
if $cygwin; then
-@@ -80,4 +64,4 @@
+@@ -150,7 +134,7 @@ if [ -z "$JAVACMD" -a -n "$JAVA_HOME" -a
JAVACMD="$JAVA_HOME/bin/java"
fi
--exec "${JAVACMD:=java}" $JAVA_OPTS -cp "$TOOL_CLASSPATH" -Dscala.home="$SCALA_HOME" -Denv.emacs="$EMACS" scala.tools.nsc.Main "$@"
-+exec "${JAVACMD:=@JAVA_HOME@/bin/java}" $JAVA_OPTS -cp "$TOOL_CLASSPATH" -Dscala.home="$SCALA_HOME" -Denv.classpath="$CLASSPATH" -Denv.emacs="$EMACS" scala.tools.nsc.Main "$@"
+-"${JAVACMD:=java}" \
++"${JAVACMD:=@JAVA_HOME@/bin/java}" \
+ $JAVA_OPTS \
+ "${java_args[@]}" \
+ ${CPSELECT}${TOOL_CLASSPATH} \
diff --git a/lang/scala/patches/patch-aa b/lang/scala/patches/patch-bin_sbaz
index 44c9e59a9aa..3e658e039a9 100644
--- a/lang/scala/patches/patch-aa
+++ b/lang/scala/patches/patch-bin_sbaz
@@ -1,10 +1,10 @@
-$NetBSD: patch-aa,v 1.2 2010/08/12 12:31:47 asau Exp $
+$NetBSD: patch-bin_sbaz,v 1.1 2011/09/30 07:56:14 yyamano Exp $
Hardwire paths to installed files and Java binary.
---- bin/fsc.orig 2010-07-13 19:48:47.000000000 +0400
-+++ bin/fsc 2010-08-12 16:20:49.000000000 +0400
-@@ -14,23 +14,7 @@
+--- bin/sbaz.orig 2011-08-29 16:44:19.000000000 +0000
++++ bin/sbaz
+@@ -14,23 +14,7 @@ case "`uname`" in
esac
# Finding the root folder for this Scala distribution
@@ -29,9 +29,9 @@ Hardwire paths to installed files and Java binary.
# Remove spaces from SCALA_HOME on windows
if $cygwin; then
-@@ -80,4 +64,4 @@
+@@ -83,4 +67,4 @@ if [ -z "$JAVACMD" -a -n "$JAVA_HOME" -a
JAVACMD="$JAVA_HOME/bin/java"
fi
--exec "${JAVACMD:=java}" $JAVA_OPTS -cp "$TOOL_CLASSPATH" -Dscala.home="$SCALA_HOME" -Denv.emacs="$EMACS" scala.tools.nsc.CompileClient "$@"
-+exec "${JAVACMD:=@JAVA_HOME@/bin/java}" $JAVA_OPTS -cp "$TOOL_CLASSPATH" -Dscala.home="$SCALA_HOME" -Denv.classpath="$CLASSPATH" -Denv.emacs="$EMACS" scala.tools.nsc.CompileClient "$@"
+-exec "${JAVACMD:=java}" $JAVA_OPTS -cp "$TOOL_CLASSPATH" -Dscala.home="$SCALA_HOME" -Denv.classpath="$CLASSPATH" -Denv.emacs="$EMACS" sbaz.clui.CommandLine "$@"
++exec "${JAVACMD:=@JAVA_HOME@/bin/java}" $JAVA_OPTS -cp "$TOOL_CLASSPATH" -Dscala.home="$SCALA_HOME" -Denv.classpath="$CLASSPATH" -Denv.emacs="$EMACS" sbaz.clui.CommandLine "$@"
diff --git a/lang/scala/patches/patch-ab b/lang/scala/patches/patch-bin_sbaz-setup
index 7bf42cc8415..8d947a6c516 100644
--- a/lang/scala/patches/patch-ab
+++ b/lang/scala/patches/patch-bin_sbaz-setup
@@ -1,17 +1,10 @@
-$NetBSD: patch-ab,v 1.2 2010/08/12 12:31:47 asau Exp $
+$NetBSD: patch-bin_sbaz-setup,v 1.1 2011/09/30 07:56:14 yyamano Exp $
Hardwire paths to installed files and Java binary.
-Fix shell.
---- bin/sbaz-setup.orig 2010-07-13 19:48:47.000000000 +0400
-+++ bin/sbaz-setup 2010-08-12 16:21:31.000000000 +0400
-@@ -1,4 +1,4 @@
--#!/bin/bash
-+#!/bin/sh
-
- set -e
-
-@@ -10,23 +10,7 @@
+--- bin/sbaz-setup.orig 2011-08-29 16:44:20.000000000 +0000
++++ bin/sbaz-setup
+@@ -10,25 +10,8 @@ case "`uname`" in
esac
@@ -32,7 +25,10 @@ Fix shell.
- SCALA_HOME=`dirname "$SOURCE"`/..;
- SCALA_HOME=`cd "$SCALA_HOME"; pwd`;
-fi
+-
+-SBAZ="$SCALA_HOME/bin/sbaz"
+SCALA_HOME=@SCALA_HOME@
++SBAZ="@PREFIX@/bin/sbaz"
- SBAZ="$SCALA_HOME/bin/sbaz"
-
+ if [ "$1" = "" ]
+ then
diff --git a/lang/scala/patches/patch-af b/lang/scala/patches/patch-bin_scala
index fefaf159b27..80aaa0127bd 100644
--- a/lang/scala/patches/patch-af
+++ b/lang/scala/patches/patch-bin_scala
@@ -1,10 +1,10 @@
-$NetBSD: patch-af,v 1.2 2010/08/12 12:31:47 asau Exp $
+$NetBSD: patch-bin_scala,v 1.1 2011/09/30 07:56:14 yyamano Exp $
Hardwire paths to installed files and Java binary.
---- bin/scaladoc.orig 2010-07-13 19:48:46.000000000 +0400
-+++ bin/scaladoc 2010-08-12 16:25:02.000000000 +0400
-@@ -14,23 +14,7 @@
+--- bin/scala.orig 2011-08-29 16:44:19.000000000 +0000
++++ bin/scala
+@@ -48,23 +48,7 @@ case "`uname`" in
esac
# Finding the root folder for this Scala distribution
@@ -29,9 +29,12 @@ Hardwire paths to installed files and Java binary.
# Remove spaces from SCALA_HOME on windows
if $cygwin; then
-@@ -80,4 +64,4 @@
+@@ -150,7 +134,7 @@ if [ -z "$JAVACMD" -a -n "$JAVA_HOME" -a
JAVACMD="$JAVA_HOME/bin/java"
fi
--exec "${JAVACMD:=java}" $JAVA_OPTS -cp "$TOOL_CLASSPATH" -Dscala.home="$SCALA_HOME" -Denv.emacs="$EMACS" scala.tools.nsc.ScalaDoc "$@"
-+exec "${JAVACMD:=@JAVA_HOME@/bin/java}" $JAVA_OPTS -cp "$TOOL_CLASSPATH" -Dscala.home="$SCALA_HOME" -Denv.classpath="$CLASSPATH" -Denv.emacs="$EMACS" scala.tools.nsc.ScalaDoc "$@"
+-"${JAVACMD:=java}" \
++"${JAVACMD:=@JAVA_HOME@/bin/java}" \
+ $JAVA_OPTS \
+ "${java_args[@]}" \
+ ${CPSELECT}${TOOL_CLASSPATH} \
diff --git a/lang/scala/patches/patch-ad b/lang/scala/patches/patch-bin_scalac
index cca4676fdf9..0f53a6a5f83 100644
--- a/lang/scala/patches/patch-ad
+++ b/lang/scala/patches/patch-bin_scalac
@@ -1,10 +1,10 @@
-$NetBSD: patch-ad,v 1.2 2010/08/12 12:31:47 asau Exp $
+$NetBSD: patch-bin_scalac,v 1.1 2011/09/30 07:56:14 yyamano Exp $
Hardwire paths to installed files and Java binary.
---- bin/scala.orig 2010-07-13 19:48:47.000000000 +0400
-+++ bin/scala 2010-08-12 16:23:06.000000000 +0400
-@@ -14,23 +14,7 @@
+--- bin/scalac.orig 2011-08-29 16:44:20.000000000 +0000
++++ bin/scalac
+@@ -48,23 +48,7 @@ case "`uname`" in
esac
# Finding the root folder for this Scala distribution
@@ -29,9 +29,12 @@ Hardwire paths to installed files and Java binary.
# Remove spaces from SCALA_HOME on windows
if $cygwin; then
-@@ -80,4 +64,4 @@
+@@ -150,7 +134,7 @@ if [ -z "$JAVACMD" -a -n "$JAVA_HOME" -a
JAVACMD="$JAVA_HOME/bin/java"
fi
--exec "${JAVACMD:=java}" $JAVA_OPTS -cp "$TOOL_CLASSPATH" -Dscala.home="$SCALA_HOME" -Denv.emacs="$EMACS" scala.tools.nsc.MainGenericRunner "$@"
-+exec "${JAVACMD:=@JAVA_HOME@/bin/java}" $JAVA_OPTS -cp "$TOOL_CLASSPATH" -Dscala.home="$SCALA_HOME" -Denv.classpath="$CLASSPATH" -Denv.emacs="$EMACS" scala.tools.nsc.MainGenericRunner "$@"
+-"${JAVACMD:=java}" \
++"${JAVACMD:=@JAVA_HOME@/bin/java}" \
+ $JAVA_OPTS \
+ "${java_args[@]}" \
+ ${CPSELECT}${TOOL_CLASSPATH} \
diff --git a/lang/scala/patches/patch-bin_scaladoc b/lang/scala/patches/patch-bin_scaladoc
new file mode 100644
index 00000000000..b0563a4fe40
--- /dev/null
+++ b/lang/scala/patches/patch-bin_scaladoc
@@ -0,0 +1,40 @@
+$NetBSD: patch-bin_scaladoc,v 1.1 2011/09/30 07:56:14 yyamano Exp $
+
+Hardwire paths to installed files and Java binary.
+
+--- bin/scaladoc.orig 2011-08-29 16:44:19.000000000 +0000
++++ bin/scaladoc
+@@ -48,23 +48,7 @@ case "`uname`" in
+ esac
+
+ # Finding the root folder for this Scala distribution
+-SOURCE=$0;
+-SCRIPT=`basename "$SOURCE"`;
+-while [ -h "$SOURCE" ]; do
+- SCRIPT=`basename "$SOURCE"`;
+- LOOKUP=`ls -ld "$SOURCE"`;
+- TARGET=`expr "$LOOKUP" : '.*-> \(.*\)$'`;
+- if expr "${TARGET:-.}/" : '/.*/$' > /dev/null; then
+- SOURCE=${TARGET:-.};
+- else
+- SOURCE=`dirname "$SOURCE"`/${TARGET:-.};
+- fi;
+-done;
+-
+-# see #2092
+-SCALA_HOME=`dirname "$SOURCE"`
+-SCALA_HOME=`cd "$SCALA_HOME"; pwd -P`
+-SCALA_HOME=`cd "$SCALA_HOME"/..; pwd`
++SCALA_HOME=@SCALA_HOME@
+
+ # Remove spaces from SCALA_HOME on windows
+ if $cygwin; then
+@@ -150,7 +134,7 @@ if [ -z "$JAVACMD" -a -n "$JAVA_HOME" -a
+ JAVACMD="$JAVA_HOME/bin/java"
+ fi
+
+-"${JAVACMD:=java}" \
++"${JAVACMD:=@JAVA_HOME@/bin/java}" \
+ $JAVA_OPTS \
+ "${java_args[@]}" \
+ ${CPSELECT}${TOOL_CLASSPATH} \
diff --git a/lang/scala/patches/patch-bin_scalap b/lang/scala/patches/patch-bin_scalap
new file mode 100644
index 00000000000..0055f6a2abf
--- /dev/null
+++ b/lang/scala/patches/patch-bin_scalap
@@ -0,0 +1,40 @@
+$NetBSD: patch-bin_scalap,v 1.1 2011/09/30 07:56:14 yyamano Exp $
+
+Hardwire paths to installed files and Java binary.
+
+--- bin/scalap.orig 2011-08-29 16:44:19.000000000 +0000
++++ bin/scalap
+@@ -48,23 +48,7 @@ case "`uname`" in
+ esac
+
+ # Finding the root folder for this Scala distribution
+-SOURCE=$0;
+-SCRIPT=`basename "$SOURCE"`;
+-while [ -h "$SOURCE" ]; do
+- SCRIPT=`basename "$SOURCE"`;
+- LOOKUP=`ls -ld "$SOURCE"`;
+- TARGET=`expr "$LOOKUP" : '.*-> \(.*\)$'`;
+- if expr "${TARGET:-.}/" : '/.*/$' > /dev/null; then
+- SOURCE=${TARGET:-.};
+- else
+- SOURCE=`dirname "$SOURCE"`/${TARGET:-.};
+- fi;
+-done;
+-
+-# see #2092
+-SCALA_HOME=`dirname "$SOURCE"`
+-SCALA_HOME=`cd "$SCALA_HOME"; pwd -P`
+-SCALA_HOME=`cd "$SCALA_HOME"/..; pwd`
++SCALA_HOME=@SCALA_HOME@
+
+ # Remove spaces from SCALA_HOME on windows
+ if $cygwin; then
+@@ -150,7 +134,7 @@ if [ -z "$JAVACMD" -a -n "$JAVA_HOME" -a
+ JAVACMD="$JAVA_HOME/bin/java"
+ fi
+
+-"${JAVACMD:=java}" \
++"${JAVACMD:=@JAVA_HOME@/bin/java}" \
+ $JAVA_OPTS \
+ "${java_args[@]}" \
+ ${CPSELECT}${TOOL_CLASSPATH} \