git: 506a90eabaae - main - games/ktx: Update 1.43 => 1.45

From: Vladimir Druzenko <vvd_at_FreeBSD.org>
Date: Sun, 23 Feb 2025 22:08:13 UTC
The branch main has been updated by vvd:

URL: https://cgit.FreeBSD.org/ports/commit/?id=506a90eabaae69c0a1f01f761df264283fb7e3a0

commit 506a90eabaae69c0a1f01f761df264283fb7e3a0
Author:     Vladimir Druzenko <vvd@FreeBSD.org>
AuthorDate: 2025-02-23 22:04:17 +0000
Commit:     Vladimir Druzenko <vvd@FreeBSD.org>
CommitDate: 2025-02-23 22:06:23 +0000

    games/ktx: Update 1.43 => 1.45
    
    The bug that caused version 1.43 to be used when creating the port has
    been fixed - the patch has been added to the port.
    Upstream pool request: https://github.com/QW-Group/ktx/pull/397
    
    Changelogs:
    https://github.com/QW-Group/ktx/releases/tag/v1.44
    https://github.com/QW-Group/ktx/releases/tag/1.45
---
 games/ktx/Makefile               |  3 +--
 games/ktx/distinfo               |  6 +++---
 games/ktx/files/patch-src_race.c | 15 +++++++++++++++
 games/ktx/pkg-plist              | 10 +++++-----
 4 files changed, 24 insertions(+), 10 deletions(-)

diff --git a/games/ktx/Makefile b/games/ktx/Makefile
index 3f6c877e06dc..3c89775f7583 100644
--- a/games/ktx/Makefile
+++ b/games/ktx/Makefile
@@ -1,6 +1,5 @@
 PORTNAME=	ktx
-DISTVERSIONPREFIX=	v
-DISTVERSION=	1.43
+DISTVERSION=	1.45
 CATEGORIES=	games
 
 MAINTAINER=	vvd@FreeBSD.org
diff --git a/games/ktx/distinfo b/games/ktx/distinfo
index ea3c5fe117e3..8518a04f1d3e 100644
--- a/games/ktx/distinfo
+++ b/games/ktx/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1740182613
-SHA256 (QW-Group-ktx-v1.43_GH0.tar.gz) = 720f719c490d8e9e975b6bcab773e62bf4051c828ac394c61ab8f99e9e9c995b
-SIZE (QW-Group-ktx-v1.43_GH0.tar.gz) = 1696285
+TIMESTAMP = 1740344268
+SHA256 (QW-Group-ktx-1.45_GH0.tar.gz) = 3bf0e78569fa7d352a2e825257ea37d1e2423480c94f0d18fa58dc265f54288c
+SIZE (QW-Group-ktx-1.45_GH0.tar.gz) = 1704185
diff --git a/games/ktx/files/patch-src_race.c b/games/ktx/files/patch-src_race.c
new file mode 100644
index 000000000000..71924f3d6966
--- /dev/null
+++ b/games/ktx/files/patch-src_race.c
@@ -0,0 +1,15 @@
+--- src/race.c.orig	2025-02-16 18:01:44 UTC
++++ src/race.c
+@@ -3541,10 +3541,9 @@ char* race_fgets(char *buf, int limit)
+ 		return NULL;
+ 	}
+ 
+-	string = buf;
+-	while (--limit > 0 && ((c = race_fgetc()) != -1))
++	for (string = buf; --limit > 0 && (c = race_fgetc()) != -1; string++)
+ 	{
+-		if ((*string++ = c) == '\n')
++		if ((*string = c) == '\n')
+ 		{
+ 			break;
+ 		}
diff --git a/games/ktx/pkg-plist b/games/ktx/pkg-plist
index 883706a66600..cfa3e572433e 100644
--- a/games/ktx/pkg-plist
+++ b/games/ktx/pkg-plist
@@ -84,7 +84,7 @@ quake/ktx/configs/usermodes/dmm4_7.cfg
 quake/ktx/configs/usermodes/dmm4_8.cfg
 quake/ktx/configs/usermodes/dmm4_9.cfg
 quake/ktx/configs/usermodes/end.cfg
-@comment quake/ktx/configs/usermodes/end2.cfg
+quake/ktx/configs/usermodes/end2.cfg
 quake/ktx/configs/usermodes/endif.cfg
 quake/ktx/configs/usermodes/ffa/default.cfg
 quake/ktx/configs/usermodes/hammer.cfg
@@ -111,12 +111,12 @@ quake/ktx/configs/usermodes/povdmm4.cfg
 quake/ktx/configs/usermodes/povdmm4a.cfg
 quake/ktx/configs/usermodes/povdmm4b.cfg
 quake/ktx/configs/usermodes/pushdmm4.cfg
-@comment quake/ktx/configs/usermodes/schlossdmm4.cfg
+quake/ktx/configs/usermodes/schlossdmm4.cfg
 quake/ktx/configs/usermodes/sewer.cfg
 quake/ktx/configs/usermodes/tearena.cfg
-@comment quake/ktx/configs/usermodes/tot/dm4.cfg
-@comment quake/ktx/configs/usermodes/tot/e1m2.cfg
-@comment quake/ktx/configs/usermodes/tot/schloss.cfg
+quake/ktx/configs/usermodes/tot/dm4.cfg
+quake/ktx/configs/usermodes/tot/e1m2.cfg
+quake/ktx/configs/usermodes/tot/schloss.cfg
 @dir(,%%QWGROUP%%,0775) quake/ktx/demos
 @sample quake/ktx/ktx.cfg.sample
 @sample quake/ktx/listip.cfg.sample