python: don't use libressl for host build 3773/head
authorAlexandru Ardelean <ardeleanalex@gmail.com>
Fri, 6 Jan 2017 13:29:19 +0000 (15:29 +0200)
committerAlexandru Ardelean <ardeleanalex@gmail.com>
Fri, 6 Jan 2017 13:29:21 +0000 (15:29 +0200)
Fixes: https://github.com/openwrt/packages/issues/3767
Since commit:
https://github.com/lede-project/source/commit/f6e6341d896adb78f9b496f71aab8f45e1742d5a

libressl is built on the host-side.

Python picks it up [ via the openssl/* headers ] and assumes
it has SSL libs.
Compiling works fine, linking fails.
Doesn't look like it's because:
https://github.com/lede-project/source/commit/2fd5ce9488d11c7e6eee7dc30f128bd12be889f5

Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
lang/python/Makefile
lang/python/patches/012-disable-openssl-for-hashlib-on-host-build.patch [new file with mode: 0644]

index b803b8c65027dab8d9ab1e9f6ee2c11835682987..fbdd06cd5beae9b77e0cbf576b9c76505a3e65fa 100644 (file)
@@ -12,7 +12,7 @@ include ./files/python-version.mk
 
 PKG_NAME:=python
 PKG_VERSION:=$(PYTHON_VERSION).$(PYTHON_VERSION_MICRO)
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=Python-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=https://www.python.org/ftp/python/$(PKG_VERSION)
diff --git a/lang/python/patches/012-disable-openssl-for-hashlib-on-host-build.patch b/lang/python/patches/012-disable-openssl-for-hashlib-on-host-build.patch
new file mode 100644 (file)
index 0000000..1a442e0
--- /dev/null
@@ -0,0 +1,11 @@
+--- a/setup.py
++++ b/setup.py
+@@ -859,7 +859,7 @@ class PyBuildExt(build_ext):
+         min_openssl_ver = 0x00907000
+         have_any_openssl = ssl_incs is not None and ssl_libs is not None
+-        have_usable_openssl = (have_any_openssl and
++        have_usable_openssl = cross_compiling and (have_any_openssl and
+                                openssl_ver >= min_openssl_ver)
+         if have_any_openssl: