61 lines
2.2 KiB
Diff
61 lines
2.2 KiB
Diff
From 5291f1f997f4450c9b7768e39a73ae6525a39c9a Mon Sep 17 00:00:00 2001
|
|
From: jeremyd2019 <github@jdrake.com>
|
|
Date: Mon, 22 Nov 2021 16:04:41 -0800
|
|
Subject: [PATCH 106/N] handle ncursesw pkg-config when cross-compiling
|
|
|
|
strip extra args from pkg-config --cflags-only-I, setup.py is only expecting a single path.
|
|
|
|
Use pkg-config ncursesw include dir even if cross-compiling (PKG_CONFIG_PATH should be set in that case).
|
|
---
|
|
configure.ac | 8 +++-----
|
|
setup.py | 3 +--
|
|
2 files changed, 4 insertions(+), 7 deletions(-)
|
|
|
|
diff --git a/configure.ac b/configure.ac
|
|
index d75462f..b15dd0a 100644
|
|
--- a/configure.ac
|
|
+++ b/configure.ac
|
|
@@ -3880,7 +3880,7 @@ else
|
|
fi
|
|
|
|
if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
|
|
- LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
|
|
+ LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ .*$//'`"
|
|
else
|
|
LIBFFI_INCLUDEDIR=""
|
|
fi
|
|
@@ -6465,7 +6465,7 @@ then
|
|
fi
|
|
|
|
if test -n "$PKG_CONFIG"; then
|
|
- NCURSESW_INCLUDEDIR="`"$PKG_CONFIG" ncursesw --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
|
|
+ NCURSESW_INCLUDEDIR="`"$PKG_CONFIG" ncursesw --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ .*$//'`"
|
|
else
|
|
NCURSESW_INCLUDEDIR=""
|
|
fi
|
|
@@ -6473,9 +6473,7 @@ AC_SUBST(NCURSESW_INCLUDEDIR)
|
|
|
|
# first curses header check
|
|
ac_save_cppflags="$CPPFLAGS"
|
|
-if test "$cross_compiling" = no; then
|
|
- CPPFLAGS="$CPPFLAGS -I$NCURSESW_INCLUDEDIR"
|
|
-fi
|
|
+CPPFLAGS="$CPPFLAGS -I$NCURSESW_INCLUDEDIR"
|
|
|
|
AC_CHECK_HEADERS(curses.h ncurses.h)
|
|
|
|
diff --git a/setup.py b/setup.py
|
|
index 2b07c4c..17a7d48 100644
|
|
--- a/setup.py
|
|
+++ b/setup.py
|
|
@@ -1155,8 +1155,7 @@ def detect_readline_curses(self):
|
|
panel_library = 'panel'
|
|
if curses_library == 'ncursesw':
|
|
curses_defines.append(('HAVE_NCURSESW', '1'))
|
|
- if not CROSS_COMPILING:
|
|
- curses_includes.append(sysconfig.get_config_var("NCURSESW_INCLUDEDIR"))
|
|
+ curses_includes.append(sysconfig.get_config_var("NCURSESW_INCLUDEDIR"))
|
|
# Bug 1464056: If _curses.so links with ncursesw,
|
|
# _curses_panel.so must link with panelw.
|
|
panel_library = 'panelw'
|