homebrew-core/Formula/ats2-postiats.rb

39 lines
1.2 KiB
Ruby
Raw Normal View History

2014-07-13 08:46:22 +00:00
class Ats2Postiats < Formula
homepage "http://www.ats-lang.org/"
url "https://downloads.sourceforge.net/project/ats2-lang/ats2-lang/ats2-postiats-0.1.11/ATS2-Postiats-0.1.11.tgz"
sha1 "89f664ca39fe90057a789f867d6c9f30df5f8c9a"
2014-07-13 08:46:22 +00:00
bottle do
cellar :any
2015-04-24 13:42:05 +00:00
sha256 "5230ba943a43a1378e89afa29e15b64d906feaba91500b6444c7b873f2cf37a9" => :yosemite
sha256 "5c7edda3dff25844035867982eb9e919907badad5314418e0a09e275926f8235" => :mavericks
sha256 "aeb5da8a05d9b085c295196e19e2b3a42636e4592adf772b250103f6ed2bb872" => :mountain_lion
end
2014-07-13 08:46:22 +00:00
depends_on "gmp"
fails_with :clang do
cause "Trying to compile this with Clang is failure-galore."
end
2014-07-13 08:46:22 +00:00
def install
ENV.deparallelize
system "./configure", "--prefix=#{prefix}"
# Disable GC support for patsopt
# https://github.com/githwxi/ATS-Postiats/issues/76
system "make", "GCFLAG=-D_ATS_NGC", "all"
system "make", "install"
end
test do
2014-07-28 00:02:07 +00:00
(testpath/"hello.dats").write <<-EOS.undent
val _ = print ("Hello, world!\n")
implement main0 () = ()
EOS
2014-07-13 08:46:22 +00:00
system "#{bin}/patscc hello.dats -o hello"
2014-05-04 19:12:41 +00:00
assert_match "Hello, world!", shell_output(testpath/"hello")
2014-07-13 08:46:22 +00:00
end
end