summaryrefslogtreecommitdiff
path: root/lang/python36
diff options
context:
space:
mode:
authorroy <roy@pkgsrc.org>2017-01-02 21:14:53 +0000
committerroy <roy@pkgsrc.org>2017-01-02 21:14:53 +0000
commitc5418303afc30d960aa9c3ea6c22f43fb9e54617 (patch)
tree372e44c1f73e057f90233c74da6ba838635db943 /lang/python36
parentcf83795901b1c2a85cc7be2d01570d91a3219773 (diff)
downloadpkgsrc-c5418303afc30d960aa9c3ea6c22f43fb9e54617.tar.gz
Update curses patch from prior python35 patch.
Diffstat (limited to 'lang/python36')
-rw-r--r--lang/python36/distinfo4
-rw-r--r--lang/python36/patches/patch-Modules___cursesmodule.c135
2 files changed, 126 insertions, 13 deletions
diff --git a/lang/python36/distinfo b/lang/python36/distinfo
index 7ab0e7431a7..08e233b36ff 100644
--- a/lang/python36/distinfo
+++ b/lang/python36/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.1 2017/01/01 14:34:27 adam Exp $
+$NetBSD: distinfo,v 1.2 2017/01/02 21:14:53 roy Exp $
SHA1 (Python-3.6.0.tar.xz) = 18ebf7d726782967d967dc00e3aa08b334fbdd5c
RMD160 (Python-3.6.0.tar.xz) = 984a38d1eec379ac8921479a86259ca0161734af
@@ -10,7 +10,7 @@ SHA1 (patch-Lib_distutils_sysconfig.py) = 23d8e9e63924e0b7be21355bd83d20eff25c9c
SHA1 (patch-Lib_distutils_unixccompiler.py) = e7aa684fa186de7a01486c3d8bfa177afdd22ef9
SHA1 (patch-Lib_sysconfig.py) = 81df54149caba826062fb78e68fdd4328ea98b2a
SHA1 (patch-Makefile.pre.in) = 99b33ba203eb2c9c626377f1bac03c723d467553
-SHA1 (patch-Modules___cursesmodule.c) = d72de4c689fd2e8beb1a9ffa7bb0d921b4aca692
+SHA1 (patch-Modules___cursesmodule.c) = cb3960bc91a5f815c8c4755e60124484b8c68266
SHA1 (patch-Modules_makesetup) = a06786eebffadecedba5e3a50a9785fb47613567
SHA1 (patch-Modules_nismodule.c) = 1bafe9b06359586d027a77011b103877590d947d
SHA1 (patch-Python_thread__pthread.h) = fb81eaa604b4ed7c1b64c3f4731d58a8aee257be
diff --git a/lang/python36/patches/patch-Modules___cursesmodule.c b/lang/python36/patches/patch-Modules___cursesmodule.c
index ad67522c4c8..a19aa6da0b3 100644
--- a/lang/python36/patches/patch-Modules___cursesmodule.c
+++ b/lang/python36/patches/patch-Modules___cursesmodule.c
@@ -1,11 +1,25 @@
-$NetBSD: patch-Modules___cursesmodule.c,v 1.1 2017/01/01 14:34:27 adam Exp $
+$NetBSD: patch-Modules___cursesmodule.c,v 1.2 2017/01/02 21:14:53 roy Exp $
-Ncurses will be used by devel/py-curses and devel/py-cursespanel.
+Allow py-curses to use NetBSD curses as well as ncurses
http://bugs.python.org/issue21457
---- Modules/_cursesmodule.c.orig 2016-12-23 02:21:21.000000000 +0000
+--- Modules/_cursesmodule.c.orig 2016-06-25 21:38:38.000000000 +0000
+++ Modules/_cursesmodule.c
-@@ -485,17 +485,9 @@ Window_NoArg2TupleReturnFunction(getpary
+@@ -112,12 +112,7 @@ char *PyCursesVersion = "2.2";
+ #define CURSES_MODULE
+ #include "py_curses.h"
+
+-/* These prototypes are in <term.h>, but including this header
+- #defines many common symbols (such as "lines") which breaks the
+- curses module in other ways. So the code will just specify
+- explicit prototypes here. */
+-extern int setupterm(char *,int,int *);
+-#ifdef __sgi
++#ifdef HAVE_TERM_H
+ #include <term.h>
+ #endif
+
+@@ -486,17 +481,9 @@ Window_NoArg2TupleReturnFunction(getpary
Window_OneArgNoReturnFunction(clearok, int, "i;True(1) or False(0)")
Window_OneArgNoReturnFunction(idlok, int, "i;True(1) or False(0)")
@@ -23,7 +37,16 @@ http://bugs.python.org/issue21457
Window_OneArgNoReturnFunction(notimeout, int, "i;True(1) or False(0)")
Window_OneArgNoReturnFunction(scrollok, int, "i;True(1) or False(0)")
Window_OneArgNoReturnFunction(winsdelln, int, "i;nlines")
-@@ -1157,11 +1149,7 @@ PyCursesWindow_GetKey(PyCursesWindowObje
+@@ -1070,7 +1057,7 @@ PyCursesWindow_EchoChar(PyCursesWindowOb
+ return NULL;
+
+ #ifdef WINDOW_HAS_FLAGS
+- if (self->win->_flags & _ISPAD)
++ if (is_keypad(self->win))
+ return PyCursesCheckERR(pechochar(self->win, ch | attr),
+ "echochar");
+ else
+@@ -1156,11 +1143,7 @@ PyCursesWindow_GetKey(PyCursesWindowObje
return Py_BuildValue("C", rtn);
} else {
const char *knp;
@@ -35,7 +58,54 @@ http://bugs.python.org/issue21457
return PyUnicode_FromString((knp == NULL) ? "" : knp);
}
}
-@@ -2612,7 +2600,6 @@ PyCurses_Is_Term_Resized(PyObject *self,
+@@ -1593,7 +1576,7 @@ PyCursesWindow_NoOutRefresh(PyCursesWind
+ #ifndef WINDOW_HAS_FLAGS
+ if (0)
+ #else
+- if (self->win->_flags & _ISPAD)
++ if (is_keypad(self->win))
+ #endif
+ {
+ switch(PyTuple_Size(args)) {
+@@ -1768,7 +1751,7 @@ PyCursesWindow_Refresh(PyCursesWindowObj
+ #ifndef WINDOW_HAS_FLAGS
+ if (0)
+ #else
+- if (self->win->_flags & _ISPAD)
++ if (is_keypad(self->win))
+ #endif
+ {
+ switch(PyTuple_Size(args)) {
+@@ -1835,7 +1818,7 @@ PyCursesWindow_SubWin(PyCursesWindowObje
+
+ /* printf("Subwin: %i %i %i %i \n", nlines, ncols, begin_y, begin_x); */
+ #ifdef WINDOW_HAS_FLAGS
+- if (self->win->_flags & _ISPAD)
++ if (is_keypad(self->win))
+ win = subpad(self->win, nlines, ncols, begin_y, begin_x);
+ else
+ #endif
+@@ -2576,15 +2559,15 @@ PyCurses_IntrFlush(PyObject *self, PyObj
+ static PyObject *
+ PyCurses_Is_Term_Resized(PyObject *self, PyObject *args)
+ {
+- int lines;
+- int columns;
++ int nlines;
++ int ncolumns;
+ int result;
+
+ PyCursesInitialised;
+
+- if (!PyArg_ParseTuple(args,"ii:is_term_resized", &lines, &columns))
++ if (!PyArg_ParseTuple(args,"ii:is_term_resized", &nlines, &ncolumns))
+ return NULL;
+- result = is_term_resized(lines, columns);
++ result = is_term_resized(nlines, ncolumns);
+ if (result == TRUE) {
+ Py_INCREF(Py_True);
+ return Py_True;
+@@ -2595,7 +2578,6 @@ PyCurses_Is_Term_Resized(PyObject *self,
}
#endif /* HAVE_CURSES_IS_TERM_RESIZED */
@@ -43,7 +113,7 @@ http://bugs.python.org/issue21457
static PyObject *
PyCurses_KeyName(PyObject *self, PyObject *args)
{
-@@ -2631,7 +2618,6 @@ PyCurses_KeyName(PyObject *self, PyObjec
+@@ -2614,7 +2596,6 @@ PyCurses_KeyName(PyObject *self, PyObjec
return PyBytes_FromString((knp == NULL) ? "" : knp);
}
@@ -51,7 +121,50 @@ http://bugs.python.org/issue21457
static PyObject *
PyCurses_KillChar(PyObject *self)
-@@ -3245,9 +3231,7 @@ static PyMethodDef PyCurses_methods[] =
+@@ -2879,16 +2860,16 @@ PyCurses_update_lines_cols(PyObject *sel
+ static PyObject *
+ PyCurses_ResizeTerm(PyObject *self, PyObject *args)
+ {
+- int lines;
+- int columns;
++ int nlines;
++ int ncolumns;
+ PyObject *result;
+
+ PyCursesInitialised;
+
+- if (!PyArg_ParseTuple(args,"ii:resizeterm", &lines, &columns))
++ if (!PyArg_ParseTuple(args,"ii:resizeterm", &nlines, &ncolumns))
+ return NULL;
+
+- result = PyCursesCheckERR(resizeterm(lines, columns), "resizeterm");
++ result = PyCursesCheckERR(resizeterm(nlines, ncolumns), "resizeterm");
+ if (!result)
+ return NULL;
+ if (!update_lines_cols())
+@@ -2902,17 +2883,17 @@ PyCurses_ResizeTerm(PyObject *self, PyOb
+ static PyObject *
+ PyCurses_Resize_Term(PyObject *self, PyObject *args)
+ {
+- int lines;
+- int columns;
++ int nlines;
++ int ncolumns;
+
+ PyObject *result;
+
+ PyCursesInitialised;
+
+- if (!PyArg_ParseTuple(args,"ii:resize_term", &lines, &columns))
++ if (!PyArg_ParseTuple(args,"ii:resize_term", &nlines, &ncolumns))
+ return NULL;
+
+- result = PyCursesCheckERR(resize_term(lines, columns), "resize_term");
++ result = PyCursesCheckERR(resize_term(nlines, ncolumns), "resize_term");
+ if (!result)
+ return NULL;
+ if (!update_lines_cols())
+@@ -3228,9 +3209,7 @@ static PyMethodDef PyCurses_methods[] =
#ifdef HAVE_CURSES_IS_TERM_RESIZED
{"is_term_resized", (PyCFunction)PyCurses_Is_Term_Resized, METH_VARARGS},
#endif
@@ -61,7 +174,7 @@ http://bugs.python.org/issue21457
{"killchar", (PyCFunction)PyCurses_KillChar, METH_NOARGS},
{"longname", (PyCFunction)PyCurses_longname, METH_NOARGS},
{"meta", (PyCFunction)PyCurses_Meta, METH_VARARGS},
-@@ -3376,9 +3360,7 @@ PyInit__curses(void)
+@@ -3359,9 +3338,7 @@ PyInit__curses(void)
SetDictInt("A_DIM", A_DIM);
SetDictInt("A_BOLD", A_BOLD);
SetDictInt("A_ALTCHARSET", A_ALTCHARSET);
@@ -71,7 +184,7 @@ http://bugs.python.org/issue21457
SetDictInt("A_PROTECT", A_PROTECT);
SetDictInt("A_CHARTEXT", A_CHARTEXT);
SetDictInt("A_COLOR", A_COLOR);
-@@ -3450,7 +3432,6 @@ PyInit__curses(void)
+@@ -3433,7 +3410,6 @@ PyInit__curses(void)
int key;
char *key_n;
char *key_n2;
@@ -79,7 +192,7 @@ http://bugs.python.org/issue21457
for (key=KEY_MIN;key < KEY_MAX; key++) {
key_n = (char *)keyname(key);
if (key_n == NULL || strcmp(key_n,"UNKNOWN KEY")==0)
-@@ -3478,7 +3459,6 @@ PyInit__curses(void)
+@@ -3461,7 +3437,6 @@ PyInit__curses(void)
if (key_n2 != key_n)
PyMem_Free(key_n2);
}