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 solutiondiff -r1.7 -r1.8 pkgsrc/games/nudoku/Makefile
(ktnb)
@@ -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 | |||
3 | DISTNAME= nudoku-2.1.0 | 3 | DISTNAME= nudoku-4.0.0 | |
4 | CATEGORIES= games | 4 | CATEGORIES= games | |
5 | MASTER_SITES= ${MASTER_SITE_GITHUB:=jubalh/} | 5 | MASTER_SITES= ${MASTER_SITE_GITHUB:=jubalh/} | |
6 | 6 | |||
7 | MAINTAINER= pkgsrc-users@NetBSD.org | 7 | MAINTAINER= pkgsrc-users@NetBSD.org | |
8 | HOMEPAGE= https://jubalh.github.io/nudoku/ | 8 | HOMEPAGE= https://jubalh.github.io/nudoku/ | |
9 | COMMENT= Ncurses based sudoku game | 9 | COMMENT= Ncurses based sudoku game | |
10 | LICENSE= gnu-gpl-v3 | 10 | LICENSE= gnu-gpl-v3 | |
11 | 11 | |||
12 | TOOL_DEPENDS+= gettext-m4-[0-9]*:../../devel/gettext-m4 | 12 | TOOL_DEPENDS+= gettext-m4-[0-9]*:../../devel/gettext-m4 | |
13 | 13 | |||
14 | # Fix gettext includes | 14 | # Fix gettext includes | |
15 | SUBST_CLASSES+= includes | 15 | SUBST_CLASSES+= includes | |
16 | SUBST_STAGE.includes= post-configure | 16 | SUBST_STAGE.includes= post-configure | |
17 | SUBST_MESSAGE.includes= Fix gettext includes | 17 | SUBST_MESSAGE.includes= Fix gettext includes | |
18 | SUBST_FILES.includes+= src/sudoku.c | 18 | SUBST_FILES.includes+= src/sudoku.c | |
19 | SUBST_SED.includes+= -e 's,"gettext.h",<libintl.h>,' | 19 | SUBST_SED.includes+= -e 's,"gettext.h",<libintl.h>,' | |
20 | 20 | |||
21 | USE_TOOLS+= autoreconf automake autoconf autopoint gettext | 21 | USE_TOOLS+= autoreconf automake autoconf autopoint gettext | |
22 | USE_TOOLS+= pkg-config | 22 | USE_TOOLS+= pkg-config | |
23 | GNU_CONFIGURE= yes | 23 | GNU_CONFIGURE= yes | |
24 | USE_PKGLOCALEDIR= yes | 24 | USE_PKGLOCALEDIR= yes | |
25 | 25 | |||
26 | FAKE_NCURSES= yes | |||
27 | ||||
28 | pre-configure: | 26 | pre-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" |
@@ -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 $ | |
2 | bin/nudoku | 2 | bin/nudoku | |
3 | man/man6/nudoku.6 | 3 | man/man6/nudoku.6 | |
4 | share/locale/de/LC_MESSAGES/nudoku.mo | 4 | share/locale/de/LC_MESSAGES/nudoku.mo | |
5 | share/locale/es/LC_MESSAGES/nudoku.mo | 5 | share/locale/es/LC_MESSAGES/nudoku.mo | |
6 | share/locale/fr/LC_MESSAGES/nudoku.mo | 6 | share/locale/fr/LC_MESSAGES/nudoku.mo | |
7 | share/locale/ja/LC_MESSAGES/nudoku.mo | 7 | share/locale/ja/LC_MESSAGES/nudoku.mo | |
8 | share/locale/ru/LC_MESSAGES/nudoku.mo | 8 | share/locale/ru/LC_MESSAGES/nudoku.mo | |
9 | share/locale/tr/LC_MESSAGES/nudoku.mo |
@@ -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 | |||
3 | BLAKE2s (nudoku-2.1.0.tar.gz) = a327d3baf97a82693a86eb1b3ca6b99b09ab594ea3fc9e9c13e9c510824d31ca | 3 | BLAKE2s (nudoku-4.0.0.tar.gz) = d4f6fb487457cb71e4aad6a548a5378ee10b4890ee54ec469ab511da23a49db7 | |
4 | SHA512 (nudoku-2.1.0.tar.gz) = dde16d1dccc1cae8d156f57fccf8b112f3fee7d23b912b5cd7ecc092ecbf04a8e85f469e53fa02e6bd2d0b9498e4a65a219e1aad8091f82638dceab32f320670 | 4 | SHA512 (nudoku-4.0.0.tar.gz) = 809af4b235e2fc84dbab846188b00517e594d24798a573a72b33a3d7845d20762b8e56e8ea3cf6c300432188e0d15060c2d02908a31e38c41e7b58ea7b057e2c | |
5 | Size (nudoku-2.1.0.tar.gz) = 31592 bytes | 5 | Size (nudoku-4.0.0.tar.gz) = 32748 bytes | |
6 | SHA1 (patch-src_main.c) = 3e8d32d3830c839727fda4bb74a4c6346553efa9 | 6 | SHA1 (patch-src_main.c) = b31c65451946649e794d0cf580ad4a8f95bdcbf7 |
@@ -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. | 3 | Fixed upstream bug where variable was defined without braces in | |
4 | - Use wgetch(grid) instead of getch(), otherwise wmove() doesn't | 4 | switch. 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) |