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.2/ATS2-Postiats-0.2.2.tgz"
sha256 "3a32aa65928d79cd17328475bd85c24dc83fb7c429826eb857beb73dad446525"
2014-07-13 08:46:22 +00:00
bottle do
cellar :any
2015-09-01 08:50:08 +00:00
sha256 "a011b5d66c72bcff0e779db8db96570b28baab1898bbd22cbec2df9998ad2caf" => :yosemite
sha256 "702f83b5149cad7df30c2cecc75e2e2ec8561f3213a63ecd23d5a95d3d1eee76" => :mavericks
sha256 "c94738700929ddec7ce7b100c341e7c53612200462ba7164697f74903eab672c" => :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
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