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.master
parent
44d9f9c542
commit
fe707c9126
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue