$NetBSD: patch-aa,v 1.2 2010/08/12 12:31:47 asau 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 @@ 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 @@ -80,4 +64,4 @@ 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 "$@"