homebrew-core/Formula/mame.rb
2017-02-08 10:08:55 +00:00

56 lines
1.8 KiB
Ruby

class Mame < Formula
desc "Multiple Arcade Machine Emulator"
homepage "http://mamedev.org/"
url "https://github.com/mamedev/mame/archive/mame0179.tar.gz"
version "0.179"
sha256 "d1616ef32b884c3e7913378ebf5282b6f846f895f419eb92a9068770581e081b"
head "https://github.com/mamedev/mame.git"
bottle do
cellar :any
sha256 "cf8874630445d18a9144830d1264cf8bdcefc844650a0f0b95f2599817fb2e86" => :sierra
sha256 "7b4888946f886f88afb2c3af87efbc3d15bd3807c0bc865d322563a7cb3ccff6" => :el_capitan
sha256 "0b635b1d334826182cd8b26cb9fda82764dbb266a359e04064ac177bc30bf4ee" => :yosemite
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 "portmidi"
depends_on "portaudio"
# Needs GCC 4.9 or newer
fails_with :gcc_4_0
fails_with :gcc
("4.3".."4.8").each do |n|
fails_with :gcc => n
end
def install
inreplace "scripts/src/osd/sdl.lua", "--static", ""
system "make", "USE_LIBSDL=1",
"USE_SYSTEM_LIB_EXPAT=", # brewed version not picked up
"USE_SYSTEM_LIB_ZLIB=1",
"USE_SYSTEM_LIB_JPEG=1",
"USE_SYSTEM_LIB_FLAC=1",
"USE_SYSTEM_LIB_LUA=", # lua53 not available yet
"USE_SYSTEM_LIB_PORTMIDI=1",
"USE_SYSTEM_LIB_PORTAUDIO=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