From 960e4610a1a693c3afb2abc4a6998fa1f750de59 Mon Sep 17 00:00:00 2001 From: Michal Vasilek Date: Thu, 24 Nov 2022 23:05:35 +0100 Subject: [PATCH] tasknc: fix build with ncurses 6.3 --- srcpkgs/tasknc/patches/ncurses-6.3.patch | 36 ++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 srcpkgs/tasknc/patches/ncurses-6.3.patch diff --git a/srcpkgs/tasknc/patches/ncurses-6.3.patch b/srcpkgs/tasknc/patches/ncurses-6.3.patch new file mode 100644 index 00000000000..46ade54a3be --- /dev/null +++ b/srcpkgs/tasknc/patches/ncurses-6.3.patch @@ -0,0 +1,36 @@ +From f74ea0641e9bf287acf22fac9f6eeea571b01800 Mon Sep 17 00:00:00 2001 +From: Sergei Trofimovich +Date: Sat, 6 Nov 2021 11:28:04 +0000 +Subject: [PATCH] src/keys.c: used KEY_EVENT only if it exists + +On ncurses-6.3 the build fails as: + + src/keys.c:122:6: error: 'KEY_EVENT' undeclared here (not in a function); did you mean 'KEY_SLEFT'? + 122 | {KEY_EVENT, "event"}, + | ^~~~~~~~~ + | KEY_SLEFT + +ncurses-6.3 deprecated KEY_EVENT as: + + * mark wgetch-events feature as deprecated. + + prevent KEY_EVENT from appearing in curses.h unless the + configure option --enable-wgetch-events is used. +--- + src/keys.c | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/src/keys.c b/src/keys.c +index f62bdae..d35e425 100644 +--- a/src/keys.c ++++ b/src/keys.c +@@ -119,7 +119,10 @@ struct keymap keymaps[] = { + {KEY_UNDO, "undo"}, + {KEY_MOUSE, "mouse"}, + {KEY_RESIZE, "resize"}, ++/* Optional deprecated ncurses feature. */ ++#ifdef KEY_EVENT + {KEY_EVENT, "event"}, ++#endif + {1, "C-a"}, + {2, "C-b"}, + {3, "C-c"},