Move to OpenSSL as a git submodule. Redundant for platforms where it's not used, but makes fdroid easier.

This commit is contained in:
2024-07-10 19:25:01 -04:00
parent b8cd1232be
commit 84c22dbf5f
8 changed files with 25 additions and 50 deletions

View File

@ -11,23 +11,13 @@ BUILD_DIR=out/openssl_android_build
BUILD_TARGETS="x86_64 x86 arm64-v8a armeabi-v7a"
rm -rf out/openssl-${OPENSSL_VERSION}
WORK_DIR=out/openssl-${OPENSSL_VERSION}-android
rm -rf $WORK_DIR
cp -arf deps/openssl_src/ $WORK_DIR
if [ ! -d out/openssl-${OPENSSL_VERSION} ]
then
if [ ! -f out/openssl-${OPENSSL_VERSION}.tar.gz ]
then
wget https://www.openssl.org/source/openssl-${OPENSSL_VERSION}.tar.gz -O out/openssl-${OPENSSL_VERSION}.tar.gz | exit 128
fi
tar -C out/ -xzf out/openssl-${OPENSSL_VERSION}.tar.gz || exit 128
fi
WORK_DIR=out/openssl-${OPENSSL_VERSION}
##### export ndk directory. Required by openssl-build-scripts #####
export ANDROID_NDK_ROOT
echo ANDROID_NDK_ROOT=$ANDROID_NDK_ROOT
##### build-function #####
build_the_thing() {
TOOLCHAIN=$ANDROID_NDK_ROOT/toolchains/llvm/prebuilt/linux-x86_64
export PATH=$TOOLCHAIN/$TRIBLE/bin:$TOOLCHAIN/bin:$PATH
@ -80,14 +70,13 @@ build_the_thing() {
-Os
-DOPENSSL_SMALL_FOOTPRINT"
pwd
echo "./Configure $SSL_TARGET $OPTIONS $GLOBAL_OPTIONS -fuse-ld=$TOOLCHAIN/bin/ld" && \
./Configure $SSL_TARGET $OPTIONS $GLOBAL_OPTIONS -fuse-ld=$TOOLCHAIN/bin/ld no-tests && \
echo "./Configure $SSL_TARGET $OPTIONS $GLOBAL_OPTIONS" && \
./Configure $SSL_TARGET $OPTIONS $GLOBAL_OPTIONS && \
make clean && \
make build_generated && \
make libcrypto.a libssl.a || exit 128
}
##### set variables according to build-tagret #####
for build_target in $BUILD_TARGETS
do
echo "Building $build_target"
@ -128,7 +117,6 @@ do
rm -rf $DESTDIR
build_the_thing
popd
#### copy libraries and includes to output-directory #####
echo WORK_DIR=$WORK_DIR
rm -rf deps/openssl/android/$build_target/
mkdir -p deps/openssl/android/$build_target/usr/local/include/