-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'nethack-01' of github.com:esselfe/moonbase-other into e…
…sselfe-nethack-01
- Loading branch information
Showing
5 changed files
with
154 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,45 +1,7 @@ | ||
default_pre_build && | ||
|
||
if in_depends $MODULE libX11; then | ||
sedit '/#define X11_GRAPHICS/ c #define X11_GRAPHICS' include/config.h && | ||
|
||
# add X11 makefile targets - no joke, this has to be done by hand | ||
sedit '/^WINSRC = $(WINTTYSRC)/ c WINSRC = $(WINTTYSRC) $(WINX11SRC) | ||
/^WINOBJ = $(WINTTYOBJ)/ c WINOBJ = $(WINTTYOBJ) $(WINX11OBJ) | ||
/^WINLIB = $(WINTTYLIB)/ c WINLIB = $(WINTTYLIB) $(WINX11LIB)' sys/unix/Makefile.src && | ||
|
||
# modern xrdb complains about ' characters | ||
sedit "s:':\`:g" win/X11/NetHack.ad | ||
fi && | ||
|
||
if in_depends $MODULE libXpm; then | ||
sedit '/\/\* # define USE_XPM/ c #define USE_XPM' include/config.h && | ||
# add -lXpm | ||
sedit '/^WINX11LIB =/ c WINX11LIB = -lXaw -lXmu -lXext -lXt -lXpm -lX11' sys/unix/Makefile.src | ||
|
||
sedit '/NetHack\.tile_file/ c NetHack.tile_file: x11tiles | ||
/NetHack\.pet_mark_bitmap/ c NetHack.pet_mark_bitmap: pet_mark.xbm | ||
/NetHack\.pet_mark_color/ c NetHack.pet_mark_color: Red | ||
/NetHack\.tombstone/ c NetHack.tombstone: rip.xpm' win/X11/NetHack.ad | ||
fi && | ||
|
||
sedit '/#define COMPRESS "\/usr\/bin\/compress"/ c #define COMPRESS "/bin/gzip" | ||
/#define COMPRESS_EXTENSION.*/ c #define COMPRESS_EXTENSION ".gz" | ||
/#define DLB/ c #define DLB' include/config.h && | ||
|
||
sedit '/#define LINUX/ c #define LINUX | ||
/#define TIMED_DELAY/ c #define TIMED_DELAY | ||
/#define VAR_PLAYGROUND/ c #define VAR_PLAYGROUND "/var/games/nethack"' include/unixconf.h && | ||
|
||
sedit '/GAMEGRP *= bin/ c GAMEGRP = games | ||
/GAMEPERM = 04755/ c GAMEPERM = 02755 | ||
/FILEPERM = 0644/ c FILEPERM = 0664 | ||
/DIRPERM = 0755/ c DIRPERM = 0775 | ||
/GAMEDIR *=/ c GAMEDIR = /usr/lib/games/nethack | ||
/VARDIR *=/ c VARDIR = /var/games/nethack | ||
/^VARDATND =/ c VARDATND = x11tiles NetHack.ad pet_mark.xbm rip.xpm' sys/unix/Makefile.top && | ||
|
||
sedit '/^PREFIX=.*/ c PREFIX=/usr | ||
/^VARFILEPERM.*/ c VARFILEPERM=0660' sys/unix/hints/linux && | ||
|
||
sedit 's/NEARDATA winid WIN_STATUS/extern \0/' src/windows.c | ||
# The ncurses installation in Lunar doesn't have libtinfo.so | ||
sedit 's/ -ltinfo//' sys/unix/hints/linux && | ||
# Prevents installing in /root/nh/install/games/ | ||
sedit '/wildcard/d' sys/unix/hints/linux && | ||
sedit 's:^\#\(PREFIX=/usr\):\1:' sys/unix/hints/linux |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,132 @@ | ||
From d8878eddd04cb986d57cc721d719670dc7f4d156 Mon Sep 17 00:00:00 2001 | ||
From: Stefan Strogin <[email protected]> | ||
Date: Tue, 17 Dec 2019 20:20:52 +0200 | ||
Subject: [PATCH] Rename manpage from recover to recover-nethack | ||
|
||
Based on the patch from https://bugs.gentoo.org/203556 | ||
|
||
Upstream-Status: Inappropriate [Gentoo-specific] | ||
Signed-off-by: Stefan Strogin <[email protected]> | ||
--- | ||
doc/nethack.6 | 2 +- | ||
doc/recover.6 | 28 ++++++++++++++-------------- | ||
2 files changed, 15 insertions(+), 15 deletions(-) | ||
|
||
diff --git a/doc/nethack.6 b/doc/nethack.6 | ||
index dda4c89f4..b26a2b493 100644 | ||
--- a/doc/nethack.6 | ||
+++ b/doc/nethack.6 | ||
@@ -393,7 +393,7 @@ SHOPTYPE and SPLEVTYPE can be used in debugging (wizard) mode. | ||
DEBUGFILES can be used if the program was built with 'DEBUG' enabled. | ||
.SH "SEE ALSO" | ||
.PP | ||
-dgn_comp(6), lev_comp(6), recover(6) | ||
+dgn_comp(6), lev_comp(6), recover-nethack(6) | ||
.SH BUGS | ||
.PP | ||
Probably infinite. | ||
diff --git a/doc/recover.6 b/doc/recover.6 | ||
index 1209d31d3..eee5bbc61 100644 | ||
--- a/doc/recover.6 | ||
+++ b/doc/recover.6 | ||
@@ -1,4 +1,4 @@ | ||
-.TH RECOVER 6 "14 December 2015" NETHACK | ||
+.TH RECOVER-NETHACK 6 "14 December 2015" NETHACK | ||
.de ND | ||
.ds Nd \\$3 | ||
.. | ||
@@ -13,9 +13,9 @@ | ||
.NR $NHDT-Revision: 1.9 $ | ||
.ds Na Kenneth Lorber | ||
.SH NAME | ||
-recover \- recover a NetHack game interrupted by disaster | ||
+recover-nethack \- recover a NetHack game interrupted by disaster | ||
.SH SYNOPSIS | ||
-.B recover | ||
+.B recover-nethack | ||
[ | ||
.B \-d | ||
.I directory | ||
@@ -33,7 +33,7 @@ so such games can be recovered at the point of the last level change. | ||
The | ||
.I base | ||
options tell | ||
-.I recover | ||
+.I recover-nethack | ||
which files to process. | ||
Each base option specifies recovery of a separate game. | ||
.PP | ||
@@ -83,24 +83,24 @@ by a user number to avoid conflicts, | ||
or "xlock" if the number of concurrent players is being limited. | ||
It may be necessary to look in the playground to find the correct | ||
base name of the interrupted game. | ||
-.I recover | ||
+.I recover-nethack | ||
will transform these level files into a save file of the same name as | ||
.I nethack | ||
would have used. | ||
.PP | ||
Since | ||
-.I recover | ||
+.I recover-nethack | ||
must be able to read and delete files from the playground | ||
and create files in the save directory, | ||
it has interesting interactions with game security. | ||
Giving ordinary players access to | ||
-.I recover | ||
+.I recover-nethack | ||
through setuid or setgid is tantamount to leaving the playground | ||
world-writable, | ||
with respect to both cheating and messing up other players. | ||
For a single-user system, this of course does not change anything, | ||
so some of the microcomputer ports install | ||
-.I recover | ||
+.I recover-nethack | ||
by default. | ||
.PP | ||
For a multi-user system, | ||
@@ -108,22 +108,22 @@ the game administrator may want to arrange for all .0 files in the | ||
playground to be fed to recover when the host machine boots, | ||
and handle game crashes individually. | ||
If the user population is sufficiently trustworthy, | ||
-.I recover | ||
+.I recover-nethack | ||
can be installed with the same permissions the | ||
.I nethack | ||
executable has. | ||
In either case, | ||
-.I recover | ||
+.I recover-nethack | ||
is easily compiled from the distribution utility directory. | ||
.SH NOTES | ||
.PP | ||
Like | ||
.I nethack | ||
itself, | ||
-.I recover | ||
+.I recover-nethack | ||
will overwrite existing savefiles of the same name. | ||
Savefiles created by | ||
-.I recover | ||
+.I recover-nethack | ||
are uncompressed; | ||
they may be compressed afterwards if desired, | ||
but even a compression-using | ||
@@ -133,12 +133,12 @@ will find them in the uncompressed form. | ||
nethack(6) | ||
.SH BUGS | ||
.PP | ||
-.I recover | ||
+.I recover-nethack | ||
makes no attempt to find out if a base name specifies a game in progress. | ||
If multiple machines share a playground, this would be impossible to | ||
determine. | ||
.PP | ||
-.I recover | ||
+.I recover-nethack | ||
should be taught to use the nethack playground locking mechanism to | ||
avoid conflicts. | ||
.SH COPYRIGHT | ||
-- | ||
2.24.1 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
https://bugs.gentoo.org/874462 | ||
--- a/win/tty/wintty.c | ||
+++ b/win/tty/wintty.c | ||
@@ -26,2 +26,6 @@ | ||
|
||
+#ifdef DEF_PAGER | ||
+#include <fcntl.h> | ||
+#endif | ||
+ | ||
#ifndef NO_TERMS |