aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Library/Formula/mednafen.rb31
1 files changed, 27 insertions, 4 deletions
diff --git a/Library/Formula/mednafen.rb b/Library/Formula/mednafen.rb
index 54f92ace9..4d0225e4f 100644
--- a/Library/Formula/mednafen.rb
+++ b/Library/Formula/mednafen.rb
@@ -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