Sun May 5 14:31:32 2024 UTC (21d)
nudoku: update to 4.0.0

Packaging changes:
Remove FAKE_NCURSES and add ncursesw because ncursesw is now required
and leaving FAKE_NCURSES enabled causes an issue with the alternate
character set (acs_map specifically).

Upstream changes:
3.0.0 -> 4.0.0
- Add Turkish translation
- Add undo feature

2.1.0 -> 3.0.0
- Fix build failure with ncurses 6.3
- Add call to PKG_PROG_PKG_CONFIG and pkg-check ncurses libs
- Fix build with musl
- Add highlighting of user input
- Fix toggling marks removing solution


(ktnb)
diff -r1.7 -r1.8 pkgsrc/games/nudoku/Makefile
diff -r1.2 -r1.3 pkgsrc/games/nudoku/PLIST
diff -r1.4 -r1.5 pkgsrc/games/nudoku/distinfo
diff -r1.1 -r1.2 pkgsrc/games/nudoku/patches/patch-src_main.c

cvs diff -r1.7 -r1.8 pkgsrc/games/nudoku/Makefile (expand / switch to unified diff)

--- pkgsrc/games/nudoku/Makefile 2022/06/27 15:29:15 1.7
+++ pkgsrc/games/nudoku/Makefile 2024/05/05 14:31:31 1.8
@@ -1,33 +1,32 @@ @@ -1,33 +1,32 @@
1# $NetBSD: Makefile,v 1.7 2022/06/27 15:29:15 fcambus Exp $ 1# $NetBSD: Makefile,v 1.8 2024/05/05 14:31:31 ktnb Exp $
2 2
3DISTNAME= nudoku-2.1.0 3DISTNAME= nudoku-4.0.0
4CATEGORIES= games 4CATEGORIES= games
5MASTER_SITES= ${MASTER_SITE_GITHUB:=jubalh/} 5MASTER_SITES= ${MASTER_SITE_GITHUB:=jubalh/}
6 6
7MAINTAINER= pkgsrc-users@NetBSD.org 7MAINTAINER= pkgsrc-users@NetBSD.org
8HOMEPAGE= https://jubalh.github.io/nudoku/ 8HOMEPAGE= https://jubalh.github.io/nudoku/
9COMMENT= Ncurses based sudoku game 9COMMENT= Ncurses based sudoku game
10LICENSE= gnu-gpl-v3 10LICENSE= gnu-gpl-v3
11 11
12TOOL_DEPENDS+= gettext-m4-[0-9]*:../../devel/gettext-m4 12TOOL_DEPENDS+= gettext-m4-[0-9]*:../../devel/gettext-m4
13 13
14# Fix gettext includes 14# Fix gettext includes
15SUBST_CLASSES+= includes 15SUBST_CLASSES+= includes
16SUBST_STAGE.includes= post-configure 16SUBST_STAGE.includes= post-configure
17SUBST_MESSAGE.includes= Fix gettext includes 17SUBST_MESSAGE.includes= Fix gettext includes
18SUBST_FILES.includes+= src/sudoku.c 18SUBST_FILES.includes+= src/sudoku.c
19SUBST_SED.includes+= -e 's,"gettext.h",<libintl.h>,' 19SUBST_SED.includes+= -e 's,"gettext.h",<libintl.h>,'
20 20
21USE_TOOLS+= autoreconf automake autoconf autopoint gettext 21USE_TOOLS+= autoreconf automake autoconf autopoint gettext
22USE_TOOLS+= pkg-config 22USE_TOOLS+= pkg-config
23GNU_CONFIGURE= yes 23GNU_CONFIGURE= yes
24USE_PKGLOCALEDIR= yes 24USE_PKGLOCALEDIR= yes
25 25
26FAKE_NCURSES= yes 
27 
28pre-configure: 26pre-configure:
29 cd ${WRKSRC} && autoreconf -i 27 cd ${WRKSRC} && autoreconf -i
30 28
31.include "../../devel/gettext-lib/buildlink3.mk" 29.include "../../devel/gettext-lib/buildlink3.mk"
 30.include "../../devel/ncursesw/buildlink3.mk"
32.include "../../mk/curses.buildlink3.mk" 31.include "../../mk/curses.buildlink3.mk"
33.include "../../mk/bsd.pkg.mk" 32.include "../../mk/bsd.pkg.mk"

cvs diff -r1.2 -r1.3 pkgsrc/games/nudoku/PLIST (expand / switch to unified diff)

--- pkgsrc/games/nudoku/PLIST 2020/11/24 21:00:02 1.2
+++ pkgsrc/games/nudoku/PLIST 2024/05/05 14:31:31 1.3
@@ -1,8 +1,9 @@ @@ -1,8 +1,9 @@
1@comment $NetBSD: PLIST,v 1.2 2020/11/24 21:00:02 fcambus Exp $ 1@comment $NetBSD: PLIST,v 1.3 2024/05/05 14:31:31 ktnb Exp $
2bin/nudoku 2bin/nudoku
3man/man6/nudoku.6 3man/man6/nudoku.6
4share/locale/de/LC_MESSAGES/nudoku.mo 4share/locale/de/LC_MESSAGES/nudoku.mo
5share/locale/es/LC_MESSAGES/nudoku.mo 5share/locale/es/LC_MESSAGES/nudoku.mo
6share/locale/fr/LC_MESSAGES/nudoku.mo 6share/locale/fr/LC_MESSAGES/nudoku.mo
7share/locale/ja/LC_MESSAGES/nudoku.mo 7share/locale/ja/LC_MESSAGES/nudoku.mo
8share/locale/ru/LC_MESSAGES/nudoku.mo 8share/locale/ru/LC_MESSAGES/nudoku.mo
 9share/locale/tr/LC_MESSAGES/nudoku.mo

cvs diff -r1.4 -r1.5 pkgsrc/games/nudoku/distinfo (expand / switch to unified diff)

--- pkgsrc/games/nudoku/distinfo 2021/10/26 10:44:17 1.4
+++ pkgsrc/games/nudoku/distinfo 2024/05/05 14:31:31 1.5
@@ -1,6 +1,6 @@ @@ -1,6 +1,6 @@
1$NetBSD: distinfo,v 1.4 2021/10/26 10:44:17 nia Exp $ 1$NetBSD: distinfo,v 1.5 2024/05/05 14:31:31 ktnb Exp $
2 2
3BLAKE2s (nudoku-2.1.0.tar.gz) = a327d3baf97a82693a86eb1b3ca6b99b09ab594ea3fc9e9c13e9c510824d31ca 3BLAKE2s (nudoku-4.0.0.tar.gz) = d4f6fb487457cb71e4aad6a548a5378ee10b4890ee54ec469ab511da23a49db7
4SHA512 (nudoku-2.1.0.tar.gz) = dde16d1dccc1cae8d156f57fccf8b112f3fee7d23b912b5cd7ecc092ecbf04a8e85f469e53fa02e6bd2d0b9498e4a65a219e1aad8091f82638dceab32f320670 4SHA512 (nudoku-4.0.0.tar.gz) = 809af4b235e2fc84dbab846188b00517e594d24798a573a72b33a3d7845d20762b8e56e8ea3cf6c300432188e0d15060c2d02908a31e38c41e7b58ea7b057e2c
5Size (nudoku-2.1.0.tar.gz) = 31592 bytes 5Size (nudoku-4.0.0.tar.gz) = 32748 bytes
6SHA1 (patch-src_main.c) = 3e8d32d3830c839727fda4bb74a4c6346553efa9 6SHA1 (patch-src_main.c) = b31c65451946649e794d0cf580ad4a8f95bdcbf7

cvs diff -r1.1 -r1.2 pkgsrc/games/nudoku/patches/patch-src_main.c (expand / switch to unified diff)

--- pkgsrc/games/nudoku/patches/patch-src_main.c 2020/03/16 12:59:02 1.1
+++ pkgsrc/games/nudoku/patches/patch-src_main.c 2024/05/05 14:31:32 1.2
@@ -1,35 +1,24 @@ @@ -1,35 +1,24 @@
1$NetBSD: patch-src_main.c,v 1.1 2020/03/16 12:59:02 fcambus Exp $ 1$NetBSD: patch-src_main.c,v 1.2 2024/05/05 14:31:32 ktnb Exp $
2 2
3- Add missing <locale.h> header, for setlocale. 3Fixed upstream bug where variable was defined without braces in
4- Use wgetch(grid) instead of getch(), otherwise wmove() doesn't 4switch. Reported upstream: https://github.com/jubalh/nudoku/issues/61
5 move the cursor in the grid window. 
6 5
7--- src/main.c.orig 2019-07-30 09:50:49.000000000 +0000 6--- src/main.c.orig 2024-05-05 01:37:03.380017435 +0000
8+++ src/main.c 7+++ src/main.c
9@@ -19,7 +19,8 @@ along with this program. If not, see <ht 8@@ -708,6 +708,7 @@ int main(int argc, char *argv[])
10 */ 9 }
11  10 break;
12 /* INCLUDES */ 11 case 'u': // Undo
13-#include "gettext.h" /* gettext */ 12+ {
14+#include <libintl.h> /* gettext */ 13 move_t old_move;
15+#include <locale.h> /* setlocale */ 14 if (undo_stack_pop(&old_move))
16 #include <stdlib.h> /* rand, srand */ 15 { // Stack empty
17 #include <unistd.h> /* getopt */ 16@@ -720,7 +721,7 @@ int main(int argc, char *argv[])
18 #include <ncurses.h> /* ncurses */ 17 user_board[posy*9+posx] = old_move.prev_val;
19@@ -294,6 +295,7 @@ static void init_windows(void) 18 fill_grid(user_board, plain_board, x, y);
20 status = newwin(STATUS_LINES, STATUS_COLS, STATUS_Y, STATUS_X); 19 break;
21  20-
22 grid = newwin(GRID_LINES, GRID_COLS, GRID_Y, GRID_X); 21+ }
23+ keypad(grid, true); 22 default:
24 _draw_grid(); 23 break;
25  24 }
26 infobox = newwin(INFO_LINES, INFO_COLS, INFO_Y, INFO_X); 
27@@ -497,7 +499,7 @@ int main(int argc, char *argv[]) 
28 #endif // DEBUG 
29 refresh(); 
30 wrefresh(grid); 
31- key = getch(); 
32+ key = wgetch(grid); 
33 // clear status window 
34 werase(status); 
35 switch(key)