port install
Scala2.8 から scala27 と scala28 の 2つが選べるようになってます。
port search scala
scala27 @2.7.7 (lang, java) The Scala Programming Language scala28 @2.8.0 (lang, java) The Scala Programming Language
scala28 をインストール。
sudo port install scala28
$ scala-2.8 -version Scala code runner version 2.8.0.final -- Copyright 2002-2010, LAMP/EPFL
ソフトリンク変更
/usr/local/bin にソフトリンク作ります。
$ which scala-2.8 /opt/local/bin/scala-2.8
えい。
sudo ln -s /opt/local/bin/scala-2.8 /usr/local/bin/scala sudo ln -s /opt/local/bin/scalac-2.8 /usr/local/bin/scalac sudo ln -s /opt/local/bin/scaladoc-2.8 /usr/local/bin/scaladoc sudo ln -s /opt/local/bin/scalap-2.8 /usr/local/bin/scalap sudo ln -s /opt/local/bin/fsc-2.8 /usr/local/bin/fsc sudo ln -s /opt/local/bin/sbaz-2.8 /usr/local/bin/sbaz sudo ln -s /opt/local/bin/sbaz-setup-2.8 /usr/local/bin/sbaz-setup
$ scala -version Scala code runner version 2.8.0.final -- Copyright 2002-2010, LAMP/EPFL
おけ。
REPL(Read-Eval-Print-Loop)で確認
$ scala Welcome to Scala version 2.8.0.final (Java HotSpot(TM) Client VM, Java 1.5.0_24). Type in expressions to have them evaluated. Type :help for more information. scala> println("Hello Scala!") Hello Scala!