summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Schmaus <flow@gentoo.org>2022-07-01 20:44:29 +0200
committerFlorian Schmaus <flow@gentoo.org>2022-07-01 21:15:07 +0200
commitbf633fa5efda688905639a937df7066e8ef6ee0f (patch)
tree80f604301924caf0dafe45a36375f42e230119c4 /xen-tools-4.4.1-tinfo.patch
downloadxen-gentoo-patches-bf633fa5efda688905639a937df7066e8ef6ee0f.tar.gz
xen-gentoo-patches-bf633fa5efda688905639a937df7066e8ef6ee0f.tar.bz2
xen-gentoo-patches-bf633fa5efda688905639a937df7066e8ef6ee0f.zip
Gentoo specific patches for 4.16.1 (or later)4.16.1-gentoo-patchset-0
Signed-off-by: Florian Schmaus <flow@gentoo.org>
Diffstat (limited to 'xen-tools-4.4.1-tinfo.patch')
-rw-r--r--xen-tools-4.4.1-tinfo.patch92
1 files changed, 92 insertions, 0 deletions
diff --git a/xen-tools-4.4.1-tinfo.patch b/xen-tools-4.4.1-tinfo.patch
new file mode 100644
index 0000000..1d1a1fd
--- /dev/null
+++ b/xen-tools-4.4.1-tinfo.patch
@@ -0,0 +1,92 @@
+--- a/m4/curses.m4
++++ b/m4/curses.m4
+@@ -4,13 +4,14 @@
+ ], [curses="n"])
+ AC_CHECK_HEADER([ncurses.h], [
+ AC_CHECK_LIB([ncurses], [clear], [ncurses="y"], [ncurses="n"])
++ AC_SEARCH_LIBS([curs_set], tinfo ncurses, [CURSES_LIBS="$CURSES_LIBS $ac_res"])
+ ], [ncurses="n"])
+ AS_IF([test "$curses" = "n" && test "$ncurses" = "n"], [
+ AC_MSG_ERROR([Unable to find a suitable curses library])
+ ])
+ # Prefer ncurses over curses if both are present
+ AS_IF([test "$ncurses" = "y"], [
+- CURSES_LIBS="-lncurses"
++ CURSES_LIBS="$CURSES_LIBS -lncurses"
+ AC_DEFINE([INCLUDE_CURSES_H], [<ncurses.h>], [Define curses header to use])
+ ], [
+ CURSES_LIBS="-lcurses"
+--- a/tools/configure
++++ a/tools/configure
+@@ -7136,6 +7136,62 @@
+ ncurses="n"
+ fi
+
++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing curs_set" >&5
++$as_echo_n "checking for library containing curs_set... " >&6; }
++if ${ac_cv_search_curs_set+:} false; then :
++ $as_echo_n "(cached) " >&6
++else
++ ac_func_search_save_LIBS=$LIBS
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h. */
++
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
++#ifdef __cplusplus
++extern "C"
++#endif
++char curs_set ();
++int
++main ()
++{
++return curs_set ();
++ ;
++ return 0;
++}
++_ACEOF
++for ac_lib in '' tinfo ncurses; do
++ if test -z "$ac_lib"; then
++ ac_res="none required"
++ else
++ ac_res=-l$ac_lib
++ LIBS="-l$ac_lib $ac_func_search_save_LIBS"
++ fi
++ if ac_fn_c_try_link "$LINENO"; then :
++ ac_cv_search_curs_set=$ac_res
++fi
++rm -f core conftest.err conftest.$ac_objext \
++ conftest$ac_exeext
++ if ${ac_cv_search_curs_set+:} false; then :
++ break
++fi
++done
++if ${ac_cv_search_curs_set+:} false; then :
++
++else
++ ac_cv_search_curs_set=no
++fi
++rm conftest.$ac_ext
++LIBS=$ac_func_search_save_LIBS
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_curs_set" >&5
++$as_echo "$ac_cv_search_curs_set" >&6; }
++ac_res=$ac_cv_search_curs_set
++if test "$ac_res" != no; then :
++ test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
++ CURSES_LIBS="$CURSES_LIBS $ac_res"
++fi
++
+
+ else
+ ncurses="n"
+@@ -7150,7 +7206,7 @@
+ # Prefer ncurses over curses if both are present
+ if test "$ncurses" = "y"; then :
+
+- CURSES_LIBS="-lncurses"
++ CURSES_LIBS="$CURSES_LIBS -lncurses"
+
+ $as_echo "#define INCLUDE_CURSES_H <ncurses.h>" >>confdefs.h
+