From 72afe0fd477dc3cc4876a57570025b5fda7d580e Mon Sep 17 00:00:00 2001 From: Paul Brussee Date: Tue, 15 Mar 2016 16:44:23 +0100 Subject: [PATCH] Undo rename openssl x.so files --- .../recipes/libtorrent/user-config-openssl.patch | 4 ++-- pythonforandroid/recipes/openssl/__init__.py | 11 ++--------- .../recipes/openssl/fix-shared-link.patch | 15 --------------- pythonforandroid/recipes/python2/__init__.py | 2 +- .../python2/patches/Python-2.7.9-xcompile.patch | 2 +- 5 files changed, 6 insertions(+), 28 deletions(-) delete mode 100644 pythonforandroid/recipes/openssl/fix-shared-link.patch diff --git a/pythonforandroid/recipes/libtorrent/user-config-openssl.patch b/pythonforandroid/recipes/libtorrent/user-config-openssl.patch index b0b29e1758..43d28db07b 100644 --- a/pythonforandroid/recipes/libtorrent/user-config-openssl.patch +++ b/pythonforandroid/recipes/libtorrent/user-config-openssl.patch @@ -20,6 +20,6 @@ +-L$(OPENSSL_BUILD_PATH) -lgnustl_shared -lpython2.7 -+-lcryptox -+-lsslx ++-lcrypto ++-lssl ; diff --git a/pythonforandroid/recipes/openssl/__init__.py b/pythonforandroid/recipes/openssl/__init__.py index 9a37808c06..c80ee6ae6a 100644 --- a/pythonforandroid/recipes/openssl/__init__.py +++ b/pythonforandroid/recipes/openssl/__init__.py @@ -2,7 +2,6 @@ from pythonforandroid.toolchain import Recipe, shprint, current_directory import sh -from os.path import join class OpenSSLRecipe(Recipe): @@ -10,7 +9,7 @@ class OpenSSLRecipe(Recipe): url = 'https://www.openssl.org/source/openssl-{version}.tar.gz' def should_build(self, arch): - return not self.has_libs(arch, 'libsslx.so', 'libcryptox.so') + return not self.has_libs(arch, 'libssl.so', 'libcrypto.so') def check_symbol(self, env, sofile, symbol): nm = env.get('NM', 'nm') @@ -45,9 +44,7 @@ def build_arch(self, arch): perl = sh.Command('perl') buildarch = self.select_build_arch(arch) shprint(perl, 'Configure', 'shared', 'no-dso', 'no-krb5', buildarch, _env=env) - self.apply_patch('disable-sover.patch', arch.arch) - self.apply_patch('fix-shared-link.patch', arch.arch) check_crypto = partial(self.check_symbol, env, 'libcrypto.so') # check_ssl = partial(self.check_symbol, env, 'libssl.so') @@ -57,10 +54,6 @@ def build_arch(self, arch): break shprint(sh.make, 'clean', _env=env) - # MUST BE RENAMED TO AVOID CONFLICTS WITH ANDROID'S DISTRIBUTED OPENSSL (IF INCLUDED INTO THE FINAL BUILD) - libs_dir = self.get_build_dir(arch.arch) - shprint(sh.cp, "-av", join(libs_dir, 'libcrypto.so'), join(libs_dir, 'libcryptox.so')) - shprint(sh.cp, "-av", join(libs_dir, 'libssl.so'), join(libs_dir, 'libsslx.so')) - self.install_libs(arch, 'libcryptox.so', 'libsslx.so') + self.install_libs(arch, 'libssl.so', 'libcrypto.so') recipe = OpenSSLRecipe() diff --git a/pythonforandroid/recipes/openssl/fix-shared-link.patch b/pythonforandroid/recipes/openssl/fix-shared-link.patch deleted file mode 100644 index ec40b7e51d..0000000000 --- a/pythonforandroid/recipes/openssl/fix-shared-link.patch +++ /dev/null @@ -1,15 +0,0 @@ ---- openssl/Makefile.shared.ori 2016-01-28 14:38:30.000000000 +0100 -+++ openssl/Makefile.shared 2016-02-16 17:56:03.430313398 +0100 -@@ -148,10 +148,11 @@ - - DO_GNU_SO=$(CALC_VERSIONS); \ - SHLIB=lib$(LIBNAME).so; \ -+ SHLIB_SONAME=lib$(LIBNAME)x.so; \ - SHLIB_SUFFIX=; \ - ALLSYMSFLAGS='-Wl,--whole-archive'; \ - NOALLSYMSFLAGS='-Wl,--no-whole-archive'; \ -- SHAREDFLAGS="$(CFLAGS) $(SHARED_LDFLAGS) -shared -Wl,-Bsymbolic -Wl,-soname=$$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX" -+ SHAREDFLAGS="$(CFLAGS) $(SHARED_LDFLAGS) -shared -Wl,-Bsymbolic -Wl,-soname=$$SHLIB_SONAME" - - DO_GNU_APP=LDFLAGS="$(CFLAGS) -Wl,-rpath,$(LIBRPATH)" - diff --git a/pythonforandroid/recipes/python2/__init__.py b/pythonforandroid/recipes/python2/__init__.py index 8d23c336ba..23823a5594 100644 --- a/pythonforandroid/recipes/python2/__init__.py +++ b/pythonforandroid/recipes/python2/__init__.py @@ -163,7 +163,7 @@ def do_python_build(self, arch): env['CFLAGS'] = ' '.join([env['CFLAGS'], '-I{}'.format(openssl_inc_dir), '-I{}/openssl'.format(openssl_inc_dir)]) - env['LDFLAGS'] = ' '.join([env['LDFLAGS'], '-L{}'.format(openssl_libs_dir), '-lcryptox', '-lsslx']) + env['LDFLAGS'] = ' '.join([env['LDFLAGS'], '-L{}'.format(openssl_libs_dir), '-lcrypto', '-lssl']) if 'sqlite3' in self.ctx.recipe_build_order: info("Activate flags for sqlite3") diff --git a/pythonforandroid/recipes/python2/patches/Python-2.7.9-xcompile.patch b/pythonforandroid/recipes/python2/patches/Python-2.7.9-xcompile.patch index 0d32593aca..ca46ca5d8f 100644 --- a/pythonforandroid/recipes/python2/patches/Python-2.7.9-xcompile.patch +++ b/pythonforandroid/recipes/python2/patches/Python-2.7.9-xcompile.patch @@ -75,7 +75,7 @@ index 2ad1aa3..ede793f 100644 +SSL=/path-to-ssl-build-dir +_ssl _ssl.c \ + -DUSE_SSL -I$(SSL)/include -I$(SSL)/include/openssl \ -+ -L$(SSL) -lsslx -lcryptox ++ -L$(SSL) -lssl -lcrypto # The crypt module is now disabled by default because it breaks builds # on many systems (where -lcrypt is needed), e.g. Linux (I believe).