aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMisty De Meo2011-09-10 15:24:02 -0500
committerMisty De Meo2012-01-25 21:53:35 -0600
commit82841dff55628e60958577d364c470620b6161ba (patch)
tree1eb2f8773a56ab2aeb82ddd23e67e8c973de6be4
parentaedacdf209815450204602ff403bb5c4510d6a3a (diff)
downloadhomebrew-82841dff55628e60958577d364c470620b6161ba.tar.bz2
mednafen: add devel
Also add an option to build the unstable new PlayStation emulator (only available in the 0.9 branch) Closes #7550. Signed-off-by: Misty De Meo <mistydemeo@gmail.com>
-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