python: Fix configure tests when using --enable-ipv6
authorKhem Raj <raj.khem@gmail.com>
Sat, 15 Jan 2011 23:31:00 +0000 (15:31 -0800)
committerKhem Raj <raj.khem@gmail.com>
Sat, 15 Jan 2011 23:31:00 +0000 (15:31 -0800)
* Add cross compile awareness to configure test in 2.6
* Cache ac_cv_buggy_getaddrinfo for all which is used by python 2.7
  onwards

Signed-off-by: Khem Raj <raj.khem@gmail.com>
recipes/python/python-2.6.5/ipv6-cross.patch [new file with mode: 0644]
recipes/python/python_2.6.5.bb
site/common

diff --git a/recipes/python/python-2.6.5/ipv6-cross.patch b/recipes/python/python-2.6.5/ipv6-cross.patch
new file mode 100644 (file)
index 0000000..3d2ac5e
--- /dev/null
@@ -0,0 +1,13 @@
+Index: Python-2.6.5/configure.in
+===================================================================
+--- Python-2.6.5.orig/configure.in     2011-01-15 14:42:42.068656002 -0800
++++ Python-2.6.5/configure.in  2011-01-15 15:18:39.668656002 -0800
+@@ -2951,7 +2951,7 @@
+ buggygetaddrinfo=yes
+ ])
+-if test "$buggygetaddrinfo" = "yes"; then
++if test "$buggygetaddrinfo" = "yes" -a x"$cross_compiling" != "xyes"; then
+       if test "$ipv6" = "yes"; then
+               echo 'Fatal: You must get working getaddrinfo() function.'
+               echo '       or you can specify "--disable-ipv6"'.
index f5808f1..d7d42a7 100644 (file)
@@ -3,7 +3,7 @@ DEPENDS = "python-native db gdbm openssl readline sqlite3 tcl zlib\
            ${@base_contains('DISTRO_FEATURES', 'tk', 'tk', '', d)}"
 DEPENDS_sharprom = "python-native db readline zlib gdbm openssl"
 # set to .0 on every increase of INC_PR
-PR = "${INC_PR}.2"
+PR = "${INC_PR}.3"
 
 SRC_URI = "\
   http://www.python.org/ftp/python/${PV}/Python-${PV}.tar.bz2 \
@@ -16,6 +16,7 @@ SRC_URI = "\
   file://05-enable-ctypes-cross-build.patch \
   file://06-ctypes-libffi-fix-configure.patch \
   file://99-ignore-optimization-flag.patch \
+  file://ipv6-cross.patch \
   file://sitecustomize.py \
 "
 SRC_URI[md5sum] = "6bef0417e71a1a1737ccf5750420fdb3"
index 2cde413..71ea7ac 100644 (file)
@@ -8,3 +8,7 @@ ac_cv_file__dev_random=${ac_cv_file__dev_random=yes}
 rd_cv_ieee_works=${rd_cv_ieee_works=yes}
 
 ac_cv_sys_symbol_underscore=no
+
+# its a runtime check which fails for cross-compiling
+# python 2.7.1 uses this variable
+ac_cv_buggy_getaddrinfo=no