homebrew-core/Formula/mmix.rb

42 lines
926 B
Ruby
Raw Normal View History

2014-03-25 20:44:56 +00:00
require "formula"
class Mmix < Formula
desc "64-bit RISC architecture designed by Donald Knuth"
2014-03-25 20:44:56 +00:00
homepage "http://mmix.cs.hm.edu/"
url "http://mmix.cs.hm.edu/src/mmix-20131017.tgz"
sha1 "75dba738c72fb163302160e745096846a7b8672a"
2014-03-26 16:24:24 +00:00
bottle do
cellar :any
sha1 "3203586ea18c63f2332cd7d52e739f87c6bf71c6" => :mavericks
sha1 "cc8eeb7fe526992122ddf3a42fc422837b18a0d4" => :mountain_lion
sha1 "d1cddd4fff7468c8234f3362d42b2a4bfbd17cee" => :lion
end
2014-03-25 20:44:56 +00:00
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 bin/"mmixal", "hello.mms"
2014-03-25 20:44:56 +00:00
assert_equal "Hello world!", `mmix hello.mmo`
end
end