45 lines
1.7 KiB
Ruby
45 lines
1.7 KiB
Ruby
class Sbt < Formula
|
|
desc "Build tool for Scala projects"
|
|
homepage "http://www.scala-sbt.org"
|
|
url "https://dl.bintray.com/sbt/native-packages/sbt/0.13.9/sbt-0.13.9.tgz"
|
|
sha256 "148f2801f2993773de6f8859fe0e6520fcabe649d66bb316e13aff8b2fd7f504"
|
|
|
|
bottle do
|
|
cellar :any_skip_relocation
|
|
sha256 "f80f0ddfa84833d74ce0aed91820c93dee33d19d27aea35bdf7cd4383e0241df" => :el_capitan
|
|
sha256 "975ba841d1a932880a7d707f1bd6144ccb39cfaecf84c45b0d574d6150ffb045" => :yosemite
|
|
sha256 "189eb34d636dda8bb19623abbc74734bfc7ba0762ff61ae8c0becc2fb01c7b02" => :mavericks
|
|
sha256 "c3b2df2a99c03f2c4591a17854e922af5301b82ef1db77301c5cfa61a132a016" => :mountain_lion
|
|
end
|
|
|
|
def install
|
|
inreplace "bin/sbt" do |s|
|
|
s.gsub! 'etc_sbt_opts_file="${sbt_home}/conf/sbtopts"', "etc_sbt_opts_file=\"#{etc}/sbtopts\""
|
|
s.gsub! "/etc/sbt/sbtopts", "#{etc}/sbtopts"
|
|
end
|
|
|
|
inreplace "bin/sbt-launch-lib.bash", "${sbt_home}/bin/sbt-launch.jar", "#{libexec}/sbt-launch.jar"
|
|
|
|
libexec.install "bin/sbt", "bin/sbt-launch-lib.bash", "bin/sbt-launch.jar"
|
|
etc.install "conf/sbtopts"
|
|
|
|
(bin/"sbt").write <<-EOS.undent
|
|
#!/bin/sh
|
|
if [ -f "$HOME/.sbtconfig" ]; then
|
|
echo "Use of ~/.sbtconfig is deprecated, please migrate global settings to #{etc}/sbtopts" >&2
|
|
. "$HOME/.sbtconfig"
|
|
fi
|
|
exec "#{libexec}/sbt" "$@"
|
|
EOS
|
|
end
|
|
|
|
def caveats; <<-EOS.undent
|
|
You can use $SBT_OPTS to pass additional JVM options to SBT:
|
|
SBT_OPTS="-XX:+CMSClassUnloadingEnabled -XX:MaxPermSize=256M"
|
|
|
|
This formula is now using the standard typesafe sbt launcher script.
|
|
Project specific options should be placed in .sbtopts in the root of your project.
|
|
Global settings should be placed in #{etc}/sbtopts
|
|
EOS
|
|
end
|
|
end
|