homebrew-core/Formula/mednafen.rb

33 lines
1 KiB
Ruby
Raw Normal View History

2017-02-06 10:26:55 +00:00
class Mednafen < Formula
desc "Multi-system emulator"
homepage "http://mednafen.fobby.net/"
url "https://mednafen.github.io/releases/files/mednafen-0.9.43.tar.xz"
sha256 "b8305914cdf297fe6483219fa10c3fa14116fff8eed02f61326a0e32dd350f4d"
2017-02-06 10:26:55 +00:00
bottle do
2017-03-13 10:49:14 +00:00
sha256 "9908e6cb239537aa01483895f427faf064e22fd15621cbdbfe8a370893f28205" => :sierra
2017-02-06 10:26:55 +00:00
end
depends_on "pkg-config" => :build
depends_on "sdl"
depends_on "libsndfile"
depends_on :macos => :sierra # needs clock_gettime
2017-02-06 10:26:55 +00:00
depends_on "gettext"
def install
# Fix run-time crash "Assertion failed: (x == TestLLVM15470_Counter), function
# TestLLVM15470_Sub2, file tests.cpp, line 643."
# LLVM miscompiles some loop code with optimization
# https://llvm.org/bugs/show_bug.cgi?id=15470
ENV.O2
2017-02-06 10:26:55 +00:00
system "./configure", "--prefix=#{prefix}", "--disable-dependency-tracking"
system "make", "install"
end
test do
cmd = "#{bin}/mednafen -dump_modules_def M >/dev/null || head -n 1 M"
assert_equal version.to_s, shell_output(cmd).chomp
2017-02-06 10:26:55 +00:00
end
end