homebrew-core/Formula/ats2-postiats.rb

40 lines
1.2 KiB
Ruby
Raw Normal View History

2014-07-13 08:46:22 +00:00
class Ats2Postiats < Formula
desc "ATS programming language implementation"
2014-07-13 08:46:22 +00:00
homepage "http://www.ats-lang.org/"
url "https://downloads.sourceforge.net/project/ats2-lang/ats2-lang/ats2-postiats-0.2.4/ATS2-Postiats-0.2.4.tgz"
sha256 "33365e1cab4f897ab24176a0988980dc4830bf8b35bf16daa8fb745006abb6a8"
2014-07-13 08:46:22 +00:00
bottle do
cellar :any
2015-10-29 02:01:17 +00:00
sha256 "5eef2e2e5135bb713c29b64da2ac63d96acb16dbc76fe2b7248332405546495c" => :el_capitan
sha256 "41eeebebef65ff56c3c655c2c3c7dc624c7702982912596bf33cde6d5ab00ece" => :yosemite
sha256 "c29a2ac2b51304cb5f42ab7698257e6d098e85202d3453320be1abe480d90207" => :mavericks
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
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