Skip to content

Commit

Permalink
Support openssl 3.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
nikialeksey committed Feb 26, 2024
1 parent 9d682aa commit 47501df
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 22 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ubuntu:20.04
FROM --platform=linux/amd64 ubuntu:20.04

# Set the path to the repo root folder
# I set /home because I'm working within a Docker container
Expand Down
19 changes: 7 additions & 12 deletions config.conf
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
###############################################################################

#NDK Version to download
NDK_VERSION=r20b
NDK_VERSION=r26c

#The URL from which to download Android NDK
NDK_DOWNLOAD_URL="https://dl.google.com/android/repository/android-ndk-$NDK_VERSION-linux-x86_64.zip"
NDK_DOWNLOAD_URL="https://dl.google.com/android/repository/android-ndk-$NDK_VERSION-linux.zip"

#The name of the folder created by executing the downloaded NDK bin
#In general, the name corresponds to that of the bin file, except the platform info
Expand Down Expand Up @@ -65,7 +65,7 @@ SWIG_BUILD_OUT_PATH="$BUILD_DIR/swig-build-output"
###############################################################################

# OpenSSL Version to download
OPENSSL_VERSION=1.1.1k
OPENSSL_VERSION=3.2.0

# The URL from which to download OpenSSL sources tag
OPENSSL_DOWNLOAD_URL="https://www.openssl.org/source/openssl-$OPENSSL_VERSION.tar.gz"
Expand All @@ -78,7 +78,7 @@ OPENSSL_DIR_NAME="openssl-$OPENSSL_VERSION"
OPENSSL_BUILD_OUT_PATH="$BUILD_DIR/openssl-build-output"

# Configure the target NDK toolchain to use when compiling OpenH264
OPENSSL_TARGET_NDK_LEVEL=23
OPENSSL_TARGET_NDK_LEVEL=28


###############################################################################
Expand Down Expand Up @@ -134,11 +134,11 @@ TARGET_ARCHS=("armeabi-v7a" "x86" "arm64-v8a" "x86_64")
###############################################################################

# Android APIs to setup
SETUP_ANDROID_APIS=("23")
ANDROID_BUILD_TOOLS="30.0.3"
SETUP_ANDROID_APIS=("28")
ANDROID_BUILD_TOOLS="33.0.2"

# Target Android API level
TARGET_ANDROID_API=23
TARGET_ANDROID_API=28

###############################################################################
########################## CONFIGURATION ###########################
Expand Down Expand Up @@ -189,8 +189,3 @@ OWNER=""
# Enable IPv6
# Thanks to @maccadoo and MR#40
ENABLE_IPV6=1

# Patch PJSIP to use a fixed Call-ID --- see README.md in patches/fixed_callid folder
USE_FIXED_CALLID=0
# Apply a different fixed Call-ID patch if PJSIP version is lower than 2.11
IS_PJSIP_LOWER_THAN_2_11=0
9 changes: 4 additions & 5 deletions openssl-build-target-archs
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,11 @@ function setupPathsAndExports {
LIB_PATH="${OPENSSL_BUILD_OUT_PATH}/libs"
LOG_PATH="${OPENSSL_BUILD_OUT_PATH}/logs"

# Export ANDROID_NDK_HOME env var
export ANDROID_NDK_HOME=$NDK_PATH
# Export ANDROID_NDK_ROOT env var
export ANDROID_NDK_ROOT=$NDK_PATH
# Add toolchains bin directory to PATH
TOOLCHAIN_PATH="$NDK_PATH/toolchains/llvm/prebuilt/linux-x86_64"
# for some reason it does not need to be exported
PATH=$TOOLCHAIN_PATH/bin:$PATH
# for more info check https://github.com/openssl/openssl/blob/master/NOTES-ANDROID.md
PATH=$ANDROID_NDK_ROOT/toolchains/llvm/prebuilt/linux-x86_64/bin:$ANDROID_NDK_ROOT/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin:$PATH
}

function clearBuildDirectory {
Expand Down
8 changes: 4 additions & 4 deletions prepare-build-system
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@ fi

if [ "$SETUP_PACKAGES" == "1" ]
then
# Setup Java 8
# Setup Java 17
apt-get update
apt-get purge -y openjdk*
apt-get install -y openjdk-8-jdk
apt-get install -y openjdk-17-jdk

DEPS="unzip git curl bzip2 binutils make autoconf openssl \
libssl-dev libopus0 libpcre3 libpcre3-dev build-essential nasm python"
DEPS="unzip git curl bzip2 binutils make autoconf \
libopus0 libpcre3 libpcre3-dev build-essential nasm python"
sh -c "dpkg --add-architecture i386; apt-get update && apt-get -y upgrade && apt-get install -y ${DEPS}"
fi

Expand Down

0 comments on commit 47501df

Please sign in to comment.