From a898b1dc9509317bd5ed57380f4677c42ac4d24b Mon Sep 17 00:00:00 2001 From: Eugene Yokota Date: Thu, 10 Aug 2017 18:28:06 -0400 Subject: [PATCH] sbt@0.13 0.13.16 (new formula) This is a copy of previous sbt formula, so it's actually an old formula. --- Aliases/sbt@1 | 1 + Formula/sbt@0.13.rb | 46 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 47 insertions(+) create mode 120000 Aliases/sbt@1 create mode 100644 Formula/sbt@0.13.rb diff --git a/Aliases/sbt@1 b/Aliases/sbt@1 new file mode 120000 index 0000000000..252751c603 --- /dev/null +++ b/Aliases/sbt@1 @@ -0,0 +1 @@ +../Formula/sbt.rb \ No newline at end of file diff --git a/Formula/sbt@0.13.rb b/Formula/sbt@0.13.rb new file mode 100644 index 0000000000..2162e45a2b --- /dev/null +++ b/Formula/sbt@0.13.rb @@ -0,0 +1,46 @@ +class SbtAT013 < Formula + desc "Build tool for Scala projects" + homepage "http://www.scala-sbt.org" + url "https://dl.bintray.com/homebrew/mirror/sbt-0.13.16" + mirror "https://cocl.us/sbt01316tgz" + sha256 "22729580a581e966259267eda4d937a2aecad86848f8a82fcc716dcae8dc760c" + + bottle :unneeded + + depends_on :java => "1.6+" + + 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 + + libexec.install "bin", "lib" + 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}/bin/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 uses the standard Lightbend 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 + + test do + ENV["_JAVA_OPTIONS"] = "-Dsbt.log.noformat=true" + ENV.java_cache + assert_match "[info] #{version}", shell_output("#{bin}/sbt sbtVersion") + end +end