aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
Diffstat (limited to 'Library')
-rw-r--r--Library/Formula/angband.rb6
-rw-r--r--Library/Formula/nethack.rb24
-rw-r--r--Library/Formula/omega.rb7
3 files changed, 11 insertions, 26 deletions
diff --git a/Library/Formula/angband.rb b/Library/Formula/angband.rb
index cf61d76cc..5eea82b50 100644
--- a/Library/Formula/angband.rb
+++ b/Library/Formula/angband.rb
@@ -6,16 +6,14 @@ class Angband <Formula
@homepage='http://rephial.org/'
def install
- angband_libexec = libexec+"angband"
-
system "./configure", "--prefix=#{prefix}",
"--enable-curses",
"--disable-x11",
"--disable-sdltest",
- "--with-libpath=#{angband_libexec}"
+ "--with-libpath=#{libexec}"
system "make"
# Install manually; 'make install' doesn't work.
bin.install "src/angband"
- angband_libexec.install Dir['lib/*']
+ libexec.install Dir['lib/*']
end
end
diff --git a/Library/Formula/nethack.rb b/Library/Formula/nethack.rb
index 3aa05f136..811f37100 100644
--- a/Library/Formula/nethack.rb
+++ b/Library/Formula/nethack.rb
@@ -17,14 +17,11 @@ class Nethack <Formula
@md5='21479c95990eefe7650df582426457f9'
def patches
- {
- :p1 =>
-["http://github.com/adamv/nethack-osx/raw/82992eb6e4d8c76b05037579126293d644ef971d/patches/nethack-osx-343.patch"]
- }
+ "http://github.com/adamv/nethack-osx/raw/82992eb6e4d8c76b05037579126293d644ef971d/patches/nethack-osx-343.patch"
end
def skip_clean? path
- path == libexec + "nethack/save"
+ path == libexec + "save"
end
def install
@@ -34,29 +31,22 @@ class Nethack <Formula
# Symlink makefiles
system 'sh sys/unix/setup.sh'
- ## We are not using the default installer
- # Install to a sane location, geez.
- nethackdir = "#{prefix}/libexec/nethack"
- system "mkdir -p #{nethackdir}"
-
inreplace "include/config.h",
'# define HACKDIR "/usr/games/lib/nethackdir"',
- "#define HACKDIR \"#{nethackdir}\""
+ "#define HACKDIR \"#{libexec}\""
# Make the data first, before we munge the CFLAGS
system "cd dat;make"
Dir.chdir 'dat' do
- nethack_libexec = (libexec+'nethack')
-
%w(perm logfile).each do |f|
system "touch #{f}"
- nethack_libexec.install f
+ libexec.install f
end
# Stage the data
- nethack_libexec.install %w(help hh cmdhelp history opthelp wizhelp dungeon license data oracles options rumors quest.dat)
- nethack_libexec.install Dir['*.lev']
+ 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
@@ -64,6 +54,6 @@ class Nethack <Formula
system 'cd src;make'
bin.install 'src/nethack'
- system "mkdir #{prefix}/libexec/nethack/save"
+ FileUtils.mkdir libexec+'save'
end
end
diff --git a/Library/Formula/omega.rb b/Library/Formula/omega.rb
index 27e30e11f..67cc7161c 100644
--- a/Library/Formula/omega.rb
+++ b/Library/Formula/omega.rb
@@ -8,11 +8,8 @@ class Omega <Formula
def install
# 'make install' is weird, so we do it ourselves
- omega_libexec = libexec + "omega"
- omega_libexec.mkpath
-
# Set up our target folders
- inreplace "defs.h", "#define OMEGALIB \"./omegalib/\"", "#define OMEGALIB \"#{omega_libexec}/\""
+ inreplace "defs.h", "#define OMEGALIB \"./omegalib/\"", "#define OMEGALIB \"#{libexec}/\""
# Don't alias CC this way; also, don't need that ncurses include path
inreplace "Makefile", "CC = gcc -I/usr/include/ncurses", ""
@@ -27,6 +24,6 @@ class Omega <Formula
system "make"
bin.install "omega"
- omega_libexec.install Dir['omegalib/*']
+ libexec.install Dir['omegalib/*']
end
end