pkgsrc/lang/scala/patches/patch-bin_scalac
yyamano 15bcd633e2 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.
2011-09-30 07:56:13 +00:00

40 lines
1.1 KiB
Text

$NetBSD: patch-bin_scalac,v 1.1 2011/09/30 07:56:14 yyamano Exp $
Hardwire paths to installed files and Java binary.
--- 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
-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} \