homebrew-core/Formula/mmix.rb

39 lines
1 KiB
Ruby
Raw Normal View History

2014-03-25 20:44:56 +00:00
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-20160804.tgz"
sha256 "fad8e64fddf2d75cbcd5080616b47e11a2d292a428cdb0c12e579be680ecdee9"
2014-03-25 20:44:56 +00:00
2014-03-26 16:24:24 +00:00
bottle do
2016-05-08 09:46:57 +00:00
cellar :any_skip_relocation
2016-11-05 22:51:31 +00:00
sha256 "b694920e61edf2dec094618910be78fcd4fbbcad22d4d37363555aad38ee0af0" => :sierra
sha256 "c1e8e0d2d627b3ab2c2c68a8b358981dab07466c3c70f3a2e4df8557006deb92" => :el_capitan
sha256 "7675c2bc1253e4da2a126d52942449f71cabdd83c39874403d449b5a05ceb145" => :yosemite
2014-03-26 16:24:24 +00:00
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,Fputs,StdErr
2014-03-25 20:44:56 +00:00
TRAP 0,Halt,0
EOS
system bin/"mmixal", "hello.mms"
assert_equal "Hello world!", shell_output("#{bin}/mmix hello.mmo")
2014-03-25 20:44:56 +00:00
end
end