summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/recipes-devtools/python/python-native_2.7.3.bb1
-rw-r--r--meta/recipes-devtools/python/python/python-fix-build-error-with-Readline-6.3.patch62
-rw-r--r--meta/recipes-devtools/python/python3-native_3.3.3.bb1
-rw-r--r--meta/recipes-devtools/python/python3/python3-fix-build-error-with-Readline-6.3.patch62
-rw-r--r--meta/recipes-devtools/python/python3_3.3.3.bb1
-rw-r--r--meta/recipes-devtools/python/python_2.7.3.bb1
6 files changed, 128 insertions, 0 deletions
diff --git a/meta/recipes-devtools/python/python-native_2.7.3.bb b/meta/recipes-devtools/python/python-native_2.7.3.bb
index 6b87a16d41..0c66d27c2d 100644
--- a/meta/recipes-devtools/python/python-native_2.7.3.bb
+++ b/meta/recipes-devtools/python/python-native_2.7.3.bb
@@ -17,6 +17,7 @@ SRC_URI += "\
17 file://add-md5module-support.patch \ 17 file://add-md5module-support.patch \
18 file://builddir.patch \ 18 file://builddir.patch \
19 file://parallel-makeinst-create-bindir.patch \ 19 file://parallel-makeinst-create-bindir.patch \
20 file://python-fix-build-error-with-Readline-6.3.patch \
20 " 21 "
21S = "${WORKDIR}/Python-${PV}" 22S = "${WORKDIR}/Python-${PV}"
22 23
diff --git a/meta/recipes-devtools/python/python/python-fix-build-error-with-Readline-6.3.patch b/meta/recipes-devtools/python/python/python-fix-build-error-with-Readline-6.3.patch
new file mode 100644
index 0000000000..b84f8c3461
--- /dev/null
+++ b/meta/recipes-devtools/python/python/python-fix-build-error-with-Readline-6.3.patch
@@ -0,0 +1,62 @@
1python: fix build error with Readline 6.3
2
3Backport two patches from upstream:
4
5use new readline function types (closes #20374)
6Issue #20374: Avoid compiler warnings when compiling readline with libedit.
7
8Upstream-Status: Backport
9
10Signed-off-by: Chong Lu <Chong.Lu@windriver.com>
11---
12 Modules/readline.c | 15 ++++++++++++---
13 1 file changed, 12 insertions(+), 3 deletions(-)
14
15diff --git a/Modules/readline.c b/Modules/readline.c
16index b5e258d..d3f52aa 100644
17--- a/Modules/readline.c
18+++ b/Modules/readline.c
19@@ -735,15 +735,24 @@ on_hook(PyObject *func)
20 return result;
21 }
22
23+
24 static int
25+#if defined(_RL_FUNCTION_TYPEDEF)
26 on_startup_hook(void)
27+#else
28+on_startup_hook()
29+#endif
30 {
31 return on_hook(startup_hook);
32 }
33
34 #ifdef HAVE_RL_PRE_INPUT_HOOK
35 static int
36+#if defined(_RL_FUNCTION_TYPEDEF)
37 on_pre_input_hook(void)
38+#else
39+on_pre_input_hook()
40+#endif
41 {
42 return on_hook(pre_input_hook);
43 }
44@@ -886,12 +895,12 @@ setup_readline(void)
45 rl_bind_key_in_map ('\t', rl_complete, emacs_meta_keymap);
46 rl_bind_key_in_map ('\033', rl_complete, emacs_meta_keymap);
47 /* Set our hook functions */
48- rl_startup_hook = (Function *)on_startup_hook;
49+ rl_startup_hook = (rl_hook_func_t *)on_startup_hook;
50 #ifdef HAVE_RL_PRE_INPUT_HOOK
51- rl_pre_input_hook = (Function *)on_pre_input_hook;
52+ rl_pre_input_hook = (rl_hook_func_t *)on_pre_input_hook;
53 #endif
54 /* Set our completion function */
55- rl_attempted_completion_function = (CPPFunction *)flex_complete;
56+ rl_attempted_completion_function = (rl_completion_func_t *)flex_complete;
57 /* Set Python word break characters */
58 rl_completer_word_break_characters =
59 strdup(" \t\n`~!@#$%^&*()-=+[{]}\\|;:'\",<>/?");
60--
611.7.9.5
62
diff --git a/meta/recipes-devtools/python/python3-native_3.3.3.bb b/meta/recipes-devtools/python/python3-native_3.3.3.bb
index df8f28b3d9..7238eaf27d 100644
--- a/meta/recipes-devtools/python/python3-native_3.3.3.bb
+++ b/meta/recipes-devtools/python/python3-native_3.3.3.bb
@@ -25,6 +25,7 @@ file://unixccompiler.patch \
25file://fix-ast.h-dependency.patch \ 25file://fix-ast.h-dependency.patch \
26file://makerace.patch \ 26file://makerace.patch \
27${DISTRO_SRC_URI} \ 27${DISTRO_SRC_URI} \
28file://python3-fix-build-error-with-Readline-6.3.patch \
28" 29"
29SRC_URI[md5sum] = "f3ebe34d4d8695bf889279b54673e10c" 30SRC_URI[md5sum] = "f3ebe34d4d8695bf889279b54673e10c"
30SRC_URI[sha256sum] = "e526e9b612f623888364d30cc9f3dfc34dcef39065c713bdbcddf47df84d8dcb" 31SRC_URI[sha256sum] = "e526e9b612f623888364d30cc9f3dfc34dcef39065c713bdbcddf47df84d8dcb"
diff --git a/meta/recipes-devtools/python/python3/python3-fix-build-error-with-Readline-6.3.patch b/meta/recipes-devtools/python/python3/python3-fix-build-error-with-Readline-6.3.patch
new file mode 100644
index 0000000000..44e2b7e5f1
--- /dev/null
+++ b/meta/recipes-devtools/python/python3/python3-fix-build-error-with-Readline-6.3.patch
@@ -0,0 +1,62 @@
1python3: fix build error with Readline 6.3
2
3Backport two patches from upstream:
4
5use new readline function types (closes #20374)
6Issue #20374: Avoid compiler warnings when compiling readline with libedit.
7
8Upstream-Status: Backport
9
10Signed-off-by: Chong Lu <Chong.Lu@windriver.com>
11---
12 Modules/readline.c | 15 ++++++++++++---
13 1 file changed, 12 insertions(+), 3 deletions(-)
14
15diff --git a/Modules/readline.c b/Modules/readline.c
16index 096c6d1..1646ef8 100644
17--- a/Modules/readline.c
18+++ b/Modules/readline.c
19@@ -773,15 +773,24 @@ on_hook(PyObject *func)
20 return result;
21 }
22
23+
24 static int
25+#if defined(_RL_FUNCTION_TYPEDEF)
26 on_startup_hook(void)
27+#else
28+on_startup_hook()
29+#endif
30 {
31 return on_hook(startup_hook);
32 }
33
34 #ifdef HAVE_RL_PRE_INPUT_HOOK
35 static int
36+#if defined(_RL_FUNCTION_TYPEDEF)
37 on_pre_input_hook(void)
38+#else
39+on_pre_input_hook()
40+#endif
41 {
42 return on_hook(pre_input_hook);
43 }
44@@ -936,12 +945,12 @@ setup_readline(void)
45 rl_bind_key_in_map ('\t', rl_complete, emacs_meta_keymap);
46 rl_bind_key_in_map ('\033', rl_complete, emacs_meta_keymap);
47 /* Set our hook functions */
48- rl_startup_hook = (Function *)on_startup_hook;
49+ rl_startup_hook = (rl_hook_func_t *)on_startup_hook;
50 #ifdef HAVE_RL_PRE_INPUT_HOOK
51- rl_pre_input_hook = (Function *)on_pre_input_hook;
52+ rl_pre_input_hook = (rl_hook_func_t *)on_pre_input_hook;
53 #endif
54 /* Set our completion function */
55- rl_attempted_completion_function = (CPPFunction *)flex_complete;
56+ rl_attempted_completion_function = (rl_completion_func_t *)flex_complete;
57 /* Set Python word break characters */
58 completer_word_break_characters =
59 rl_completer_word_break_characters =
60--
611.7.9.5
62
diff --git a/meta/recipes-devtools/python/python3_3.3.3.bb b/meta/recipes-devtools/python/python3_3.3.3.bb
index b6f6def8f1..c357bbb07e 100644
--- a/meta/recipes-devtools/python/python3_3.3.3.bb
+++ b/meta/recipes-devtools/python/python3_3.3.3.bb
@@ -20,6 +20,7 @@ file://0001-h2py-Fix-issue-13032-where-it-fails-with-UnicodeDeco.patch \
20file://fix-ast.h-dependency.patch \ 20file://fix-ast.h-dependency.patch \
21file://makerace.patch \ 21file://makerace.patch \
22${DISTRO_SRC_URI} \ 22${DISTRO_SRC_URI} \
23file://python3-fix-build-error-with-Readline-6.3.patch \
23" 24"
24 25
25SRC_URI += "\ 26SRC_URI += "\
diff --git a/meta/recipes-devtools/python/python_2.7.3.bb b/meta/recipes-devtools/python/python_2.7.3.bb
index aaa72e5e10..c7bb9b4131 100644
--- a/meta/recipes-devtools/python/python_2.7.3.bb
+++ b/meta/recipes-devtools/python/python_2.7.3.bb
@@ -34,6 +34,7 @@ SRC_URI += "\
34 file://pypirc-secure.patch \ 34 file://pypirc-secure.patch \
35 file://parallel-makeinst-create-bindir.patch \ 35 file://parallel-makeinst-create-bindir.patch \
36 file://python-2.7.3-CVE-2013-1752-smtplib-fix.patch \ 36 file://python-2.7.3-CVE-2013-1752-smtplib-fix.patch \
37 file://python-fix-build-error-with-Readline-6.3.patch \
37" 38"
38 39
39S = "${WORKDIR}/Python-${PV}" 40S = "${WORKDIR}/Python-${PV}"