Files
macports-ports/lang/python37/files/patch-libedit.diff
2018-06-28 15:17:11 +10:00

177 lines
6.1 KiB
Diff

--- configure.orig 2018-03-29 22:57:55.000000000 +1100
+++ configure 2018-04-27 06:16:26.000000000 +1000
@@ -14944,9 +14944,9 @@
$as_echo_n "checking how to link readline libs... " >&6; }
for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do
if test -z "$py_libtermcap"; then
- READLINE_LIBS="-lreadline"
+ READLINE_LIBS="-ledit"
else
- READLINE_LIBS="-lreadline -l$py_libtermcap"
+ READLINE_LIBS="-ledit -l$py_libtermcap"
fi
LIBS="$READLINE_LIBS $LIBS_no_readline"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -14992,7 +14992,7 @@
# check for readline 2.2
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-#include <readline/readline.h>
+#include <editline/readline.h>
_ACEOF
if ac_fn_c_try_cpp "$LINENO"; then :
have_readline=yes
@@ -15005,7 +15005,7 @@
then
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-#include <readline/readline.h>
+#include <editline/readline.h>
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
@@ -15018,7 +15018,7 @@
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-#include <readline/readline.h>
+#include <editline/readline.h>
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
@@ -15032,13 +15032,13 @@
fi
# check for readline 4.0
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
-$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -ledit" >&5
+$as_echo_n "checking for rl_pre_input_hook in -ledit... " >&6; }
if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
-LIBS="-lreadline $READLINE_LIBS $LIBS"
+LIBS="-ledit $READLINE_LIBS $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -15076,13 +15076,13 @@
# also in 4.0
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
-$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -ledit" >&5
+$as_echo_n "checking for rl_completion_display_matches_hook in -ledit... " >&6; }
if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
-LIBS="-lreadline $READLINE_LIBS $LIBS"
+LIBS="-ledit $READLINE_LIBS $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -15120,13 +15120,13 @@
# also in 4.0, but not in editline
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_resize_terminal in -lreadline" >&5
-$as_echo_n "checking for rl_resize_terminal in -lreadline... " >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_resize_terminal in -ledit" >&5
+$as_echo_n "checking for rl_resize_terminal in -ledit... " >&6; }
if ${ac_cv_lib_readline_rl_resize_terminal+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
-LIBS="-lreadline $READLINE_LIBS $LIBS"
+LIBS="-ledit $READLINE_LIBS $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -15164,13 +15164,13 @@
# check for readline 4.2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
-$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -ledit" >&5
+$as_echo_n "checking for rl_completion_matches in -ledit... " >&6; }
if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
-LIBS="-lreadline $READLINE_LIBS $LIBS"
+LIBS="-ledit $READLINE_LIBS $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -15210,7 +15210,7 @@
# also in readline 4.2
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-#include <readline/readline.h>
+#include <editline/readline.h>
_ACEOF
if ac_fn_c_try_cpp "$LINENO"; then :
have_readline=yes
@@ -15223,7 +15223,7 @@
then
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-#include <readline/readline.h>
+#include <editline/readline.h>
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
@@ -15236,13 +15236,13 @@
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for append_history in -lreadline" >&5
-$as_echo_n "checking for append_history in -lreadline... " >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for append_history in -ledit" >&5
+$as_echo_n "checking for append_history in -ledit... " >&6; }
if ${ac_cv_lib_readline_append_history+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
-LIBS="-lreadline $READLINE_LIBS $LIBS"
+LIBS="-ledit $READLINE_LIBS $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
--- setup.py.orig 2018-03-29 22:57:55.000000000 +1100
+++ setup.py 2018-04-27 06:10:46.000000000 +1000
@@ -779,7 +779,7 @@
libraries=['m']) )
# readline
- do_readline = self.compiler.find_library_file(lib_dirs, 'readline')
+ do_readline = self.compiler.find_library_file(lib_dirs, 'edit')
readline_termcap_library = ""
curses_library = ""
# Cannot use os.popen here in py3k.
@@ -845,7 +845,7 @@
else:
readline_extra_link_args = ()
- readline_libs = ['readline']
+ readline_libs = ['edit']
if readline_termcap_library:
pass # Issue 7384: Already linked against curses or tinfo.
elif curses_library:
--- Modules/readline.c.orig 2013-10-23 21:51:09.000000000 +0300
+++ Modules/readline.c 2013-10-23 22:10:09.000000000 +0300
@@ -29,8 +29,7 @@
/* GNU readline definitions */
#undef HAVE_CONFIG_H /* Else readline/chardefs.h includes strings.h */
-#include <readline/readline.h>
-#include <readline/history.h>
+#include <editline/readline.h>
#ifdef HAVE_RL_COMPLETION_MATCHES
#define completion_matches(x, y) \