summaryrefslogtreecommitdiffstats
path: root/packaging/macosx/ports/lang/python25/files/patch-libedit.diff
blob: 99da7a9c464f283694de7b446b0032038bd71dd4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
--- configure.orig	2011-10-31 13:23:35.000000000 +1100
+++ configure	2011-10-31 13:28:19.000000000 +1100
@@ -20985,9 +20985,9 @@
 echo $ECHO_N "checking how to link readline libs... $ECHO_C" >&6; }
 for py_libtermcap in "" 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 >conftest.$ac_ext <<_ACEOF
@@ -21060,13 +21060,13 @@
 fi
 
 # check for readline 2.1
-{ echo "$as_me:$LINENO: checking for rl_callback_handler_install in -lreadline" >&5
-echo $ECHO_N "checking for rl_callback_handler_install in -lreadline... $ECHO_C" >&6; }
+{ echo "$as_me:$LINENO: checking for rl_callback_handler_install in -ledit" >&5
+echo $ECHO_N "checking for rl_callback_handler_install in -ledit... $ECHO_C" >&6; }
 if test "${ac_cv_lib_readline_rl_callback_handler_install+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   ac_check_lib_save_LIBS=$LIBS
-LIBS="-lreadline $READLINE_LIBS $LIBS"
+LIBS="-ledit $READLINE_LIBS $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
@@ -21137,7 +21137,7 @@
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-#include <readline/readline.h>
+#include <editline/readline.h>
 _ACEOF
 if { (ac_try="$ac_cpp conftest.$ac_ext"
 case "(($ac_try" in
@@ -21172,7 +21172,7 @@
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-#include <readline/readline.h>
+#include <editline/readline.h>
 
 _ACEOF
 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
@@ -21188,13 +21188,13 @@
 fi
 
 # check for readline 4.0
-{ echo "$as_me:$LINENO: checking for rl_pre_input_hook in -lreadline" >&5
-echo $ECHO_N "checking for rl_pre_input_hook in -lreadline... $ECHO_C" >&6; }
+{ echo "$as_me:$LINENO: checking for rl_pre_input_hook in -ledit" >&5
+echo $ECHO_N "checking for rl_pre_input_hook in -ledit... $ECHO_C" >&6; }
 if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   ac_check_lib_save_LIBS=$LIBS
-LIBS="-lreadline $READLINE_LIBS $LIBS"
+LIBS="-ledit $READLINE_LIBS $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
@@ -21259,13 +21259,13 @@
 
 
 # check for readline 4.2
-{ echo "$as_me:$LINENO: checking for rl_completion_matches in -lreadline" >&5
-echo $ECHO_N "checking for rl_completion_matches in -lreadline... $ECHO_C" >&6; }
+{ echo "$as_me:$LINENO: checking for rl_completion_matches in -ledit" >&5
+echo $ECHO_N "checking for rl_completion_matches in -ledit... $ECHO_C" >&6; }
 if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   ac_check_lib_save_LIBS=$LIBS
-LIBS="-lreadline $READLINE_LIBS $LIBS"
+LIBS="-ledit $READLINE_LIBS $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
@@ -21336,7 +21336,7 @@
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-#include <readline/readline.h>
+#include <editline/readline.h>
 _ACEOF
 if { (ac_try="$ac_cpp conftest.$ac_ext"
 case "(($ac_try" in
@@ -21371,7 +21371,7 @@
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-#include <readline/readline.h>
+#include <editline/readline.h>
 
 _ACEOF
 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
--- setup.py.orig	2011-10-31 13:23:35.000000000 +1100
+++ setup.py	2011-10-31 13:32:40.000000000 +1100
@@ -488,7 +488,7 @@
             else:
                 readline_extra_link_args = ()
 
-            readline_libs = ['readline']
+            readline_libs = ['edit']
             if self.compiler.find_library_file(lib_dirs,
                                                  'ncursesw'):
                 readline_libs.append('ncursesw')
--- Modules/readline.c.orig	2007-01-23 03:10:27.000000000 +1100
+++ Modules/readline.c	2011-10-31 14:00:36.000000000 +1100
@@ -28,8 +28,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) \
@@ -794,7 +793,6 @@ readline_until_enter_or_signal(char *pro
 			PyEval_SaveThread();	
 #endif
 			if (s < 0) {
-				rl_free_line_state();
 				rl_cleanup_after_signal();
 				rl_callback_handler_remove();
 				*signal = 1;