blob: 295a72c3d2952ceafff65687f3621d4ea35eb54a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
|
$NetBSD: patch-ae,v 1.1.1.1 2010/01/23 10:50:45 yyamano Exp $
--- bin/scalac.orig 2009-10-28 06:19:04.000000000 -0700
+++ bin/scalac
@@ -14,20 +14,21 @@ 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;
-SCALA_HOME=`dirname "$SOURCE"`/..;
-SCALA_HOME=`cd "$SCALA_HOME"; pwd`;
+#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;
+#SCALA_HOME=`dirname "$SOURCE"`/..;
+#SCALA_HOME=`cd "$SCALA_HOME"; pwd`;
+SCALA_HOME=@SCALA_HOME@
# Remove spaces from SCALA_HOME on windows
if $cygwin; then
SCALA_HOME=`cygpath --windows --short-name "$SCALA_HOME"`
@@ -63,4 +64,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.classpath="$CLASSPATH" -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 "$@"
|