summarylogtreecommitdiffstats
path: root/nethack-x11.patch
blob: 30362ae23a707202f4bf49cb0996873d1a2186a8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
diff -ru '--color=auto' nethack-3.6.2.orig/include/config.h nethack-3.6.2/include/config.h
--- nethack-3.6.2.orig/include/config.h	2019-10-14 15:43:52.234943122 -0400
+++ nethack-3.6.2/include/config.h	2019-10-14 16:26:55.257097257 -0400
@@ -46,7 +46,7 @@
 #define TTY_GRAPHICS /* good old tty based graphics */
 #endif
 /* #define CURSES_GRAPHICS *//* Curses interface - Karl Garrison*/
-/* #define X11_GRAPHICS */   /* X11 interface */
+#define X11_GRAPHICS         /* X11 interface */
 /* #define QT_GRAPHICS */    /* Qt interface */
 /* #define GNOME_GRAPHICS */ /* Gnome interface */
 /* #define MSWIN_GRAPHICS */ /* Windows NT, CE, Graphics */
@@ -116,7 +116,7 @@
 #endif
 
 #ifndef DEFAULT_WINDOW_SYS
-#define DEFAULT_WINDOW_SYS "tty"
+#define DEFAULT_WINDOW_SYS "X11"
 #endif
 
 #ifdef CURSES_GRAPHICS
@@ -134,7 +134,7 @@
  * would allow:
  *  xpmtoppm <x11tiles.xpm | pnmscale 1.25 | ppmquant 90 >x11tiles_big.xpm
  */
-/* # define USE_XPM */ /* Disable if you do not have the XPM library */
+#define USE_XPM /* Disable if you do not have the XPM library */
 #ifdef USE_XPM
 #define GRAPHIC_TOMBSTONE /* Use graphical tombstone (rip.xpm) */
 #endif
@@ -263,11 +263,11 @@
 
 #if defined(UNIX) && !defined(ZLIB_COMP) && !defined(COMPRESS)
 /* path and file name extension for compression program */
-#define COMPRESS "/usr/bin/compress" /* Lempel-Ziv compression */
-#define COMPRESS_EXTENSION ".Z"      /* compress's extension */
+/* #define COMPRESS "/usr/bin/compress" */ /* Lempel-Ziv compression */
+/* #define COMPRESS_EXTENSION ".Z" */      /* compress's extension */
 /* An example of one alternative you might want to use: */
-/* #define COMPRESS "/usr/local/bin/gzip" */ /* FSF gzip compression */
-/* #define COMPRESS_EXTENSION ".gz" */       /* normal gzip extension */
+#define COMPRESS "/usr/bin/gzip" /* FSF gzip compression */
+#define COMPRESS_EXTENSION ".gz"       /* normal gzip extension */
 #endif
 
 #ifndef COMPRESS
@@ -311,7 +311,7 @@
  *      a tar-like file, thus making a neater installation.  See *conf.h
  *      for detailed configuration.
  */
-/* #define DLB */ /* not supported on all platforms */
+#define DLB /* not supported on all platforms */
 
 /*
  *      Defining REPRODUCIBLE_BUILD causes 'util/makedefs -v' to construct
@@ -352,7 +352,7 @@
  * otherwise it will be the current directory.
  */
 #ifndef HACKDIR
-#define HACKDIR "/usr/games/lib/nethackdir"
+#define HACKDIR "/var/games/nethack"
 #endif
 
 /*
@@ -362,7 +362,7 @@
  * since the user might create files in a directory of his choice.
  * Of course SECURE is meaningful only if HACKDIR is defined.
  */
-/* #define SECURE */ /* do setuid(getuid()) after chdir() */
+#define SECURE /* do setuid(getuid()) after chdir() */
 
 /*
  * If it is desirable to limit the number of people that can play Hack
diff -ru '--color=auto' nethack-3.6.2.orig/include/unixconf.h nethack-3.6.2/include/unixconf.h
--- nethack-3.6.2.orig/include/unixconf.h	2019-10-14 15:43:52.238276427 -0400
+++ nethack-3.6.2/include/unixconf.h	2019-10-14 16:26:55.257097257 -0400
@@ -133,7 +133,7 @@
  * "extra output" method is used, but not all systems provide access to
  * a fine-grained timer.
  */
-/* #define TIMED_DELAY */ /* usleep() */
+#define TIMED_DELAY /* usleep() */
 #endif
 #if defined(MACOSX) && !defined(TIMED_DELAY)
 #define TIMED_DELAY
diff -ru '--color=auto' nethack-3.6.2.orig/src/invent.c nethack-3.6.2/src/invent.c
--- nethack-3.6.2.orig/src/invent.c	2019-10-14 15:43:52.238276427 -0400
+++ nethack-3.6.2/src/invent.c	2019-10-14 16:26:55.257097257 -0400
@@ -3483,6 +3483,7 @@
                 picked_some ? "Other things" : "Things",
                 Blind ? "you feel" : "are");
         putstr(tmpwin, 0, buf);
+        putstr(tmpwin, 0, ""); /* add a separator */
         for (; otmp; otmp = otmp->nexthere) {
             if (otmp->otyp == CORPSE && will_feel_cockatrice(otmp, FALSE)) {
                 felt_cockatrice = TRUE;
diff -ru '--color=auto' nethack-3.6.2.orig/sys/unix/Makefile.src nethack-3.6.2/sys/unix/Makefile.src
--- nethack-3.6.2.orig/sys/unix/Makefile.src	2019-10-14 15:43:52.244943040 -0400
+++ nethack-3.6.2/sys/unix/Makefile.src	2019-10-14 16:27:31.580193016 -0400
@@ -267,8 +267,8 @@
 #WINBEOBJ = winbe.o NHWindow.o NHMenuWindow.o NHMapWindow.o tile.o
 #
 #
-#WINSRC = $(WINTTYSRC)
-#WINOBJ = $(WINTTYOBJ)
+WINSRC = $(WINTTYSRC) $(WINX11SRC)
+WINOBJ = $(WINTTYOBJ) $(WINX11OBJ)
 #
 # Curses - Karl Garrison, Tangles
 #WINSRC = $(WINCURSESSRC)
@@ -287,14 +287,14 @@
 # WINTTYLIB = -ltermcap
 # WINTTYLIB = -lcurses
 # WINTTYLIB = -lcurses16
-# WINTTYLIB = -lncurses
+WINTTYLIB = -lncurses
 #WINTTYLIB = -ltermlib
 #
 # libraries for X11
 # If USE_XPM is defined in config.h, you will also need -lXpm here.
 #WINX11LIB = -lXaw -lXmu -lXext -lXt -lX11
 # WINX11LIB = -lXaw -lXmu -lXt -lX11
-# WINX11LIB = -lXaw -lXmu -lXext -lXt -lXpm -lX11 -lm
+WINX11LIB = -lXaw -lXmu -lXext -lXt -lXpm -lX11 -lm
 # WINX11LIB = -lXaw -lXmu -lXpm -lXext -lXt -lX11 -lSM -lICE -lm # BSD/OS 2.0
 #
 #
@@ -327,7 +327,7 @@
 # same as above, for XCurses
 #WINCURSESLIB = -L/usr/local/lib/pdcurses -lXCurses -lXawM -lXmu -lXext -lXt -lX11
 #
-#WINLIB = $(WINTTYLIB)
+WINLIB = $(WINTTYLIB) $(WINX11LIB)
 #
 # For Curses
 #WINLIB = $(WINCURSESLIB)
diff -ru '--color=auto' nethack-3.6.2.orig/sys/unix/Makefile.top nethack-3.6.2/sys/unix/Makefile.top
--- nethack-3.6.2.orig/sys/unix/Makefile.top	2019-10-14 15:43:52.244943040 -0400
+++ nethack-3.6.2/sys/unix/Makefile.top	2019-10-14 16:26:55.257097257 -0400
@@ -22,16 +22,16 @@
 #PREFIX	 = /usr
 GAME     = nethack
 # GAME     = nethack.prg
-#GAMEUID  = games
-#GAMEGRP  = bin
+GAMEUID  = root
+GAMEGRP  = games
 
 # Permissions - some places use setgid instead of setuid, for instance
 # See also the option "SECURE" in include/config.h
 #GAMEPERM = 04755
-FILEPERM = 0644
+FILEPERM = 0664
 # VARFILEPERM = 0644
 EXEPERM  = 0755
-DIRPERM  = 0755
+DIRPERM  = 0775
 # VARDIRPERM = 0755
 
 # VARDIR may also appear in unixconf.h as "VAR_PLAYGROUND" else HACKDIR
@@ -49,7 +49,7 @@
 # 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 rip.xpm
 # for Atari/Gem
 # VARDATND = nh16.img title.img GEM_RSC.RSC rip.img
 # for BeOS