2012-03-28 16:32:49 +00:00
|
|
|
require 'formula'
|
|
|
|
|
|
|
|
class Dasm < Formula
|
|
|
|
homepage 'http://dasm-dillon.sourceforge.net'
|
2014-06-14 10:26:39 +00:00
|
|
|
url 'https://downloads.sourceforge.net/project/dasm-dillon/dasm-dillon/2.20.11/dasm-2.20.11-2014.03.04-source.tar.gz'
|
|
|
|
sha1 '2ce78b29505b31778b8f796ba4b161b9f890e77e'
|
|
|
|
head 'svn://svn.code.sf.net/p/dasm-dillon/code/trunk'
|
2012-03-28 16:32:49 +00:00
|
|
|
|
2014-06-14 10:39:56 +00:00
|
|
|
bottle do
|
|
|
|
cellar :any
|
|
|
|
sha1 "16a36f8d3d57693ea2b2fea55ab264e538ddcfaf" => :mavericks
|
|
|
|
sha1 "5bf2a732a5e3d3b9963ad405c6b526b0a9cb74d0" => :mountain_lion
|
|
|
|
sha1 "14895b0dee0237dec3cc7cedafeba2fdb4b88bad" => :lion
|
|
|
|
end
|
|
|
|
|
2012-03-28 16:32:49 +00:00
|
|
|
def install
|
|
|
|
system "make"
|
2012-09-28 04:26:52 +00:00
|
|
|
prefix.install 'bin', 'doc'
|
2012-03-28 16:32:49 +00:00
|
|
|
end
|
2014-02-03 17:46:14 +00:00
|
|
|
|
|
|
|
test do
|
|
|
|
path = testpath/"a.asm"
|
|
|
|
path.write <<-EOS
|
|
|
|
processor 6502
|
|
|
|
org $c000
|
|
|
|
jmp $fce2
|
|
|
|
EOS
|
|
|
|
|
|
|
|
system bin/"dasm", path
|
|
|
|
code = File.open(testpath/"a.out", "rb") { |f| f.read.unpack("C*") }
|
|
|
|
assert_equal [0x00, 0xc0, 0x4c, 0xe2, 0xfc], code
|
|
|
|
end
|
2012-03-28 16:32:49 +00:00
|
|
|
end
|