summaryrefslogtreecommitdiff
path: root/games/xnethack/files/patch-sys-unix-Makefile.top
diff options
context:
space:
mode:
Diffstat (limited to 'games/xnethack/files/patch-sys-unix-Makefile.top')
-rw-r--r--games/xnethack/files/patch-sys-unix-Makefile.top127
1 files changed, 52 insertions, 75 deletions
diff --git a/games/xnethack/files/patch-sys-unix-Makefile.top b/games/xnethack/files/patch-sys-unix-Makefile.top
index 7dd119a0717f..feff1aaed068 100644
--- a/games/xnethack/files/patch-sys-unix-Makefile.top
+++ b/games/xnethack/files/patch-sys-unix-Makefile.top
@@ -1,96 +1,87 @@
---- sys/unix/Makefile.top.orig 2021-03-22 22:28:14 UTC
+--- sys/unix/Makefile.top.orig 2022-03-07 23:57:15 UTC
+++ sys/unix/Makefile.top
-@@ -20,18 +20,18 @@ NHSROOT=.
-
- # make NetHack
- #PREFIX = /usr
--GAME = xnethack
-+GAME = xnethack
+@@ -25,15 +25,15 @@ NHSROOT=.
+ GAME = xnethack
# GAME = nethack.prg
#GAMEUID = games
-#GAMEGRP = bin
+GAMEGRP = games
- # Permissions - some places use setgid instead of setuid, for instance
- # See also the option "SECURE" in include/config.h
+ # Permissions - some places use setgid instead of setuid, for instance.
+ # See also the option "SECURE" in include/config.h.
-#GAMEPERM = 04755
--FILEPERM = 0644
+GAMEPERM = 02755
-+FILEPERM = 0664
+ FILEPERM = 0644
# VARFILEPERM = 0644
EXEPERM = 0755
-DIRPERM = 0755
+DIRPERM = 0775
# VARDIRPERM = 0755
- # VARDIR may also appear in unixconf.h as "VAR_PLAYGROUND" else HACKDIR
-@@ -41,14 +41,15 @@ DIRPERM = 0755
- # therefore there should not be anything in HACKDIR that you want to keep
- # (if there is, you'll have to do the installation by hand or modify the
- # instructions)
--#HACKDIR = $(PREFIX)/games/lib/$(GAME)dir
+ # VARDIR may also appear in unixconf.h as "VAR_PLAYGROUND" else HACKDIR
+@@ -44,10 +44,12 @@ DIRPERM = 0755
+ # keep (if there is, you'll have to do the installation by hand or
+ # modify the install commands below).
+ #HACKDIR = $(PREFIX)/games/lib/$(GAME)dir
-#VARDIR = $(HACKDIR)
-+HACKDIR = %%HACKDIR%%
++HACKDIR = %%HACKDIR%%
++INSTDIR = ${HACKDIR}
+VARDIR = $(HACKDIR)
-+INSTDIR = $(HACKDIR)
- # Where nethack.sh in installed. If this is not defined, the wrapper is not used.
+ # Where nethack.sh is installed (as 'nethack').
+ # If this is not defined, the shell wrapper script is not used.
-#SHELLDIR = $(PREFIX)/games
-+SHELLDIR = ${PREFIX}/bin
++SHELLDIR = $(PREFIX)/bin
+ # Extra data files depending upon the interface(s) built into nethack.
# per discussion in Install.X11 and Install.Qt
- #VARDATND =
- # VARDATND = x11tiles NetHack.ad pet_mark.xbm pilemark.xbm
--# VARDATND = x11tiles NetHack.ad pet_mark.xbm pilemark.xbm rip.xpm
-+VARDATND = x11tiles NetHack.ad pet_mark.xbm pilemark.xbm
- # for Atari/Gem
- # VARDATND = nh16.img title.img GEM_RSC.RSC rip.img
-@@ -75,7 +76,7 @@ VARDAT = $(VARDATD) $(VARDATND)
- #CHGRP = chgrp
-
- # Lua version
--LUA_VERSION = 5.4.2
-+LUA_VERSION = ${LUA_VER}
+@@ -62,7 +64,7 @@ DIRPERM = 0755
+ # X11 with GRAPHIC_TOMBSTONE (requires 'xpm'):
+ # VARDATND = x11tiles NetHack.ad pet_mark.xbm pilemark.xbm rip.xpm
+ # both X11 and Qt:
+-# VARDATND = x11tiles nhtiles.bmp NetHack.ad pet_mark.xbm pilemark.xbm rip.xpm
++VARDATND = x11tiles nhtiles.bmp NetHack.ad pet_mark.xbm pilemark.xbm rip.xpm
+ # Qt without X11; assumes GRAPHIC_TOMBSTONE:
+ # VARDATND = nhtiles.bmp pet_mark.xbm pilemark.xbm rip.xpm
- #
- # end of configuration
-@@ -108,7 +109,7 @@ all: $(ALLDEP)
+@@ -123,7 +125,7 @@ all: $(ALLDEP)
$(GAME): lua_support
( cd src ; $(MAKE) $(GAME) )
-lua_support: $(TOPLUALIB) include/nhlua.h
+lua_support: include/nhlua.h
@true
- lib/lua-$(LUA_VERSION)/src/liblua.a: lib/lua-$(LUA_VERSION)/src/lua.h
- ( cd lib/lua-$(LUA_VERSION)/src \
-@@ -116,13 +117,11 @@ lib/lua-$(LUA_VERSION)/src/liblua.a: lib/lua-$(LUA_VER
- lib/lua/liblua.a: lib/lua-$(LUA_VERSION)/src/liblua.a
- @( if [ ! -d lib/lua ] ; then mkdir -p lib/lua ; fi )
- cp lib/lua-$(LUA_VERSION)/src/liblua.a $@
+ $(LUATOP)/liblua.a: $(LUAHEADERS)/lua.h
+ ( cd $(LUATOP) \
+@@ -131,13 +133,11 @@ $(LUATOP)/liblua.a: $(LUAHEADERS)/lua.h
+ lib/lua/liblua.a: $(LUATOP)/liblua.a
+ @( if test -d lib/lua ; then true ; else mkdir -p lib/lua ; fi )
+ cp $(LUATOP)/liblua.a $@
-include/nhlua.h: $(TOPLUALIB)
+include/nhlua.h:
echo '/* nhlua.h - generated by top Makefile */' > $@
-- @echo '#include "../lib/lua-$(LUA_VERSION)/src/lua.h"' >> $@
+- @echo '#include "../$(LUAHEADERS)/lua.h"' >> $@
- @sed -e '/(lua_error)/!d' -e '/(lua_error)/s/;/ NORETURN;/1' \
-- < lib/lua-$(LUA_VERSION)/src/lua.h >> $@
-- @echo '#include "../lib/lua-$(LUA_VERSION)/src/lualib.h"' >> $@
-- @echo '#include "../lib/lua-$(LUA_VERSION)/src/lauxlib.h"' >> $@
+- < $(LUAHEADERS)/lua.h >> $@
+- @echo '#include "../$(LUAHEADERS)/lualib.h"' >> $@
+- @echo '#include "../$(LUAHEADERS)/lauxlib.h"' >> $@
+ @echo '#include <lua.h>' >> $@
+ @echo '#include <lualib.h>' >> $@
+ @echo '#include <lauxlib.h>' >> $@
@echo '/*nhlua.h*/' >> $@
-
- # Note: many of the dependencies below are here to allow parallel make
-@@ -234,39 +233,22 @@ dofiles:
+ # LUATESTTARGET is this by default
+ lib/lua-$(LUA_VERSION)/src/lua.h:
+@@ -258,39 +258,22 @@ dofiles:
-e '}' \
-e '$$s/.*/nodlb/p' < dat/options` ; \
$(MAKE) dofiles-$${target-nodlb}
- cp src/$(GAME) $(INSTDIR)
- cp util/recover $(INSTDIR)
- -if test -n '$(SHELLDIR)'; then rm -f $(SHELLDIR)/$(GAME); fi
+- if test -n '$(SHELLDIR)'; then \
+ cp src/$(GAME) ${DESTDIR}$(INSTDIR)/$(GAME)
+ cp util/recover ${DESTDIR}$(INSTDIR)
+ -if test -n '${DESTDIR}$(SHELLDIR)'; then rm -f ${DESTDIR}$(SHELLDIR)/$(GAME); fi
- if test -n '$(SHELLDIR)'; then \
++ if test -n '${DESTDIR}$(SHELLDIR)'; then \
sed -e 's;/usr/games/lib/nethackdir;$(HACKDIR);' \
-e 's;HACKDIR/nethack;HACKDIR/$(GAME);' \
< sys/unix/nethack.sh \
@@ -127,22 +118,7 @@
#
# This is not part of the dependency build hierarchy.
# It requires an explicit "make fetch-Lua".
-@@ -283,13 +265,9 @@ fetch-Lua:
- update: $(GAME) recover $(VARDAT) spec_levs
- # (don't yank the old version out from under people who're playing it)
- -mv $(INSTDIR)/$(GAME) $(INSTDIR)/$(GAME).old
-- -mv $(INSTDIR)/nhdat $(INSTDIR)/nhdat.old
-+ -mv ${DESTDIR}$(INSTDIR)/nhdat ${DESTDIR}$(INSTDIR)/nhdat.old
- # set up new versions of the game files
- ( $(MAKE) dofiles )
--# touch time-sensitive files
-- -touch -c $(VARDIR)/bones* $(VARDIR)/?lock* $(VARDIR)/wizard*
-- -touch -c $(VARDIR)/save/* $(VARDIR)/whereis/*
-- touch $(VARDIR)/perm $(VARDIR)/record
- # and a reminder
- @echo You may also want to install the man pages via the doc Makefile.
-
-@@ -300,25 +278,16 @@ install: rootcheck $(GAME) recover $(VARDAT) spec_levs
+@@ -327,25 +310,17 @@ install: rootcheck $(GAME) recover $(VARDAT) spec_levs
true; $(PREINSTALL)
# set up the directories
# not all mkdirs have -p; those that don't will create a -p directory
@@ -153,7 +129,7 @@
+ -if test -n '${DESTDIR}$(SHELLDIR)'; then \
+ mkdir -p ${DESTDIR}$(SHELLDIR); fi
+ rm -rf ${DESTDIR}$(INSTDIR) ${DESTDIR}$(VARDIR)
-+ -mkdir -p ${DESTDIR}$(INSTDIR) ${DESTDIR}$(VARDIR) ${DESTDIR}$(VARDIR)/save ${DESTDIR}$(VARDIR)/whereis
++ -mkdir -p ${DESTDIR}$(INSTDIR) ${DESTDIR}$(VARDIR)/save ${DESTDIR}$(VARDIR)/whereis
if test -d ./-p; then rmdir ./-p; fi
- -$(CHOWN) $(GAMEUID) $(INSTDIR) $(VARDIR) $(VARDIR)/save $(VARDIR)/whereis
- $(CHGRP) $(GAMEGRP) $(INSTDIR) $(VARDIR) $(VARDIR)/save $(VARDIR)/whereis
@@ -163,13 +139,14 @@
# set up the game files
( $(MAKE) dofiles )
# set up some additional files
-- touch $(VARDIR)/perm $(VARDIR)/record $(VARDIR)/logfile \
-- $(VARDIR)/xlogfile $(VARDIR)/livelog
-- -( cd $(VARDIR) ; \
-- $(CHOWN) $(GAMEUID) perm record logfile xlogfile livelog ; \
-- $(CHGRP) $(GAMEGRP) perm record logfile xlogfile livelog ; \
-- chmod $(VARFILEPERM) perm record logfile xlogfile livelog )
-+ touch ${DESTDIR}$(VARDIR)/perm ${DESTDIR}$(VARDIR)/record ${DESTDIR}$(VARDIR)/logfile ${DESTDIR}$(VARDIR)/xlogfile
- true; $(POSTINSTALL)
+- touch $(VARDIR)/perm $(VARDIR)/record $(VARDIR)/logfile $(VARDIR)/xlogfile \
+- $(VARDIR)/livelog
+- -( cd $(VARDIR) ; $(CHOWN) $(GAMEUID) perm record logfile xlogfile livelog ; \
+- $(CHGRP) $(GAMEGRP) perm record logfile xlogfile livelog ; \
+- chmod $(VARFILEPERM) perm record logfile xlogfile livelog )
+- true; $(POSTINSTALL)
++ touch ${DESTDIR}$(VARDIR)/perm ${DESTDIR}$(VARDIR)/record \
++ ${DESTDIR}$(VARDIR)/logfile ${DESTDIR}$(VARDIR)/xlogfile ${DESTDIR}$(VARDIR)/livelog
# and a reminder
@echo You may also want to reinstall the man pages via the doc Makefile.
+