From 8dade0a2268cf1f8a53f4f49427889aeedc006ba Mon Sep 17 00:00:00 2001 From: Juergen Daubert Date: Tue, 4 Mar 2014 12:39:58 +0100 Subject: [PATCH] python: apply patch to build with readline 6.3 --- python/.md5sum | 1 + python/Pkgfile | 7 +++++-- python/python-2.7.6-readline-6.3.patch | 27 ++++++++++++++++++++++++++ 3 files changed, 33 insertions(+), 2 deletions(-) create mode 100644 python/python-2.7.6-readline-6.3.patch diff --git a/python/.md5sum b/python/.md5sum index 9b492fa49..e083eca56 100644 --- a/python/.md5sum +++ b/python/.md5sum @@ -1,2 +1,3 @@ bcf93efa8eaf383c98ed3ce40b763497 Python-2.7.6.tar.xz 387d5f6d00d2be01ecb87216cac0f88c pyconfig.h +e843269080db424430719b3040073531 python-2.7.6-readline-6.3.patch diff --git a/python/Pkgfile b/python/Pkgfile index 7554d27e6..e6bfc3486 100644 --- a/python/Pkgfile +++ b/python/Pkgfile @@ -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" \ diff --git a/python/python-2.7.6-readline-6.3.patch b/python/python-2.7.6-readline-6.3.patch new file mode 100644 index 000000000..9eb3abfbc --- /dev/null +++ b/python/python-2.7.6-readline-6.3.patch @@ -0,0 +1,27 @@ +# HG changeset patch +# User Benjamin Peterson +# 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 = +