diff options
author | Andreas Oberritter <obi@opendreambox.org> | 2012-03-12 22:24:08 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-03-13 11:45:13 +0000 |
commit | c8f2f585fc653db728e44812246d16ed8ae993d2 (patch) | |
tree | 78d20ea847de5c4f17220be154b281f4c03d1c96 /meta/recipes-devtools/python | |
parent | 8f3aefa16201798ff1b78e24383f79916a389946 (diff) | |
download | poky-c8f2f585fc653db728e44812246d16ed8ae993d2.tar.gz |
python, python-native: always set platform to linux2
* Fixes many problems with linux2 vs. linux3. At least:
- Detected version was from build-host instead of target-host.
- linuxaudiodev and ossaudiodev were disabled for linux3.
- Files were missing in /usr/lib/python2.7/plat-linux3.
* Imported from upstream HG rev c816479f6aaf
* Bugtracker URL: http://bugs.python.org/issue12326
(From OE-Core rev: accb2b728ab10cae20be59253a56ac6410b8de10)
Signed-off-by: Andreas Oberritter <obi@opendreambox.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/python')
5 files changed, 80 insertions, 19 deletions
diff --git a/meta/recipes-devtools/python/python-native/sys_platform_is_now_always_linux2.patch b/meta/recipes-devtools/python/python-native/sys_platform_is_now_always_linux2.patch new file mode 100644 index 0000000000..ed529366c5 --- /dev/null +++ b/meta/recipes-devtools/python/python-native/sys_platform_is_now_always_linux2.patch | |||
@@ -0,0 +1,39 @@ | |||
1 | Upstream-Status: Accepted [http://hg.python.org/cpython/rev/c816479f6aaf/] | ||
2 | Bugtracker: http://bugs.python.org/issue12326 | ||
3 | |||
4 | [Removed "Misc/NEWS" hunk] | ||
5 | |||
6 | Signed-off-by: Andreas Oberritter <obi@opendreambox.org> | ||
7 | |||
8 | # HG changeset patch | ||
9 | # User Victor Stinner <victor.stinner@haypocalc.com> | ||
10 | # Date 1313841758 -7200 | ||
11 | # Node ID c816479f6aaf71dbd3f3fe4b239186d60c55ce48 | ||
12 | # Parent 3e093590ac57fdda428c7da3f72ddf0c475ecf2b | ||
13 | Issue #12326: sys.platform is now always 'linux2' on Linux | ||
14 | |||
15 | Even if Python is compiled on Linux 3. | ||
16 | |||
17 | diff --git a/configure b/configure | ||
18 | --- a/configure | ||
19 | +++ b/configure | ||
20 | @@ -2995,6 +2995,7 @@ then | ||
21 | MACHDEP="$ac_md_system$ac_md_release" | ||
22 | |||
23 | case $MACHDEP in | ||
24 | + linux*) MACHDEP="linux2";; | ||
25 | cygwin*) MACHDEP="cygwin";; | ||
26 | darwin*) MACHDEP="darwin";; | ||
27 | atheos*) MACHDEP="atheos";; | ||
28 | diff --git a/configure.in b/configure.in | ||
29 | --- a/configure.in | ||
30 | +++ b/configure.in | ||
31 | @@ -293,6 +293,7 @@ then | ||
32 | MACHDEP="$ac_md_system$ac_md_release" | ||
33 | |||
34 | case $MACHDEP in | ||
35 | + linux*) MACHDEP="linux2";; | ||
36 | cygwin*) MACHDEP="cygwin";; | ||
37 | darwin*) MACHDEP="darwin";; | ||
38 | atheos*) MACHDEP="atheos";; | ||
39 | |||
diff --git a/meta/recipes-devtools/python/python-native_2.7.2.bb b/meta/recipes-devtools/python/python-native_2.7.2.bb index 8bf0af0b8d..b00e2fcc3e 100644 --- a/meta/recipes-devtools/python/python-native_2.7.2.bb +++ b/meta/recipes-devtools/python/python-native_2.7.2.bb | |||
@@ -13,6 +13,7 @@ SRC_URI += "file://04-default-is-optimized.patch \ | |||
13 | file://nohostlibs.patch \ | 13 | file://nohostlibs.patch \ |
14 | file://multilib.patch \ | 14 | file://multilib.patch \ |
15 | file://add-md5module-support.patch \ | 15 | file://add-md5module-support.patch \ |
16 | file://sys_platform_is_now_always_linux2.patch \ | ||
16 | " | 17 | " |
17 | S = "${WORKDIR}/Python-${PV}" | 18 | S = "${WORKDIR}/Python-${PV}" |
18 | 19 | ||
diff --git a/meta/recipes-devtools/python/python/07-linux3-regen-fix.patch b/meta/recipes-devtools/python/python/07-linux3-regen-fix.patch deleted file mode 100644 index d7fb313cc7..0000000000 --- a/meta/recipes-devtools/python/python/07-linux3-regen-fix.patch +++ /dev/null | |||
@@ -1,18 +0,0 @@ | |||
1 | Upstream-Status: Inappropriate [embedded specific] | ||
2 | |||
3 | Without this patch it calls cross-compiled python if host is running linux-3.0 | ||
4 | python$EXE ../../Tools/scripts/h2py.py -i '(u_long)' /usr/include/netinet/in.h | ||
5 | | ./regen: line 3: /OE/shr-core/tmp/work/armv4t-oe-linux-gnueabi/python-2.6.6-nk2.8/Python-2.6.6/python: cannot execute binary file | ||
6 | |||
7 | diff -uNr Python-2.6.6.orig//Lib/plat-linux3/regen Python-2.6.6/Lib/plat-linux3/regen | ||
8 | --- Python-2.6.6.orig//Lib/plat-linux3/regen 1970-01-01 01:00:00.000000000 +0100 | ||
9 | +++ Python-2.6.6/Lib/plat-linux3/regen 2001-08-09 14:48:17.000000000 +0200 | ||
10 | @@ -0,0 +1,8 @@ | ||
11 | +#! /bin/sh | ||
12 | +case `uname` in | ||
13 | +Linux*) ;; | ||
14 | +*) echo Probably not on a Linux system 1>&2 | ||
15 | + exit 1;; | ||
16 | +esac | ||
17 | +set -v | ||
18 | +h2py -i '(u_long)' /usr/include/sys/types.h /usr/include/netinet/in.h /usr/include/dlfcn.h | ||
diff --git a/meta/recipes-devtools/python/python/sys_platform_is_now_always_linux2.patch b/meta/recipes-devtools/python/python/sys_platform_is_now_always_linux2.patch new file mode 100644 index 0000000000..ed529366c5 --- /dev/null +++ b/meta/recipes-devtools/python/python/sys_platform_is_now_always_linux2.patch | |||
@@ -0,0 +1,39 @@ | |||
1 | Upstream-Status: Accepted [http://hg.python.org/cpython/rev/c816479f6aaf/] | ||
2 | Bugtracker: http://bugs.python.org/issue12326 | ||
3 | |||
4 | [Removed "Misc/NEWS" hunk] | ||
5 | |||
6 | Signed-off-by: Andreas Oberritter <obi@opendreambox.org> | ||
7 | |||
8 | # HG changeset patch | ||
9 | # User Victor Stinner <victor.stinner@haypocalc.com> | ||
10 | # Date 1313841758 -7200 | ||
11 | # Node ID c816479f6aaf71dbd3f3fe4b239186d60c55ce48 | ||
12 | # Parent 3e093590ac57fdda428c7da3f72ddf0c475ecf2b | ||
13 | Issue #12326: sys.platform is now always 'linux2' on Linux | ||
14 | |||
15 | Even if Python is compiled on Linux 3. | ||
16 | |||
17 | diff --git a/configure b/configure | ||
18 | --- a/configure | ||
19 | +++ b/configure | ||
20 | @@ -2995,6 +2995,7 @@ then | ||
21 | MACHDEP="$ac_md_system$ac_md_release" | ||
22 | |||
23 | case $MACHDEP in | ||
24 | + linux*) MACHDEP="linux2";; | ||
25 | cygwin*) MACHDEP="cygwin";; | ||
26 | darwin*) MACHDEP="darwin";; | ||
27 | atheos*) MACHDEP="atheos";; | ||
28 | diff --git a/configure.in b/configure.in | ||
29 | --- a/configure.in | ||
30 | +++ b/configure.in | ||
31 | @@ -293,6 +293,7 @@ then | ||
32 | MACHDEP="$ac_md_system$ac_md_release" | ||
33 | |||
34 | case $MACHDEP in | ||
35 | + linux*) MACHDEP="linux2";; | ||
36 | cygwin*) MACHDEP="cygwin";; | ||
37 | darwin*) MACHDEP="darwin";; | ||
38 | atheos*) MACHDEP="atheos";; | ||
39 | |||
diff --git a/meta/recipes-devtools/python/python_2.7.2.bb b/meta/recipes-devtools/python/python_2.7.2.bb index eb3965e21a..5ad410904f 100644 --- a/meta/recipes-devtools/python/python_2.7.2.bb +++ b/meta/recipes-devtools/python/python_2.7.2.bb | |||
@@ -12,7 +12,6 @@ SRC_URI += "\ | |||
12 | file://05-enable-ctypes-cross-build.patch \ | 12 | file://05-enable-ctypes-cross-build.patch \ |
13 | file://06-ctypes-libffi-fix-configure.patch \ | 13 | file://06-ctypes-libffi-fix-configure.patch \ |
14 | file://06-avoid_usr_lib_termcap_path_in_linking.patch \ | 14 | file://06-avoid_usr_lib_termcap_path_in_linking.patch \ |
15 | file://07-linux3-regen-fix.patch \ | ||
16 | file://99-ignore-optimization-flag.patch \ | 15 | file://99-ignore-optimization-flag.patch \ |
17 | ${DISTRO_SRC_URI} \ | 16 | ${DISTRO_SRC_URI} \ |
18 | file://multilib.patch \ | 17 | file://multilib.patch \ |
@@ -21,6 +20,7 @@ SRC_URI += "\ | |||
21 | file://setup_py_skip_cross_import_check.patch \ | 20 | file://setup_py_skip_cross_import_check.patch \ |
22 | file://add-md5module-support.patch \ | 21 | file://add-md5module-support.patch \ |
23 | file://host_include_contamination.patch \ | 22 | file://host_include_contamination.patch \ |
23 | file://sys_platform_is_now_always_linux2.patch \ | ||
24 | " | 24 | " |
25 | 25 | ||
26 | S = "${WORKDIR}/Python-${PV}" | 26 | S = "${WORKDIR}/Python-${PV}" |