blob: 30d29064393649ef5b0a4d9e970a6b201e68c39d [file] [log] [blame]
Andrew Geissler595f6302022-01-24 19:11:47 +00001From 788cd0464ee2b175493a0167ceee8c0045ce323c Mon Sep 17 00:00:00 2001
Andrew Geissler82c905d2020-04-13 13:39:40 -05002From: Alexander Kanavin <alex.kanavin@gmail.com>
3Date: Sun, 16 Feb 2020 17:50:25 +0100
4Subject: [PATCH] configure.ac, setup.py: do not add a curses include path from
5 the host
6
7This leads to host contamination, and particularly can cause
8curses modules to fail at runtime if the host curses is configured
9differently to native curses (observed on current OpenSuse Tumbleweed
10as dnf failures).
11
12Upstream-Status: Inappropriate [oe-core specific]
13Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
Andrew Geissler595f6302022-01-24 19:11:47 +000014
Andrew Geissler82c905d2020-04-13 13:39:40 -050015---
16 configure.ac | 6 ------
17 setup.py | 2 --
18 2 files changed, 8 deletions(-)
19
20diff --git a/configure.ac b/configure.ac
Andrew Geissler595f6302022-01-24 19:11:47 +000021index e5e3df8..bfdd987 100644
Andrew Geissler82c905d2020-04-13 13:39:40 -050022--- a/configure.ac
23+++ b/configure.ac
Andrew Geissler595f6302022-01-24 19:11:47 +000024@@ -5092,12 +5092,6 @@ then
Andrew Geissler82c905d2020-04-13 13:39:40 -050025 [Define if you have struct stat.st_mtimensec])
26 fi
27
28-# first curses header check
29-ac_save_cppflags="$CPPFLAGS"
30-if test "$cross_compiling" = no; then
31- CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
32-fi
33-
34 AC_CHECK_HEADERS(curses.h ncurses.h)
35
36 # On Solaris, term.h requires curses.h
37diff --git a/setup.py b/setup.py
Andrew Geissler595f6302022-01-24 19:11:47 +000038index 62f0e18..c190002 100644
Andrew Geissler82c905d2020-04-13 13:39:40 -050039--- a/setup.py
40+++ b/setup.py
Andrew Geissler595f6302022-01-24 19:11:47 +000041@@ -1169,8 +1169,6 @@ class PyBuildExt(build_ext):
Andrew Geissler82c905d2020-04-13 13:39:40 -050042 panel_library = 'panel'
43 if curses_library == 'ncursesw':
44 curses_defines.append(('HAVE_NCURSESW', '1'))
45- if not CROSS_COMPILING:
46- curses_includes.append('/usr/include/ncursesw')
47 # Bug 1464056: If _curses.so links with ncursesw,
48 # _curses_panel.so must link with panelw.
49 panel_library = 'panelw'