32 lines
1 KiB
Ruby
32 lines
1 KiB
Ruby
class Mednafen < Formula
|
|
desc "Multi-system emulator"
|
|
homepage "http://mednafen.fobby.net/"
|
|
url "https://mednafen.github.io/releases/files/mednafen-0.9.48.tar.xz"
|
|
sha256 "d3cc0c838f496511946d6ea18fda5965d2b71577c610acc811835cc87d152102"
|
|
|
|
bottle do
|
|
sha256 "28d2204ee6d2a149c52f2e3fa5eb93df32ade953f23d55baf7b42a6dc2381c6c" => :sierra
|
|
end
|
|
|
|
depends_on "pkg-config" => :build
|
|
depends_on "sdl"
|
|
depends_on "libsndfile"
|
|
depends_on :macos => :sierra # needs clock_gettime
|
|
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
|
|
|
|
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
|
|
end
|
|
end
|