diff options
Diffstat (limited to 'Library/Formula')
| -rw-r--r-- | Library/Formula/ats2-postiats.rb | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/Library/Formula/ats2-postiats.rb b/Library/Formula/ats2-postiats.rb new file mode 100644 index 000000000..d58c12f45 --- /dev/null +++ b/Library/Formula/ats2-postiats.rb @@ -0,0 +1,33 @@ +require "formula" + +class Ats2Postiats < Formula + homepage "http://www.ats-lang.org/" + url "https://downloads.sourceforge.net/project/ats2-lang/ats2-lang/ats2-postiats-0.1.0/ATS2-Postiats-0.1.0.tgz" + sha1 "7767db094f7f050edf30518866892b6cd0e2277e" + + depends_on "gmp" + + 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 + File.open("hello.dats", "w") do |f| + f.write <<-EOF.undent + val _ = print ("Hello, world!\n") + implement main0 () = () + EOF + end + system "#{bin}/patscc hello.dats -o hello" + IO.popen("./hello", "r") do |pipe| + assert_match "Hello, world!", pipe.read + end + end +end |
