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.3/ATS2-Postiats-0.2.3.tgz"
sha256 "a2a50305ddfc8c88d475e0378a9f476887d11c0a64f381b849f2b9f1746258cd"
2014-07-13 08:46:22 +00:00
bottle do
cellar :any
2015-09-26 04:28:34 +00:00
sha256 "295b064f14032a4451c809c895d73b0ca21fb0644a6120ace18e54834acdfb35" => :el_capitan
sha256 "c3540cd3eb58b2c928bbc44b9908dc5e7e481d0c55899e7161c73f0e8ba17c1c" => :yosemite
sha256 "5aa63e79df1724739cf0cd4b0ae61757f3326cd25b36cc19c995d520cbcbab52" => :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