Skip to content
This repository
tree: 0f4b4d8085
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

file 52 lines (41 sloc) 1.418 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51
require 'formula'

class Mednafen < Formula
  homepage 'http://mednafen.sourceforge.net/'
  url 'http://downloads.sourceforge.net/project/mednafen/Mednafen/0.8.D.3/mednafen-0.8.D.3.tar.bz2'
  md5 '57d22805071becd81858b0c088a275e5'
  version '0.8.D.3'

  devel do
    url 'http://forum.fobby.net/index.php?t=getfile&id=358'
    md5 '40516f81b18df70ae4a2dfd411fa0861'
    version '0.9.21-WIP'
  end

  fails_with :clang do
    build 318
  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
    # 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

    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.include? "--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
Something went wrong with that request. Please try again.