termux-packages/packages/openssl/Configurations-15-android.conf.patch
Yaksh Bariya 0608868e17 openssl: update to 3.0.1
Changes made:-
- OpenSSL has been updates to 3.0.1
- `openssl-1.1` package has been added for packages still needing the
  legacy version.

Any package that still needs legacy openssl-1.1 needs some extra CFLAGS,
CXXFLAGS, LDFLAGS and CPPFLAGS

CFLAGS="-I$TERMUX_PREFIX/include/openssl-1.1 $CFLAGS"
CXXFLAGS="-I$TERMUX_PREFIX/include/openssl-1.1 $CXXFLAGS"
CPPFLAGS="-I$TERMUX_PREFIX/include/openssl-1.1 $CPPFLAGS"
LDFLAGS="-L$TERMUX_PREFIX/lib/openssl-1.1 $LDFLAGS"

Additionally if the package by itself adds `-I$prefix/include` or
similar, it needs to be patched not to do so in order to prevent it from
using OpenSSL 3 headers

Similarly for LDFLAGS, make sure that package doesn't add
`-L$prefix/lib` and `-Wl,-rpath=$prefix/lib` before OpenSSL 1.1 LDFLAGS
nentioned above or else it will cause compilation errors
2022-02-26 04:25:43 +00:00

50 lines
2.2 KiB
Diff

--- ./Configurations/15-android.conf.orig 2021-10-04 14:25:47.176057752 +0530
+++ ./Configurations/15-android.conf 2021-10-04 14:33:03.366057586 +0530
@@ -184,10 +184,10 @@
# systems are perfectly capable of executing binaries targeting
# Froyo. Keep in mind that in the nutshell Android builds are
# about JNI, i.e. shared libraries, not applications.
- cflags => add(sub { android_ndk()->{cflags} }),
- cppflags => add(sub { android_ndk()->{cppflags} }),
- cxxflags => add(sub { android_ndk()->{cflags} }),
- bn_ops => sub { android_ndk()->{bn_ops} },
+ #cflags => add(sub { android_ndk()->{cflags} }),
+ #cppflags => add(sub { android_ndk()->{cppflags} }),
+ #cxxflags => add(sub { android_ndk()->{cflags} }),
+ #bn_ops => sub { android_ndk()->{bn_ops} },
bin_cflags => "-fPIE",
bin_lflags => "-pie",
enable => [ ],
@@ -222,13 +222,13 @@
# Newer NDK versions reportedly require additional -latomic.
#
inherit_from => [ "android" ],
- bn_ops => add("RC4_CHAR"),
+ bn_ops => "BN_LLONG RC4_CHAR",
asm_arch => 'armv4',
perlasm_scheme => "void",
},
"android-arm64" => {
inherit_from => [ "android" ],
- bn_ops => add("RC4_CHAR"),
+ bn_ops => "SIXTY_FOUR_BIT_LONG RC4_CHAR",
asm_arch => 'aarch64',
perlasm_scheme => "linux64",
},
@@ -258,13 +258,13 @@
"android-x86" => {
inherit_from => [ "android" ],
CFLAGS => add(picker(release => "-fomit-frame-pointer")),
- bn_ops => add("RC4_INT"),
+ bn_ops => "BN_LLONG RC4_INT",
asm_arch => 'x86',
perlasm_scheme => "android",
},
"android-x86_64" => {
inherit_from => [ "android" ],
- bn_ops => add("RC4_INT"),
+ bn_ops => "SIXTY_FOUR_BIT_LONG RC4_INT",
asm_arch => 'x86_64',
perlasm_scheme => "elf",
},