diff options
| author | Adam Vandenberg | 2009-09-30 09:47:18 -0700 |
|---|---|---|
| committer | Max Howell | 2009-10-01 15:17:29 +0100 |
| commit | 30b0ee4f217de58aba964d4e2de37f0a1830a6bc (patch) | |
| tree | e92c44e94f7897856c0fc9477cbb002377d49c80 /Library | |
| parent | ff414bbf6f2301ca0f3c2f16343fb0107f439e9c (diff) | |
| download | homebrew-30b0ee4f217de58aba964d4e2de37f0a1830a6bc.tar.bz2 | |
Update usage of libexec for roguelikes.
Since "libexec" folders under the Cellar are already private per
formula, there's no reason to create an additional folder underneath
for namespacing.
Removed the extra folder level from these formulas.
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Formula/angband.rb | 6 | ||||
| -rw-r--r-- | Library/Formula/nethack.rb | 24 | ||||
| -rw-r--r-- | Library/Formula/omega.rb | 7 |
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 |
