summaryrefslogtreecommitdiff
path: root/lang/scala
diff options
context:
space:
mode:
authoryyamano <yyamano@pkgsrc.org>2010-01-23 10:50:45 +0000
committeryyamano <yyamano@pkgsrc.org>2010-01-23 10:50:45 +0000
commit7e4af2890e4dca11f803c59ce1c7401d4966c4e6 (patch)
treed704e6ea696639989fbc1615f7ce885c8333c237 /lang/scala
parent2feec747e986c63a1ede09557af17ff86cdda184 (diff)
downloadpkgsrc-7e4af2890e4dca11f803c59ce1c7401d4966c4e6.tar.gz
Import Scala 2.7.7.final.
Scala is a general purpose programming language designed to express common programming patterns in a concise, elegant, and type-safe way. It smoothly integrates features of object-oriented and functional languages, enabling Java and other programmers to be more productive.
Diffstat (limited to 'lang/scala')
-rw-r--r--lang/scala/DESCR4
-rw-r--r--lang/scala/Makefile43
-rw-r--r--lang/scala/PLIST108
-rw-r--r--lang/scala/distinfo11
-rw-r--r--lang/scala/patches/patch-aa46
-rw-r--r--lang/scala/patches/patch-ab52
-rw-r--r--lang/scala/patches/patch-ac46
-rw-r--r--lang/scala/patches/patch-ad46
-rw-r--r--lang/scala/patches/patch-ae46
-rw-r--r--lang/scala/patches/patch-af46
10 files changed, 448 insertions, 0 deletions
diff --git a/lang/scala/DESCR b/lang/scala/DESCR
new file mode 100644
index 00000000000..062658d5366
--- /dev/null
+++ b/lang/scala/DESCR
@@ -0,0 +1,4 @@
+Scala is a general purpose programming language designed to express common
+programming patterns in a concise, elegant, and type-safe way. It smoothly
+integrates features of object-oriented and functional languages, enabling
+Java and other programmers to be more productive.
diff --git a/lang/scala/Makefile b/lang/scala/Makefile
new file mode 100644
index 00000000000..57d2d7a2610
--- /dev/null
+++ b/lang/scala/Makefile
@@ -0,0 +1,43 @@
+# $NetBSD: Makefile,v 1.1.1.1 2010/01/23 10:50:45 yyamano Exp $
+
+DISTNAME= scala-2.7.7
+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/
+COMMENT= Scala is a multi-paradigm programming language
+
+PKG_DESTDIR_SUPPORT= user-destdir
+
+USE_JAVA= run
+USE_JAVA2= 1.5
+NO_BUILD= yes
+
+SCALA_HOME= ${DESTDIR}${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_STAGE.scala= pre-configure
+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}
+
+INSTALLATION_DIRS= bin man share/${DISTNAME}
+
+post-extract:
+ @${RM} ${WRKSRC}/bin/*.bat
+
+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}
+
+.include "../../mk/java-vm.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/lang/scala/PLIST b/lang/scala/PLIST
new file mode 100644
index 00000000000..50b532b3b2a
--- /dev/null
+++ b/lang/scala/PLIST
@@ -0,0 +1,108 @@
+@comment $NetBSD: PLIST,v 1.1.1.1 2010/01/23 10:50:45 yyamano Exp $
+bin/fsc
+bin/sbaz
+bin/sbaz-setup
+bin/scala
+bin/scalac
+bin/scaladoc
+man/man1/fsc.1
+man/man1/sbaz.1
+man/man1/scala.1
+man/man1/scalac.1
+man/man1/scaladoc.1
+share/${DISTNAME}/lib/sbaz-tests.jar
+share/${DISTNAME}/lib/sbaz.jar
+share/${DISTNAME}/lib/scala-compiler.jar
+share/${DISTNAME}/lib/scala-dbc.jar
+share/${DISTNAME}/lib/scala-library.jar
+share/${DISTNAME}/lib/scala-swing.jar
+share/${DISTNAME}/meta/available
+share/${DISTNAME}/meta/description
+share/${DISTNAME}/meta/installed
+share/${DISTNAME}/meta/universe
+share/${DISTNAME}/src/sbaz-src.jar
+share/${DISTNAME}/src/scala-compiler-src.jar
+share/${DISTNAME}/src/scala-dbc-src.jar
+share/${DISTNAME}/src/scala-library-src.jar
+share/${DISTNAME}/src/scala-swing-src.jar
+share/${DISTNAME}/doc/sbaz/manual.pdf
+share/${DISTNAME}/doc/sbaz/manual.html
+share/${DISTNAME}/doc/sbaz-setup/README.txt
+share/${DISTNAME}/doc/LICENSE
+share/${DISTNAME}/doc/README
+share/${DISTNAME}/misc/scala-tool-support/xcode/Specifications/Scala.pbfilespec
+share/${DISTNAME}/misc/scala-tool-support/xcode/Specifications/Scala.pblangspec
+share/${DISTNAME}/misc/scala-tool-support/xcode/README
+share/${DISTNAME}/misc/scala-tool-support/emacs/scala-mode-lib.el
+share/${DISTNAME}/misc/scala-tool-support/emacs/scala-mode.el
+share/${DISTNAME}/misc/scala-tool-support/emacs/README
+share/${DISTNAME}/misc/scala-tool-support/emacs/contrib/dot-ctags
+share/${DISTNAME}/misc/scala-tool-support/emacs/contrib/README
+share/${DISTNAME}/misc/scala-tool-support/emacs/FUTURE
+share/${DISTNAME}/misc/scala-tool-support/emacs/scala-mode-feature-tags.el
+share/${DISTNAME}/misc/scala-tool-support/emacs/AUTHORS
+share/${DISTNAME}/misc/scala-tool-support/emacs/scala-mode-fontlock.el
+share/${DISTNAME}/misc/scala-tool-support/emacs/scala-mode-ui.el
+share/${DISTNAME}/misc/scala-tool-support/emacs/scala-mode-navigation.el
+share/${DISTNAME}/misc/scala-tool-support/emacs/Makefile
+share/${DISTNAME}/misc/scala-tool-support/emacs/scala-mode-feature-speedbar.el
+share/${DISTNAME}/misc/scala-tool-support/emacs/scala-mode-auto.el
+share/${DISTNAME}/misc/scala-tool-support/emacs/scala-mode-feature-electric.el
+share/${DISTNAME}/misc/scala-tool-support/emacs/scala-mode-variables.el
+share/${DISTNAME}/misc/scala-tool-support/emacs/scala-mode-constants.el
+share/${DISTNAME}/misc/scala-tool-support/emacs/scala-mode-inf.el
+share/${DISTNAME}/misc/scala-tool-support/emacs/scala-mode-feature.el
+share/${DISTNAME}/misc/scala-tool-support/emacs/scala-mode-indent.el
+share/${DISTNAME}/misc/scala-tool-support/latex/verbfilterScala.java
+share/${DISTNAME}/misc/scala-tool-support/latex/tweaklist.sty
+share/${DISTNAME}/misc/scala-tool-support/latex/scalatex.scm
+share/${DISTNAME}/misc/scala-tool-support/latex/scaladefs.sty
+share/${DISTNAME}/misc/scala-tool-support/latex/scaladoc.sty
+share/${DISTNAME}/misc/scala-tool-support/a2ps/scala.ssh
+share/${DISTNAME}/misc/scala-tool-support/a2ps/README
+share/${DISTNAME}/misc/scala-tool-support/subethaedit/Scala.mode/Contents/Resources/English.lproj/InfoPlist.strings
+share/${DISTNAME}/misc/scala-tool-support/subethaedit/Scala.mode/Contents/Resources/English.lproj/Localizable.strings
+share/${DISTNAME}/misc/scala-tool-support/subethaedit/Scala.mode/Contents/Resources/Scripts/Rot13.scpt
+share/${DISTNAME}/misc/scala-tool-support/subethaedit/Scala.mode/Contents/Resources/AutocompleteAdditions.txt
+share/${DISTNAME}/misc/scala-tool-support/subethaedit/Scala.mode/Contents/Resources/SyntaxDefinition.xml
+share/${DISTNAME}/misc/scala-tool-support/subethaedit/Scala.mode/Contents/Resources/mytemplate.scala
+share/${DISTNAME}/misc/scala-tool-support/subethaedit/Scala.mode/Contents/Resources/RegexSymbols.xml
+share/${DISTNAME}/misc/scala-tool-support/subethaedit/Scala.mode/Contents/Resources/ModeSettings.xml
+share/${DISTNAME}/misc/scala-tool-support/subethaedit/Scala.mode/Contents/Info.plist
+share/${DISTNAME}/misc/scala-tool-support/subethaedit/artwork/readme.txt
+share/${DISTNAME}/misc/scala-tool-support/subethaedit/artwork/SymbolM.psd
+share/${DISTNAME}/misc/scala-tool-support/subethaedit/Documentation.webloc
+share/${DISTNAME}/misc/scala-tool-support/scite/README
+share/${DISTNAME}/misc/scala-tool-support/scite/scala.properties
+share/${DISTNAME}/misc/scala-tool-support/enscript/scala.st
+share/${DISTNAME}/misc/scala-tool-support/enscript/README
+share/${DISTNAME}/misc/scala-tool-support/intellij/scala.xml
+share/${DISTNAME}/misc/scala-tool-support/intellij/README
+share/${DISTNAME}/misc/scala-tool-support/notepad-plus/userDefineLang.xml
+share/${DISTNAME}/misc/scala-tool-support/notepad-plus/README
+share/${DISTNAME}/misc/scala-tool-support/vim/ftdetect/scala.vim
+share/${DISTNAME}/misc/scala-tool-support/vim/plugin/31-create-scala.vim
+share/${DISTNAME}/misc/scala-tool-support/vim/syntax/scala.vim
+share/${DISTNAME}/misc/scala-tool-support/vim/indent/scala.vim
+share/${DISTNAME}/misc/scala-tool-support/vim/README
+share/${DISTNAME}/misc/scala-tool-support/gedit/scala.lang
+share/${DISTNAME}/misc/scala-tool-support/gedit/README
+share/${DISTNAME}/misc/scala-tool-support/jedit/modes/scala.xml
+share/${DISTNAME}/misc/scala-tool-support/jedit/modes/README
+share/${DISTNAME}/misc/scala-tool-support/jedit/console/commando/scala.xml
+share/${DISTNAME}/misc/scala-tool-support/jedit/console/commando/scalac.xml
+share/${DISTNAME}/misc/scala-tool-support/jedit/console/README
+share/${DISTNAME}/misc/scala-tool-support/geshi/scala-alt.php
+share/${DISTNAME}/misc/scala-tool-support/geshi/scala.php
+share/${DISTNAME}/misc/scala-tool-support/bluefish/highlighting
+share/${DISTNAME}/misc/scala-tool-support/bluefish/README
+share/${DISTNAME}/misc/scala-tool-support/textwrangler/README
+share/${DISTNAME}/misc/scala-tool-support/textwrangler/Scala_Configuration.plist
+share/${DISTNAME}/misc/scala-tool-support/textmate/Bundles/Scala.tmbundle.zip
+share/${DISTNAME}/misc/scala-tool-support/kate/scala.xml
+share/${DISTNAME}/misc/scala-tool-support/kate/README
+share/${DISTNAME}/misc/sbaz/descriptors/scala-dev
+share/${DISTNAME}/misc/sbaz/descriptors/README
+share/${DISTNAME}/misc/sbaz/descriptors/lamp-rc
+share/${DISTNAME}/misc/sbaz/scala-library.jar
+share/${DISTNAME}/misc/sbaz-testall/tests/sbaz
diff --git a/lang/scala/distinfo b/lang/scala/distinfo
new file mode 100644
index 00000000000..85914dbaf5a
--- /dev/null
+++ b/lang/scala/distinfo
@@ -0,0 +1,11 @@
+$NetBSD: distinfo,v 1.1.1.1 2010/01/23 10:50:45 yyamano Exp $
+
+SHA1 (scala-2.7.7.final.tgz) = 2197475c8d137cb9f05614807e7d4f18ad8db7e3
+RMD160 (scala-2.7.7.final.tgz) = ea590b9e25fd0ede59cc6ccd5e9d3bba99885b0f
+Size (scala-2.7.7.final.tgz) = 15619192 bytes
+SHA1 (patch-aa) = ba7c9f1b154ed045ed29b6aa0ad85163db035034
+SHA1 (patch-ab) = 21cd2709f0f6669804ecfbac328df9d99572319c
+SHA1 (patch-ac) = 88ffdf598abc3a8c25f59d425cf149e6747829d2
+SHA1 (patch-ad) = de64edd3e5b9bd0f3e8ea8b6e9316a8344984907
+SHA1 (patch-ae) = 9030e246d502a9728ee20b4a2896559da3895ff3
+SHA1 (patch-af) = d5523354654cefd1e85233b2aa142b1d14fe5dc1
diff --git a/lang/scala/patches/patch-aa b/lang/scala/patches/patch-aa
new file mode 100644
index 00000000000..b8390214068
--- /dev/null
+++ b/lang/scala/patches/patch-aa
@@ -0,0 +1,46 @@
+$NetBSD: patch-aa,v 1.1.1.1 2010/01/23 10:50:45 yyamano Exp $
+
+--- bin/fsc.orig 2009-10-28 06:19:04.000000000 -0700
++++ bin/fsc
+@@ -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.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 "$@"
diff --git a/lang/scala/patches/patch-ab b/lang/scala/patches/patch-ab
new file mode 100644
index 00000000000..f7f120ee81a
--- /dev/null
+++ b/lang/scala/patches/patch-ab
@@ -0,0 +1,52 @@
+$NetBSD: patch-ab,v 1.1.1.1 2010/01/23 10:50:45 yyamano Exp $
+
+--- bin/sbaz-setup.orig 2009-10-28 06:19:05.000000000 -0700
++++ bin/sbaz-setup
+@@ -1,4 +1,4 @@
+-#!/bin/bash
++#!/bin/sh
+
+ set -e
+
+@@ -10,23 +10,24 @@ case "`uname`" in
+ esac
+
+
+-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;
+-if [ "$SCALA_HOME" = "" ]
+-then
+- SCALA_HOME=`dirname "$SOURCE"`/..;
+- SCALA_HOME=`cd "$SCALA_HOME"; pwd`;
+-fi
++#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;
++#if [ "$SCALA_HOME" = "" ]
++#then
++# SCALA_HOME=`dirname "$SOURCE"`/..;
++# SCALA_HOME=`cd "$SCALA_HOME"; pwd`;
++#fi
++SCALA_HOME=@SCALA_HOME@
+
+ SBAZ="$SCALA_HOME/bin/sbaz"
+
diff --git a/lang/scala/patches/patch-ac b/lang/scala/patches/patch-ac
new file mode 100644
index 00000000000..37f29717cb6
--- /dev/null
+++ b/lang/scala/patches/patch-ac
@@ -0,0 +1,46 @@
+$NetBSD: patch-ac,v 1.1.1.1 2010/01/23 10:50:45 yyamano Exp $
+
+--- bin/sbaz.orig 2009-10-28 06:19:03.000000000 -0700
++++ bin/sbaz
+@@ -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@
+ if $cygwin; then
+ SCALA_HOME=`cygpath --windows --short-name "$SCALA_HOME"`
+ SCALA_HOME=`cygpath --unix "$SCALA_HOME"`
+@@ -58,4 +59,4 @@ fi
+ # Reminder: substitution ${JAVA_OPTS:=-Xmx256M -Xms16M} DO NOT work on Solaris
+ [ -n "$JAVA_OPTS" ] || JAVA_OPTS="-Xmx256M -Xms16M"
+
+-${JAVACMD:=java} $JAVA_OPTS -cp "$TOOL_CLASSPATH" -Dscala.home="$SCALA_HOME" -Denv.classpath="$CLASSPATH" -Denv.emacs="$EMACS" sbaz.clui.CommandLine "$@"
++${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-ad b/lang/scala/patches/patch-ad
new file mode 100644
index 00000000000..7776070942b
--- /dev/null
+++ b/lang/scala/patches/patch-ad
@@ -0,0 +1,46 @@
+$NetBSD: patch-ad,v 1.1.1.1 2010/01/23 10:50:45 yyamano Exp $
+
+--- bin/scala.orig 2009-10-28 06:19:03.000000000 -0700
++++ bin/scala
+@@ -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.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 "$@"
diff --git a/lang/scala/patches/patch-ae b/lang/scala/patches/patch-ae
new file mode 100644
index 00000000000..295a72c3d29
--- /dev/null
+++ b/lang/scala/patches/patch-ae
@@ -0,0 +1,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 "$@"
diff --git a/lang/scala/patches/patch-af b/lang/scala/patches/patch-af
new file mode 100644
index 00000000000..3ba1bbf4424
--- /dev/null
+++ b/lang/scala/patches/patch-af
@@ -0,0 +1,46 @@
+$NetBSD: patch-af,v 1.1.1.1 2010/01/23 10:50:45 yyamano Exp $
+
+--- bin/scaladoc.orig 2009-10-28 06:19:03.000000000 -0700
++++ bin/scaladoc
+@@ -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.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 "$@"