From 7b053941d7f9d5f430333a5b7620de109193c1b2 Mon Sep 17 00:00:00 2001 From: Alexandru Ardelean Date: Mon, 13 Feb 2017 16:12:39 +0200 Subject: [PATCH] python3: fix ncursesw definition collisions setup.py seems to add the host's /usr/include/ncursesw header. Reported-by: Arturo Rinaldi Signed-off-by: Alexandru Ardelean --- lang/python3/Makefile | 2 +- ...11-fix-ncursesw-definition-colisions.patch | 24 +++++++++++++++++++ 2 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 lang/python3/patches/011-fix-ncursesw-definition-colisions.patch diff --git a/lang/python3/Makefile b/lang/python3/Makefile index aa758b5630..3a08a93935 100644 --- a/lang/python3/Makefile +++ b/lang/python3/Makefile @@ -14,7 +14,7 @@ PYTHON_VERSION:=$(PYTHON3_VERSION) PYTHON_VERSION_MICRO:=$(PYTHON3_VERSION_MICRO) PKG_NAME:=python3 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_VERSION:=$(PYTHON_VERSION).$(PYTHON_VERSION_MICRO) PKG_SOURCE:=Python-$(PKG_VERSION).tar.xz diff --git a/lang/python3/patches/011-fix-ncursesw-definition-colisions.patch b/lang/python3/patches/011-fix-ncursesw-definition-colisions.patch new file mode 100644 index 0000000000..0df72c745e --- /dev/null +++ b/lang/python3/patches/011-fix-ncursesw-definition-colisions.patch @@ -0,0 +1,24 @@ +diff --git a/Modules/_cursesmodule.c b/Modules/_cursesmodule.c +index 3bf2ca7..c156964 100644 +--- a/Modules/_cursesmodule.c ++++ b/Modules/_cursesmodule.c +@@ -116,7 +116,6 @@ char *PyCursesVersion = "2.2"; + #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 + #include + #endif +diff --git a/setup.py b/setup.py +index af9a414..ee19ecd 100644 +--- a/setup.py ++++ b/setup.py +@@ -1349,7 +1349,6 @@ class PyBuildExt(build_ext): + panel_library = 'panel' + if curses_library == 'ncursesw': + curses_defines.append(('HAVE_NCURSESW', '1')) +- curses_includes.append('/usr/include/ncursesw') + # Bug 1464056: If _curses.so links with ncursesw, + # _curses_panel.so must link with panelw. + panel_library = 'panelw'