aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula
diff options
context:
space:
mode:
authorForest Belton2014-07-13 01:46:22 -0700
committerMike McQuaid2014-07-13 21:40:06 -0700
commit9d66a1b08b4151f839007fd75abca023e58e5ff3 (patch)
tree2426187c9c415b03e0d631a661393a10e0d40105 /Library/Formula
parentff3f1b8252ac2fe61ea3ba23dabe378f33bf16df (diff)
downloadhomebrew-9d66a1b08b4151f839007fd75abca023e58e5ff3.tar.bz2
ats2-postiats 0.1.0 (New formula)
Diffstat (limited to 'Library/Formula')
-rw-r--r--Library/Formula/ats2-postiats.rb33
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