summarylogtreecommitdiffstats
path: root/nethack-x11.patch
blob: 3a872b71827589745c39298e7ece850ddd54124b (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
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
diff -ru nethack-3.6.0.orig/include/config.h nethack-3.6.0/include/config.h
--- nethack-3.6.0.orig/include/config.h	2015-11-17 06:58:34.000000000 +0100
+++ nethack-3.6.0/include/config.h	2016-05-08 21:15:56.953494936 +0200
@@ -43,7 +43,7 @@
 #if !defined(NOTTYGRAPHICS)
 #define TTY_GRAPHICS /* good old tty based graphics */
 #endif
-/* #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 */
@@ -113,7 +113,7 @@
 #endif
 
 #ifndef DEFAULT_WINDOW_SYS
-#define DEFAULT_WINDOW_SYS "tty"
+#define DEFAULT_WINDOW_SYS "X11"
 #endif
 
 #ifdef X11_GRAPHICS
@@ -125,7 +125,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
@@ -250,11 +250,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
@@ -298,7 +298,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 INSURANCE slows down level changes, but allows games that
@@ -317,7 +317,7 @@
  * otherwise it will be the current directory.
  */
 #ifndef HACKDIR
-#define HACKDIR "/usr/games/lib/nethackdir"
+#define HACKDIR "/usr/games/nethack"
 #endif
 
 /*
@@ -327,7 +327,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 nethack-3.6.0.orig/include/unixconf.h nethack-3.6.0/include/unixconf.h
--- nethack-3.6.0.orig/include/unixconf.h	2015-11-17 11:54:25.000000000 +0100
+++ nethack-3.6.0/include/unixconf.h	2016-05-08 21:19:25.780412473 +0200
@@ -36,7 +36,7 @@
 #define NETWORK        /* if running on a networked system */
                        /* e.g. Suns sharing a playground through NFS */
 /* #define SUNOS4 */   /* SunOS 4.x */
-/* #define LINUX */    /* Another Unix clone */
+#define LINUX    /* Another Unix clone */
 /* #define CYGWIN32 */ /* Unix on Win32 -- use with case sensitive defines */
 /* #define GENIX */    /* Yet Another Unix Clone */
 /* #define HISX */     /* Bull Unix for XPS Machines */
@@ -101,7 +101,7 @@
  * If you want the static parts of your playground on a read-only file
  * system, define VAR_PLAYGROUND to be where the variable parts are kept.
  */
-/* #define VAR_PLAYGROUND "/var/lib/games/nethack" */
+#define VAR_PLAYGROUND "/var/games/nethack"
 
 /*
  * Define DEF_PAGER as your default pager, e.g. "/bin/cat" or "/usr/ucb/more"
@@ -128,7 +128,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
 
 /*
diff -ru nethack-3.6.0.orig/src/invent.c nethack-3.6.0/src/invent.c
--- nethack-3.6.0.orig/src/invent.c	2015-11-16 06:05:29.000000000 +0100
+++ nethack-3.6.0/src/invent.c	2016-05-12 23:03:28.134734406 +0200
@@ -2813,6 +2813,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 nethack-3.6.0.orig/sys/unix/Makefile.src nethack-3.6.0/sys/unix/Makefile.src
--- nethack-3.6.0.orig/sys/unix/Makefile.src	2015-11-12 08:51:56.000000000 +0100
+++ nethack-3.6.0/sys/unix/Makefile.src	2016-05-08 21:22:05.518161366 +0200
@@ -222,8 +222,8 @@
 
 #
 #
-#WINSRC = $(WINTTYSRC)
-#WINOBJ = $(WINTTYOBJ)
+WINSRC = $(WINTTYSRC) $(WINX11SRC) 
+WINOBJ = $(WINTTYOBJ) $(WINX11OBJ) 
 
 # on some systems the termcap library is in -ltermcap or -lcurses
 # on 386 Xenix, the -ltermlib tputs() seems not to work; use -lcurses instead
@@ -238,14 +238,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 -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
 #
 # libraries for Qt
@@ -263,7 +263,7 @@
 # libraries for BeOS 
 WINBELIB = -lbe
 
-#WINLIB = $(WINTTYLIB)
+WINLIB = $(WINTTYLIB) $(WINX11LIB)
 
 # any other strange libraries your system needs (for Sysunix only -- the more
 # specialized targets should already be right)
diff -ru nethack-3.6.0.orig/sys/unix/Makefile.top nethack-3.6.0/sys/unix/Makefile.top
--- nethack-3.6.0.orig/sys/unix/Makefile.top	2015-11-18 21:54:59.000000000 +0100
+++ nethack-3.6.0/sys/unix/Makefile.top	2016-05-08 21:44:50.649427698 +0200
@@ -20,17 +20,17 @@
 #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
+GAMEPERM = 04755
 FILEPERM = 0644
-# VARFILEPERM = 0644
+VARFILEPERM = 0644
 EXEPERM  = 0755
 DIRPERM  = 0755
-# VARDIRPERM = 0755
+VARDIRPERM = 0755
 
 # VARDIR may also appear in unixconf.h as "VAR_PLAYGROUND" else HACKDIR
 #
@@ -39,15 +39,16 @@
 # 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  = $(HACKDIR)
+HACKDIR  = $(PREFIX)/games/$(GAME)
+VARDIR  = "/var/games/nethack"
 # Where nethack.sh in installed.  If this is not defined, the wrapper is not used.
-#SHELLDIR = $(PREFIX)/games
+SHELLDIR = $(PREFIX)/bin
+INSTDIR = $(HACKDIR)
 
 # per discussion in Install.X11 and Install.Qt
 #VARDATND = 
 # VARDATND = x11tiles NetHack.ad pet_mark.xbm pilemark.xpm
-# VARDATND = x11tiles NetHack.ad pet_mark.xbm pilemark.xpm 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
@@ -69,8 +70,8 @@
 # other permission-related reasons.  If that happens, you may want to set the
 # command to "true", which is a no-op. Note that disabling chown or chgrp
 # will only work if setuid (or setgid) behavior is not desired or required.
-#CHOWN = chown
-#CHGRP = chgrp
+CHOWN = chown
+CHGRP = chgrp
 
 #
 # end of configuration