fixes ipv6 for python (tested with ipv4/ipv6 + http/https). Closes #218

This commit is contained in:
Mathieu Virbel 2017-05-14 20:39:16 +02:00
parent 91ecf0fe4a
commit 819fa05712
2 changed files with 65 additions and 0 deletions

View file

@ -31,6 +31,7 @@ class PythonRecipe(Recipe):
self.apply_patch("xcompile.patch")
self.apply_patch("setuppath.patch")
self.append_file("ModulesSetup.mobile", "Modules/Setup.local")
self.apply_patch("ipv6.patch")
if "openssl.build_all" in self.ctx.state:
self.append_file("ModulesSetup.openssl", "Modules/Setup.local")
@ -50,6 +51,7 @@ class PythonRecipe(Recipe):
"--prefix=/python",
"--with-system-ffi",
"--without-doc-strings",
"--enable-ipv6",
_env=build_env)
self._patch_pyconfig()

63
recipes/python/ipv6.patch Normal file
View file

@ -0,0 +1,63 @@
--- Python-2.7.1.orig/configure.in 2017-05-14 19:54:10.000000000 +0200
+++ Python-2.7.1/configure.in 2017-05-14 19:56:01.000000000 +0200
@@ -3111,17 +3111,17 @@
AC_MSG_RESULT($ac_cv_buggy_getaddrinfo)
-if test $have_getaddrinfo = no -o "$ac_cv_buggy_getaddrinfo" = yes
-then
- if test $ipv6 = yes
- then
- echo 'Fatal: You must get working getaddrinfo() function.'
- echo ' or you can specify "--disable-ipv6"'.
- exit 1
- fi
-else
- AC_DEFINE(HAVE_GETADDRINFO, 1, [Define if you have the getaddrinfo function.])
-fi
+# if test $have_getaddrinfo = no -o "$ac_cv_buggy_getaddrinfo" = yes
+# then
+# if test $ipv6 = yes
+# then
+# echo 'Fatal: You must get working getaddrinfo() function.'
+# echo ' or you can specify "--disable-ipv6"'.
+# exit 1
+# fi
+# else
+# AC_DEFINE(HAVE_GETADDRINFO, 1, [Define if you have the getaddrinfo function.])
+# fi
AC_CHECK_FUNCS(getnameinfo)
--- Python-2.7.1.orig/configure 2017-05-14 20:22:04.000000000 +0200
+++ Python-2.7.1/configure 2017-05-14 20:22:03.000000000 +0200
@@ -10802,19 +10802,19 @@
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
-if test $have_getaddrinfo = no -o "$ac_cv_buggy_getaddrinfo" = yes
-then
- if test $ipv6 = yes
- then
- echo 'Fatal: You must get working getaddrinfo() function.'
- echo ' or you can specify "--disable-ipv6"'.
- exit 1
- fi
-else
+# if test $have_getaddrinfo = no -o "$ac_cv_buggy_getaddrinfo" = yes
+# then
+# if test $ipv6 = yes
+# then
+# echo 'Fatal: You must get working getaddrinfo() function.'
+# echo ' or you can specify "--disable-ipv6"'.
+# exit 1
+# fi
+# else
$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
-fi
+# fi
for ac_func in getnameinfo
do :