aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/nethack.rb
diff options
context:
space:
mode:
authorAdam Vandenberg2010-04-06 22:58:35 -0700
committerAdam Vandenberg2010-08-07 18:08:53 -0700
commitd0efd9ee94a55e243f3b10e903526274fc21d569 (patch)
treeb21984390a0292957a3819df57c62bac558d284d /Library/Formula/nethack.rb
parentcdf768bc328f01e64e9f74551ff4b40d5cf0da70 (diff)
downloadhomebrew-d0efd9ee94a55e243f3b10e903526274fc21d569.tar.bz2
Update formulae for version 0.7
* Use new "url" features * Use keg_only DSL * Use "skip_clean :all" DSL * Whitespace and style cleanups * Make bash invocations less silly * Use new man2-man8 helpers * Remove "FileUtils." since it is included in Formula * Use real names for deps instead of aliases * ENV.x11 now updates path, so remove that from individual brews
Diffstat (limited to 'Library/Formula/nethack.rb')
-rw-r--r--Library/Formula/nethack.rb29
1 files changed, 12 insertions, 17 deletions
diff --git a/Library/Formula/nethack.rb b/Library/Formula/nethack.rb
index 06a86a8c0..1145c06b4 100644
--- a/Library/Formula/nethack.rb
+++ b/Library/Formula/nethack.rb
@@ -11,20 +11,15 @@ require 'formula'
# done.
class Nethack <Formula
- @url='http://downloads.sourceforge.net/project/nethack/nethack/3.4.3/nethack-343-src.tgz'
- @homepage='http://www.nethack.org/index.html'
- @version='3.4.3'
- @md5='21479c95990eefe7650df582426457f9'
+ url 'http://downloads.sourceforge.net/project/nethack/nethack/3.4.3/nethack-343-src.tgz'
+ homepage 'http://www.nethack.org/index.html'
+ version '3.4.3'
+ md5 '21479c95990eefe7650df582426457f9'
def patches
DATA
end
- def skip_clean? path
- # Keep the empty save folder
- path == libexec + "save"
- end
-
def install
fails_with_llvm
# Build everything in-order; no multi builds.
@@ -32,31 +27,31 @@ class Nethack <Formula
# Symlink makefiles
system 'sh sys/unix/setup.sh'
-
+
inreplace "include/config.h",
/^#\s*define HACKDIR.*$/,
- "#define HACKDIR \"#{libexec}\""
-
+ "#define HACKDIR \"#{var}/nethack\""
+
# Make the data first, before we munge the CFLAGS
system "cd dat;make"
-
+
Dir.chdir 'dat' do
%w(perm logfile).each do |f|
system "touch", f
libexec.install f
end
-
+
# Stage the data
libexec.install %w(help hh cmdhelp history opthelp wizhelp dungeon license data oracles options rumors quest.dat)
libexec.install Dir['*.lev']
end
-
+
# Make the game
ENV.append_to_cflags "-I../include"
system 'cd src;make'
-
+
bin.install 'src/nethack'
- (libexec+'save').mkpath
+ (var+'nethack').mkpath
end
end