2014-12-21 11:18:39 +00:00
|
|
|
class Chapel < Formula
|
|
|
|
homepage "http://chapel.cray.com/"
|
2015-04-02 05:22:57 +00:00
|
|
|
url "https://github.com/chapel-lang/chapel/releases/download/1.11.0/chapel-1.11.0.tar.gz"
|
|
|
|
sha256 "307b156d9cf0968bad90a2f7225366d90f6a5d948eb42be1d33f0efc6979949b"
|
2014-12-21 11:18:39 +00:00
|
|
|
head "https://github.com/chapel-lang/chapel.git"
|
|
|
|
|
2015-01-07 18:26:38 +00:00
|
|
|
bottle do
|
2015-04-03 01:28:34 +00:00
|
|
|
sha256 "364aabb29b63231fb16fd528232a60685fc6ee49358d0f8623eaccd6356d666e" => :yosemite
|
|
|
|
sha256 "7b600c3db7fb0fcccaed605cf112bf6331930d9a1fb29cf9b522723b8db0e46c" => :mavericks
|
|
|
|
sha256 "dd6605f94bad0dfbc342657d2dc43e037a482c2237c7f1c6aad3a1fa74df4236" => :mountain_lion
|
2015-01-07 18:26:38 +00:00
|
|
|
end
|
|
|
|
|
2014-12-21 11:18:39 +00:00
|
|
|
def install
|
|
|
|
libexec.install Dir["*"]
|
|
|
|
# Chapel uses this ENV to work out where to install.
|
|
|
|
ENV["CHPL_HOME"] = libexec
|
|
|
|
|
|
|
|
# Must be built from within CHPL_HOME to prevent build bugs.
|
|
|
|
# https://gist.github.com/DomT4/90dbcabcc15e5d4f786d
|
|
|
|
# https://github.com/Homebrew/homebrew/pull/35166
|
|
|
|
cd libexec do
|
2015-04-02 05:22:57 +00:00
|
|
|
system "make"
|
|
|
|
system "make", "chpldoc"
|
2014-12-21 11:18:39 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
prefix.install_metafiles
|
|
|
|
|
2015-04-02 05:22:57 +00:00
|
|
|
# Install chpl and other binaries (e.g. chpldoc) into bin/ as exec scripts.
|
|
|
|
bin.install Dir[libexec/"bin/darwin/*"]
|
|
|
|
bin.env_script_all_files libexec/"bin/darwin/", :CHPL_HOME => libexec
|
2014-12-21 11:18:39 +00:00
|
|
|
man1.install_symlink Dir["#{libexec}/man/man1/*.1"]
|
|
|
|
end
|
|
|
|
|
|
|
|
test do
|
|
|
|
(testpath/"hello.chpl").write "writeln('Hello, world!');"
|
|
|
|
system "#{bin}/chpl", "-o", "hello", "hello.chpl"
|
|
|
|
assert_equal "Hello, world!", shell_output("./hello").strip
|
|
|
|
end
|
|
|
|
end
|