2014-07-13 08:46:22 +00:00
|
|
|
class Ats2Postiats < Formula
|
2015-05-19 00:00:59 +00:00
|
|
|
desc "ATS programming language implementation"
|
2014-07-13 08:46:22 +00:00
|
|
|
homepage "http://www.ats-lang.org/"
|
2015-05-28 13:29:42 +00:00
|
|
|
url "https://downloads.sourceforge.net/project/ats2-lang/ats2-lang/ats2-postiats-0.1.13/ATS2-Postiats-0.1.13.tgz"
|
|
|
|
sha1 "d6cc8b5bcd8a323701d7c6a86cf4466ad36af4b4"
|
2014-07-13 08:46:22 +00:00
|
|
|
|
2014-07-13 23:00:21 +00:00
|
|
|
bottle do
|
|
|
|
cellar :any
|
2015-05-28 13:56:22 +00:00
|
|
|
sha256 "07927a049396017ed2afeaf0eb71134b5759e1864535ef38a2b3ffbda7df9f4b" => :yosemite
|
|
|
|
sha256 "61a899de07271245f29713e3f52ecfe9c365d0cb9deb07745a6fec4a895520c9" => :mavericks
|
|
|
|
sha256 "1097d605c57f3baccb3a63acbd9185f5d33c1edcd2c7bdebbe0ad633d09d84ef" => :mountain_lion
|
2014-07-13 23:00:21 +00:00
|
|
|
end
|
|
|
|
|
2014-07-13 08:46:22 +00:00
|
|
|
depends_on "gmp"
|
|
|
|
|
2014-11-09 05:48:35 +00:00
|
|
|
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
|