62 lines
2.1 KiB
Ruby
62 lines
2.1 KiB
Ruby
class Mame < Formula
|
|
desc "Multiple Arcade Machine Emulator"
|
|
homepage "http://mamedev.org/"
|
|
url "https://github.com/mamedev/mame/archive/mame0192.tar.gz"
|
|
version "0.192"
|
|
sha256 "13ccc4e334a73a727e44dbfed6d3dd33b3c193542856d5ac081a64254b781537"
|
|
head "https://github.com/mamedev/mame.git"
|
|
|
|
bottle do
|
|
cellar :any
|
|
sha256 "c5215bb423e4ef39ea9ef9223d7350342b95151976ef64d90b1dbc57e4779c01" => :high_sierra
|
|
sha256 "8c484bafb184d2adb9be9816ac95b0a31a8370cb8e600121a976dfe7bf66b16c" => :sierra
|
|
sha256 "57fb62b47fd78ea4186954a24b7fceffb6422f47c32492882c0f9c5f4c1c9f1f" => :el_capitan
|
|
end
|
|
|
|
depends_on :macos => :yosemite
|
|
depends_on "pkg-config" => :build
|
|
depends_on "sphinx-doc" => :build
|
|
depends_on "sdl2"
|
|
depends_on "jpeg"
|
|
depends_on "flac"
|
|
depends_on "sqlite"
|
|
depends_on "portmidi"
|
|
depends_on "portaudio"
|
|
depends_on "utf8proc"
|
|
|
|
# Need C++ compiler and standard library support C++14.
|
|
needs :cxx14
|
|
|
|
# jpeg 9 compatibility
|
|
patch do
|
|
url "https://raw.githubusercontent.com/Homebrew/formula-patches/2b7053a/mame/jpeg9.patch"
|
|
sha256 "be8095e1b519f17ac4b9e6208f2d434e47346d8b4a8faf001b68749aac3efd20"
|
|
end
|
|
|
|
def install
|
|
inreplace "scripts/src/osd/sdl.lua", "--static", ""
|
|
system "make", "USE_LIBSDL=1",
|
|
"USE_SYSTEM_LIB_EXPAT=1",
|
|
"USE_SYSTEM_LIB_ZLIB=1",
|
|
"USE_SYSTEM_LIB_JPEG=1",
|
|
"USE_SYSTEM_LIB_FLAC=1",
|
|
"USE_SYSTEM_LIB_LUA=", # Homebrew's lua@5.3 can't build with MAME yet.
|
|
"USE_SYSTEM_LIB_SQLITE3=1",
|
|
"USE_SYSTEM_LIB_PORTMIDI=1",
|
|
"USE_SYSTEM_LIB_PORTAUDIO=1",
|
|
"USE_SYSTEM_LIB_UTF8PROC=1"
|
|
bin.install "mame64" => "mame"
|
|
cd "docs" do
|
|
system "make", "text"
|
|
doc.install Dir["build/text/*"]
|
|
system "make", "man"
|
|
man1.install "build/man/MAME.1" => "mame.1"
|
|
end
|
|
pkgshare.install %w[artwork bgfx hash ini keymaps plugins samples uismall.bdf]
|
|
end
|
|
|
|
test do
|
|
assert shell_output("#{bin}/mame -help").start_with? "MAME v#{version}"
|
|
system "#{bin}/mame", "-validate"
|
|
end
|
|
end
|