Permalink
Browse files

Adding the formula for MAME

This formula builds MAME, the Multiple Arcade Machine Emulator.
  • Loading branch information...
1 parent 03a4f01 commit d86222adafdc81019f02894d1b331b6956bff2d2 @ashgti committed Jul 23, 2012
Showing with 31 additions and 0 deletions.
  1. +31 −0 Library/Formula/mame.rb
View
@@ -0,0 +1,31 @@
+require 'formula'
+
+class Mame < Formula
+ url 'svn://messdev.no-ip.org/mess', :revision => 15603
+ head 'svn://messdev.no-ip.org/mess'
+ homepage 'http://mamedev.org/'
+ version '146u3'
+
+ depends_on :x11
+ depends_on 'sdl'
+
+ def install
+ ENV['MACOSX_USE_LIBSDL'] = '1'
+ ENV['INCPATH'] = '-I./src/lib/util -I/usr/X11/include'
+ ENV['PTR64'] = if MacOS.prefer_64_bit? then '0' else '1' end
+
+ # Builds MAME
+ system 'make', 'TARGET=mame', 'SUBTARGET=mame'
+ bin.install 'mame64'
+ if MacOS.prefer_64_bit?
+ bin.install 'mame64' => 'mame'
+ else
+ bin.install 'mame'
+ end
+ end
+
+ def test
+ system "mame -h"
+ end
+end
+

0 comments on commit d86222a

Please sign in to comment.