60 lines
2.2 KiB
Ruby
60 lines
2.2 KiB
Ruby
class RomTools < Formula
|
|
desc "Tools for Multiple Arcade Machine Emulator"
|
|
homepage "https://mamedev.org/"
|
|
url "https://github.com/mamedev/mame/archive/mame0206.tar.gz"
|
|
version "0.206"
|
|
sha256 "588ba357361cc49fdc2754d8343c8b91f6b965b30220a998cbb1da09e49dcbdd"
|
|
head "https://github.com/mamedev/mame.git"
|
|
|
|
bottle do
|
|
cellar :any
|
|
sha256 "1d8a87c5f9b41e4ef10f993b60f3be96435574c67949ee59949a2eed38e0fe8a" => :mojave
|
|
sha256 "00819099afd31de6800565bbbfdc857c640c217e882f6c06a4f57ee6e4a77974" => :high_sierra
|
|
sha256 "62e9d54a1cb122eac6db54c374450004292a23a2c0a706e3af914b1d88bdef8b" => :sierra
|
|
end
|
|
|
|
depends_on "pkg-config" => :build
|
|
depends_on "flac"
|
|
depends_on "portmidi"
|
|
depends_on "sdl2"
|
|
depends_on "utf8proc"
|
|
|
|
def install
|
|
inreplace "scripts/src/osd/sdl.lua", "--static", ""
|
|
system "make", "TOOLS=1",
|
|
"PTR64=1",
|
|
"USE_LIBSDL=1",
|
|
"USE_SYSTEM_LIB_EXPAT=1",
|
|
"USE_SYSTEM_LIB_ZLIB=1",
|
|
"USE_SYSTEM_LIB_FLAC=1",
|
|
"USE_SYSTEM_LIB_PORTMIDI=1",
|
|
"USE_SYSTEM_LIB_UTF8PROC=1"
|
|
bin.install %w[
|
|
aueffectutil castool chdman floptool imgtool jedutil ldresample
|
|
ldverify nltool nlwav pngcmp regrep romcmp src2html srcclean unidasm
|
|
]
|
|
bin.install "split" => "rom-split"
|
|
man1.install Dir["docs/man/*.1"]
|
|
end
|
|
|
|
# Needs more comprehensive tests
|
|
test do
|
|
# system "#{bin}/aueffectutil" # segmentation fault
|
|
system "#{bin}/castool"
|
|
assert_match "chdman info", shell_output("#{bin}/chdman help info", 1)
|
|
system "#{bin}/floptool"
|
|
system "#{bin}/imgtool", "listformats"
|
|
system "#{bin}/jedutil", "-viewlist"
|
|
assert_match "linear equation", shell_output("#{bin}/ldresample 2>&1", 1)
|
|
assert_match "avifile.avi", shell_output("#{bin}/ldverify 2>&1", 1)
|
|
system "#{bin}/nltool", "--help"
|
|
system "#{bin}/nlwav", "--help"
|
|
assert_match "image1", shell_output("#{bin}/pngcmp 2>&1", 10)
|
|
assert_match "summary", shell_output("#{bin}/regrep 2>&1", 1)
|
|
system "#{bin}/romcmp"
|
|
system "#{bin}/rom-split"
|
|
assert_match "template", shell_output("#{bin}/src2html 2>&1", 1)
|
|
system "#{bin}/srcclean"
|
|
assert_match "architecture", shell_output("#{bin}/unidasm", 1)
|
|
end
|
|
end
|