2011-03-30 09:52:31 +00:00
|
|
|
class Fantom < Formula
|
2015-05-19 00:00:59 +00:00
|
|
|
desc "Object oriented, portable programming language"
|
2015-01-20 10:04:20 +00:00
|
|
|
homepage "http://fantom.org"
|
|
|
|
url "https://bitbucket.org/fantom/fan-1.0/downloads/fantom-1.0.67.zip"
|
2015-08-03 12:55:31 +00:00
|
|
|
sha256 "155b8317b25c8049a1d3ee8fb8642ce2a8719743906b05f53e116952fcff5e47"
|
2011-02-23 15:07:41 +00:00
|
|
|
|
2015-01-20 10:04:20 +00:00
|
|
|
option "with-src", "Also install fantom source"
|
|
|
|
option "with-examples", "Also install fantom examples"
|
2012-03-08 07:00:26 +00:00
|
|
|
|
2011-02-23 15:07:41 +00:00
|
|
|
def install
|
2015-01-20 10:04:20 +00:00
|
|
|
rm_f Dir["bin/*.exe", "bin/*.dll", "lib/dotnet/*"]
|
2014-03-06 20:40:26 +00:00
|
|
|
rm_rf "examples" if build.without? "examples"
|
|
|
|
rm_rf "src" if build.without? "src"
|
2011-03-30 09:52:31 +00:00
|
|
|
|
2015-01-20 10:04:20 +00:00
|
|
|
# Select the OS X JDK path in the config file
|
|
|
|
inreplace "etc/build/config.props", "//jdkHome=/System", "jdkHome=/System"
|
|
|
|
|
|
|
|
libexec.install Dir["*"]
|
|
|
|
chmod 0755, Dir["#{libexec}/bin/*"]
|
2012-02-12 19:07:38 +00:00
|
|
|
bin.install_symlink Dir["#{libexec}/bin/*"]
|
2011-02-23 15:07:41 +00:00
|
|
|
end
|
2013-05-22 20:56:28 +00:00
|
|
|
|
2015-01-20 10:04:20 +00:00
|
|
|
test do
|
|
|
|
(testpath/"test.fan").write <<-EOS.undent
|
|
|
|
class ATest {
|
|
|
|
static Void main() { echo("a test") }
|
|
|
|
}
|
|
|
|
EOS
|
2013-05-22 20:56:28 +00:00
|
|
|
|
2015-01-20 10:04:20 +00:00
|
|
|
assert_match "a test", shell_output("#{bin}/fan test.fan").chomp
|
|
|
|
end
|
|
|
|
end
|