diff --git a/games/xnethack/Makefile b/games/xnethack/Makefile index a51bfebf0b06..aa4d6d959737 100644 --- a/games/xnethack/Makefile +++ b/games/xnethack/Makefile @@ -1,95 +1,95 @@ PORTNAME= xNetHack DISTVERSIONPREFIX= xnh -DISTVERSION= 9.0 +DISTVERSION= 9.1 CATEGORIES= games MAINTAINER= fuz@FreeBSD.org COMMENT= Experimental features and improvements applied to NetHack 3.7-dev WWW= https://nethackwiki.com/wiki/XNetHack LICENSE= nethack LICENSE_NAME= NETHACK GENERAL PUBLIC LICENSE LICENSE_FILE= ${WRKSRC}/dat/license LICENSE_PERMS= dist-mirror dist-sell pkg-mirror pkg-sell auto-accept FLAVORS= x11 nox11 qt FLAVOR?= ${FLAVORS:[1]} nox11_PKGNAMESUFFIX= -nox11 qt_PKGNAMESUFFIX= -qt BUILD_DEPENDS= nroff:textproc/groff USES= compiler:c11 gmake ncurses tar:tgz lua:54 USE_GITHUB= yes GH_ACCOUNT= copperwater MAKE_ENV= GRAPHICS="${GRAPHICS}" PLIST_SUB= HACKNAME="${HACKNAME}" # Configure these variables as you want them to be. HACKNAME?= ${PORTNAME:tl} HACKDIR?= share/${HACKNAME} DATADIR= ${PREFIX}/${HACKDIR} DOCSDIR= ${PREFIX}/share/doc/${HACKNAME} .if ${FLAVOR} == "x11" USES+= xorg USE_XORG= xaw xpm xmu xext xt x11 sm ice CFLAGS+= -DUSE_TILES GRAPHICS= X11_GRAPHICS .elif ${FLAVOR} == "nox11" GRAPHICS= # none .elif ${FLAVOR} == "qt" USES+= localbase pkgconfig qt:5 USE_QT= buildtools:build core gui multimedia network widgets 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 GRAPHICS= QT_GRAPHICS .endif CFLAGS+= -DNOMAIL -DCURSES_GRAPHICS # nhlua.c has a (patched out) version check for lua when the sandbox # is used. As I cannot ascertain whether using the system's different # lua version could cause problems, I'll leave the sandbox disabled by # default. OPTIONS_DEFINE= DOCS SANDBOX SANDBOX_DESC= Run lua in a sandbox (untested) SANDBOX_CFLAGS= -DNHL_SANDBOX .include pre-configure: .for f in include/config.h sys/unix/Makefile.top @${REINPLACE_CMD} -e 's|%%HACKDIR%%|${PREFIX}/${HACKDIR}|g' \ ${WRKSRC}/${f} .endfor .if defined(WITHOUT_SHELL) @${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 .endif do-configure: ${TOUCH} ${WRKSRC}/dat/gitinfo.txt @cd ${WRKSRC}/sys/unix; ${SH} setup.sh post-install: ${STRIP_CMD} ${STAGEDIR}${DATADIR}/recover ${STRIP_CMD} ${STAGEDIR}${DATADIR}/${HACKNAME} @cd ${WRKSRC}/doc; ${SETENV} ${MAKE_ENV} ${MAKE} ${MAKE_ARGS} manpages ${MKDIR} ${STAGEDIR}${DATADIR}/save ${CP} ${WRKSRC}/sys/unix/sysconf ${STAGEDIR}/${DATADIR}/sysconf .for f in livelog logfile record sysconf xlogfile ${CP} ${STAGEDIR}/${DATADIR}/${f} ${STAGEDIR}/${DATADIR}/${f}.sample .endfor .if ${PORT_OPTIONS:MDOCS} ${MKDIR} ${STAGEDIR}${DOCSDIR} ${INSTALL_DATA} ${WRKSRC}/doc/Guidebook.txt ${STAGEDIR}${DOCSDIR} .endif .include diff --git a/games/xnethack/distinfo b/games/xnethack/distinfo index f8398db4ad95..b4cc355689bf 100644 --- a/games/xnethack/distinfo +++ b/games/xnethack/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1742211468 -SHA256 (copperwater-xNetHack-xnh9.0_GH0.tar.gz) = 10bda8996fe6d42d7e285a261a5dc442348cb677768562437c2d9612e324e4b5 -SIZE (copperwater-xNetHack-xnh9.0_GH0.tar.gz) = 10982131 +TIMESTAMP = 1772730329 +SHA256 (copperwater-xNetHack-xnh9.1_GH0.tar.gz) = 451adb8cdec50464fafa41deabeb2efeaef1c7475db07195c8eb238aaaeeabaf +SIZE (copperwater-xNetHack-xnh9.1_GH0.tar.gz) = 11092768 diff --git a/games/xnethack/files/patch-doc_dlb.6 b/games/xnethack/files/patch-doc_dlb.6 deleted file mode 100644 index 9333c33abd0d..000000000000 --- a/games/xnethack/files/patch-doc_dlb.6 +++ /dev/null @@ -1,11 +0,0 @@ ---- doc/dlb.6.orig 2025-03-17 12:07:52 UTC -+++ doc/dlb.6 -@@ -137,7 +137,7 @@ Kenneth Lorber - .SH AUTHOR - Kenneth Lorber - .SH "SEE ALSO" --.IR nethack (6), -+.IR xnethack (6), - .IR tar (1) - .SH BUGS - .IP \(bu 2n diff --git a/games/xnethack/files/patch-doc_recover.6 b/games/xnethack/files/patch-doc_recover.6 deleted file mode 100644 index 2a1b9bdf0703..000000000000 --- a/games/xnethack/files/patch-doc_recover.6 +++ /dev/null @@ -1,11 +0,0 @@ ---- doc/recover.6.orig 2025-03-17 12:08:19 UTC -+++ doc/recover.6 -@@ -136,7 +136,7 @@ will find them in the uncompressed form. - .I nethack - will find them in the uncompressed form. - .SH "SEE ALSO" --nethack(6) -+xnethack(6) - .SH BUGS - .PP - .I recover diff --git a/games/xnethack/files/patch-include-config.h b/games/xnethack/files/patch-include-config.h index aeabd252b245..a21f02b21bf8 100644 --- a/games/xnethack/files/patch-include-config.h +++ b/games/xnethack/files/patch-include-config.h @@ -1,54 +1,54 @@ ---- include/config.h.orig 2025-03-17 12:13:32 UTC +--- include/config.h.orig 2026-02-28 22:45:03 UTC +++ include/config.h -@@ -386,11 +386,11 @@ +@@ -387,11 +387,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 -@@ -475,7 +475,7 @@ +@@ -444,7 +444,7 @@ * otherwise it will be the current directory. */ #ifndef HACKDIR -#define HACKDIR "/usr/games/lib/xnethackdir" +#define HACKDIR "%%HACKDIR%%" #endif /* -@@ -730,7 +730,7 @@ typedef unsigned char uchar; +@@ -699,7 +699,7 @@ typedef unsigned char uchar; /* TEMPORARY - MAKE UNCONDITIONAL BEFORE RELEASE */ /* undef this to check if sandbox breaks something */ -#define NHL_SANDBOX +/* #define NHL_SANDBOX */ #ifdef NHL_SANDBOX #ifdef CHRONICLE -@@ -764,7 +764,7 @@ typedef unsigned char uchar; +@@ -733,7 +733,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") -@@ -800,7 +800,7 @@ typedef unsigned char uchar; +@@ -769,7 +769,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 */ diff --git a/games/xnethack/files/patch-src-files.c b/games/xnethack/files/patch-src-files.c index d0c30ca9a2d6..a9fc312a5363 100644 --- a/games/xnethack/files/patch-src-files.c +++ b/games/xnethack/files/patch-src-files.c @@ -1,10 +1,10 @@ ---- src/files.c.orig 2025-03-15 15:02:36 UTC +--- src/files.c.orig 2026-02-28 22:45:03 UTC +++ src/files.c -@@ -50,6 +50,7 @@ const +@@ -76,6 +76,7 @@ const #if defined(UNIX) && defined(SELECTSAVED) #include +#include #include #endif diff --git a/games/xnethack/files/patch-src_nhlua.c b/games/xnethack/files/patch-src_nhlua.c index 9afd5a952205..d655a5dadf5b 100644 --- a/games/xnethack/files/patch-src_nhlua.c +++ b/games/xnethack/files/patch-src_nhlua.c @@ -1,26 +1,26 @@ As we unbundle lua, we cannot ensure that this version check succeeds. Removal of the version check allows us to build a working binary, but it is uncertain if there are any residual effects from the version 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 2025-03-17 12:18:47 UTC +--- src/nhlua.c.orig 2026-02-28 22:45:03 UTC +++ src/nhlua.c -@@ -2236,6 +2236,7 @@ nhl_init(nhl_sandbox_info *sbi) +@@ -2356,6 +2356,7 @@ nhl_init(nhl_sandbox_info *sbi) lua_State * nhl_init(nhl_sandbox_info *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) +@@ -2372,6 +2373,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 lua_State *L = nhlL_newstate(sbi, "nhl_init"); diff --git a/games/xnethack/files/patch-sys-unix-Makefile.doc b/games/xnethack/files/patch-sys-unix-Makefile.doc index 5724617301d7..20bc3521410d 100644 --- a/games/xnethack/files/patch-sys-unix-Makefile.doc +++ b/games/xnethack/files/patch-sys-unix-Makefile.doc @@ -1,30 +1,33 @@ ---- sys/unix/Makefile.doc.orig 2025-03-15 15:02:36 UTC +--- sys/unix/Makefile.doc.orig 2026-02-28 22:45:03 UTC +++ sys/unix/Makefile.doc -@@ -80,10 +80,10 @@ $(MAKEDEFS) : ../util/makedefs.c ../include/config.h . +@@ -83,13 +83,13 @@ $(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 ) +- ( cd .. ; make makedefs ) ++ ( cd .. ; $(MAKE) makedefs ) + + ../util/stripbs: ../util/stripbs.c + ( cd .. ; $(MAKE) stripbs ) GAME = xnethack -MANDIR ?= /usr/man/man6 -+MANDIR ?= ${PREFIX}/share/man/man6 ++MANDIR ?= $(PREFIX)/share/man/man6 MANEXT = 6 NROFF ?= nroff -@@ -99,10 +99,10 @@ manpages: $(PREMANPAGES) +@@ -105,10 +105,10 @@ manpages: $(PREMANPAGES) # MDMANCREATE = cat makedefs.6 | $(NHGREP) | nroff -man - > manpages: $(PREMANPAGES) - -$(GAMEMANCREATE) $(MANDIR)/$(GAME).$(MANEXT) - -$(RCVRMANCREATE) $(MANDIR)/recover.$(MANEXT) - -$(DLBMANCREATE) $(MANDIR)/dlb.$(MANEXT) - -$(MDMANCREATE) $(MANDIR)/makedefs.$(MANEXT) + -$(GAMEMANCREATE) ${DESTDIR}$(MANDIR)/$(GAME).$(MANEXT) + -$(RCVRMANCREATE) ${DESTDIR}$(MANDIR)/recover.$(MANEXT) + -$(DLBMANCREATE) ${DESTDIR}$(MANDIR)/dlb.$(MANEXT) + -$(MDMANCREATE) ${DESTDIR}$(MANDIR)/makedefs.$(MANEXT) # manual creation for distribution DISTRIB = Guidebook.txt xnethack.txt recover.txt \ diff --git a/games/xnethack/files/patch-sys-unix-Makefile.src b/games/xnethack/files/patch-sys-unix-Makefile.src index 33f90a2930ca..a6f2c9b2e56b 100644 --- a/games/xnethack/files/patch-sys-unix-Makefile.src +++ b/games/xnethack/files/patch-sys-unix-Makefile.src @@ -1,187 +1,187 @@ ---- sys/unix/Makefile.src.orig 2025-03-15 15:02:36 UTC +--- sys/unix/Makefile.src.orig 2026-02-28 22:45:03 UTC +++ sys/unix/Makefile.src @@ -184,9 +184,17 @@ SYSOBJ = $(TARGETPFX)ioctl.o $(TARGETPFX)unixmain.o $( # flags for debugging: # CFLAGS = -g -I../include +CFLAGS += -I../include -I${LUA_INCDIR} +ifeq ("$(GRAPHICS)","X11_GRAPHICS") +CFLAGS += -DX11_GRAPHICS -I${LOCALBASE}/include +endif +ifeq ("$(GRAPHICS)","QT_GRAPHICS") +CFLAGS += -DQT_GRAPHICS +endif #CFLAGS = -O -I../include -#LFLAGS = +LFLAGS += -L${LUA_LIBDIR} +LINK ?= $(CC) - AR = ar - ARFLAGS = rcs -@@ -194,7 +202,7 @@ ARFLAGS = rcs + #fallback values, only if these are not already set + CFLAGS ?= -I../include +@@ -198,7 +206,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 ?= $(CCXXFLAGS) -I. -I$(QTDIR)/include $(QTCXXFLAGS) +CXXFLAGS += $(CCXXFLAGS) -I. -I../include -I$(QTDIR)/include -I${LUA_INCDIR} $(QTCXXFLAGS) CXX ?= g++ MOC ?= moc MOCPATH ?= $(QTDIR)/bin/$(MOC) -@@ -267,7 +275,7 @@ WINX11OBJ = $(TARGETPFX)Window.o $(TARGETPFX)dialogs.o +@@ -271,7 +279,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 \ - $(TARGETPFX)winval.o #$(TARGETPFX)tile.o + $(TARGETPFX)winval.o $(TARGETPFX)tile.o # # Files for a Qt 3 interface (renamed since nethack 3.6.x) # -@@ -303,7 +311,7 @@ WINQTOBJ = $(TARGETPFX)qt_bind.o $(TARGETPFX)qt_click. +@@ -307,7 +315,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 \ - $(TARGETPFX)qt_xcmd.o $(TARGETPFX)qt_yndlg.o #$(TARGETPFX)tile.o + $(TARGETPFX)qt_xcmd.o $(TARGETPFX)qt_yndlg.o $(TARGETPFX)tile.o # Files for Shim windowing interface for libnh -- doesn't do anything, # just passes along the API calls to the library -@@ -328,6 +336,29 @@ WINBEOBJ = +@@ -332,6 +340,29 @@ WINBEOBJ = # Curses - Karl Garrison, Tangles #WINSRC = $(WINCURSESSRC) #WINOBJ = $(WINCURSESOBJ) + +WINSRC = $(WINTTYSRC) $(WINCURSESSRC) +ifeq ("$(GRAPHICS)","X11_GRAPHICS") +WINSRC += $(WINX11SRC) +endif +ifeq ("$(GRAPHICS)","QT_GRAPHICS") +WINSRC += $(WINQTSRC) +endif +ifeq ("$(GRAPHICS)","GNOME_GRAPHICS") +WINSRC += $(WINGNOMESRC) +endif + +WINOBJ = $(WINTTYOBJ) $(WINCURSESOBJ) +ifeq ("$(GRAPHICS)","X11_GRAPHICS") +WINOBJ += $(WINX11OBJ) +endif +ifeq ("$(GRAPHICS)","QT_GRAPHICS") +WINOBJ += $(WINQTOBJ) +endif +ifeq ("$(GRAPHICS)","GNOME_GRAPHICS") +WINOBJ += $(WINGNOMEOBJ) +endif + # # on some systems the termcap library is in -ltermcap or -lcurses # on 386 Xenix, the -ltermlib tputs() seems not to work; use -lcurses instead -@@ -344,6 +375,7 @@ WINBEOBJ = +@@ -348,6 +379,7 @@ WINBEOBJ = # WINTTYLIB = -lcurses16 # WINTTYLIB = -lncurses #WINTTYLIB = -ltermlib +WINTTYLIB = -lncurses -L${LOCALBASE}/lib # # libraries for X11 # If USE_XPM is defined in config.h, you will also need -lXpm here. -@@ -351,16 +383,19 @@ WINBEOBJ = +@@ -355,16 +387,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 +WINX11LIB = -lXaw -lXmu -lXpm -lXext -lXt -lX11 -lSM -lICE -L${LOCALBASE}/lib # # # libraries for Qt 3 -WINQT3LIB = -L$(QTDIR)/lib -lqt +#WINQTLIB = -L$(QTDIR)/lib -lqt +#WINQT3LIB = ${QTCFGLIBS} ${LIBQT} +#WINQTLIB = ${QTCFGLIBS} ${LIBQT} # # libraries for Qt 4 WINQT4LIB = `pkg-config QtGui --libs` # # libraries for Qt 5 (use with WINQTSRC and WINQTOBJ) -WINQT5LIB = `pkg-config Qt5Gui Qt5Widgets Qt5Multimedia --libs` +WINQTLIB = `pkg-config Qt5Gui Qt5Widgets Qt5Multimedia --libs` # # libraries for KDE (with Qt) WINKDELIB = -lkdecore -lkdeui -lXext -@@ -370,7 +405,7 @@ WINBELIB = -lbe +@@ -374,7 +409,7 @@ WINBELIB = -lbe # # libraries for curses port # link with ncurses -WINCURSESLIB = -lncurses +WINCURSESLIB = -lncurses -L${LOCALBASE}/lib # link with pdcurses for SDL, installed in a separate directory #WINCURSESLIB = -L/usr/local/lib/pdcurses -lpdcurses -lSDL # same as above, for XCurses -@@ -380,6 +415,18 @@ WINCURSESLIB = -lncurses +@@ -384,6 +419,18 @@ WINCURSESLIB = -lncurses # # For Curses #WINLIB = $(WINCURSESLIB) + +WINLIB = $(WINTTYLIB) +ifeq ("$(GRAPHICS)","X11_GRAPHICS") +WINLIB += $(WINX11LIB) +endif +ifeq ("$(GRAPHICS)","QT_GRAPHICS") +WINLIB += $(WINQTLIB) +endif +ifeq ("$(GRAPHICS)","GNOME_GRAPHICS") +WINLIB += $(WINGNOMELIB) +endif + # # some platforms need to build the support libraries # BUILDMORE = $(TARGETPFX)pdcurses.a -@@ -435,7 +482,7 @@ AWK = awk +@@ -443,7 +490,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 -GITINFO=1 +GITINFO=0 # 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; -@@ -443,7 +490,7 @@ GITINFO=1 +@@ -451,7 +498,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) -QUIETCC=1 +QUIETCC=0 # ---------------------------------------- # -@@ -505,7 +552,7 @@ LUALIB = ../lib/lua/$(LUABASE) - LUA_VERSION ?=5.4.6 +@@ -513,7 +560,7 @@ LUALIB = ../lib/lua/$(LUABASE) + LUA_VERSION ?=5.4.8 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 -@@ -644,7 +691,7 @@ pregame: - pregame: +@@ -658,7 +705,7 @@ pregame: $(RESPONSEFILES) + pregame: $(RESPONSEFILES) $(PREGAME) -$(GAME): pregame $(MAKEDEFS) $(LUALIB) $(WAVS) $(SYSTEM) +$(GAME): pregame $(MAKEDEFS) $(WAVS) $(SYSTEM) @echo "$(GAME) is up to date." Sysunix: $(HOSTOBJ) $(HOBJ) $(TARGET_HACKLIB) $(DATE_O) $(BUILDMORE) Makefile -@@ -730,11 +777,11 @@ qt3_kde0.moc: ../win/Qt3/qt3_kde0.h +@@ -744,11 +791,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 - $(QTDIR)/bin/moc -o qt3kde0.moc ../win/Qt3/qt3_kde0.h + ${MOC} -o qt3kde0.moc ../win/Qt3/qt3_kde0.h qt3_win.moc: ../win/Qt3/qt3_win.h - $(QTDIR)/bin/moc -o qt3win.moc ../win/Qt3/qt3_win.h + ${MOC} -o qt3win.moc ../win/Qt3/qt3_win.h qt3tableview.moc: ../win/Qt3/qt3tableview.h - $(QTDIR)/bin/moc -o qt3tableview.moc ../win/Qt3/qt3tableview.h + ${MOC} -o qt3tableview.moc ../win/Qt3/qt3tableview.h # build monst.o and objects.o before executing '$(MAKE) makedefs' $(MAKEDEFS): $(FIRSTOBJ) \ diff --git a/games/xnethack/files/patch-sys-unix-Makefile.top b/games/xnethack/files/patch-sys-unix-Makefile.top index 40f580e54f61..c7183353e84c 100644 --- a/games/xnethack/files/patch-sys-unix-Makefile.top +++ b/games/xnethack/files/patch-sys-unix-Makefile.top @@ -1,143 +1,143 @@ ---- sys/unix/Makefile.top.orig 2025-03-15 15:02:36 UTC +--- sys/unix/Makefile.top.orig 2026-02-28 22:45:03 UTC +++ sys/unix/Makefile.top @@ -25,15 +25,15 @@ GAME = xnethack GAME = xnethack # GAME = nethack.prg #GAMEUID = games -#GAMEGRP = bin +GAMEGRP = games # Permissions - some places use setgid instead of setuid, for instance. # See also the option "SECURE" in include/config.h. -#GAMEPERM = 04755 +GAMEPERM = 02755 FILEPERM = 0644 # VARFILEPERM = 0644 EXEPERM = 0755 -DIRPERM = 0755 +DIRPERM = 0775 # VARDIRPERM = 0755 # VARDIR may also appear in unixconf.h as "VAR_PLAYGROUND" else HACKDIR @@ -44,10 +44,12 @@ DIRPERM = 0755 # keep (if there is, you'll have to do the installation by hand or # modify the install commands below). #HACKDIR = $(PREFIX)/games/lib/$(GAME)dir -#VARDIR = $(HACKDIR) +HACKDIR = %%HACKDIR%% +INSTDIR = ${HACKDIR} +VARDIR = $(HACKDIR) # Where nethack.sh is installed (as 'nethack'). # If this is not defined, the shell wrapper script is not used. -#SHELLDIR = $(PREFIX)/games +SHELLDIR = $(PREFIX)/bin # Extra data files depending upon the interface(s) built into nethack. # per discussion in Install.X11 and Install.Qt @@ -62,7 +64,7 @@ DIRPERM = 0755 # X11 with GRAPHIC_TOMBSTONE (requires 'xpm'): # VARDATND = x11tiles NetHack.ad pet_mark.xbm pilemark.xbm rip.xpm # both X11 and Qt: -# VARDATND = x11tiles nhtiles.bmp NetHack.ad pet_mark.xbm pilemark.xbm rip.xpm +VARDATND = x11tiles nhtiles.bmp NetHack.ad pet_mark.xbm pilemark.xbm rip.xpm # Qt without X11; assumes GRAPHIC_TOMBSTONE: # VARDATND = nhtiles.bmp pet_mark.xbm pilemark.xbm rip.xpm @@ -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 $@ -include/nhlua.h: $(TOPLUALIB) +include/nhlua.h: echo '/* nhlua.h - generated by top Makefile */' > $@ - @echo '#include "../$(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 ' >> $@ + @echo '#include ' >> $@ + @echo '#include ' >> $@ @echo '/*nhlua.h*/' >> $@ # LUATESTTARGET is this by default lib/lua-$(LUA_VERSION)/src/lua.h: -@@ -304,39 +303,22 @@ dofiles: +@@ -309,39 +308,22 @@ dofiles: -e '}' \ -e '$$s/.*/nodlb/p' < dat/options` ; \ $(MAKE) dofiles-$${target-nodlb} - cp src/$(GAME) $(INSTDIR) - cp util/recover $(INSTDIR) - -if test -n '$(SHELLDIR)'; then rm -f $(SHELLDIR)/$(GAME); fi - if test -n '$(SHELLDIR)'; then \ + cp src/$(GAME) ${DESTDIR}$(INSTDIR)/$(GAME) + cp util/recover ${DESTDIR}$(INSTDIR) + -if test -n '${DESTDIR}$(SHELLDIR)'; then rm -f ${DESTDIR}$(SHELLDIR)/$(GAME); fi + if test -n '${DESTDIR}$(SHELLDIR)'; then \ sed -e 's;/usr/games/lib/nethackdir;$(HACKDIR);' \ -e 's;HACKDIR/nethack;HACKDIR/$(GAME);' \ < sys/unix/nethack.sh \ - > $(SHELLDIR)/$(GAME) ; fi -# set up their permissions - -( cd $(INSTDIR) ; $(CHOWN) $(GAMEUID) $(GAME) recover ; \ - $(CHGRP) $(GAMEGRP) $(GAME) recover ) - chmod $(GAMEPERM) $(INSTDIR)/$(GAME) - chmod $(EXEPERM) $(INSTDIR)/recover - -if test -n '$(SHELLDIR)'; then \ - $(CHOWN) $(GAMEUID) $(SHELLDIR)/$(GAME); fi - if test -n '$(SHELLDIR)'; then \ - $(CHGRP) $(GAMEGRP) $(SHELLDIR)/$(GAME); \ - chmod $(EXEPERM) $(SHELLDIR)/$(GAME); fi + > ${DESTDIR}$(SHELLDIR)/$(GAME) ; fi dofiles-dlb: check-dlb - ( cd dat ; cp nhdat $(DATNODLB) $(INSTDIR) ) -# set up their permissions - -( cd $(INSTDIR) ; $(CHOWN) $(GAMEUID) nhdat $(DATNODLB) ; \ - $(CHGRP) $(GAMEGRP) nhdat $(DATNODLB) ; \ - chmod $(FILEPERM) nhdat $(DATNODLB) ) + ( cd dat ; cp nhdat $(DATNODLB) ${DESTDIR}$(INSTDIR) ) dofiles-nodlb: # copy over the game files - ( cd dat ; cp $(DAT) $(INSTDIR) ) -# set up their permissions - -( cd $(INSTDIR) ; $(CHOWN) $(GAMEUID) $(DAT) ; \ - $(CHGRP) $(GAMEGRP) $(DAT) ; \ - chmod $(FILEPERM) $(DAT) ) + ( cd dat ; cp $(DAT) ${DESTDIR}$(INSTDIR) ) + # # This is not part of the dependency build hierarchy. # It requires an explicit "make fetch-Lua". -@@ -447,24 +429,17 @@ install: rootcheck $(PRECHECK) $(GAME) recover $(VARDA +@@ -460,24 +442,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 - -if test -n '$(SHELLDIR)'; then \ - mkdir -p $(SHELLDIR); fi - rm -rf $(INSTDIR) $(VARDIR) - -mkdir -p $(INSTDIR) $(VARDIR) $(VARDIR)/save $(VARDIR)/whereis + -if test -n '${DESTDIR}$(SHELLDIR)'; then \ + mkdir -p ${DESTDIR}$(SHELLDIR); fi + rm -rf ${DESTDIR}$(INSTDIR) ${DESTDIR}$(VARDIR) + -mkdir -p ${DESTDIR}$(INSTDIR) ${DESTDIR}$(VARDIR)/save ${DESTDIR}$(VARDIR)/whereis if test -d ./-p; then rmdir ./-p; fi - -$(CHOWN) $(GAMEUID) $(INSTDIR) $(VARDIR) $(VARDIR)/save $(VARDIR)/whereis - $(CHGRP) $(GAMEGRP) $(INSTDIR) $(VARDIR) $(VARDIR)/save $(VARDIR)/whereis # order counts here: - chmod $(DIRPERM) $(INSTDIR) - chmod $(VARDIRPERM) $(VARDIR) $(VARDIR)/save $(VARDIR)/whereis # set up the game files ( $(MAKE) dofiles ) # set up some additional files - touch $(VARDIR)/perm $(VARDIR)/record $(VARDIR)/logfile $(VARDIR)/xlogfile \ - $(VARDIR)/livelog - -( cd $(VARDIR) ; $(CHOWN) $(GAMEUID) perm record logfile xlogfile livelog ; \ - $(CHGRP) $(GAMEGRP) perm record logfile xlogfile livelog ; \ - chmod $(VARFILEPERM) perm record logfile xlogfile livelog ) + touch ${DESTDIR}$(VARDIR)/perm ${DESTDIR}$(VARDIR)/record ${DESTDIR}$(VARDIR)/logfile ${DESTDIR}$(VARDIR)/xlogfile \ + ${DESTDIR}$(VARDIR)/livelog # sysconf true; $(SYSCONFINSTALL) # other steps from hints file diff --git a/games/xnethack/files/patch-sys-unix-Makefile.utl b/games/xnethack/files/patch-sys-unix-Makefile.utl index 553be4350043..87ad84e9117a 100644 --- a/games/xnethack/files/patch-sys-unix-Makefile.utl +++ b/games/xnethack/files/patch-sys-unix-Makefile.utl @@ -1,33 +1,34 @@ ---- sys/unix/Makefile.utl.orig 2023-05-16 21:33:58 UTC +--- sys/unix/Makefile.utl.orig 2026-02-28 22:45:03 UTC +++ sys/unix/Makefile.utl -@@ -103,18 +103,25 @@ NHSROOT=.. - # flags for debugging: - # CFLAGS = -g -I../include +@@ -106,18 +106,29 @@ NHSROOT=.. + #CFLAGS = -O -I../include + #LFLAGS = --#CFLAGS = -O -I../include --#LFLAGS = +CFLAGS += -I../include -I${LUA_INCDIR} +ifeq ("$(GRAPHICS)","X11_GRAPHICS") +CFLAGS += -DX11_GRAPHICS +endif +ifeq ("$(GRAPHICS)","QT_GRAPHICS") +CFLAGS += -DQT_GRAPHICS +endif +ifeq ("$(GRAPHICS)","GNOME_GRAPHICS") +CFLAGS += -DGNOME_GRAPHICS +endif ++ + #fallback defaults if not set + CFLAGS ?= -I../include --# -lm required by lua + # -lm required by lua -LFLAGS += -lm -+LFLAGS = -L${LUA_LIBDIR} ++LFLAGS += -L${LUA_LIBDIR} # we specify C preprocessor flags via CFLAGS; files built with default rules # might include $(CPPFLAGS) which could get a value from user's environment; # we avoid that by forcing it empty rather than by overriding default rules CPPFLAGS = -LIBS = +LIBS = -llua-${LUA_VER} -lm OBJDIR = ../src diff --git a/games/xnethack/files/patch-win-tty-termcap.c b/games/xnethack/files/patch-win-tty-termcap.c index 59a1c215512f..94d015d11d2f 100644 --- a/games/xnethack/files/patch-win-tty-termcap.c +++ b/games/xnethack/files/patch-win-tty-termcap.c @@ -1,13 +1,13 @@ ---- win/tty/termcap.c.orig 2025-03-15 15:02:36 UTC +--- win/tty/termcap.c.orig 2026-02-28 22:45:03 UTC +++ win/tty/termcap.c -@@ -195,10 +195,6 @@ term_startup(int *wid, int *hgt) +@@ -196,10 +196,6 @@ term_startup(int *wid, int *hgt) error("Terminal must backspace."); #else if (!(BC = Tgetstr(nhStr("bc")))) { /* termcap also uses bc/bs */ -#ifndef MINIMAL_TERM - if (!tgetflag(nhStr("bs"))) - error("Terminal must backspace."); -#endif BC = tbufptr; tbufptr += 2; *BC = '\b'; diff --git a/games/xnethack/pkg-plist b/games/xnethack/pkg-plist index dfb0e6722ada..52bbf6f04680 100644 --- a/games/xnethack/pkg-plist +++ b/games/xnethack/pkg-plist @@ -1,201 +1,202 @@ @mode 555 bin/%%HACKNAME%% @owner games @group games @mode 02755 %%DATADIR%%/%%HACKNAME%% @mode %%DATADIR%%/Arc-fila.lua %%DATADIR%%/Arc-filb.lua %%DATADIR%%/Arc-goal.lua %%DATADIR%%/Arc-loca.lua %%DATADIR%%/Arc-strt.lua %%DATADIR%%/Bar-fila.lua %%DATADIR%%/Bar-filb.lua %%DATADIR%%/Bar-goal.lua %%DATADIR%%/Bar-loca.lua %%DATADIR%%/Bar-strt.lua %%DATADIR%%/Cav-fila.lua %%DATADIR%%/Cav-filb.lua %%DATADIR%%/Cav-goal.lua %%DATADIR%%/Cav-loca.lua %%DATADIR%%/Cav-strt.lua %%DATADIR%%/Hea-fila.lua %%DATADIR%%/Hea-filb.lua %%DATADIR%%/Hea-goal.lua %%DATADIR%%/Hea-loca.lua %%DATADIR%%/Hea-strt.lua %%DATADIR%%/Kni-fila.lua %%DATADIR%%/Kni-filb.lua %%DATADIR%%/Kni-goal.lua %%DATADIR%%/Kni-loca.lua %%DATADIR%%/Kni-strt.lua %%DATADIR%%/Mon-fila.lua %%DATADIR%%/Mon-filb.lua %%DATADIR%%/Mon-goal.lua %%DATADIR%%/Mon-loca.lua %%DATADIR%%/Mon-strt.lua %%DATADIR%%/NHdump.css %%DATADIR%%/NetHack.ad %%DATADIR%%/Pri-fila.lua %%DATADIR%%/Pri-filb.lua %%DATADIR%%/Pri-goal.lua %%DATADIR%%/Pri-loca.lua %%DATADIR%%/Pri-strt.lua %%DATADIR%%/Ran-fila.lua %%DATADIR%%/Ran-filb.lua %%DATADIR%%/Ran-goal.lua %%DATADIR%%/Ran-loca.lua %%DATADIR%%/Ran-strt.lua %%DATADIR%%/Rog-fila.lua %%DATADIR%%/Rog-filb.lua %%DATADIR%%/Rog-goal.lua %%DATADIR%%/Rog-loca.lua %%DATADIR%%/Rog-strt.lua %%DATADIR%%/Sam-fila.lua %%DATADIR%%/Sam-filb.lua %%DATADIR%%/Sam-goal.lua %%DATADIR%%/Sam-loca.lua %%DATADIR%%/Sam-strt.lua %%DATADIR%%/Tou-fila.lua %%DATADIR%%/Tou-filb.lua %%DATADIR%%/Tou-goal.lua %%DATADIR%%/Tou-loca.lua %%DATADIR%%/Tou-strt.lua %%DATADIR%%/Val-fila.lua %%DATADIR%%/Val-filb.lua %%DATADIR%%/Val-goal.lua %%DATADIR%%/Val-loca.lua %%DATADIR%%/Val-strt.lua %%DATADIR%%/Wiz-fila.lua %%DATADIR%%/Wiz-filb.lua %%DATADIR%%/Wiz-goal.lua %%DATADIR%%/Wiz-loca.lua %%DATADIR%%/Wiz-strt.lua %%DATADIR%%/abyssfill.lua %%DATADIR%%/air.lua %%DATADIR%%/asmodeus.lua %%DATADIR%%/astral.lua %%DATADIR%%/baalz.lua %%DATADIR%%/bigrm-1.lua %%DATADIR%%/bigrm-10.lua %%DATADIR%%/bigrm-11.lua %%DATADIR%%/bigrm-12.lua %%DATADIR%%/bigrm-13.lua %%DATADIR%%/bigrm-14.lua +%%DATADIR%%/bigrm-15.lua %%DATADIR%%/bigrm-2.lua %%DATADIR%%/bigrm-3.lua %%DATADIR%%/bigrm-4.lua %%DATADIR%%/bigrm-5.lua %%DATADIR%%/bigrm-6.lua %%DATADIR%%/bigrm-7.lua %%DATADIR%%/bigrm-8.lua %%DATADIR%%/bigrm-9.lua %%DATADIR%%/bogusmon %%DATADIR%%/castle.lua %%DATADIR%%/cmdhelp %%DATADIR%%/cocytusfill.lua %%DATADIR%%/data %%DATADIR%%/demogorgon.lua %%DATADIR%%/dis.lua %%DATADIR%%/dispater.lua %%DATADIR%%/dungeon.lua %%DATADIR%%/earth.lua %%DATADIR%%/engrave %%DATADIR%%/epitaph %%DATADIR%%/fire.lua %%DATADIR%%/geryon.lua %%DATADIR%%/hellfill.lua %%DATADIR%%/hellgate.lua %%DATADIR%%/help %%DATADIR%%/hh %%DATADIR%%/history %%DATADIR%%/invocation.lua %%DATADIR%%/juiblex.lua %%DATADIR%%/keyhelp %%DATADIR%%/knox.lua %%DATADIR%%/license @sample(games,games,664) %%DATADIR%%/livelog.sample @sample(games,games,664) %%DATADIR%%/logfile.sample %%DATADIR%%/medusa-1.lua %%DATADIR%%/medusa-2.lua %%DATADIR%%/medusa-3.lua %%DATADIR%%/medusa-4.lua %%DATADIR%%/minefill.lua %%DATADIR%%/minend-1.lua %%DATADIR%%/minend-2.lua %%DATADIR%%/minend-3.lua %%DATADIR%%/minend-4.lua %%DATADIR%%/minetn-1.lua %%DATADIR%%/minetn-2.lua %%DATADIR%%/minetn-3.lua %%DATADIR%%/minetn-4.lua %%DATADIR%%/minetn-5.lua %%DATADIR%%/minetn-6.lua %%DATADIR%%/minetn-7.lua %%DATADIR%%/minetn-8.lua %%DATADIR%%/nhcore.lua %%DATADIR%%/nhlib.lua %%DATADIR%%/nhtiles.bmp %%DATADIR%%/opthelp %%DATADIR%%/options %%DATADIR%%/optmenu %%DATADIR%%/oracle-1.lua %%DATADIR%%/oracle-2.lua %%DATADIR%%/oracle-3.lua %%DATADIR%%/oracles %%DATADIR%%/orcus.lua @mode 664 %%DATADIR%%/perm @mode %%DATADIR%%/pet_mark.xbm %%DATADIR%%/pilemark.xbm %%DATADIR%%/quest.lua @sample(games,games,664) %%DATADIR%%/record.sample @mode 02755 %%DATADIR%%/recover @mode %%DATADIR%%/repair-Val-loca.lua %%DATADIR%%/rip.xpm %%DATADIR%%/rumors %%DATADIR%%/sanctum.lua %%DATADIR%%/shirts %%DATADIR%%/soko1-1.lua %%DATADIR%%/soko1-2.lua %%DATADIR%%/soko2-1.lua %%DATADIR%%/soko2-2.lua %%DATADIR%%/soko3-1.lua %%DATADIR%%/soko3-2.lua %%DATADIR%%/soko4-1.lua %%DATADIR%%/soko4-2.lua %%DATADIR%%/styxmarsh.lua %%DATADIR%%/symbols @sample(games,games,) %%DATADIR%%/sysconf.sample %%DATADIR%%/themerms.lua %%DATADIR%%/tower1.lua %%DATADIR%%/tower2.lua %%DATADIR%%/tower3.lua %%DATADIR%%/tower4.lua %%DATADIR%%/tribute %%DATADIR%%/tut-1.lua %%DATADIR%%/tut-2.lua %%DATADIR%%/usagehlp %%DATADIR%%/valley.lua %%DATADIR%%/water.lua %%DATADIR%%/wizard1.lua %%DATADIR%%/wizard2.lua %%DATADIR%%/wizard3.lua %%DATADIR%%/wizhelp %%DATADIR%%/x11tiles %%DATADIR%%/yeenoghu.lua @sample(games,games,664) %%DATADIR%%/xlogfile.sample @owner @group share/man/man6/dlb.6.gz share/man/man6/makedefs.6.gz share/man/man6/recover.6.gz share/man/man6/%%HACKNAME%%.6.gz %%PORTDOCS%%%%DOCSDIR%%/Guidebook.txt @dir(games,games,0775) %%DATADIR%%/save @dir(games,games,0775) %%DATADIR%%/whereis @dir(games,games,0775) %%DATADIR%%