void-packages/templates/python-fix-curses-module.diff
Juan RP e9def74b60 Mega patch to improve how build dependencies are handled and
how packages are found.

First: I removed all these *-deps.db files and only a single file
is used now "build-depends.db"; it's smaller and will be easier
to handle in the future... when "run-depends.db" is added :-)

Second: there's no need to specify version of package anymore;
before you had to do:

	$ pkgfs.sh install git-1.6.0.2

now you only do:

	$ pkgfs.sh install git

This will read the variables located at PKGFS_TEMPLATESDIR/git.tmpl
and will the install the version that is there.

--HG--
extra : convert_revision : 9e3e5d70965a69c76f59e322b7c7b674d627af52
2008-10-04 06:29:49 +02:00

86 lines
2.9 KiB
Diff

$NetBSD: patch-ah,v 1.1.1.1 2008/04/24 01:50:58 tnn Exp $
--- Modules/_cursesmodule.c.orig 2008-01-26 15:03:51.000000000 +0100
+++ Modules/_cursesmodule.c
@@ -314,17 +314,9 @@ 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")
@@ -827,11 +819,7 @@ PyCursesWindow_GetKey(PyCursesWindowObje
} else if (rtn<=255)
return Py_BuildValue("c", rtn);
else
-#if defined(__NetBSD__)
- return PyString_FromString(unctrl(rtn));
-#else
return PyString_FromString((char *)keyname(rtn));
-#endif
}
static PyObject *
@@ -2039,7 +2027,6 @@ PyCurses_Is_Term_Resized(PyObject *self,
}
#endif /* HAVE_CURSES_IS_TERM_RESIZED */
-#if !defined(__NetBSD__)
static PyObject *
PyCurses_KeyName(PyObject *self, PyObject *args)
{
@@ -2058,7 +2045,6 @@ PyCurses_KeyName(PyObject *self, PyObjec
return PyString_FromString((knp == NULL) ? "" : (char *)knp);
}
-#endif
static PyObject *
PyCurses_KillChar(PyObject *self)
@@ -2603,9 +2589,7 @@ 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},
@@ -2714,9 +2698,7 @@ 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);
@@ -2788,7 +2770,6 @@ 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)
@@ -2816,7 +2797,6 @@ init_curses(void)
if (key_n2 != key_n)
free(key_n2);
}
-#endif
SetDictInt("KEY_MIN", KEY_MIN);
SetDictInt("KEY_MAX", KEY_MAX);
}