pkgsrc-WIP-changes archive

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

nudoku: revert previous commit, patch to use wgetch() instead of getch().



Module Name:	pkgsrc-wip
Committed By:	Frederic Cambus <fcambus%NetBSD.org@localhost>
Pushed By:	fcambus
Date:		Wed Mar 11 19:04:35 2020 +0100
Changeset:	75d02bba232ff049765b08ac5ac160ee22169552

Modified Files:
	nudoku/Makefile
	nudoku/distinfo
	nudoku/patches/patch-src_main.c

Log Message:
nudoku: revert previous commit, patch to use wgetch() instead of getch().

While there, also avoid hardcoding GITHUB_RELEASE value.

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=75d02bba232ff049765b08ac5ac160ee22169552

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

diffstat:
 nudoku/Makefile                 |  6 +++---
 nudoku/distinfo                 |  2 +-
 nudoku/patches/patch-src_main.c | 29 +++++++++++++++++++++++++----
 3 files changed, 29 insertions(+), 8 deletions(-)

diffs:
diff --git a/nudoku/Makefile b/nudoku/Makefile
index ef8e8dc84f..92a25a0cff 100644
--- a/nudoku/Makefile
+++ b/nudoku/Makefile
@@ -3,7 +3,7 @@
 DISTNAME=	nudoku-2.0.0
 CATEGORIES=	games
 MASTER_SITES=	${MASTER_SITE_GITHUB:=jubalh/}
-GITHUB_RELEASE=	2.0.0
+GITHUB_RELEASE=	${PKGVERSION_NOREV}
 
 MAINTAINER=	fcambus%NetBSD.org@localhost
 HOMEPAGE=	https://jubalh.github.io/nudoku/
@@ -21,8 +21,8 @@ SUBST_SED.includes+=	-e 's,"gettext.h",<libintl.h>,'
 GNU_CONFIGURE=		yes
 USE_PKGLOCALEDIR=	yes
 
-USE_NCURSES=		yes # wmove() doesn't move the cursor in the grid window
+FAKE_NCURSES=		yes
 
 .include "../../devel/gettext-lib/buildlink3.mk"
-.include "../../devel/ncurses/buildlink3.mk"
+.include "../../mk/curses.buildlink3.mk"
 .include "../../mk/bsd.pkg.mk"
diff --git a/nudoku/distinfo b/nudoku/distinfo
index 6be9ba0ef3..331856b5f8 100644
--- a/nudoku/distinfo
+++ b/nudoku/distinfo
@@ -4,4 +4,4 @@ SHA1 (nudoku-2.0.0.tar.gz) = 4eb056fa5d58551d7b57a2698428ddfcc521a9c5
 RMD160 (nudoku-2.0.0.tar.gz) = ebe12ecf0a2f51a322d512e312e969c44cace8d4
 SHA512 (nudoku-2.0.0.tar.gz) = acf0a5714fc767bb580c97d5ceb586db5390ce7a1428e56c1e7413af653cd784939dc5ae3681c4ad19fde0a3ee5e941f1a4466bc35eac4bdf802f0b9ba6b025f
 Size (nudoku-2.0.0.tar.gz) = 203292 bytes
-SHA1 (patch-src_main.c) = 96af8db25c7ea2839045be95cbcc99b1beee4609
+SHA1 (patch-src_main.c) = 3e8d32d3830c839727fda4bb74a4c6346553efa9
diff --git a/nudoku/patches/patch-src_main.c b/nudoku/patches/patch-src_main.c
index 49a4c66b9c..8bb6a8a864 100644
--- a/nudoku/patches/patch-src_main.c
+++ b/nudoku/patches/patch-src_main.c
@@ -1,14 +1,35 @@
 $NetBSD$
 
-Add missing <locale.h> header, for setlocale.
+- Add missing <locale.h> header, for setlocale.
+- Use wgetch(grid) instead of getch(), otherwise wmove() doesn't
+  move the cursor in the grid window.
 
---- src/main.c.orig	2019-12-12 21:05:55.068322791 +0000
+--- src/main.c.orig	2019-07-30 09:50:49.000000000 +0000
 +++ src/main.c
-@@ -20,6 +20,7 @@ along with this program. If not, see <ht
+@@ -19,7 +19,8 @@ along with this program. If not, see <ht
+ */
  
  /* INCLUDES */
- #include "gettext.h"			/* gettext */
+-#include "gettext.h"			/* gettext */
++#include <libintl.h>			/* gettext */
 +#include <locale.h>				/* setlocale */
  #include <stdlib.h>				/* rand, srand */
  #include <unistd.h>				/* getopt */
  #include <ncurses.h>			/* ncurses */
+@@ -294,6 +295,7 @@ static void init_windows(void)
+ 	status = newwin(STATUS_LINES, STATUS_COLS, STATUS_Y, STATUS_X);
+ 
+ 	grid = newwin(GRID_LINES, GRID_COLS, GRID_Y, GRID_X);
++	keypad(grid, true);
+ 	_draw_grid();
+ 
+ 	infobox = newwin(INFO_LINES, INFO_COLS, INFO_Y, INFO_X);
+@@ -497,7 +499,7 @@ int main(int argc, char *argv[])
+ #endif // DEBUG
+ 		refresh();
+ 		wrefresh(grid);
+-		key = getch();
++		key = wgetch(grid);
+ 		// clear status window
+ 		werase(status);
+ 		switch(key)


Home | Main Index | Thread Index | Old Index