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/'
|
2011-05-27 13:43:25 +00:00
|
|
|
url 'http://www.scala-lang.org/downloads/distrib/files/scala-2.9.0.1-devel-docs.tgz'
|
|
|
|
version '2.9.0.1'
|
2011-06-17 03:27:34 +00:00
|
|
|
md5 'acb16cbdf46f682806f60b052707b7b7'
|
2010-12-31 03:53:13 +00:00
|
|
|
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/'
|
2011-05-27 13:43:25 +00:00
|
|
|
url 'http://www.scala-lang.org/downloads/distrib/files/scala-2.9.0.1.tgz'
|
2011-06-17 03:27:34 +00:00
|
|
|
md5 '10d01410fd75019fa21a88964462a077'
|
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['*']
|
|
|
|
bin.mkpath
|
|
|
|
Dir["#{libexec}/bin/*"].each { |f| ln_s f, bin }
|
2010-12-31 03:53:13 +00:00
|
|
|
|
|
|
|
if ARGV.include? '--with-docs'
|
|
|
|
ScalaDocs.new.brew { doc.install Dir['*'] }
|
|
|
|
end
|
2009-09-04 01:26:09 +00:00
|
|
|
end
|
|
|
|
end
|