-
Notifications
You must be signed in to change notification settings - Fork 116
/
snescom.rb
39 lines (33 loc) · 1.32 KB
/
snescom.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
class Snescom < Formula
homepage "http://bisqwit.iki.fi/source/snescom.html"
url "http://bisqwit.iki.fi/src/arch/snescom-1.7.4.1.tar.bz2"
sha256 "e80187d969fd448fe4d3c636bdbe9c24fe452e1436566b29fbf3410bde739504"
bottle do
root_url "https://homebrew.bintray.com/bottles-games"
cellar :any
sha256 "102cfb6d03ac2dede67119f47329a1db8436f001946ef36c285b7bb3463dafa3" => :yosemite
sha256 "2ef1408312be3110c88e5be2f9e7b736a8d498ade8335b5076da09585ebff971" => :mavericks
sha256 "23af80922e45a7937086900f06e213fb017b6afdde06b3ab96db2ce7b7f784ce" => :mountain_lion
end
patch :p1 do
# Includes cstdlib for Clang.
# Reported upstream, should be fixed in the next release.
url "https://gist.githubusercontent.com/protomouse/31335db2fe5c11978faf/raw/f0671999314e87c0487035e4f80f92a67a0c4d06/snescom-disasm-missing-cstdlib.diff"
sha256 "3e214ae0a5751dfe72f81c0723b792601ddb4bca335dd2d5fd345572f051e29c"
end
depends_on "boost" => :build
def install
system "make"
bin.install "disasm", "snescom", "sneslink"
doc.install "README.html"
end
test do
(testpath/"test.a65").write <<-EOS.undent
GAME_MAIN:
rts
EOS
system "#{bin}/snescom", "-Wall", "-fips", "-o", "test.ips", "test.a65"
asm = `#{bin}/disasm test.ips`
assert_match(/.extern GAME_MAIN/, asm)
end
end