diff options
| author | Adam Vandenberg | 2010-02-17 14:57:08 -0800 |
|---|---|---|
| committer | Adam Vandenberg | 2010-02-18 08:23:39 -0800 |
| commit | 17c9e67e91767bca8043f388da7dc41266f01221 (patch) | |
| tree | a64552fe817ff6ca61c35027f5dc008bc7e3d601 /Library | |
| parent | c624feb929e6379167a94ffec1739afdbd25f19f (diff) | |
| download | homebrew-17c9e67e91767bca8043f388da7dc41266f01221.tar.bz2 | |
Nethack updates
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Formula/nethack.rb | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/Library/Formula/nethack.rb b/Library/Formula/nethack.rb index ef3329e4e..cf15e8850 100644 --- a/Library/Formula/nethack.rb +++ b/Library/Formula/nethack.rb @@ -21,10 +21,12 @@ class Nethack <Formula end def skip_clean? path + # Keep the empty save folder path == libexec + "save" end def install + ENV.gcc_4_2 # Build everything in-order; no multi builds. ENV.deparallelize @@ -32,7 +34,7 @@ class Nethack <Formula system 'sh sys/unix/setup.sh' inreplace "include/config.h", - '# define HACKDIR "/usr/games/lib/nethackdir"', + /^#\s*define HACKDIR.*$/, "#define HACKDIR \"#{libexec}\"" # Make the data first, before we munge the CFLAGS @@ -40,7 +42,7 @@ class Nethack <Formula Dir.chdir 'dat' do %w(perm logfile).each do |f| - system "touch #{f}" + system "touch", f libexec.install f end @@ -50,10 +52,10 @@ class Nethack <Formula end # Make the game - ENV['CFLAGS'] = ENV['CFLAGS'] + " -I../include" + ENV.append_to_cflags "-I../include" system 'cd src;make' bin.install 'src/nethack' - FileUtils.mkdir libexec+'save' + (libexec+'save').mkpath end end |
