pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/lang/python39 python39: make curses module more amenab...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/a40f6053b467
branches:  trunk
changeset: 770669:a40f6053b467
user:      wiz <wiz%pkgsrc.org@localhost>
date:      Mon Dec 06 16:03:06 2021 +0000

description:
python39: make curses module more amenable to NetBSD curses

diffstat:

 lang/python39/distinfo                               |   3 ++-
 lang/python39/patches/patch-Modules___cursesmodule.c |  17 +++++++++++++++++
 2 files changed, 19 insertions(+), 1 deletions(-)

diffs (38 lines):

diff -r f720e6218e3b -r a40f6053b467 lang/python39/distinfo
--- a/lang/python39/distinfo    Mon Dec 06 15:38:18 2021 +0000
+++ b/lang/python39/distinfo    Mon Dec 06 16:03:06 2021 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.17 2021/11/16 14:23:50 adam Exp $
+$NetBSD: distinfo,v 1.18 2021/12/06 16:03:06 wiz Exp $
 
 BLAKE2s (Python-3.9.9.tar.xz) = bb0cf5c1cb3212d82b69ab4e965f03b77736610c84bd032f31a5debdd25e6a30
 SHA512 (Python-3.9.9.tar.xz) = 0ab29fb9a7ecb808bd08d84d28908d5a934e0f021853da0f7a9c94670eb30c8dbbc233d461afdb3995b0de59275ef7e1de43e82d7f848802cbd6e6e50b7b25a6
@@ -10,6 +10,7 @@
 SHA1 (patch-Lib_lib2to3_pgen2_driver.py) = 5d6dab14197f27363394ff1aeee22a8ced8026d2
 SHA1 (patch-Lib_sysconfig.py) = a4f009ed73ebbd9d9c4bf7e12b7981182ed8fd7c
 SHA1 (patch-Makefile.pre.in) = dd5ff571ac9fe2dc2e41fa678261d8e3648ac908
+SHA1 (patch-Modules___cursesmodule.c) = 9ea087fbbd3e6a33699bc91d0ace18b7c7aa9955
 SHA1 (patch-Modules___ssl.c) = f241ba148e4c244a641386be5ac07817b03f04f7
 SHA1 (patch-Modules_makesetup) = a06786eebffadecedba5e3a50a9785fb47613567
 SHA1 (patch-Modules_nismodule.c) = 1bafe9b06359586d027a77011b103877590d947d
diff -r f720e6218e3b -r a40f6053b467 lang/python39/patches/patch-Modules___cursesmodule.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/python39/patches/patch-Modules___cursesmodule.c      Mon Dec 06 16:03:06 2021 +0000
@@ -0,0 +1,17 @@
+$NetBSD: patch-Modules___cursesmodule.c,v 1.1 2021/12/06 16:03:06 wiz Exp $
+
+NetBSD curses compatibility.
+
+--- Modules/_cursesmodule.c.orig       2021-11-15 17:43:00.000000000 +0000
++++ Modules/_cursesmodule.c
+@@ -1077,8 +1077,8 @@ PyCursesWindow_ChgAt(PyCursesWindowObjec
+         return NULL;
+     }
+ 
+-    color = (short)((attr >> 8) & 0xff);
+-    attr = attr - (color << 8);
++    color = (short) PAIR_NUMBER(attr);
++    attr = attr & A_ATTRIBUTES;
+ 
+     if (use_xy) {
+         rtn = mvwchgat(self->win,y,x,num,attr,color,NULL);



Home | Main Index | Thread Index | Old Index