Skip to content

Commit bc21df5

Browse files
committed
Remove legacy version of openssl
Because as per ndk r19 the default compiler is clang and gcc has been partially removed (legacy version needs gcc)
1 parent bbccc81 commit bc21df5

File tree

3 files changed

+11
-81
lines changed

3 files changed

+11
-81
lines changed

pythonforandroid/recipes/openssl/__init__.py

Lines changed: 11 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -41,41 +41,19 @@ class OpenSSLRecipe(Recipe):
4141
- Add ability to build a legacy version of the openssl libs when using
4242
python2legacy or python3crystax.
4343
44+
.. versionchanged:: 0.7.1
45+
- Removed legacy libs
46+
4447
'''
4548

46-
standard_version = '1.1'
49+
version = '1.1'
4750
'''the major minor version used to link our recipes'''
48-
legacy_version = '1.0'
49-
'''the major minor version used to link our recipes when using
50-
python2legacy or python3crystax'''
5151

52-
standard_url_version = '1.1.1'
52+
url_version = '1.1.1'
5353
'''the version used to download our libraries'''
54-
legacy_url_version = '1.0.2q'
55-
'''the version used to download our libraries when using python2legacy or
56-
python3crystax'''
5754

5855
url = 'https://www.openssl.org/source/openssl-{url_version}.tar.gz'
5956

60-
@property
61-
def use_legacy(self):
62-
if not self.ctx.recipe_build_order:
63-
return False
64-
return any([i for i in ('python2legacy', 'python3crystax') if
65-
i in self.ctx.recipe_build_order])
66-
67-
@property
68-
def version(self):
69-
if self.use_legacy:
70-
return self.legacy_version
71-
return self.standard_version
72-
73-
@property
74-
def url_version(self):
75-
if self.use_legacy:
76-
return self.legacy_url_version
77-
return self.standard_url_version
78-
7957
@property
8058
def versioned_url(self):
8159
if self.url is None:
@@ -117,19 +95,15 @@ def get_recipe_env(self, arch=None):
11795
env = super(OpenSSLRecipe, self).get_recipe_env(arch)
11896
env['OPENSSL_VERSION'] = self.version
11997
env['MAKE'] = 'make' # This removes the '-j5', which isn't safe
120-
if self.use_legacy:
121-
env['CFLAGS'] += ' ' + env['LDFLAGS']
122-
env['CC'] += ' ' + env['LDFLAGS']
123-
else:
124-
env['ANDROID_NDK'] = self.ctx.ndk_dir
98+
env['ANDROID_NDK'] = self.ctx.ndk_dir
12599
return env
126100

127101
def select_build_arch(self, arch):
128102
aname = arch.arch
129103
if 'arm64' in aname:
130-
return 'android-arm64' if not self.use_legacy else 'linux-aarch64'
104+
return 'android-arm64'
131105
if 'v7a' in aname:
132-
return 'android-arm' if not self.use_legacy else 'android-armv7'
106+
return 'android-arm'
133107
if 'arm' in aname:
134108
return 'android'
135109
if 'x86_64' in aname:
@@ -151,18 +125,10 @@ def build_arch(self, arch):
151125
# ^
152126
# crypto/aes/bsaes-armv7.S:1434:14: error: immediate operand must be in the range [0,4095]
153127
# sub r6, r8, #.LREVM0SR-.LSR @ pass constants
154-
config_args = ['shared', 'no-dso', 'no-asm']
155-
if self.use_legacy:
156-
config_args.append('no-krb5')
157-
config_args.append(buildarch)
158-
if not self.use_legacy:
159-
config_args.append('-D__ANDROID_API__={}'.format(self.ctx.ndk_api))
128+
config_args = ['shared', 'no-dso', 'no-asm', buildarch,
129+
'-D__ANDROID_API__={}'.format(self.ctx.ndk_api)]
160130
shprint(perl, 'Configure', *config_args, _env=env)
161-
self.apply_patch(
162-
'disable-sover{}.patch'.format(
163-
'-legacy' if self.use_legacy else ''), arch.arch)
164-
if self.use_legacy:
165-
self.apply_patch('rename-shared-lib.patch', arch.arch)
131+
self.apply_patch('disable-sover.patch', arch.arch)
166132

167133
shprint(sh.make, 'build_libs', _env=env)
168134

pythonforandroid/recipes/openssl/disable-sover-legacy.patch

Lines changed: 0 additions & 20 deletions
This file was deleted.

pythonforandroid/recipes/openssl/rename-shared-lib.patch

Lines changed: 0 additions & 16 deletions
This file was deleted.

0 commit comments

Comments
 (0)