python: apply patch to build with readline 6.3

This commit is contained in:
Juergen Daubert 2014-03-04 12:39:58 +01:00
parent 550784062c
commit 8dade0a226
3 changed files with 33 additions and 2 deletions

View File

@ -1,2 +1,3 @@
bcf93efa8eaf383c98ed3ce40b763497 Python-2.7.6.tar.xz
387d5f6d00d2be01ecb87216cac0f88c pyconfig.h
e843269080db424430719b3040073531 python-2.7.6-readline-6.3.patch

View File

@ -5,13 +5,16 @@
name=python
version=2.7.6
release=1
release=2
source=(http://www.python.org/ftp/$name/$version/Python-$version.tar.xz \
pyconfig.h)
pyconfig.h $name-$version-readline-6.3.patch)
build () {
cd Python-$version
# http://bugs.python.org/issue20374
patch -p1 -i $SRC/$name-$version-readline-6.3.patch
# set OPT to the python default without -O3
# our CFLAGS are used as well
OPT="-Wall -Wstrict-prototypes -fwrapv" \

View File

@ -0,0 +1,27 @@
# HG changeset patch
# User Benjamin Peterson <benjamin@python.org>
# Date 1390541532 18000
# Node ID 79b82ebc4fd17fda401c32840da1da0577e3c73e
# Parent f28b60141c5c417111670a22b223f0c411136c7b
use new readline function types (closes #20374)
diff --git a/Modules/readline.c b/Modules/readline.c
--- a/Modules/readline.c
+++ b/Modules/readline.c
@@ -911,12 +911,12 @@ setup_readline(void)
rl_bind_key_in_map ('\t', rl_complete, emacs_meta_keymap);
rl_bind_key_in_map ('\033', rl_complete, emacs_meta_keymap);
/* Set our hook functions */
- rl_startup_hook = (Function *)on_startup_hook;
+ rl_startup_hook = (rl_hook_func_t *)on_startup_hook;
#ifdef HAVE_RL_PRE_INPUT_HOOK
- rl_pre_input_hook = (Function *)on_pre_input_hook;
+ rl_pre_input_hook = (rl_hook_func_t *)on_pre_input_hook;
#endif
/* Set our completion function */
- rl_attempted_completion_function = (CPPFunction *)flex_complete;
+ rl_attempted_completion_function = (rl_completion_func_t *)flex_complete;
/* Set Python word break characters */
completer_word_break_characters =
rl_completer_word_break_characters =