From 9acab46c39c4dc2fc6a0c5cdfa5dbe034b43c6aa Mon Sep 17 00:00:00 2001 From: leot Date: Sun, 3 Jun 2018 07:49:27 +0000 Subject: python27: Remove patches/patch-ah (no longer needed) Since Python 2.7.15 patches/patch-ah is no longer needed and badly interfere (e.g. with it `curses.KEY_*' are no longer exposed): - Prototypes of NetBSD curses(3) are as described, no need to patch them - Avoid {lines,columns} -> {nlines,columns} rename, they are properly undef-ed due HAVE_TERM_H. - Use keyname() (it should be present since NetBSD 2.0) Bump PKGREVISION for devel/py-curses so it will be properly rebuild. Fixes PR pkg/53330 reported by . --- lang/python27/distinfo | 3 +- lang/python27/patches/patch-ah | 140 ----------------------------------------- 2 files changed, 1 insertion(+), 142 deletions(-) delete mode 100644 lang/python27/patches/patch-ah (limited to 'lang/python27') diff --git a/lang/python27/distinfo b/lang/python27/distinfo index bde5485dc89..c8aa0c8e2eb 100644 --- a/lang/python27/distinfo +++ b/lang/python27/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.68 2018/05/19 06:54:55 spz Exp $ +$NetBSD: distinfo,v 1.69 2018/06/03 07:49:27 leot Exp $ SHA1 (Python-2.7.15.tar.xz) = f99348a095ec4a6411c84c0d15343d11920c9724 RMD160 (Python-2.7.15.tar.xz) = 4bbb2b0012b82e1b27661a08305fad461371679f @@ -19,7 +19,6 @@ SHA1 (patch-Modules_socketmodule.c) = 16848d90947b3de1f921a0813fa5c317f76961d4 SHA1 (patch-ab) = ea4feba4e93dbcff07050c82a00d591bb650e934 SHA1 (patch-ad) = 96ae702995d434e2d7ec0ac62e37427a90b61d13 SHA1 (patch-ae) = d836d77854a2b3d79fa34a06a8e2493bf0a503e6 -SHA1 (patch-ah) = e74afa778af669605f9089e67b70953a271589a8 SHA1 (patch-al) = 999700e96dd227cdd16cea3ae1001eb887ab8fee SHA1 (patch-am) = 25c29f3799cb02db962d5c42d71ec59b4748466f SHA1 (patch-an) = 9aad78714c4fe1a21cf66a6627d97d164ecea196 diff --git a/lang/python27/patches/patch-ah b/lang/python27/patches/patch-ah deleted file mode 100644 index 9159d08f88d..00000000000 --- a/lang/python27/patches/patch-ah +++ /dev/null @@ -1,140 +0,0 @@ -$NetBSD: patch-ah,v 1.9 2018/05/19 06:54:55 spz Exp $ - -Allow py-curses to use NetBSD curses as well as ncurses -http://bugs.python.org/issue21457 - ---- Modules/_cursesmodule.c.orig 2018-04-29 22:47:33.000000000 +0000 -+++ Modules/_cursesmodule.c -@@ -326,9 +326,17 @@ Window_NoArg2TupleReturnFunction(getpary - - Window_OneArgNoReturnFunction(clearok, int, "i;True(1) or False(0)") - Window_OneArgNoReturnFunction(idlok, int, "i;True(1) or False(0)") -+#if defined(__NetBSD__) -+Window_OneArgNoReturnVoidFunction(keypad, int, "i;True(1) or False(0)") -+#else - Window_OneArgNoReturnFunction(keypad, int, "i;True(1) or False(0)") -+#endif - Window_OneArgNoReturnFunction(leaveok, int, "i;True(1) or False(0)") -+#if defined(__NetBSD__) -+Window_OneArgNoReturnVoidFunction(nodelay, int, "i;True(1) or False(0)") -+#else - Window_OneArgNoReturnFunction(nodelay, int, "i;True(1) or False(0)") -+#endif - 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") -@@ -2131,15 +2139,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; -@@ -2150,6 +2158,7 @@ PyCurses_Is_Term_Resized(PyObject *self, - } - #endif /* HAVE_CURSES_IS_TERM_RESIZED */ - -+#if !defined(__NetBSD__) - static PyObject * - PyCurses_KeyName(PyObject *self, PyObject *args) - { -@@ -2168,6 +2177,7 @@ PyCurses_KeyName(PyObject *self, PyObjec - - return PyString_FromString((knp == NULL) ? "" : (char *)knp); - } -+#endif - - static PyObject * - PyCurses_KillChar(PyObject *self) -@@ -2422,16 +2432,16 @@ update_lines_cols(void) - 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()) -@@ -2445,17 +2455,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()) -@@ -2729,7 +2739,9 @@ static PyMethodDef PyCurses_methods[] = - #ifdef HAVE_CURSES_IS_TERM_RESIZED - {"is_term_resized", (PyCFunction)PyCurses_Is_Term_Resized, METH_VARARGS}, - #endif -+#if !defined(__NetBSD__) - {"keyname", (PyCFunction)PyCurses_KeyName, METH_VARARGS}, -+#endif - {"killchar", (PyCFunction)PyCurses_KillChar, METH_NOARGS}, - {"longname", (PyCFunction)PyCurses_longname, METH_NOARGS}, - {"meta", (PyCFunction)PyCurses_Meta, METH_VARARGS}, -@@ -2844,7 +2856,9 @@ init_curses(void) - SetDictInt("A_DIM", A_DIM); - SetDictInt("A_BOLD", A_BOLD); - SetDictInt("A_ALTCHARSET", A_ALTCHARSET); -+#if !defined(__NetBSD__) - SetDictInt("A_INVIS", A_INVIS); -+#endif - SetDictInt("A_PROTECT", A_PROTECT); - SetDictInt("A_CHARTEXT", A_CHARTEXT); - SetDictInt("A_COLOR", A_COLOR); -@@ -2916,6 +2930,7 @@ init_curses(void) - int key; - char *key_n; - char *key_n2; -+#if !defined(__NetBSD__) - for (key=KEY_MIN;key < KEY_MAX; key++) { - key_n = (char *)keyname(key); - if (key_n == NULL || strcmp(key_n,"UNKNOWN KEY")==0) -@@ -2943,6 +2958,7 @@ init_curses(void) - if (key_n2 != key_n) - free(key_n2); - } -+#endif - SetDictInt("KEY_MIN", KEY_MIN); - SetDictInt("KEY_MAX", KEY_MAX); - } -- cgit v1.2.3