2009-10-15 08:07:12 +00:00
|
|
|
require 'formula'
|
2009-09-04 01:26:09 +00:00
|
|
|
|
2011-03-10 05:11:03 +00:00
|
|
|
class ScalaDocs < Formula
|
2010-12-31 03:53:13 +00:00
|
|
|
homepage 'http://www.scala-lang.org/'
|
2012-03-11 06:49:30 +00:00
|
|
|
url 'http://www.scala-lang.org/downloads/distrib/files/scala-2.9.1-1-devel-docs.tgz'
|
|
|
|
md5 '6bfdd990c379c1b2c87335c89f6c444c'
|
2010-12-31 03:53:13 +00:00
|
|
|
end
|
|
|
|
|
2011-09-07 14:04:44 +00:00
|
|
|
class ScalaCompletion < Formula
|
|
|
|
homepage 'http://www.scala-lang.org/'
|
|
|
|
url 'https://raw.github.com/scala/scala-dist/27bc0c25145a8/completion.d/2.9.1/scala'
|
|
|
|
version '2.9.1'
|
|
|
|
md5 '40cb02604b718fd0977a12d932b9e693'
|
|
|
|
end
|
|
|
|
|
2011-03-10 05:11:03 +00:00
|
|
|
class Scala < Formula
|
2010-07-14 16:52:07 +00:00
|
|
|
homepage 'http://www.scala-lang.org/'
|
2012-03-11 06:49:30 +00:00
|
|
|
url 'http://www.scala-lang.org/downloads/distrib/files/scala-2.9.1-1.tgz'
|
|
|
|
md5 'bde2427b3f56e9c5ccb86a4376ac0d93'
|
2009-09-04 01:26:09 +00:00
|
|
|
|
2010-12-31 03:53:13 +00:00
|
|
|
def options
|
|
|
|
[['--with-docs', 'Also install library documentation']]
|
|
|
|
end
|
|
|
|
|
2009-09-04 01:26:09 +00:00
|
|
|
def install
|
2010-04-07 05:58:35 +00:00
|
|
|
rm_f Dir["bin/*.bat"]
|
2010-08-08 15:49:45 +00:00
|
|
|
doc.install Dir['doc/*']
|
2010-02-18 18:22:20 +00:00
|
|
|
man1.install Dir['man/man1/*']
|
2010-08-08 15:49:45 +00:00
|
|
|
libexec.install Dir['*']
|
2012-02-12 19:16:05 +00:00
|
|
|
bin.install_symlink Dir["#{libexec}/bin/*"]
|
2011-09-07 18:03:34 +00:00
|
|
|
ScalaCompletion.new.brew { (prefix+'etc/bash_completion.d').install 'scala' }
|
2012-03-11 16:44:26 +00:00
|
|
|
ScalaDocs.new.brew { doc.install Dir['*'] } if ARGV.include? '--with-docs'
|
|
|
|
end
|
2010-12-31 03:53:13 +00:00
|
|
|
|
2012-03-11 16:44:26 +00:00
|
|
|
def caveats; <<-EOS.undent
|
|
|
|
Bash completion has been installed to:
|
|
|
|
#{etc}/bash_completion.d
|
|
|
|
EOS
|
2009-09-04 01:26:09 +00:00
|
|
|
end
|
|
|
|
end
|