diff options
| author | Adam Vandenberg | 2010-03-09 23:09:19 -0800 |
|---|---|---|
| committer | Adam Vandenberg | 2010-03-09 23:35:12 -0800 |
| commit | c6923dced690a6c1526dac3de8c7afaa183ce4ff (patch) | |
| tree | 30331ee9a038358e5bfee486593837507ea7c33f /Library/Formula | |
| parent | d1f68f672da2a2ff6b33000b490791e4fc69c8c0 (diff) | |
| download | homebrew-c6923dced690a6c1526dac3de8c7afaa183ce4ff.tar.bz2 | |
DosBox 0.73
Diffstat (limited to 'Library/Formula')
| -rw-r--r-- | Library/Formula/dosbox.rb | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/Library/Formula/dosbox.rb b/Library/Formula/dosbox.rb new file mode 100644 index 000000000..e20f63433 --- /dev/null +++ b/Library/Formula/dosbox.rb @@ -0,0 +1,45 @@ +require 'formula' +require 'hardware' + +# Install script heavily borrowed from Fink package: +# http://pdb.finkproject.org/pdb/package.php/dosbox +class Dosbox <Formula + url 'http://downloads.sourceforge.net/project/dosbox/dosbox/0.73/dosbox-0.73.tar.gz' + homepage 'http://www.dosbox.com/' + md5 '0823a11242db711ac3d6ebfff6aff572' + + depends_on 'sdl' + depends_on 'sdl_net' + depends_on 'sdl_sound' + + def install + ENV.libpng + ENV.fast + + which_darwin=`uname -r|cut -f1 -d.` + + # 64-bit CPU detection is broken in ./configure + if MACOS_VERSION >= 10.6 and Hardware.is_64_bit? + which_cpu = 'x86_64' + else + which_cpu = 'i386' + end + + system "./configure", "--disable-debug", "--disable-dependency-tracking", + "--prefix=#{prefix}", + "--mandir=#{man}", + "--disable-sdltest", + "--enable-core-inline", + "--build=#{which_cpu}-apple-darwin#{which_darwin}" + + # This should be a patch - add missing header. + inreplace "src/gui/midi_coreaudio.h", + "#include <AudioToolbox/AUGraph.h>", + "#include <AudioToolbox/AUGraph.h>\n#include <CoreServices/CoreServices.h>" + + system "make" + + bin.install 'src/dosbox' + man1.install gzip('docs/dosbox.1') + end +end |
