Skip to content

Commit

Permalink
Merge pull request #4 from intermedia-net/fixes-for-openssl3
Browse files Browse the repository at this point in the history
Fixes for openssl3
  • Loading branch information
anikitin-intermedia authored Jan 17, 2024
2 parents d4ca01c + dbc10e4 commit f808953
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 168 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
5 changes: 0 additions & 5 deletions build
Original file line number Diff line number Diff line change
Expand Up @@ -79,11 +79,6 @@ function buildPjSip {
# using /*/* we assume there is only one directory (whatever its name is)
# and retrieve all its content (.so libs)
mv "${PJSUA_GENERATED_SO_PATH}"/*/* "${FINAL_BUILD_LIB}/${arch}"

if [ -f ${OPENH264_BUILD_OUT_PATH}/libs/${arch}/lib/libopenh264.so ]; then
echo "Copying OpenH264 .so library to final build directory ..."
cp ${OPENH264_BUILD_OUT_PATH}/libs/${arch}/lib/libopenh264.so ${FINAL_BUILD_LIB}/${arch}/
fi
}

function copyPjSuaJava {
Expand Down
28 changes: 0 additions & 28 deletions config.conf
Original file line number Diff line number Diff line change
Expand Up @@ -81,27 +81,6 @@ OPENSSL_BUILD_OUT_PATH="$BUILD_DIR/openssl-build-output"
OPENSSL_TARGET_NDK_LEVEL=23


###############################################################################
############################# OPENH264 #############################
###############################################################################

# OPENH264 Version to download
OPENH264_VERSION=openh264v2.1.0

# The URL from which to download OpenH264 sources tag
OPENH264_DOWNLOAD_URL="https://github.com/cisco/openh264/archive/$OPENH264_VERSION.tar.gz"

# The name of the folder generated when untarring OpenH264 sources file
# In general, the name corresponds to that of the tar, except the file extension
OPENH264_DIR_NAME="openh264-$OPENH264_VERSION"

# The output directory where to store OpenH264 compiled libraries
OPENH264_BUILD_OUT_PATH="$BUILD_DIR/openh264-build-output"

# Configure the target NDK toolchain to use when compiling OpenH264
OPENH264_TARGET_NDK_LEVEL=21


###############################################################################
################################ OPUS ###############################
###############################################################################
Expand Down Expand Up @@ -187,13 +166,6 @@ DOWNLOAD_SWIG=1
# Downloads a fresh copy of OpenSSH. Any existing files will be deleted
DOWNLOAD_OPENSSL=1

# Downloads a fresh copy of OpenH264. Any existing files will be deleted
DOWNLOAD_OPENH264=0

# On recent versions of OpenH264 building encdemo and decdemo build fails
# [OpenH264 2.1.x && NDK >= r20b]
SKIP_OPENH264_DEMO=1

# Downloads a fresh copy of Opus. Any existing files will be deleted
DOWNLOAD_OPUS=1

Expand Down
108 changes: 0 additions & 108 deletions openh264-build-target-archs

This file was deleted.

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
21 changes: 0 additions & 21 deletions prepare-build-system
Original file line number Diff line number Diff line change
Expand Up @@ -145,27 +145,6 @@ then
./openssl-build-target-archs
fi

if [ "$DOWNLOAD_OPENH264" == "1" ]
then
echo ""
echo "Downloading OpenH264 ${OPENH264_VERSION} ..."
echo ""
cd $DOWNLOAD_DIR
curl -L -# -o openh264.tar.gz "$OPENH264_DOWNLOAD_URL" 2>&1
rm -rf "${OPENH264_DIR_NAME}"
echo "OpenH264 downloaded!"
echo "Extracting OpenH264 ..."
tar xzf openh264.tar.gz && rm -rf openh264.tar.gz

if [ "$SKIP_OPENH264_DEMO" == "1" ]
then
echo "Modifying platform-android.mk to skip Encdemo and Decdemo builds"
sed -e "/binaries: decdemo encdemo/ s/^#*/#/" -i ${OPENH264_DIR_NAME}/build/platform-android.mk
fi
cd ${BASEDIR}
./openh264-build-target-archs || true
fi

if [ "$DOWNLOAD_OPUS" == "1" ]
then
echo ""
Expand Down

0 comments on commit f808953

Please sign in to comment.