2013-10-14 22:32:27 +00:00
|
|
|
require 'formula'
|
|
|
|
|
|
|
|
class Acme < Formula
|
2015-05-19 00:00:59 +00:00
|
|
|
desc "Crossassembler for multiple environments"
|
2013-10-14 22:32:27 +00:00
|
|
|
homepage 'http://www.esw-heim.tu-clausthal.de/~marco/smorbrod/acme/'
|
|
|
|
url 'http://www.esw-heim.tu-clausthal.de/~marco/smorbrod/acme/current/acme091src.tar.gz'
|
|
|
|
version '0.91'
|
|
|
|
sha1 '7104ea01a2ca2962294aaac4974e10c6486534a8'
|
|
|
|
|
2014-12-12 08:22:14 +00:00
|
|
|
bottle do
|
|
|
|
cellar :any
|
|
|
|
sha1 "1d11ae93af38d5c851bbc53bb485b7278e50447c" => :yosemite
|
|
|
|
sha1 "84b5a3f996dab2603f7ad0c6edef309620672a0c" => :mavericks
|
|
|
|
sha1 "86a9fb8fd72407d787032bdc98282d9af036c5d9" => :mountain_lion
|
|
|
|
end
|
|
|
|
|
2014-12-12 08:09:57 +00:00
|
|
|
devel do
|
|
|
|
url "http://www.esw-heim.tu-clausthal.de/~marco/smorbrod/acme/current/acme093testing.tar.bz2"
|
|
|
|
sha1 "59bde69dcbb3242fc29fc019052cbdff10dbb8f8"
|
|
|
|
version "0.93"
|
|
|
|
end
|
|
|
|
|
2013-10-14 22:32:27 +00:00
|
|
|
def install
|
2014-04-17 04:10:10 +00:00
|
|
|
system "make", "-C", "src", "install", "BINDIR=#{bin}"
|
2013-10-14 22:32:27 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
test do
|
2014-02-03 18:34:03 +00:00
|
|
|
path = testpath/"a.asm"
|
|
|
|
path.write <<-EOS
|
|
|
|
!to "a.out", cbm
|
|
|
|
* = $c000
|
|
|
|
jmp $fce2
|
|
|
|
EOS
|
|
|
|
|
|
|
|
system bin/"acme", path
|
|
|
|
code = File.open(testpath/"a.out", "rb") { |f| f.read.unpack("C*") }
|
|
|
|
assert_equal [0x00, 0xc0, 0x4c, 0xe2, 0xfc], code
|
2013-10-14 22:32:27 +00:00
|
|
|
end
|
|
|
|
end
|