pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/games/gnuchess



Module Name:    pkgsrc
Committed By:   wiz
Date:           Mon Sep 21 09:30:53 UTC 2026

Modified Files:
        pkgsrc/games/gnuchess: Makefile distinfo
Added Files:
        pkgsrc/games/gnuchess/patches: patch-src_adapter_pgn.cpp
            patch-src_frontend_cmd.cc patch-src_frontend_move.cc

Log Message:
gnuchess: fix ctype(3) problems

Bump PKGREVISION.

Fixes gnuchess-book build on my system.


To generate a diff of this commit:
cvs rdiff -u -r1.47 -r1.48 pkgsrc/games/gnuchess/Makefile
cvs rdiff -u -r1.19 -r1.20 pkgsrc/games/gnuchess/distinfo
cvs rdiff -u -r0 -r1.1 \
    pkgsrc/games/gnuchess/patches/patch-src_adapter_pgn.cpp \
    pkgsrc/games/gnuchess/patches/patch-src_frontend_cmd.cc \
    pkgsrc/games/gnuchess/patches/patch-src_frontend_move.cc

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/games/gnuchess/Makefile
diff -u pkgsrc/games/gnuchess/Makefile:1.47 pkgsrc/games/gnuchess/Makefile:1.48
--- pkgsrc/games/gnuchess/Makefile:1.47 Wed Jul 14 16:51:58 2021
+++ pkgsrc/games/gnuchess/Makefile      Mon Sep 21 09:30:52 2026
@@ -1,6 +1,7 @@
-# $NetBSD: Makefile,v 1.47 2021/07/14 16:51:58 fcambus Exp $
+# $NetBSD: Makefile,v 1.48 2026/09/21 09:30:52 wiz Exp $
 
 DISTNAME=      gnuchess-6.2.9
+PKGREVISION=   1
 CATEGORIES=    games
 MASTER_SITES=  ${MASTER_SITE_GNU:=chess/}
 
@@ -9,6 +10,8 @@ HOMEPAGE=      https://www.gnu.org/software/c
 COMMENT=       GNU chess engine
 LICENSE=       gnu-gpl-v3
 
+TOOL_DEPENDS+= help2man-[0-9]*:../../converters/help2man
+
 USE_LANGUAGES=         c c++
 USE_TOOLS+=            flex gmake
 GNU_CONFIGURE=         yes

Index: pkgsrc/games/gnuchess/distinfo
diff -u pkgsrc/games/gnuchess/distinfo:1.19 pkgsrc/games/gnuchess/distinfo:1.20
--- pkgsrc/games/gnuchess/distinfo:1.19 Tue Oct 26 10:44:02 2021
+++ pkgsrc/games/gnuchess/distinfo      Mon Sep 21 09:30:52 2026
@@ -1,5 +1,8 @@
-$NetBSD: distinfo,v 1.19 2021/10/26 10:44:02 nia Exp $
+$NetBSD: distinfo,v 1.20 2026/09/21 09:30:52 wiz Exp $
 
 BLAKE2s (gnuchess-6.2.9.tar.gz) = fe2026d17581b788eae352c20042ff929a5f97519ca5a873468236fbe3cfd9a0
 SHA512 (gnuchess-6.2.9.tar.gz) = 7e2ec9e14ab331ffaab2dd60da81b64b5c5a07cf14f9139d67c77886038512d15511939b8e683675ea6611e24ff2c38212a7f288540448c9225c263435f71963
 Size (gnuchess-6.2.9.tar.gz) = 802697 bytes
+SHA1 (patch-src_adapter_pgn.cpp) = bbb71c1cd504b40d544fa0a0389b2c2d05fcb025
+SHA1 (patch-src_frontend_cmd.cc) = 19f86e48a87bc9049cdb5eefc1ae20ac4e6329b6
+SHA1 (patch-src_frontend_move.cc) = 53fc658e3ddf277623d730897fae9a2c0b048e68

Added files:

Index: pkgsrc/games/gnuchess/patches/patch-src_adapter_pgn.cpp
diff -u /dev/null pkgsrc/games/gnuchess/patches/patch-src_adapter_pgn.cpp:1.1
--- /dev/null   Mon Sep 21 09:30:53 2026
+++ pkgsrc/games/gnuchess/patches/patch-src_adapter_pgn.cpp     Mon Sep 21 09:30:53 2026
@@ -0,0 +1,16 @@
+$NetBSD: patch-src_adapter_pgn.cpp,v 1.1 2026/09/21 09:30:53 wiz Exp $
+
+Fix ctype(3) usage.
+Mailed to bug-gnu-chess mailing list on 2026-09-21.
+
+--- src/adapter/pgn.cpp.orig   2026-09-21 08:50:11.609305395 +0000
++++ src/adapter/pgn.cpp
+@@ -545,7 +545,7 @@ static void pgn_skip_blanks(pgn_t * pgn) {
+ 
+       if (false) {
+ 
+-      } else if (isspace(pgn->char_hack)) {
++      } else if (isspace((unsigned char)pgn->char_hack)) {
+ 
+          // skip white space
+ 
Index: pkgsrc/games/gnuchess/patches/patch-src_frontend_cmd.cc
diff -u /dev/null pkgsrc/games/gnuchess/patches/patch-src_frontend_cmd.cc:1.1
--- /dev/null   Mon Sep 21 09:30:53 2026
+++ pkgsrc/games/gnuchess/patches/patch-src_frontend_cmd.cc     Mon Sep 21 09:30:53 2026
@@ -0,0 +1,39 @@
+$NetBSD: patch-src_frontend_cmd.cc,v 1.1 2026/09/21 09:30:53 wiz Exp $
+
+Fix ctype(3) usage.
+Mailed to bug-gnu-chess mailing list on 2026-09-21.
+
+--- src/frontend/cmd.cc.orig   2026-09-21 08:51:06.915496850 +0000
++++ src/frontend/cmd.cc
+@@ -69,14 +69,14 @@ static void split_input(void)
+ 
+   for (k = 0, s = r = inputstr; k < TOKENS; ++k) {
+     /* Skip leading whitespace */
+-    while (isspace(*s)) s++;
++    while (isspace((unsigned char)*s)) s++;
+     token[k] = s;
+     /* Skip token */
+-    while (*s && !isspace(*s)) r = s++;
++    while (*s && !isspace((unsigned char)*s)) r = s++;
+   }
+   while (*s) {
+-    while (isspace(*s)) s++;
+-    while (*s && !isspace(*s)) r = s++;
++    while (isspace((unsigned char)*s)) s++;
++    while (*s && !isspace((unsigned char)*s)) r = s++;
+   }
+   r[1] = '\0';
+ }
+@@ -87,10 +87,10 @@ static int tokeneq(const char *s, const char *t)
+  */
+ static int tokeneq(const char *s, const char *t)
+ {
+-  while (*s && *t && !isspace(*s) && !isspace(*t)) {
++  while (*s && *t && !isspace((unsigned char)*s) && !isspace((unsigned char)*t)) {
+     if (*s++ != *t++) return 0;
+   }
+-  return (!*s || isspace(*s)) && (!*t || isspace(*t));
++  return (!*s || isspace((unsigned char)*s)) && (!*t || isspace((unsigned char)*t));
+ }
+ 
+ /*
Index: pkgsrc/games/gnuchess/patches/patch-src_frontend_move.cc
diff -u /dev/null pkgsrc/games/gnuchess/patches/patch-src_frontend_move.cc:1.1
--- /dev/null   Mon Sep 21 09:30:53 2026
+++ pkgsrc/games/gnuchess/patches/patch-src_frontend_move.cc    Mon Sep 21 09:30:53 2026
@@ -0,0 +1,16 @@
+$NetBSD: patch-src_frontend_move.cc,v 1.1 2026/09/21 09:30:53 wiz Exp $
+
+Fix ctype(3) usage.
+Mailed to bug-gnu-chess mailing list on 2026-09-21.
+
+--- src/frontend/move.cc.orig  2026-09-21 08:50:44.746178707 +0000
++++ src/frontend/move.cc
+@@ -559,7 +559,7 @@ leaf * ValidateMove (char *s, char *cleanMove)
+    p = mvstr;
+    do
+    {
+-      if (*s != 'x' && *s != '+' && *s != '=' && !isspace(*s))
++      if (*s != 'x' && *s != '+' && *s != '=' && !isspace((unsigned char)*s))
+          *p++ = *s;
+    } while (*s++ != '\0' );
+ 



Home | Main Index | Thread Index | Old Index