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-06-13 13:11:23 +00:00
|
|
|
url "https://downloads.sourceforge.net/project/ats2-lang/ats2-lang/ats2-postiats-0.2.0/ATS2-Postiats-0.2.0.tgz"
|
|
|
|
sha256 "455e269f5d56f0f92f8aa83d47e8e221135d1fe57f03f4afd9d1a07ab1ad3dfe"
|
2014-07-13 08:46:22 +00:00
|
|
|
|
2014-07-13 23:00:21 +00:00
|
|
|
bottle do
|
|
|
|
cellar :any
|
2015-06-13 13:31:19 +00:00
|
|
|
sha256 "610c16028ad304d1ceff668caabe1747b0dcdf0e30c53999c7180f71b35fecae" => :yosemite
|
|
|
|
sha256 "ab945998ef2c119a37ca558a0c74c23d447a00598f3c2c3c139648addb3f2631" => :mavericks
|
|
|
|
sha256 "88088dfb23656af89907bf82d280910b6eda7a49420e8e21246f223422614f96" => :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
|