aboutsummaryrefslogtreecommitdiff
path: root/libs/newt/patches/python_init_once.patch
diff options
context:
space:
mode:
authorJeffery To <jeffery.to@gmail.com>2019-04-30 20:35:13 +0800
committerJeffery To <jeffery.to@gmail.com>2019-05-14 13:55:25 +0800
commit80c95fc08264122b003ba6d37059ab26c1c7cba0 (patch)
treeda75ff2dfefc8bfd9b9601f505e3b2bf7d4758ac /libs/newt/patches/python_init_once.patch
parent46a658748d31dc9bb1e26f9d4abfa0775be2b959 (diff)
newt: Add new package
From the README: Newt is a programming library for color text mode, widget based user interfaces. Newt can be used to add stacked windows, entry widgets, checkboxes, radio buttons, labels, plain text fields, scrollbars, etc., to text mode user interfaces. Newt is based on the slang library. Adapted from the old packages feed: https://git.openwrt.org/?p=openwrt/svn-archive/packages.git;a=tree;f=libs/newt Signed-off-by: Jeffery To <jeffery.to@gmail.com>
Diffstat (limited to 'libs/newt/patches/python_init_once.patch')
-rw-r--r--libs/newt/patches/python_init_once.patch24
1 files changed, 24 insertions, 0 deletions
diff --git a/libs/newt/patches/python_init_once.patch b/libs/newt/patches/python_init_once.patch
new file mode 100644
index 000000000..3d52b4486
--- /dev/null
+++ b/libs/newt/patches/python_init_once.patch
@@ -0,0 +1,24 @@
+Author: Alastair McKinstry <mckinstry@debian.org>
+Description: newtInit() should only be called once
+Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=557960
+Forwarded: no
+Last-Updated: 2014-06-11
+
+--- a/snack.c
++++ b/snack.c
+@@ -377,10 +377,15 @@ static snackWidget * snackWidgetNew (voi
+ }
+
+ static PyObject * initScreen(PyObject * s, PyObject * args) {
++ static int init_newt = 1;
+ suspend.cb = NULL;
+ suspend.data = NULL;
+
+ newtInit();
++ if (init_newt) {
++ newtInit();
++ init_newt = 0;
++ }
+ newtCls();
+
+ Py_INCREF(Py_None);