games/xnethack: update to 9.0
Changelog: https://github.com/copperwater/xNetHack/blob/master/doc/xnh-changelog-9.0.md
This commit is contained in:
parent
315ed3707e
commit
a2326508a3
@ -1,7 +1,6 @@
|
||||
PORTNAME= xNetHack
|
||||
DISTVERSIONPREFIX= xnh
|
||||
DISTVERSION= 8.0
|
||||
PORTREVISION= 1
|
||||
DISTVERSION= 9.0
|
||||
CATEGORIES= games
|
||||
|
||||
MAINTAINER= fuz@FreeBSD.org
|
||||
@ -18,6 +17,8 @@ FLAVOR?= ${FLAVORS:[1]}
|
||||
nox11_PKGNAMESUFFIX= -nox11
|
||||
qt_PKGNAMESUFFIX= -qt
|
||||
|
||||
BUILD_DEPENDS= nroff:textproc/groff
|
||||
|
||||
USES= alias compiler:c11 gmake ncurses tar:tgz lua:54
|
||||
USE_GITHUB= yes
|
||||
GH_ACCOUNT= copperwater
|
||||
@ -42,7 +43,7 @@ GRAPHICS= # none
|
||||
.elif ${FLAVOR} == "qt"
|
||||
USES+= localbase pkgconfig qt:5
|
||||
USE_QT= buildtools:build core gui multimedia network widgets
|
||||
MAKE_ENV+= MOCPATH=${MOC} LINK=${CXX}
|
||||
MAKE_ENV+= LINK=${CXX} QTDIR=${LOCALBASE}/${QT_ARCHDIR_REL}
|
||||
CFLAGS+= -I${QT_INCDIR} -DSND_LIB_QTSOUND
|
||||
CXXFLAGS+= -fpic -I${QT_INCDIR} -DQT_WIDGETS_LIB -DQT_MULTIMEDIA_LIB \
|
||||
-DQT_NETWORK_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DSND_LIB_QTSOUND
|
||||
@ -66,12 +67,8 @@ pre-configure:
|
||||
@${REINPLACE_CMD} -e 's|%%HACKDIR%%|${PREFIX}/${HACKDIR}|g' \
|
||||
${WRKSRC}/${f}
|
||||
.endfor
|
||||
.for f in nethack.6 recover.6
|
||||
@${REINPLACE_CMD} -e 's|%%HACKDIR%%|${PREFIX}/${HACKDIR}|g' \
|
||||
${WRKSRC}/doc/${f}
|
||||
.endfor
|
||||
.if defined(WITHOUT_SHELL)
|
||||
@${REINPLACE_CMD} -e 's|#define SHELL|/* #define SHELL|' ${WRKSRC}/include/unixconf.h
|
||||
@${REINPLACE_CMD} -e 's|#define SHELL|/* #define SHELL */|' ${WRKSRC}/include/unixconf.h
|
||||
.endif
|
||||
.if defined(WITH_MAIL)
|
||||
@${REINPLACE_CMD} -e 's|/\* #define MAIL \*/|#define MAIL|' ${WRKSRC}/include/unixconf.h
|
||||
|
||||
@ -1,3 +1,3 @@
|
||||
TIMESTAMP = 1685888297
|
||||
SHA256 (copperwater-xNetHack-xnh8.0_GH0.tar.gz) = a9861ccec6274037ad95877a9b5c1c1ef6727bbc96f8a896ada672b4ad4c80bb
|
||||
SIZE (copperwater-xNetHack-xnh8.0_GH0.tar.gz) = 10779285
|
||||
TIMESTAMP = 1742211468
|
||||
SHA256 (copperwater-xNetHack-xnh9.0_GH0.tar.gz) = 10bda8996fe6d42d7e285a261a5dc442348cb677768562437c2d9612e324e4b5
|
||||
SIZE (copperwater-xNetHack-xnh9.0_GH0.tar.gz) = 10982131
|
||||
|
||||
@ -1,11 +1,11 @@
|
||||
--- doc/dlb.6.orig 2022-03-07 23:57:15 UTC
|
||||
--- doc/dlb.6.orig 2025-03-17 12:07:52 UTC
|
||||
+++ doc/dlb.6
|
||||
@@ -95,7 +95,7 @@ List the contents of the archive 'foo':
|
||||
@@ -137,7 +137,7 @@ Kenneth Lorber
|
||||
.SH AUTHOR
|
||||
Kenneth Lorber
|
||||
.SH "SEE ALSO"
|
||||
.PP
|
||||
-nethack(6), tar(1)
|
||||
+xnethack(6), tar(1)
|
||||
-.IR nethack (6),
|
||||
+.IR xnethack (6),
|
||||
.IR tar (1)
|
||||
.SH BUGS
|
||||
.PP
|
||||
Not a good tar emulation; - does not mean stdin or stdout.
|
||||
.IP \(bu 2n
|
||||
|
||||
@ -1,47 +0,0 @@
|
||||
--- doc/nethack.6.orig 2023-05-16 21:33:58 UTC
|
||||
+++ doc/nethack.6
|
||||
@@ -20,7 +20,7 @@ nethack \- Exploring The Mazes of Menace
|
||||
.\" have been arranged to fit within an 80-column page with nearly full
|
||||
.\" lines while avoiding splitting "[" and "-opt ]" or "[ -opt" and "]"
|
||||
.\" across line boundaries. It would be better to do that with 'roff magic.
|
||||
-.B nethack
|
||||
+.B xnethack
|
||||
[
|
||||
.BR \-d | \-\-directory
|
||||
.I directory
|
||||
@@ -92,7 +92,7 @@ Also
|
||||
.BR \-W | \-Wiz
|
||||
]
|
||||
.PP
|
||||
-.B nethack
|
||||
+.B xnethack
|
||||
[
|
||||
.BR \-d | \-\-directory
|
||||
.I directory
|
||||
@@ -114,7 +114,7 @@ Also
|
||||
.I playernames
|
||||
]
|
||||
.PP
|
||||
-.B nethack
|
||||
+.B xnethack
|
||||
[
|
||||
.B \-\-usage
|
||||
|
|
||||
@@ -310,7 +310,7 @@ option, which must be the first argument if it appears
|
||||
supplies a directory which is to serve as the playground.
|
||||
It overrides the value from NETHACKDIR, HACKDIR,
|
||||
or the directory specified by the game administrator during compilation
|
||||
-(usually /usr/games/lib/nethackdir).
|
||||
+(usually %%HACKDIR%%).
|
||||
This option is usually only useful to the game administrator.
|
||||
The playground must contain several auxiliary files such as help files,
|
||||
the list of top scorers, and a subdirectory
|
||||
@@ -418,7 +418,7 @@ name is '.xnethackrc' in the user's home directory.
|
||||
|
||||
.br
|
||||
All other files are in the playground directory,
|
||||
-normally /usr/games/lib/nethackdir.
|
||||
+normally %%HACKDIR%%.
|
||||
If DLB was defined during the compile, the data files and special levels
|
||||
will be inside a larger file, normally nhdat, instead of being separate
|
||||
files.
|
||||
@ -1,15 +1,6 @@
|
||||
--- doc/recover.6.orig 2022-03-07 23:57:15 UTC
|
||||
--- doc/recover.6.orig 2025-03-17 12:08:19 UTC
|
||||
+++ doc/recover.6
|
||||
@@ -42,7 +42,7 @@ option, which must be the first argument if it appears
|
||||
supplies a directory which is the NetHack playground.
|
||||
It overrides the value from NETHACKDIR, HACKDIR, or the directory
|
||||
specified by the game administrator during compilation
|
||||
-(usually /usr/games/lib/nethackdir).
|
||||
+(usually %%HACKDIR%%).
|
||||
.PP
|
||||
^?ALLDOCS
|
||||
For recovery to be possible,
|
||||
@@ -129,7 +129,7 @@ but even a compression-using
|
||||
@@ -136,7 +136,7 @@ will find them in the uncompressed form.
|
||||
.I nethack
|
||||
will find them in the uncompressed form.
|
||||
.SH "SEE ALSO"
|
||||
|
||||
20
games/xnethack/files/patch-doc_xnethack.6
Normal file
20
games/xnethack/files/patch-doc_xnethack.6
Normal file
@ -0,0 +1,20 @@
|
||||
--- doc/xnethack.6.orig 2025-03-17 11:59:42 UTC
|
||||
+++ doc/xnethack.6
|
||||
@@ -317,7 +317,7 @@ or the directory specified by the game administrator d
|
||||
supplies a directory which is to serve as the playground.
|
||||
It overrides the value from NETHACKDIR, HACKDIR,
|
||||
or the directory specified by the game administrator during compilation
|
||||
-(usually /usr/games/lib/nethackdir).
|
||||
+(usually %%HACKDIR%%).
|
||||
This option is usually only useful to the game administrator.
|
||||
The playground must contain several auxiliary files such as help files,
|
||||
the list of top scorers, and a subdirectory
|
||||
@@ -435,7 +435,7 @@ All other files are in the playground directory,
|
||||
|
||||
.br
|
||||
All other files are in the playground directory,
|
||||
-normally /usr/games/lib/xnethackdir.
|
||||
+normally %%HACKDIR%%.
|
||||
If DLB was defined during the compile, the data files and special levels
|
||||
will be inside a larger file, normally nhdat, instead of being separate
|
||||
files.
|
||||
@ -1,6 +1,6 @@
|
||||
--- include/config.h.orig 2023-05-16 21:33:58 UTC
|
||||
--- include/config.h.orig 2025-03-17 12:13:32 UTC
|
||||
+++ include/config.h
|
||||
@@ -312,11 +312,11 @@
|
||||
@@ -386,11 +386,11 @@
|
||||
|
||||
#if defined(UNIX) && !defined(ZLIB_COMP) && !defined(COMPRESS)
|
||||
/* path and file name extension for compression program */
|
||||
@ -16,7 +16,7 @@
|
||||
#endif
|
||||
|
||||
#ifndef COMPRESS
|
||||
@@ -401,7 +401,7 @@
|
||||
@@ -475,7 +475,7 @@
|
||||
* otherwise it will be the current directory.
|
||||
*/
|
||||
#ifndef HACKDIR
|
||||
@ -25,25 +25,25 @@
|
||||
#endif
|
||||
|
||||
/*
|
||||
@@ -662,7 +662,7 @@ typedef unsigned char uchar;
|
||||
@@ -730,7 +730,7 @@ typedef unsigned char uchar;
|
||||
|
||||
/* TEMPORARY - MAKE UNCONDITIONAL BEFORE RELEASE */
|
||||
/* undef this to check if sandbox breaks something */
|
||||
-#define NHL_SANDBOX
|
||||
+/* #define NHL_SANDBOX */
|
||||
|
||||
/* End of Section 4 */
|
||||
|
||||
@@ -691,7 +691,7 @@ typedef unsigned char uchar;
|
||||
#define DUMPLOG_MSG_COUNT 50
|
||||
#endif /* DUMPLOG_MSG_COUNT */
|
||||
#ifdef NHL_SANDBOX
|
||||
#ifdef CHRONICLE
|
||||
@@ -764,7 +764,7 @@ typedef unsigned char uchar;
|
||||
#ifdef DUMPLOG
|
||||
#define DUMPLOG_CORE
|
||||
#ifndef DUMPLOG_FILE
|
||||
-#define DUMPLOG_FILE "/tmp/xnethack.%n.%d.log"
|
||||
+#define DUMPLOG_FILE "/tmp/xnethack.%v.%u.%n.%D.log"
|
||||
/* DUMPLOG_FILE allows following placeholders:
|
||||
%% literal '%'
|
||||
%v version (eg. "3.6.3-0")
|
||||
@@ -720,7 +720,7 @@ typedef unsigned char uchar;
|
||||
@@ -800,7 +800,7 @@ typedef unsigned char uchar;
|
||||
|
||||
/* TEMPORARY - MAKE UNCONDITIONAL BEFORE RELEASE */
|
||||
/* undef this to check if sandbox breaks something */
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
--- include/unixconf.h.orig 2023-05-16 21:33:58 UTC
|
||||
--- include/unixconf.h.orig 2025-03-15 15:02:36 UTC
|
||||
+++ include/unixconf.h
|
||||
@@ -20,13 +20,13 @@
|
||||
*/
|
||||
@ -16,7 +16,7 @@
|
||||
/* of Linux */
|
||||
/* #define HPUX */ /* Hewlett-Packard's Unix, version 6.5 or higher */
|
||||
/* use SYSV for < v6.5 */
|
||||
@@ -327,7 +327,7 @@
|
||||
@@ -332,7 +332,7 @@
|
||||
#endif
|
||||
|
||||
#if defined(BSD) || defined(ULTRIX)
|
||||
|
||||
@ -1,10 +1,10 @@
|
||||
--- src/files.c.orig 2021-03-22 22:28:14 UTC
|
||||
--- src/files.c.orig 2025-03-15 15:02:36 UTC
|
||||
+++ src/files.c
|
||||
@@ -51,6 +51,7 @@ const
|
||||
@@ -50,6 +50,7 @@ const
|
||||
|
||||
#if defined(UNIX) && defined(SELECTSAVED)
|
||||
#include <sys/types.h>
|
||||
+#include <limits.h>
|
||||
#include <dirent.h>
|
||||
#include <stdlib.h>
|
||||
#endif
|
||||
|
||||
|
||||
@ -6,26 +6,21 @@ mismatch.
|
||||
To rule out that possibility, the sandbox code is left disabled by
|
||||
default but can be enabled if desired through the SANDBOX option.
|
||||
|
||||
--- src/nhlua.c.orig 2023-05-16 21:33:58 UTC
|
||||
--- src/nhlua.c.orig 2025-03-17 12:18:47 UTC
|
||||
+++ src/nhlua.c
|
||||
@@ -2074,20 +2074,6 @@ DISABLE_WARNING_CONDEXPR_IS_CONSTANT
|
||||
@@ -2236,6 +2236,7 @@ nhl_init(nhl_sandbox_info *sbi)
|
||||
lua_State *
|
||||
nhl_init(nhl_sandbox_info *sbi)
|
||||
{
|
||||
- /* It would be nice to import EXPECTED from each build system. XXX */
|
||||
- /* And it would be nice to do it only once, but it's cheap. */
|
||||
-#ifndef NHL_VERSION_EXPECTED
|
||||
-#define NHL_VERSION_EXPECTED 50404
|
||||
-#endif
|
||||
-
|
||||
-#ifdef NHL_SANDBOX
|
||||
- if (NHL_VERSION_EXPECTED != LUA_VERSION_RELEASE_NUM) {
|
||||
- panic(
|
||||
- "sandbox doesn't know this Lua version: this=%d != expected=%d ",
|
||||
- LUA_VERSION_RELEASE_NUM, NHL_VERSION_EXPECTED);
|
||||
- }
|
||||
-#endif
|
||||
-
|
||||
lua_State *L = nhlL_newstate(sbi);
|
||||
+#if 0
|
||||
/* It would be nice to import EXPECTED from each build system. XXX */
|
||||
/* And it would be nice to do it only once, but it's cheap. */
|
||||
#ifndef NHL_VERSION_EXPECTED
|
||||
@@ -2248,6 +2249,7 @@ nhl_init(nhl_sandbox_info *sbi)
|
||||
"sandbox doesn't know this Lua version: this=%d != expected=%d ",
|
||||
LUA_VERSION_RELEASE_NUM, NHL_VERSION_EXPECTED);
|
||||
}
|
||||
+#endif
|
||||
#endif
|
||||
|
||||
iflags.in_lua = TRUE;
|
||||
lua_State *L = nhlL_newstate(sbi, "nhl_init");
|
||||
|
||||
@ -1,34 +1,22 @@
|
||||
--- sys/unix/Makefile.doc.orig 2023-05-16 21:33:58 UTC
|
||||
--- sys/unix/Makefile.doc.orig 2025-03-15 15:02:36 UTC
|
||||
+++ sys/unix/Makefile.doc
|
||||
@@ -78,17 +78,17 @@ Guidebook.dvi : $(GUIDEBOOK_TEX)
|
||||
@@ -80,10 +80,10 @@ $(MAKEDEFS) : ../util/makedefs.c ../include/config.h .
|
||||
# (note: 'make makedefs', not 'make $(MAKEDEFS)')
|
||||
$(MAKEDEFS) : ../util/makedefs.c ../include/config.h ../src/mdlib.c \
|
||||
../util/mdgrep.h
|
||||
- ( cd ../util ; make makedefs )
|
||||
+ ( cd ../util ; ${MAKE} makedefs )
|
||||
|
||||
-GAME = nethack
|
||||
-MANDIR = /usr/man/man6
|
||||
+GAME = xnethack
|
||||
+MANDIR = ${PREFIX}/share/man/man6
|
||||
GAME = xnethack
|
||||
-MANDIR ?= /usr/man/man6
|
||||
+MANDIR ?= ${PREFIX}/share/man/man6
|
||||
MANEXT = 6
|
||||
NROFF ?= nroff
|
||||
|
||||
# manual installation for most BSD-style systems
|
||||
-GAMEMANCREATE = cat nethack.6 | $(NHGREP) >
|
||||
-RCVRMANCREATE = cat recover.6 | $(NHGREP) >
|
||||
-DLBMANCREATE = cat dlb.6 | $(NHGREP) >
|
||||
-MDMANCREATE = cat makedefs.6 | $(NHGREP) >
|
||||
+GAMEMANCREATE = cat nethack.6 | $(NHGREP) > nethack.6.out ; ${BSD_INSTALL_MAN} nethack.6.out
|
||||
+RCVRMANCREATE = cat recover.6 | $(NHGREP) > recover.6.out ; ${BSD_INSTALL_MAN} recover.6.out
|
||||
+DLBMANCREATE = cat dlb.6 | $(NHGREP) > dlb.6.out ; ${BSD_INSTALL_MAN} dlb.6.out
|
||||
+MDMANCREATE = cat makedefs.6 | $(NHGREP) > makedefs.6.out ; ${BSD_INSTALL_MAN} makedefs.6.out
|
||||
# manual installation for most SYSV-style systems
|
||||
# GAMEMANCREATE = cat nethack.6 | $(NHGREP) | nroff -man - >
|
||||
# RCVRMANCREATE = cat recover.6 | $(NHGREP) | nroff -man - >
|
||||
@@ -96,10 +96,10 @@ MDMANCREATE = cat makedefs.6 | $(NHGREP) >
|
||||
@@ -99,10 +99,10 @@ manpages: $(PREMANPAGES)
|
||||
# MDMANCREATE = cat makedefs.6 | $(NHGREP) | nroff -man - >
|
||||
|
||||
manpages:
|
||||
manpages: $(PREMANPAGES)
|
||||
- -$(GAMEMANCREATE) $(MANDIR)/$(GAME).$(MANEXT)
|
||||
- -$(RCVRMANCREATE) $(MANDIR)/recover.$(MANEXT)
|
||||
- -$(DLBMANCREATE) $(MANDIR)/dlb.$(MANEXT)
|
||||
@ -39,4 +27,4 @@
|
||||
+ -$(MDMANCREATE) ${DESTDIR}$(MANDIR)/makedefs.$(MANEXT)
|
||||
|
||||
# manual creation for distribution
|
||||
DISTRIB = Guidebook.txt nethack.txt recover.txt \
|
||||
DISTRIB = Guidebook.txt xnethack.txt recover.txt \
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
--- sys/unix/Makefile.src.orig 2023-05-29 12:17:06 UTC
|
||||
--- sys/unix/Makefile.src.orig 2025-03-15 15:02:36 UTC
|
||||
+++ sys/unix/Makefile.src
|
||||
@@ -179,14 +179,22 @@ SYSOBJ = $(TARGETPFX)ioctl.o $(TARGETPFX)unixmain.o $(
|
||||
@@ -184,9 +184,17 @@ SYSOBJ = $(TARGETPFX)ioctl.o $(TARGETPFX)unixmain.o $(
|
||||
|
||||
# flags for debugging:
|
||||
# CFLAGS = -g -I../include
|
||||
@ -17,15 +17,18 @@
|
||||
+LFLAGS += -L${LUA_LIBDIR}
|
||||
+LINK ?= $(CC)
|
||||
|
||||
AR = ar
|
||||
ARFLAGS = rcs
|
||||
@@ -194,7 +202,7 @@ ARFLAGS = rcs
|
||||
# The Qt and Be window systems are written in C++, while the rest of
|
||||
# NetHack is standard C. If using Qt, uncomment the LINK line here to get
|
||||
# the C++ libraries linked in.
|
||||
-CXXFLAGS = $(CCXXFLAGS) -I. -I$(QTDIR)/include $(QTCXXFLAGS)
|
||||
+CXXFLAGS += -I. -I../include -I${LUA_INCDIR}
|
||||
+CXXFLAGS += $(CCXXFLAGS) -I. -I../include -I$(QTDIR)/include -I${LUA_INCDIR} $(QTCXXFLAGS)
|
||||
CXX ?= g++
|
||||
MOC ?= moc
|
||||
MOCPATH ?= $(QTDIR)/bin/$(MOC)
|
||||
@@ -257,7 +265,7 @@ WINX11SRC = ../win/X11/Window.c ../win/X11/dialogs.c .
|
||||
@@ -267,7 +275,7 @@ WINX11OBJ = $(TARGETPFX)Window.o $(TARGETPFX)dialogs.o
|
||||
WINX11OBJ = $(TARGETPFX)Window.o $(TARGETPFX)dialogs.o $(TARGETPFX)winX.o \
|
||||
$(TARGETPFX)winmap.o $(TARGETPFX)winmenu.o $(TARGETPFX)winmesg.o \
|
||||
$(TARGETPFX)winmisc.o $(TARGETPFX)winstat.o $(TARGETPFX)wintext.o \
|
||||
@ -34,7 +37,7 @@
|
||||
#
|
||||
# Files for a Qt 3 interface (renamed since nethack 3.6.x)
|
||||
#
|
||||
@@ -293,7 +301,7 @@ WINQTOBJ = $(TARGETPFX)qt_bind.o $(TARGETPFX)qt_click.
|
||||
@@ -303,7 +311,7 @@ WINQTOBJ = $(TARGETPFX)qt_bind.o $(TARGETPFX)qt_click.
|
||||
$(TARGETPFX)qt_msg.o $(TARGETPFX)qt_plsel.o $(TARGETPFX)qt_rip.o \
|
||||
$(TARGETPFX)qt_set.o $(TARGETPFX)qt_stat.o $(TARGETPFX)qt_str.o \
|
||||
$(TARGETPFX)qt_streq.o $(TARGETPFX)qt_svsel.o $(TARGETPFX)qt_win.o \
|
||||
@ -43,7 +46,7 @@
|
||||
|
||||
# Files for Shim windowing interface for libnh -- doesn't do anything,
|
||||
# just passes along the API calls to the library
|
||||
@@ -318,6 +326,29 @@ WINBEOBJ =
|
||||
@@ -328,6 +336,29 @@ WINBEOBJ =
|
||||
# Curses - Karl Garrison, Tangles
|
||||
#WINSRC = $(WINCURSESSRC)
|
||||
#WINOBJ = $(WINCURSESOBJ)
|
||||
@ -73,7 +76,7 @@
|
||||
#
|
||||
# on some systems the termcap library is in -ltermcap or -lcurses
|
||||
# on 386 Xenix, the -ltermlib tputs() seems not to work; use -lcurses instead
|
||||
@@ -334,6 +365,7 @@ WINBEOBJ =
|
||||
@@ -344,6 +375,7 @@ WINBEOBJ =
|
||||
# WINTTYLIB = -lcurses16
|
||||
# WINTTYLIB = -lncurses
|
||||
#WINTTYLIB = -ltermlib
|
||||
@ -81,7 +84,7 @@
|
||||
#
|
||||
# libraries for X11
|
||||
# If USE_XPM is defined in config.h, you will also need -lXpm here.
|
||||
@@ -341,16 +373,19 @@ WINBEOBJ =
|
||||
@@ -351,16 +383,19 @@ WINBEOBJ =
|
||||
# WINX11LIB = -lXaw -lXmu -lXt -lX11
|
||||
# WINX11LIB = -lXaw -lXmu -lXext -lXt -lXpm -lX11 -lm
|
||||
# WINX11LIB = -lXaw -lXmu -lXpm -lXext -lXt -lX11 -lSM -lICE -lm # BSD/OS 2.0
|
||||
@ -103,7 +106,7 @@
|
||||
#
|
||||
# libraries for KDE (with Qt)
|
||||
WINKDELIB = -lkdecore -lkdeui -lXext
|
||||
@@ -360,7 +395,7 @@ WINBELIB = -lbe
|
||||
@@ -370,7 +405,7 @@ WINBELIB = -lbe
|
||||
#
|
||||
# libraries for curses port
|
||||
# link with ncurses
|
||||
@ -112,7 +115,7 @@
|
||||
# link with pdcurses for SDL, installed in a separate directory
|
||||
#WINCURSESLIB = -L/usr/local/lib/pdcurses -lpdcurses -lSDL
|
||||
# same as above, for XCurses
|
||||
@@ -370,6 +405,18 @@ WINCURSESLIB = -lncurses
|
||||
@@ -380,6 +415,18 @@ WINCURSESLIB = -lncurses
|
||||
#
|
||||
# For Curses
|
||||
#WINLIB = $(WINCURSESLIB)
|
||||
@ -131,7 +134,7 @@
|
||||
#
|
||||
# some platforms need to build the support libraries
|
||||
# BUILDMORE = $(TARGETPFX)pdcurses.a
|
||||
@@ -425,7 +472,7 @@ AWK = awk
|
||||
@@ -435,7 +482,7 @@ AWK = awk
|
||||
# skip it--if nethack's sources don't reside in a git repository than
|
||||
# the script which creates that file will fail benignly and 'makedefs -v'
|
||||
# will proceed without it
|
||||
@ -140,7 +143,7 @@
|
||||
|
||||
# if you change this to 1, feedback while building will omit -Dthis -Wthat
|
||||
# -Isomewhere so that each file being compiled is listed on one short line;
|
||||
@@ -433,7 +480,7 @@ GITINFO=1
|
||||
@@ -443,7 +490,7 @@ GITINFO=1
|
||||
# (rather than just in suffix default rule), such as is implemented by
|
||||
# gnu make and others which have picked up its extensions;
|
||||
# allowed values are 0, 1, and empty (which behaves like 0)
|
||||
@ -149,16 +152,16 @@
|
||||
|
||||
# ----------------------------------------
|
||||
#
|
||||
@@ -487,7 +534,7 @@ MAKEDEFS = ../util/makedefs
|
||||
LUA_VERSION ?=5.4.4
|
||||
@@ -505,7 +552,7 @@ LUALIB = ../lib/lua/$(LUABASE)
|
||||
LUA_VERSION ?=5.4.6
|
||||
LUABASE = liblua-$(LUA_VERSION).a
|
||||
LUALIB = ../lib/lua/$(LUABASE)
|
||||
-LUALIBS = $(LUALIB) -lm $(DLLIB)
|
||||
+LUALIBS = -llua-${LUA_VER} -lm $(DLLIB)
|
||||
LUAHEADERS = lib/lua-$(LUA_VERSION)/src
|
||||
|
||||
# timestamp files to reduce `make' overhead and shorten .o dependency lists
|
||||
CONFIG_H = ../src/config.h-t
|
||||
@@ -621,7 +668,7 @@ all: $(GAME)
|
||||
@@ -644,7 +691,7 @@ pregame:
|
||||
pregame:
|
||||
$(PREGAME)
|
||||
|
||||
@ -166,8 +169,8 @@
|
||||
+$(GAME): pregame $(MAKEDEFS) $(WAVS) $(SYSTEM)
|
||||
@echo "$(GAME) is up to date."
|
||||
|
||||
Sysunix: $(HOSTOBJ) $(HOBJ) $(DATE_O) $(BUILDMORE) Makefile
|
||||
@@ -701,11 +748,11 @@ objects.o:
|
||||
Sysunix: $(HOSTOBJ) $(HOBJ) $(TARGET_HACKLIB) $(DATE_O) $(BUILDMORE) Makefile
|
||||
@@ -730,11 +777,11 @@ qt3_kde0.moc: ../win/Qt3/qt3_kde0.h
|
||||
|
||||
# outdated Qt 3 windowport meta-object-compiler output
|
||||
qt3_kde0.moc: ../win/Qt3/qt3_kde0.h
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
--- sys/unix/Makefile.top.orig 2023-05-16 21:33:58 UTC
|
||||
--- sys/unix/Makefile.top.orig 2025-03-15 15:02:36 UTC
|
||||
+++ sys/unix/Makefile.top
|
||||
@@ -25,15 +25,15 @@ NHSROOT=.
|
||||
@@ -25,15 +25,15 @@ GAME = xnethack
|
||||
GAME = xnethack
|
||||
# GAME = nethack.prg
|
||||
#GAMEUID = games
|
||||
@ -43,7 +43,7 @@
|
||||
# Qt without X11; assumes GRAPHIC_TOMBSTONE:
|
||||
# VARDATND = nhtiles.bmp pet_mark.xbm pilemark.xbm rip.xpm
|
||||
|
||||
@@ -136,13 +138,11 @@ $(TOPLUALIB): $(LUATOP)/liblua.a
|
||||
@@ -152,14 +154,11 @@ $(TOPLUALIB): $(LUATOP)/liblua.a
|
||||
@( if test -d lib/lua ; then true ; else mkdir -p lib/lua ; fi )
|
||||
cp $(LUATOP)/liblua.a $@
|
||||
|
||||
@ -51,8 +51,9 @@
|
||||
+include/nhlua.h:
|
||||
echo '/* nhlua.h - generated by top Makefile */' > $@
|
||||
- @echo '#include "../$(LUAHEADERS)/lua.h"' >> $@
|
||||
- @sed -e '/(lua_error)/!d' -e '/(lua_error)/s/;/ NORETURN;/1' \
|
||||
- < $(LUAHEADERS)/lua.h >> $@
|
||||
- @sed -e '/(lua_error)/!d' \
|
||||
- -e '/(lua_error)/s/LUA_API/ATTRNORETURN LUA_API/1' \
|
||||
- -e '/(lua_error)/s/;/ NORETURN;/1' < $(LUAHEADERS)/lua.h >> $@
|
||||
- @echo '#include "../$(LUAHEADERS)/lualib.h"' >> $@
|
||||
- @echo '#include "../$(LUAHEADERS)/lauxlib.h"' >> $@
|
||||
+ @echo '#include <lua.h>' >> $@
|
||||
@ -61,7 +62,7 @@
|
||||
@echo '/*nhlua.h*/' >> $@
|
||||
# LUATESTTARGET is this by default
|
||||
lib/lua-$(LUA_VERSION)/src/lua.h:
|
||||
@@ -273,39 +273,22 @@ dofiles:
|
||||
@@ -304,39 +303,22 @@ dofiles:
|
||||
-e '}' \
|
||||
-e '$$s/.*/nodlb/p' < dat/options` ; \
|
||||
$(MAKE) dofiles-$${target-nodlb}
|
||||
@ -109,7 +110,7 @@
|
||||
#
|
||||
# This is not part of the dependency build hierarchy.
|
||||
# It requires an explicit "make fetch-Lua".
|
||||
@@ -342,25 +325,17 @@ install: rootcheck $(GAME) recover $(VARDAT) spec_levs
|
||||
@@ -447,24 +429,17 @@ install: rootcheck $(PRECHECK) $(GAME) recover $(VARDA
|
||||
true; $(PREINSTALL)
|
||||
# set up the directories
|
||||
# not all mkdirs have -p; those that don't will create a -p directory
|
||||
@ -135,9 +136,8 @@
|
||||
- -( 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.
|
||||
|
||||
+ touch ${DESTDIR}$(VARDIR)/perm ${DESTDIR}$(VARDIR)/record ${DESTDIR}$(VARDIR)/logfile ${DESTDIR}$(VARDIR)/xlogfile \
|
||||
+ ${DESTDIR}$(VARDIR)/livelog
|
||||
# sysconf
|
||||
true; $(SYSCONFINSTALL)
|
||||
# other steps from hints file
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
--- sys/unix/sysconf.orig 2023-05-16 21:33:58 UTC
|
||||
--- sys/unix/sysconf.orig 2025-03-15 15:02:36 UTC
|
||||
+++ sys/unix/sysconf
|
||||
@@ -142,7 +142,7 @@ LIVELOG=0x11FFF
|
||||
@@ -146,7 +146,7 @@ LIVELOG=0x11FFF
|
||||
# %D current time, YYYYMMDDhhmmss format
|
||||
# %n player name
|
||||
# %N first character of player name
|
||||
|
||||
@ -1,71 +0,0 @@
|
||||
--- util/makedefs.c.orig 2023-05-16 21:33:58 UTC
|
||||
+++ util/makedefs.c
|
||||
@@ -113,6 +113,7 @@ static struct version_info version;
|
||||
#define MAXFNAMELEN 600
|
||||
|
||||
static char filename[MAXFNAMELEN];
|
||||
+static char tempfilename[MAXFNAMELEN];
|
||||
|
||||
#ifdef FILE_PREFIX
|
||||
/* if defined, a first argument not starting with - is
|
||||
@@ -244,6 +245,12 @@ main(int argc, char *argv[])
|
||||
/*NOTREACHED*/
|
||||
}
|
||||
|
||||
+ if (snprintf(tempfilename, sizeof(tempfilename), "%s.%d", "grep.tmp", getpid()) >= sizeof(tempfilename)) {
|
||||
+ Fprintf(stderr, "Cannot create temporary filename.");
|
||||
+ (void) fflush(stderr);
|
||||
+ return 1;
|
||||
+ }
|
||||
+
|
||||
#ifdef FILE_PREFIX
|
||||
if (argc >= 2 && argv[1][0] != '-') {
|
||||
file_prefix = argv[1];
|
||||
@@ -1041,12 +1048,12 @@ do_rnd_access_file(
|
||||
Strcat(buf, "\n"); /* so make sure that the default one does too */
|
||||
(void) fputs(xcrypt(padline(buf, padlength)), ofp);
|
||||
|
||||
- tfp = getfp(DATA_TEMPLATE, "grep.tmp", WRTMODE, FLG_TEMPFILE);
|
||||
+ tfp = getfp(DATA_TEMPLATE, tempfilename, WRTMODE, FLG_TEMPFILE);
|
||||
grep0(ifp, tfp, FLG_TEMPFILE);
|
||||
#ifndef HAS_NO_MKSTEMP
|
||||
ifp = tfp;
|
||||
#else
|
||||
- ifp = getfp(DATA_TEMPLATE, "grep.tmp", RDTMODE, 0);
|
||||
+ ifp = getfp(DATA_TEMPLATE, tempfilename, RDTMODE, 0);
|
||||
#endif
|
||||
while ((line = fgetline(ifp)) != 0) {
|
||||
if (line[0] != '#' && line[0] != '\n') {
|
||||
@@ -1059,7 +1066,7 @@ do_rnd_access_file(
|
||||
Fclose(ofp);
|
||||
|
||||
#ifdef HAS_NO_MKSTEMP
|
||||
- delete_file(DATA_TEMPLATE, "grep.tmp");
|
||||
+ delete_file(DATA_TEMPLATE, templfilename);
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
@@ -1874,12 +1881,12 @@ do_dungeon(void)
|
||||
}
|
||||
Fprintf(ofp, "%s", Dont_Edit_Data);
|
||||
|
||||
- tfp = getfp(DATA_TEMPLATE, "grep.tmp", WRTMODE, FLG_TEMPFILE);
|
||||
+ tfp = getfp(DATA_TEMPLATE, tempfilename, WRTMODE, FLG_TEMPFILE);
|
||||
grep0(ifp, tfp, FLG_TEMPFILE);
|
||||
#ifndef HAS_NO_MKSTEMP
|
||||
ifp = tfp;
|
||||
#else
|
||||
- ifp = getfp(DATA_TEMPLATE, "grep.tmp", RDTMODE, 0);
|
||||
+ ifp = getfp(DATA_TEMPLATE, tempfilename, RDTMODE, 0);
|
||||
#endif
|
||||
while ((line = fgetline(ifp)) != 0) {
|
||||
SpinCursor(3);
|
||||
@@ -1895,7 +1902,7 @@ do_dungeon(void)
|
||||
Fclose(ofp);
|
||||
|
||||
#ifdef HAS_NO_MKSTEMP
|
||||
- delete_file(DATA_TEMPLATE, "grep.tmp");
|
||||
+ delete_file(DATA_TEMPLATE, tempfilename);
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
@ -1,6 +1,6 @@
|
||||
--- win/tty/termcap.c.orig 2023-05-16 21:33:58 UTC
|
||||
--- win/tty/termcap.c.orig 2025-03-15 15:02:36 UTC
|
||||
+++ win/tty/termcap.c
|
||||
@@ -192,10 +192,6 @@ tty_startup(int *wid, int *hgt)
|
||||
@@ -195,10 +195,6 @@ term_startup(int *wid, int *hgt)
|
||||
error("Terminal must backspace.");
|
||||
#else
|
||||
if (!(BC = Tgetstr(nhStr("bc")))) { /* termcap also uses bc/bs */
|
||||
|
||||
11
games/xnethack/files/patch-win_curses_cursmesg.c
Normal file
11
games/xnethack/files/patch-win_curses_cursmesg.c
Normal file
@ -0,0 +1,11 @@
|
||||
--- win/curses/cursmesg.c.orig 2025-03-17 13:33:30 UTC
|
||||
+++ win/curses/cursmesg.c
|
||||
@@ -31,7 +31,7 @@ glyph_info mesg_gi;
|
||||
glyph_info mesg_gi;
|
||||
|
||||
#ifndef CURSES_GENL_PUTMIXED
|
||||
-#if defined(PDC_WIDE) || defined(NCURSES_WIDECHAR)
|
||||
+#if defined(PDC_WIDE) || NCURSES_WIDECHAR
|
||||
#define USE_CURSES_PUTMIXED
|
||||
#else /* WIDE */
|
||||
#ifdef NH_PRAGMA_MESSAGE
|
||||
@ -82,6 +82,7 @@ bin/%%HACKNAME%%
|
||||
%%DATADIR%%/bigrm-11.lua
|
||||
%%DATADIR%%/bigrm-12.lua
|
||||
%%DATADIR%%/bigrm-13.lua
|
||||
%%DATADIR%%/bigrm-14.lua
|
||||
%%DATADIR%%/bigrm-2.lua
|
||||
%%DATADIR%%/bigrm-3.lua
|
||||
%%DATADIR%%/bigrm-4.lua
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user