63 lines
2.0 KiB
Ruby
63 lines
2.0 KiB
Ruby
class Mame < Formula
|
|
desc "Multiple Arcade Machine Emulator"
|
|
homepage "https://mamedev.org/"
|
|
url "https://github.com/mamedev/mame/archive/mame0204.tar.gz"
|
|
version "0.204"
|
|
sha256 "eeb6e304502dc1f1ce5a9c73d59a32865fc6e374c14ecef85d85b6de98a76e42"
|
|
head "https://github.com/mamedev/mame.git"
|
|
|
|
bottle do
|
|
cellar :any
|
|
sha256 "69da0e0b7367d61a4fd071791622b1e66bd2cd6b97e7ba4268e0a8be6ee687f4" => :mojave
|
|
sha256 "75b03d95efb819d1cb8d1497389a1c9202df27b3f096e82f9f2d08b23b7eaa82" => :high_sierra
|
|
sha256 "1aec6e8076495bde8634256556f072f331ec26fb5e6e6d05450fe991ec2c253c" => :sierra
|
|
end
|
|
|
|
depends_on "pkg-config" => :build
|
|
depends_on "sphinx-doc" => :build
|
|
depends_on "flac"
|
|
depends_on "jpeg"
|
|
depends_on "lua"
|
|
depends_on :macos => :yosemite
|
|
depends_on "portaudio"
|
|
depends_on "portmidi"
|
|
depends_on "sdl2"
|
|
depends_on "sqlite"
|
|
depends_on "utf8proc"
|
|
|
|
# Need C++ compiler and standard library support C++14.
|
|
needs :cxx14
|
|
|
|
def install
|
|
inreplace "scripts/src/osd/sdl.lua", "--static", ""
|
|
|
|
# 3rdparty/sol2/sol/compatibility/version.hpp:30:10
|
|
# fatal error: 'lua.hpp' file not found
|
|
ENV.append "CPPFLAGS", "-I#{Formula["lua"].opt_include}/lua"
|
|
|
|
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=1",
|
|
"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
|