Skip to content

Commit 3583f21

Browse files
committed
patch openssl
1 parent 55604b0 commit 3583f21

File tree

2 files changed

+27
-0
lines changed

2 files changed

+27
-0
lines changed

pythonforandroid/recipes/openssl/__init__.py

+1
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,7 @@ def build_arch(self, arch):
131131
buildarch,
132132
'-D__ANDROID_API__={}'.format(self.ctx.ndk_api),
133133
]
134+
self.apply_patch('standalone-ndk.patch', arch.arch)
134135
shprint(perl, 'Configure', *config_args, _env=env)
135136
self.apply_patch('disable-sover.patch', arch.arch)
136137

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
--- a/Configurations/15-android.conf 2021-01-02 03:49:06.227255874 +0100
2+
+++ b/Configurations/15-android.conf 2021-01-02 04:06:22.239571311 +0100
3+
@@ -107,16 +107,20 @@
4+
}
5+
} elsif (-f "$ndk/AndroidVersion.txt") { #"standalone toolchain"
6+
my $cc = $user{CC} // "clang";
7+
+ my $ndk_api = $ENV{NDK_API};
8+
+ if ($ndk_api =~ m|^android-(\d+)$|) {
9+
+ $api = $1;
10+
+ }
11+
# One can probably argue that both clang and gcc should be
12+
# probed, but support for "standalone toolchain" was added
13+
# *after* announcement that gcc is being phased out, so
14+
# favouring clang is considered adequate. Those who insist
15+
# have option to enforce test for gcc with CC=gcc.
16+
- if (which("$triarch-$cc") !~ m|^$ndk|) {
17+
+ if (which("$triarch$api-$cc") !~ m|^$ndk|) {
18+
die "no NDK $triarch-$cc on \$PATH";
19+
}
20+
- $user{CC} = $cc;
21+
- $user{CROSS_COMPILE} = "$triarch-";
22+
+ $user{CC} = "$triarch$api-$cc";
23+
+ $user{CROSS_COMPILE} = "";
24+
} elsif ($user{CC} eq "clang") {
25+
die "no NDK clang on \$PATH";
26+
} else {

0 commit comments

Comments
 (0)