lbry-android-sdk/p4a/pythonforandroid/recipes/python2legacy/patches/enable-openssl.patch
Akinwale Ariwodola 8b2694efb7
New build (#508)
* fix build for openssl 1.1.1b required for sdk
(cherry picked from commit aa49e3b2755b97b6331cdbbb89efc954de8d5977)

* use js code from master

* fix openssl recipe and tweak build
(cherry picked from commit 6e94c27021c7bd7b1e880c2fc314850e36a5a38e)

* remove unused build recipes
(cherry picked from commit f5c0577bdb175bfc0990602936bbc9e2052e1f25)
2019-03-30 21:58:45 +01:00

46 lines
2.2 KiB
Diff

--- Python-2.7.2/setup.py.orig 2011-06-11 17:46:28.000000000 +0200
+++ Python-2.7.2/setup.py 2018-12-23 15:53:22.521709336 +0100
@@ -706,18 +706,15 @@ class PyBuildExt(build_ext):
'/usr/local/ssl/include',
'/usr/contrib/ssl/include/'
]
- ssl_incs = find_file('openssl/ssl.h', inc_dirs,
- search_for_ssl_incs_in
- )
+ ssl_incs = [
+ os.path.join(os.environ["OPENSSL_BUILD"], 'include'),
+ os.path.join(os.environ["OPENSSL_BUILD"], 'include', 'openssl')]
if ssl_incs is not None:
krb5_h = find_file('krb5.h', inc_dirs,
['/usr/kerberos/include'])
if krb5_h:
ssl_incs += krb5_h
- ssl_libs = find_library_file(self.compiler, 'ssl',lib_dirs,
- ['/usr/local/ssl/lib',
- '/usr/contrib/ssl/lib/'
- ] )
+ ssl_libs = [os.environ["OPENSSL_BUILD"]]
if (ssl_incs is not None and
ssl_libs is not None):
@@ -735,8 +732,8 @@ class PyBuildExt(build_ext):
'^\s*#\s*define\s+OPENSSL_VERSION_NUMBER\s+(0x[0-9a-fA-F]+)' )
# look for the openssl version header on the compiler search path.
- opensslv_h = find_file('openssl/opensslv.h', [],
- inc_dirs + search_for_ssl_incs_in)
+ opensslv_h = [os.path.join(os.environ["OPENSSL_BUILD"], 'include'),
+ os.path.join(os.environ["OPENSSL_BUILD"], 'include', 'openssl')]
if opensslv_h:
name = os.path.join(opensslv_h[0], 'openssl/opensslv.h')
if sys.platform == 'darwin' and is_macosx_sdk_path(name):
@@ -753,8 +750,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
- openssl_ver >= min_openssl_ver)
+ have_usable_openssl = (have_any_openssl and True)
if have_any_openssl:
if have_usable_openssl: