mednafen: add devel

Also add an option to build the unstable new PlayStation emulator (only
available in the 0.9 branch)

Closes Homebrew/homebrew#7550.

Signed-off-by: Misty De Meo <mistydemeo@gmail.com>
This commit is contained in:
Misty De Meo 2011-09-10 15:24:02 -05:00
parent 2f03f781da
commit 705fd2a2de

View file

@ -6,19 +6,42 @@ class Mednafen < Formula
md5 '57d22805071becd81858b0c088a275e5'
version '0.8.D.3'
devel do
url 'http://forum.fobby.net/index.php?t=getfile&id=304'
md5 '0327b3b0f8413f1ed446c4d8b9b897f0'
version '0.9.18-WIP'
end
depends_on 'pkg-config' => :build
depends_on 'sdl'
depends_on 'sdl_net'
depends_on 'libcdio'
depends_on 'libsndfile'
def options
[
["--with-psx", "Build experimental PlayStation emulator"]
]
end
def install
# someone with more C++ juice than me can undertake to patch the
# crasher in Blip_Synth<8, 1>::offset_resampled that happens with
# even minimal optimizations turned on (in LLVM or GCC 4.2)
# Compiler produces code which fails math tests
# with optimizations enabled
# http://forum.fobby.net/index.php?t=msg&&th=659&goto=2254#msg_2254
ENV.no_optimization
system "./configure", "--disable-dependency-tracking", "--prefix=#{prefix}"
args = [ "--disable-dependency-tracking", "--prefix=#{prefix}" ]
if ARGV.include? "--with-psx" and not ARGV.build_devel?
onoe "--with-psx is only supported with --devel" \
end
args << "--enable-psx" if ARGV.flag? "--with-psx" and ARGV.build_devel?
# Platform detection is buggy; problem reported upstream:
# http://forum.fobby.net/index.php?t=msg&&th=659&goto=2214#msg_2214
args << "--build=x86_64-apple-darwin#{`uname -r`}" if MacOS.prefer_64_bit?
system "./configure", *args
system "make install"
end
end