pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/devel/p5-Curses Fix build on systems which do not defi...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/4abcea373522
branches:  trunk
changeset: 639662:4abcea373522
user:      jperkin <jperkin%pkgsrc.org@localhost>
date:      Mon Sep 22 10:47:18 2014 +0000

description:
Fix build on systems which do not defined KEY_CODE_YES, using KEY_MIN
instead (notably SunOS).

diffstat:

 devel/p5-Curses/distinfo                  |   3 ++-
 devel/p5-Curses/patches/patch-CursesFun.c |  19 +++++++++++++++++++
 2 files changed, 21 insertions(+), 1 deletions(-)

diffs (34 lines):

diff -r e99b93cbf7d0 -r 4abcea373522 devel/p5-Curses/distinfo
--- a/devel/p5-Curses/distinfo  Sun Sep 21 14:49:45 2014 +0000
+++ b/devel/p5-Curses/distinfo  Mon Sep 22 10:47:18 2014 +0000
@@ -1,5 +1,6 @@
-$NetBSD: distinfo,v 1.14 2014/04/12 09:00:36 wiz Exp $
+$NetBSD: distinfo,v 1.15 2014/09/22 10:47:18 jperkin Exp $
 
 SHA1 (Curses-1.29.tgz) = ebd091c7ffb7805c1eb59e6ed787e5b292c322a3
 RMD160 (Curses-1.29.tgz) = c81b9b74c0a126feb4d8d63764f533a278c6ccf6
 Size (Curses-1.29.tgz) = 141638 bytes
+SHA1 (patch-CursesFun.c) = 0b6ae05b2f2870c7246624188010c602f8aa7e48
diff -r e99b93cbf7d0 -r 4abcea373522 devel/p5-Curses/patches/patch-CursesFun.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/p5-Curses/patches/patch-CursesFun.c Mon Sep 22 10:47:18 2014 +0000
@@ -0,0 +1,19 @@
+$NetBSD: patch-CursesFun.c,v 1.1 2014/09/22 10:47:18 jperkin Exp $
+
+Not all curses implementations have KEY_CODE_YES, use KEY_MIN
+there instead. XXX: arguably should be default?
+
+--- CursesFun.c.orig   2014-04-05 17:09:37.000000000 +0000
++++ CursesFun.c
+@@ -6968,7 +6968,11 @@ XS(XS_CURSES_getchar) {
+       int key = wgetch(win);
+       if (key == ERR) {
+               XSRETURN_UNDEF;
++#ifdef KEY_CODE_YES
+       } else if (key < KEY_CODE_YES) {
++#else
++      } else if (key < KEY_MIN) {
++#endif
+               ST(0) = sv_newmortal();
+               c_wchar2sv(ST(0), key);
+               XSRETURN(1);



Home | Main Index | Thread Index | Old Index