summarylogtreecommitdiffstats
path: root/0108-build-Cleanup-ncursesw-include-lookup-code.patch
diff options
context:
space:
mode:
authoratomlong2021-08-28 11:19:04 +0800
committeratomlong2021-08-28 13:15:13 +0800
commit89a67c05174951d172252b1db96ff93cc4ec4bcd (patch)
treed8c39fa79b201cf9aea28c51e7446a252ed8fee4 /0108-build-Cleanup-ncursesw-include-lookup-code.patch
parentcf8d8d8771493a2aa8370ed323d06dc733a84181 (diff)
downloadaur-89a67c05174951d172252b1db96ff93cc4ec4bcd.tar.gz
Update to 3.9.6
Diffstat (limited to '0108-build-Cleanup-ncursesw-include-lookup-code.patch')
-rw-r--r--0108-build-Cleanup-ncursesw-include-lookup-code.patch75
1 files changed, 75 insertions, 0 deletions
diff --git a/0108-build-Cleanup-ncursesw-include-lookup-code.patch b/0108-build-Cleanup-ncursesw-include-lookup-code.patch
new file mode 100644
index 000000000000..a37be8ae9b67
--- /dev/null
+++ b/0108-build-Cleanup-ncursesw-include-lookup-code.patch
@@ -0,0 +1,75 @@
+From 092108ff97a30264657e3f998de754e691cc58f4 Mon Sep 17 00:00:00 2001
+From: Christoph Reiter <reiter.christoph@gmail.com>
+Date: Fri, 23 Jul 2021 08:50:39 +0200
+Subject: [PATCH 108/N] build: Cleanup ncursesw include lookup code
+
+Mirror what si already done for libffi; Look it up via
+pkg-config and use the exported path via sysconfig in setup.py
+
+This should be merged into "dont include system ncurses path"
+---
+ Makefile.pre.in | 1 +
+ configure.ac | 19 ++++++++++---------
+ setup.py | 2 +-
+ 3 files changed, 12 insertions(+), 10 deletions(-)
+
+diff --git a/Makefile.pre.in b/Makefile.pre.in
+index 01cc055..fe25d9e 100644
+--- a/Makefile.pre.in
++++ b/Makefile.pre.in
+@@ -313,6 +313,7 @@ IO_OBJS= \
+ ##########################################################################
+
+ LIBFFI_INCLUDEDIR= @LIBFFI_INCLUDEDIR@
++NCURSESW_INCLUDEDIR= @NCURSESW_INCLUDEDIR@
+
+ ##########################################################################
+ # Parser
+diff --git a/configure.ac b/configure.ac
+index 14e4c8c..bab62ad 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -5556,17 +5556,18 @@ then
+ [Define if you have struct stat.st_mtimensec])
+ fi
+
++if test -n "$PKG_CONFIG"; then
++ NCURSESW_INCLUDEDIR="`"$PKG_CONFIG" ncursesw --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
++else
++ NCURSESW_INCLUDEDIR=""
++fi
++AC_SUBST(NCURSESW_INCLUDEDIR)
++
+ # first curses header check
+ ac_save_cppflags="$CPPFLAGS"
+-case $host_os in
+- mingw*)
+- ;;
+- *)
+- if test "$cross_compiling" = no; then
+- CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
+- fi
+- ;;
+-esac
++if test "$cross_compiling" = no; then
++ CPPFLAGS="$CPPFLAGS -I$NCURSESW_INCLUDEDIR"
++fi
+
+ AC_CHECK_HEADERS(curses.h ncurses.h)
+
+diff --git a/setup.py b/setup.py
+index a2d5656..4e7a284 100644
+--- a/setup.py
++++ b/setup.py
+@@ -1098,7 +1098,7 @@ class PyBuildExt(build_ext):
+ if curses_library == 'ncursesw':
+ curses_defines.append(('HAVE_NCURSESW', '1'))
+ if not CROSS_COMPILING:
+- curses_includes.append('/usr/include/ncursesw')
++ 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'
+--
+2.32.0
+