git: 731c48516426 - main - games/xnethack: update to 7.1

From: Fernando Apesteguía <fernape_at_FreeBSD.org>
Date: Wed, 01 Jun 2022 16:05:34 UTC
The branch main has been updated by fernape:

URL: https://cgit.FreeBSD.org/ports/commit/?id=731c4851642685f61bd152d2e6e490a371920f63

commit 731c4851642685f61bd152d2e6e490a371920f63
Author:     Robert Clausecker <fuz@fuz.su>
AuthorDate: 2022-05-31 05:24:55 +0000
Commit:     Fernando Apesteguía <fernape@FreeBSD.org>
CommitDate: 2022-06-01 16:03:02 +0000

    games/xnethack: update to 7.1
    
    ChangeLog: https://github.com/copperwater/xNetHack/releases/tag/xnh7.1
    
    PR:     264276
    Reported by:    fuz@fuz.su (maintainer)
---
 games/xnethack/Makefile                          | 27 +++++++--------------
 games/xnethack/distinfo                          |  6 ++---
 games/xnethack/files/patch-include-config.h      |  8 +++----
 games/xnethack/files/patch-sys-unix-Makefile.src | 30 ++++++++++++------------
 games/xnethack/files/patch-sys-unix-Makefile.top | 19 ++++-----------
 games/xnethack/pkg-plist                         |  1 +
 6 files changed, 37 insertions(+), 54 deletions(-)

diff --git a/games/xnethack/Makefile b/games/xnethack/Makefile
index b342ec0f71d5..b5665934f18e 100644
--- a/games/xnethack/Makefile
+++ b/games/xnethack/Makefile
@@ -1,6 +1,6 @@
 PORTNAME=	xNetHack
 DISTVERSIONPREFIX=	xnh
-DISTVERSION=	7.0
+DISTVERSION=	7.1
 CATEGORIES=	games
 
 MAINTAINER=	fuz@fuz.su
@@ -55,13 +55,11 @@ OPTIONS_DEFINE=	DOCS
 
 post-patch:
 .for f in include/config.h sys/unix/Makefile.doc sys/unix/Makefile.src sys/unix/Makefile.top
-	@${REINPLACE_CMD} -e 's|%%HACKNAME%%|${HACKNAME}|g' \
-		-e 's|%%HACKDIR%%|${PREFIX}/${HACKDIR}|g' \
+	@${REINPLACE_CMD} -e 's|%%HACKDIR%%|${PREFIX}/${HACKDIR}|g' \
 		${WRKSRC}/${f}
 .endfor
 .for f in dlb.6 nethack.6 recover.6
-	@${REINPLACE_CMD} -e 's|%%HACKNAME%%|${HACKNAME}|g' \
-		-e 's|%%HACKDIR%%|${PREFIX}/${HACKDIR}|g' \
+	@${REINPLACE_CMD} -e 's|%%HACKDIR%%|${PREFIX}/${HACKDIR}|g' \
 		${WRKSRC}/doc/${f}
 .endfor
 .if defined(WITHOUT_SHELL)
@@ -74,25 +72,18 @@ post-patch:
 do-configure:
 	${TOUCH} ${WRKSRC}/dat/gitinfo.txt
 	@cd ${WRKSRC}/sys/unix; ${SH} setup.sh
-	# work around a race condition
-	cd ${WRKSRC}/util; ${MAKE_CMD} tiletxt.c
 
 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
-	# Make sysconf a sample to prevent it being removed if altered
-	@${CP} ${STAGEDIR}/${DATADIR}/sysconf ${STAGEDIR}/${DATADIR}/sysconf.sample
-	# Make "sample" files from records to prevent them being removed
-	# if they have been altered
-	@${CP} ${STAGEDIR}/${DATADIR}/logfile ${STAGEDIR}/${DATADIR}/livelog.sample
-	@${CP} ${STAGEDIR}/${DATADIR}/logfile ${STAGEDIR}/${DATADIR}/logfile.sample
-	@${CP} ${STAGEDIR}/${DATADIR}/record ${STAGEDIR}/${DATADIR}/record.sample
-	@${CP} ${STAGEDIR}/${DATADIR}/xlogfile ${STAGEDIR}/${DATADIR}/xlogfile.sample
+	${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}
+	${MKDIR} ${STAGEDIR}${DOCSDIR}
 	${INSTALL_DATA} ${WRKSRC}/doc/Guidebook.txt ${STAGEDIR}${DOCSDIR}
 .endif
 
diff --git a/games/xnethack/distinfo b/games/xnethack/distinfo
index 311196d7ea1d..50f48252cd24 100644
--- a/games/xnethack/distinfo
+++ b/games/xnethack/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1646737487
-SHA256 (copperwater-xNetHack-xnh7.0_GH0.tar.gz) = d2f9ed47a2dde9d1dfeba073f4f2cbb6c226f8d98457a860b56ec00551429725
-SIZE (copperwater-xNetHack-xnh7.0_GH0.tar.gz) = 5985717
+TIMESTAMP = 1653608416
+SHA256 (copperwater-xNetHack-xnh7.1_GH0.tar.gz) = 086c12275463c5c008e594713a6a5ee26dd075ce8740c956e19485771f2d46f6
+SIZE (copperwater-xNetHack-xnh7.1_GH0.tar.gz) = 6102486
diff --git a/games/xnethack/files/patch-include-config.h b/games/xnethack/files/patch-include-config.h
index cd282cbf1737..26f78d8821aa 100644
--- a/games/xnethack/files/patch-include-config.h
+++ b/games/xnethack/files/patch-include-config.h
@@ -1,6 +1,6 @@
---- include/config.h.orig	2022-03-07 23:57:15 UTC
+--- include/config.h.orig	2022-05-26 12:31:08 UTC
 +++ include/config.h
-@@ -303,11 +303,11 @@
+@@ -312,11 +312,11 @@
  
  #if defined(UNIX) && !defined(ZLIB_COMP) && !defined(COMPRESS)
  /* path and file name extension for compression program */
@@ -16,7 +16,7 @@
  #endif
  
  #ifndef COMPRESS
-@@ -392,7 +392,7 @@
+@@ -401,7 +401,7 @@
   * otherwise it will be the current directory.
   */
  #ifndef HACKDIR
@@ -25,7 +25,7 @@
  #endif
  
  /*
-@@ -653,7 +653,7 @@ typedef unsigned char uchar;
+@@ -662,7 +662,7 @@ typedef unsigned char uchar;
  #ifdef DUMPLOG
  
  #ifndef DUMPLOG_FILE
diff --git a/games/xnethack/files/patch-sys-unix-Makefile.src b/games/xnethack/files/patch-sys-unix-Makefile.src
index d9073ce22b96..6e56fc3af367 100644
--- a/games/xnethack/files/patch-sys-unix-Makefile.src
+++ b/games/xnethack/files/patch-sys-unix-Makefile.src
@@ -1,4 +1,4 @@
---- sys/unix/Makefile.src.orig	2022-03-07 23:57:15 UTC
+--- sys/unix/Makefile.src.orig	2022-05-26 12:31:08 UTC
 +++ sys/unix/Makefile.src
 @@ -169,14 +169,22 @@ SYSOBJ = $(TARGETPFX)ioctl.o $(TARGETPFX)unixmain.o $(
  
@@ -131,25 +131,25 @@
  
  # ----------------------------------------
  #
-@@ -473,7 +520,7 @@ PACKAGE=@true
- MAKEDEFS = ../util/makedefs
- 
- # -lm required by lua
--LUALIB = ../lib/lua/liblua.a -lm $(DLLIB)
-+LUALIB = -llua-${LUA_VER} -lm $(DLLIB)
+@@ -476,7 +523,7 @@ MAKEDEFS = ../util/makedefs
+ LUA_VERSION ?=5.4.4
+ LUABASE = liblua-$(LUA_VERSION).a
+ LUALIB = ../lib/lua/$(LUABASE)
+-LUALIBS = $(LUALIB) -lm $(DLLIB)
++LUALIBS = -llua-${LUA_VER} -lm $(DLLIB)
  
  # timestamp files to reduce `make' overhead and shorten .o dependency lists
  CONFIG_H = ../src/config.h-t
-@@ -668,7 +715,7 @@ DUMB.Setup:	../include/extern.h
- 	cp ../include/extern.DUMB ../include/extern.h
- 	@touch DUMB.Setup
+@@ -610,7 +657,7 @@ all:	$(GAME)
+ pregame:
+ 	$(PREGAME)
  
--../lib/lua/liblua.a ../include/nhlua.h:
-+../include/nhlua.h:
- 	@( cd .. ; $(MAKE) lua_support )
+-$(GAME):	pregame $(MAKEDEFS) $(LUALIB) $(SYSTEM)
++$(GAME):	pregame $(MAKEDEFS) $(SYSTEM)
+ 	@echo "$(GAME) is up to date."
  
- #	dependencies for makedefs and its outputs, which the util
-@@ -687,11 +734,11 @@ objects.o:
+ Sysunix:	$(HOSTOBJ) $(HOBJ) $(DATE_O) $(BUILDMORE) Makefile
+@@ -690,11 +737,11 @@ objects.o:
  
  # outdated Qt 3 windowport meta-object-compiler output
  qt3_kde0.moc: ../win/Qt3/qt3_kde0.h
diff --git a/games/xnethack/files/patch-sys-unix-Makefile.top b/games/xnethack/files/patch-sys-unix-Makefile.top
index feff1aaed068..3df0cc17c07a 100644
--- a/games/xnethack/files/patch-sys-unix-Makefile.top
+++ b/games/xnethack/files/patch-sys-unix-Makefile.top
@@ -1,4 +1,4 @@
---- sys/unix/Makefile.top.orig	2022-03-07 23:57:15 UTC
+--- sys/unix/Makefile.top.orig	2022-05-26 12:31:08 UTC
 +++ sys/unix/Makefile.top
 @@ -25,15 +25,15 @@ NHSROOT=.
  GAME     = xnethack
@@ -43,19 +43,10 @@
  #	Qt without X11; assumes GRAPHIC_TOMBSTONE:
  # VARDATND = nhtiles.bmp pet_mark.xbm pilemark.xbm rip.xpm
  
-@@ -123,7 +125,7 @@ all:    $(ALLDEP)
- $(GAME): lua_support
- 	( cd src ; $(MAKE) $(GAME) )
- 
--lua_support: $(TOPLUALIB) include/nhlua.h
-+lua_support: include/nhlua.h
- 	@true
- $(LUATOP)/liblua.a: $(LUAHEADERS)/lua.h
- 	( cd $(LUATOP) \
-@@ -131,13 +133,11 @@ $(LUATOP)/liblua.a: $(LUAHEADERS)/lua.h
- lib/lua/liblua.a: $(LUATOP)/liblua.a
+@@ -134,13 +136,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 */' > $@
@@ -70,7 +61,7 @@
  	@echo '/*nhlua.h*/' >> $@
  # LUATESTTARGET is this by default
  lib/lua-$(LUA_VERSION)/src/lua.h:
-@@ -258,39 +258,22 @@ dofiles:
+@@ -261,39 +261,22 @@ dofiles:
  		-e '}' 					\
  	  	-e '$$s/.*/nodlb/p' < dat/options` ;	\
  	$(MAKE) dofiles-$${target-nodlb}
@@ -118,7 +109,7 @@
  #
  # This is not part of the dependency build hierarchy.
  # It requires an explicit "make fetch-Lua".
-@@ -327,25 +310,17 @@ install: rootcheck $(GAME) recover $(VARDAT) spec_levs
+@@ -330,25 +313,17 @@ install: rootcheck $(GAME) recover $(VARDAT) spec_levs
  	true; $(PREINSTALL)
  # set up the directories
  # not all mkdirs have -p; those that don't will create a -p directory
diff --git a/games/xnethack/pkg-plist b/games/xnethack/pkg-plist
index 28cdcc50fcee..5ceb07d02b61 100644
--- a/games/xnethack/pkg-plist
+++ b/games/xnethack/pkg-plist
@@ -147,6 +147,7 @@ bin/%%HACKNAME%%
 @mode 02755
 %%DATADIR%%/recover
 @mode
+%%DATADIR%%/repair-Val-loca.lua
 %%DATADIR%%/rip.xpm
 %%DATADIR%%/rumors
 %%DATADIR%%/sanctum.lua