|
# Licensed to the Apache Software Foundation (ASF) under one or more |
|
# contributor license agreements. See the NOTICE file distributed with |
|
# this work for additional information regarding copyright ownership. |
|
# The ASF licenses this file to You under the Apache License, Version 2.0 |
|
# (the "License"); you may not use this file except in compliance with |
|
# the License. You may obtain a copy of the License at |
|
# |
|
# http://www.apache.org/licenses/LICENSE-2.0 |
|
# |
|
# Unless required by applicable law or agreed to in writing, software |
|
# distributed under the License is distributed on an "AS IS" BASIS, |
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
|
# See the License for the specific language governing permissions and |
|
# limitations under the License. |
|
|
|
require 'formula' |
|
|
|
class ScalaDocs < Formula |
|
homepage 'http://www.scala-lang.org/' |
|
url 'http://www.scala-lang.org/downloads/distrib/files/scala-docs-2.10.0.zip' |
|
md5 '699d61aff25f16a5560372e610da91ab' |
|
end |
|
|
|
class ScalaCompletion < Formula |
|
homepage 'http://www.scala-lang.org/' |
|
url 'https://raw.github.com/scala/scala-dist/27bc0c25145a83691e3678c7dda602e765e13413/completion.d/2.9.1/scala' |
|
version '2.9.1' |
|
sha1 'e2fd99fe31a9fb687a2deaf049265c605692c997' |
|
end |
|
|
|
class Scala < Formula |
|
homepage 'http://www.scala-lang.org/' |
|
url 'http://www.scala-lang.org/downloads/distrib/files/scala-2.10.0.tgz' |
|
md5 '7692fc5b9b5e0038842e1e256ae8f120' |
|
version '2.10.0' |
|
|
|
option 'with-docs', 'Also install library documentation' |
|
|
|
def install |
|
rm_f Dir["bin/*.bat"] |
|
doc.install Dir['doc/*'] |
|
man1.install Dir['man/man1/*'] |
|
libexec.install Dir['*'] |
|
bin.install_symlink Dir["#{libexec}/bin/*"] |
|
ScalaCompletion.new.brew { (prefix/'etc/bash_completion.d').install 'scala' } |
|
ScalaDocs.new.brew { doc.install Dir['*'] } if build.include? 'with-docs' |
|
end |
|
end |