aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula
diff options
context:
space:
mode:
Diffstat (limited to 'Library/Formula')
-rw-r--r--Library/Formula/mmix.rb33
1 files changed, 33 insertions, 0 deletions
diff --git a/Library/Formula/mmix.rb b/Library/Formula/mmix.rb
new file mode 100644
index 000000000..24ebe1c09
--- /dev/null
+++ b/Library/Formula/mmix.rb
@@ -0,0 +1,33 @@
+require "formula"
+
+class Mmix < Formula
+ homepage "http://mmix.cs.hm.edu/"
+ url "http://mmix.cs.hm.edu/src/mmix-20131017.tgz"
+ sha1 "75dba738c72fb163302160e745096846a7b8672a"
+
+ depends_on "cweb" => :build
+
+ def install
+ ENV.deparallelize
+
+ system "make", "all"
+
+ bin.install "mmix", "mmixal", "mmmix", "mmotype"
+ end
+
+ test do
+ (testpath/"hello.mms").write <<-EOS
+ LOC Data_Segment
+ GREG @
+txt BYTE "Hello world!",0
+
+ LOC #100
+
+Main LDA $255,txt
+ TRAP 0,Fputs,StdOut
+ TRAP 0,Halt,0
+ EOS
+ system "mmixal", "hello.mms"
+ assert_equal "Hello world!", `mmix hello.mmo`
+ end
+end