aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula
diff options
context:
space:
mode:
authorAdam Vandenberg2010-03-26 00:03:05 -0700
committerAdam Vandenberg2010-03-31 12:12:07 -0700
commitcbc3e7b137b89c3a10aae3a9905e62f964e5e0c6 (patch)
treec396bbaee09cc96091a4f9e665dd98388a57fbd6 /Library/Formula
parent4a74d94f01257bc0f4f7f1990f422ef0df9160e5 (diff)
downloadhomebrew-cbc3e7b137b89c3a10aae3a9905e62f964e5e0c6.tar.bz2
Formula for Net-Nuclear 4.
Diffstat (limited to 'Library/Formula')
-rw-r--r--Library/Formula/net-nuclear.rb44
1 files changed, 44 insertions, 0 deletions
diff --git a/Library/Formula/net-nuclear.rb b/Library/Formula/net-nuclear.rb
new file mode 100644
index 000000000..ac9a0dd24
--- /dev/null
+++ b/Library/Formula/net-nuclear.rb
@@ -0,0 +1,44 @@
+require 'formula'
+
+class NetNuclearSoundsAndGraphics <Formula
+ # Source tarball doesn't include sfx or gfx.
+ # Get them from a v4 binary build.
+ url 'http://studiostok.se/files/netnuclear4-linux.tar.gz'
+ version '4'
+ md5 '2dbbfe9083275aa170cb96d48237cfe4'
+end
+
+
+class NetNuclear <Formula
+ url 'http://studiostok.se/files/netnuclear4-source.rar'
+ version '4'
+ homepage 'http://studiostok.se/?page=netnuclear'
+ md5 '061df954d0632f1cbc158dc0002e4b6c'
+
+ depends_on 'sdl'
+ depends_on 'sdl_mixer'
+ depends_on 'sdl_net'
+
+ def startup_script
+ return <<-END
+#!/bin/bash
+#{libexec}/nuclear $*
+END
+ end
+
+ def install
+ inreplace 'Makefile' do |s|
+ s.remove_make_var! 'CC'
+ s.change_make_var! 'CFLAGS', "#{ENV['CFLAGS']} -I#{HOMEBREW_PREFIX}/include/SDL"
+ s.change_make_var! 'LIBS', "-lSDLmain -lSDL -lSDL_mixer -lSDL_net -framework Cocoa"
+ end
+
+ system 'make'
+ libexec.install 'nuclear'
+
+ d = libexec
+ NetNuclearSoundsAndGraphics.new.brew { d.install ['sfx','gfx'] }
+
+ (bin+'nuclear').write startup_script
+ end
+end