* yet more dir-less .cache DEP updates
[t2sde.git] / package / games / nethack / nethack.conf
bloba9226577d25effeeaee189fcdaecbb67d66ecdea
1 # --- T2-COPYRIGHT-NOTE-BEGIN ---
2 # T2 SDE: package/*/nethack/nethack.conf
3 # Copyright (C) 2004 - 2023 The T2 SDE Project
4 # Copyright (C) 1998 - 2003 ROCK Linux Project
5
6 # This Copyright note is generated by scripts/Create-CopyPatch,
7 # more information can be found in the files COPYING and README.
8
9 # This program is free software; you can redistribute it and/or modify
10 # it under the terms of the GNU General Public License version 2.
11 # --- T2-COPYRIGHT-NOTE-END ---
13 createpatch() {
14         cd sys/unix/; sh setup.sh; cd ../..
15         xx=$builddir/config.patch
16 # Creating common patch
17         cat >$xx<<-EEE
18 --- nethack-3.4.0/include/unixconf.h    Thu Mar 21 00:42:56 2002
19 +++ nethack-3.4.0_my/include/unixconf.h Tue Oct 29 10:59:21 2002
20 @@ -36,7 +36,7 @@
21                         * including Solaris 2+ */
22  #define NETWORK                /* if running on a networked system */
23                         /* e.g. Suns sharing a playground through NFS */
24  /* #define SUNOS4 */   /* SunOS 4.x */
25 -/* #define LINUX */    /* Another Unix clone */
26 +#define LINUX  /* Another Unix clone */
27  /* #define CYGWIN32 */ /* Unix on Win32 -- use with case sensitive defines */
28  /* #define GENIX */    /* Yet Another Unix Clone */
29         EEE
31 # Timed Delay
32         if [ "$SDECFG_PKG_NETHACK_DEL" == "1" ]; then
33                 cat >>$xx<<-EEE
34 @@ -132,7 +132,7 @@
35   * "extra output" method is used, but not all systems provide access to
36   * a fine-grained timer.
37   */
38 -/* #define TIMED_DELAY */      /* usleep() */
39 +#define TIMED_DELAY    /* usleep() */
40  #endif
42  /*
43                 EEE
44         fi
45 # Adding source files for UIs
46         if [ "$SDECFG_PKG_NETHACK_TTY" == "0" ]; then
47                 winsrc=
48                 winobj=
49                 winlib=
50         else
51                 winsrc='$(WINTTYSRC)'
52                 winobj='$(WINTTYOBJ)'
53                 winlib='$(WINTTYLIB)'
54         fi
55         if [ "$SDECFG_PKG_NETHACK_X11" == "1" ]; then
56                 winsrc="$winsrc "'$(WINX11SRC)'
57                 winobj="$winobj "'$(WINX11OBJ)'
58                 winlib="$winlib "'$(WINX11LIB)'
59         fi
60         if [ "$SDECFG_PKG_NETHACK_QT" == "1" ]; then
61                 winsrc="$winsrc "'$(WINQTSRC)'
62                 winobj="$winobj "'$(WINQTOBJ)'
63                 winlib="$winlib "'$(WINQTLIB)'
64         fi
65         if [ "$SDECFG_PKG_NETHACK_GNO" == "1" ]; then
66                 winsrc="$winsrc "'$(WINGNOMESRC)'
67                 winobj="$winobj "'$(WINGNOMEOBJ)'
68                 winlib="$winlib "'$(WINGNOMELIB)'
69         fi
70         cat >>$xx<<-EEE
71 --- nethack-3.4.0/src/Makefile  Fri Nov  8 11:20:35 2002
72 +++ nethack-3.4.0_my/src/Makefile       Tue Oct 29 10:58:25 2002
73 @@ -207,2 +207,2 @@
74 -WINSRC = \$(WINTTYSRC)
75 -WINOBJ = \$(WINTTYOBJ)
76 +WINSRC = $winsrc
77 +WINOBJ = $winobj tile.o
78         EEE
80 # more common things
81         cat >>$xx<<-EEE
82 @@ -219,8 +219,8 @@
83  # WINTTYLIB = -ltermcap
84  # WINTTYLIB = -lcurses
85  # WINTTYLIB = -lcurses16
86 -# WINTTYLIB = -lncurses
87 -WINTTYLIB = -ltermlib
88 +WINTTYLIB = -lncurses
89 +#WINTTYLIB = -ltermlib
90  #
91  # libraries for X11
92  # If USE_XPM is defined in config.h, you will also need -lXpm here.
93         EEE
94 # Use libXpm?
95         if [ "$SDECFG_PKG_NETHACK_XPM" == "1" ]; then
96                 cat >>$xx<<-EEE
97 @@ -225,5 +225,5 @@
98  # libraries for X11
99  # If USE_XPM is defined in config.h, you will also need -lXpm here.
100 -WINX11LIB = -lXaw -lXmu -lXext -lXt -lX11
101 +WINX11LIB = -L/usr/X11R6/lib -lXaw -lXmu -lXext -lXt -lX11 -lXpm
102  # WINX11LIB = -lXaw -lXmu -lXt -lX11
103  # WINX11LIB = -lXaw -lXmu -lXext -lXt -lXpm -lX11 -lm
104 @@ -248,1 +248,1 @@
105 -WINLIB = \$(WINTTYLIB)
106 +WINLIB = $winlib
107                 EEE
108         fi
109 # Tiles for Qt
110         if [ "$SDECFG_PKG_NETHACK_QT" == "1" ]; then
111                 cat >>$xx<<-EEE
112 --- ./Makefile  2003-06-08 13:13:32.000000000 +0200
113 +++ ./Makefile  2003-06-08 21:24:48.000000000 +0200
114 @@ -40,7 +40,7 @@ VARDIR  = \$(GAMEDIR)
115  SHELLDIR = \$(PREFIX)/games
117  # per discussion in Install.X11 and Install.Qt
118 -VARDATND =
119 +VARDATND = x11tiles rip.xpm nhsplash.xpm pet_mark.xbm
120  # VARDATND = x11tiles pet_mark.xbm
121  # VARDATND = x11tiles pet_mark.xbm rip.xpm
122  # for Atari/Gem
123                 EEE
124         fi
125         cat >>$xx<<-EEE
126 --- nethack-3.4.0/include/config.h      Fri Nov  8 11:20:35 2002
127 +++ nethack-3.4.0/include/config.h      Tue Oct 29 10:58:25 2002
128         EEE
129 #more User Interfaces
130         if [ "$SDECFG_PKG_NETHACK_TTY" == "0" -o        \
131              "$SDECFG_PKG_NETHACK_X11" == "1" -o        \
132              "$SDECFG_PKG_NETHACK_QT" == "1" -o \
133              "$SDECFG_PKG_NETHACK_GNO" == "1" ]; then
134                 cat >>$xx<<-EEE
135 @@ -43,7 +43,7 @@
136   * Some combinations make no sense.  See the installation document.
137   */
138                 EEE
139                 if [ "$SDECFG_PKG_NETHACK_TTY" == "0" ]; then
140                         cat >>$xx<<-EEE
141 -#define TTY_GRAPHICS   /* good old tty based graphics */
142 +/* #define TTY_GRAPHICS */     /* good old tty based graphics */
143                         EEE
144                 else
145                         cat >>$xx<<-EEE
146  #define TTY_GRAPHICS   /* good old tty based graphics */
147                         EEE
148                 fi
149                 if [ "$SDECFG_PKG_NETHACK_X11" == "1" ]; then
150                         cat >>$xx<<-EEE
151 -/* #define X11_GRAPHICS */     /* X11 interface */
152 +#define X11_GRAPHICS   /* X11 interface */
153                         EEE
154                 else
155                         cat >>$xx<<-EEE
156  /* #define X11_GRAPHICS */     /* X11 interface */
157                         EEE
158                 fi
159                 if [ "$SDECFG_PKG_NETHACK_QT" == "1" ]; then
160                         cat >>$xx<<-EEE
161 -/* #define QT_GRAPHICS */      /* Qt interface */
162 +#define QT_GRAPHICS    /* Qt interface */
163                         EEE
164                 else
165                         cat >>$xx<<-EEE
166  /* #define QT_GRAPHICS */      /* Qt interface */
167                         EEE
168                 fi
169                 if [ "$SDECFG_PKG_NETHACK_GNO" == "1" ]; then
170                         cat >>$xx<<-EEE
171 -/* #define GNOME_GRAPHICS */   /* Gnome interface */
172 +#define GNOME_GRAPHICS /* Gnome interface */
173                         EEE
174                 else
175                         cat >>$xx<<-EEE
176  /* #define GNOME_GRAPHICS */   /* Gnome interface */
177                         EEE
178                 fi
179                 cat >>$xx<<-EEE
180  /* #define MSWIN_GRAPHICS */   /* Windows NT, CE, Graphics */
181                         EEE
182         fi
183 # Wizard name, logfile, news
184         if [ "$SDECFG_PKG_NETHACK_WIZ" != "wizard" ]; then
185                 cat >>$xx<<-EEE
186 @@ -139,8 +139,8 @@
187  #ifndef WIZARD         /* allow for compile-time or Makefile changes */
188  # ifndef KR1ED
189 -#  define WIZARD  "wizard" /* the person allowed to use the -D option */
190 +#  define WIZARD  "$SDECFG_PKG_NETHACK_WIZ" /* the person allowed to use the -D option */
191  # else
192  #  define WIZARD
193 -#  define WIZARD_NAME "wizard"
194 +#  define WIZARD_NAME "$SDECFG_PKG_NETHACK_WIZ"
195  # endif
196  #endif
197                 EEE
198         fi
199         if [ "$SDECFG_PKG_NETHACK_LOG" != "logfile" ]; then
200                 cat >>$xx<<-EEE
201 @@ -151,1 +151,1 @@
202 -#define LOGFILE "logfile"      /* larger file for debugging purposes */
203 +#define LOGFILE "$SDECFG_PKG_NETHACK_LOG"      /* larger file for debugging purposes */
204                 EEE
205         fi
206         if [ "$SDECFG_PKG_NETHACK_NEW" != "news" ]; then
207                 cat >>$xx<<-EEE
208 -#define NEWS "news"            /* the file containing the latest hack news */
209 +#define NEWS "$SDECFG_PKG_NETHACK_NEW"         /* the file containing the latest hack news */
210                 EEE
211         fi
212 # Compression
213         if [ "$SDECFG_PKG_NETHACK_USE_COM" == "1" ]; then
214                 if [ "$SDECFG_PKG_NETHACK_COM" != "/usr/bin/compress" ]; then
215                         cat >>$xx<<-EEE
216 @@ -170,1 +170,1 @@
217 -#define COMPRESS "/usr/bin/compress"   /* Lempel-Ziv compression */
218 +#define COMPRESS "$SDECFG_PKG_NETHACK_COM"     /* Lempel-Ziv compression */
219                         EEE
220                 fi
221                 if [ "$SDECFG_PKG_NETHACK_EXT" != ".Z" ]; then
222                         cat >>$xx<<-EEE
223 @@ -171,1 +171,1 @@
224 -#define COMPRESS_EXTENSION ".Z"                /* compress's extension */
225 +#define COMPRESS_EXTENSION "$SDECFG_PKG_NETHACK_COM_EXT"               /* compress's extension */
226                         EEE
227                 fi
228         else
229                 cat >>$xx<<-EEE
230 @@ -164,8 +164,8 @@
231  #ifdef UNIX
232  /* path and file name extension for compression program */
233 -#define COMPRESS "/usr/bin/compress"   /* Lempel-Ziv compression */
234 -#define COMPRESS_EXTENSION ".Z"                /* compress's extension */
235 +/* #define COMPRESS "/usr/bin/compress" */     /* Lempel-Ziv compression */
236 +/* #define COMPRESS_EXTENSION ".Z" */          /* compress's extension */
237  /* An example of one alternative you might want to use: */
238  /* #define COMPRESS "/usr/local/bin/gzip" */   /* FSF gzip compression */
239  /* #define COMPRESS_EXTENSION ".gz" */         /* normal gzip extension */
240  #endif
241                 EEE
242         fi
243 #Hackdir
244         if [ "$SDECFG_PKG_NETHACK_HACKDIR" != "/usr/games/lib/nethackdir" ]; then
245                 cat >>$xx<<-EEE
246 @@ -203,3 +203,3 @@
247  #  else
248 -#    define HACKDIR "/usr/games/lib/nethackdir"
249 +#    define HACKDIR "$SDECFG_PKG_NETHACK_HACKDIR"
250  #  endif
251                 EEE
252         fi
254 #Max number of players
255         if [ $SDECFG_PKG_NETHACK_MAX -gt 0 ]; then
256                 cat >>$xx<<-EEE
257 @@ -215,7 +215,7 @@
258 -/* #define SECURE */   /* do setuid(getuid()) after chdir() */
259 +#define SECURE /* do setuid(getuid()) after chdir() */
261  /*
262   * If it is desirable to limit the number of people that can play Hack
263 - * simultaneously, define HACKDIR, SECURE and MAX_NR_OF_PLAYERS.
264 - * #define MAX_NR_OF_PLAYERS 6
265 - */
266 + * simultaneously, define HACKDIR, SECURE and MAX_NR_OF_PLAYERS. */
267 + #define MAX_NR_OF_PLAYERS $SDECFG_PKG_NETHACK_MAX
268 + /* */
269                 EEE
270         fi
271  # dungeon features
272         if [ "$SDECFG_PKG_NETHACK_SINKS" == "0" ]; then
273                 cat >>$xx<<-EEE
274 @@ -317,1 +317,1 @@
275 -#define SINKS          /* Kitchen sinks - Janet Walz */
276 +/*#define SINKS */             /* Kitchen sinks - Janet Walz */
277                 EEE
278         fi
280         if [ "$SDECFG_PKG_NETHACK_MAZES" == "0" ]; then
281                 cat >>$xx<<-EEE
282 @@ -319,1 +319,1 @@
283 -#define WALLIFIED_MAZE /* Fancy mazes - Jean-Christophe Collet */
284 +/* #define WALLIFIED_MAZE */   /* Fancy mazes - Jean-Christophe Collet */
285                 EEE
286         fi
288         if [ "$SDECFG_PKG_NETHACK_REINCARNATION" == "0" ]; then
289                 cat >>$xx<<-EEE
290 @@ -320,1 +320,1 @@
291 -#define REINCARNATION  /* Special Rogue-like levels */
292 +/* #define REINCARNATION */    /* Special Rogue-like levels */
293                 EEE
294         fi
296         if [ "$SDECFG_PKG_NETHACK_KOPS" == "0" ]; then
297                 cat >>$xx<<-EEE
298 @@ -322,1 +322,1 @@
299 -#define KOPS           /* Keystone Kops by Scott R. Turner */
300 +/* #define KOPS */             /* Keystone Kops by Scott R. Turner */
301                 EEE
302         fi
304         if [ "$SDECFG_PKG_NETHACK_SEDUCE" == "0" ]; then
305                 cat >>$xx<<-EEE
306 @@ -323,1 +323,1 @@
307 -#define SEDUCE         /* Succubi/incubi seduction, by KAA, suggested by IM */
308 + /* #define SEDUCE */          /* Succubi/incubi seduction, by KAA, suggested by IM */
309                 EEE
310         fi
312         if [ "$SDECFG_PKG_NETHACK_STEED" == "0" ]; then
313                 cat >>$xx<<-EEE
314 @@ -324,1 +324,1 @@
315 -#define STEED          /* Riding steeds */
316 +/* #define STEED */            /* Riding steeds */
317                 EEE
318         fi
320         if [ "$SDECFG_PKG_NETHACK_TOURIST" == "0" ]; then
321                 cat >>$xx<<-EEE
322 @@ -325,1 +325,1 @@
323 -#define TOURIST                /* Tourist players with cameras and Hawaiian shirts */
324 +/* #define TOURIST */          /* Tourist players with cameras and Hawaiian shirts */
325                 EEE
326         fi
328         if [ "$SDECFG_PKG_NETHACK_ELBERETH" == "0" ]; then
329                 cat >>$xx<<-EEE
330 @@ -327,1 +327,1 @@
331 -#define ELBERETH       /* Engraving the E-word repels monsters */
332 +/* #define ELBERETH */ /* Engraving the E-word repels monsters */
333                 EEE
334         fi
336         if [ "$SDECFG_PKG_NETHACK_EXP" == "0" ]; then
337                 cat >>$xx<<-EEE
338 @@ -338,1 +338,1 @@
339 -#define EXP_ON_BOTL    /* Show experience on bottom line */
340 +/* #define EXP_ON_BOTL */      /* Show experience on bottom line */
341                 EEE
342         fi
344         if [ "$SDECFG_PKG_NETHACK_SCORE" == "1" ]; then
345                 cat >>$xx<<-EEE
346 @@ -339,1 +339,1 @@
347 -/* #define SCORE_ON_BOTL */    /* added by Gary Erickson (erickson@ucivax) */
348 +#define SCORE_ON_BOTL  /* added by Gary Erickson (erickson@ucivax) */
349                 EEE
350         fi
352         if [ "$SDECFG_PKG_NETHACK_GOLD" == "1" ]; then
353                 cat >>$xx<<-EEE
354 @@ -349,1 +349,1 @@
355 -/*#define GOLDOBJ */   /* Gold is kept on obj chains - Helge Hafting */
356 +#define GOLDOBJ        /* Gold is kept on obj chains - Helge Hafting */
357                 EEE
358         fi
361 runconf=0
363 hook_add prepatch 5 "createpatch"
364 patchfiles="$patchfiles $builddir/config.patch"