Skip to content
This repository has been archived by the owner on Oct 7, 2021. It is now read-only.

Commit

Permalink
Enable all gpl libraries when both --full and --enable-gpl flags are …
Browse files Browse the repository at this point in the history
…present, fixes #394
  • Loading branch information
tanersener committed May 10, 2020
1 parent bf1f474 commit 9df1b52
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 17 deletions.
19 changes: 14 additions & 5 deletions android.sh
Expand Up @@ -602,6 +602,7 @@ rm -rf ${BASEDIR}/android/obj 1>>${BASEDIR}/build.log 2>&1
GPL_ENABLED="no"
DISPLAY_HELP=""
BUILD_LTS=""
BUILD_FULL=""
BUILD_TYPE_ID=""
BUILD_VERSION=$(git describe --tags 2>>${BASEDIR}/build.log)

Expand Down Expand Up @@ -654,11 +655,7 @@ while [ ! $# -eq 0 ]; do
rebuild_library ${BUILD_LIBRARY}
;;
--full)
for library in {0..46}; do
if [[ $library -ne 18 ]] && [[ $library -ne 19 ]] && [[ $library -ne 20 ]] && [[ $library -ne 21 ]] && [[ $library -ne 22 ]]; then
enable_library $(get_library_name $library)
fi
done
BUILD_FULL="1"
;;
--enable-gpl)
GPL_ENABLED="yes"
Expand Down Expand Up @@ -704,6 +701,18 @@ if [[ ! -z ${DISPLAY_HELP} ]]; then
exit 0
fi

if [[ -n ${BUILD_FULL} ]]; then
for library in {0..46}; do
if [ ${GPL_ENABLED} == "yes" ]; then
enable_library $(get_library_name $library)
else
if [[ $library -ne 18 ]] && [[ $library -ne 19 ]] && [[ $library -ne 20 ]] && [[ $library -ne 21 ]] && [[ $library -ne 22 ]]; then
enable_library $(get_library_name $library)
fi
fi
done
fi

if [[ -z ${ANDROID_NDK_ROOT} ]]; then
echo "ANDROID_NDK_ROOT not defined"
exit 1
Expand Down
19 changes: 14 additions & 5 deletions ios.sh
Expand Up @@ -817,6 +817,7 @@ GPL_ENABLED="no"
DISPLAY_HELP=""
BUILD_TYPE_ID=""
BUILD_LTS=""
BUILD_FULL=""
MOBILE_FFMPEG_XCF_BUILD=""
BUILD_FORCE=""
BUILD_VERSION=$(git describe --tags 2>>"${BASEDIR}/build.log")
Expand Down Expand Up @@ -869,11 +870,7 @@ while [ ! $# -eq 0 ]; do
rebuild_library "${BUILD_LIBRARY}"
;;
--full)
for library in {0..50}; do
if [[ $library -ne 17 ]] && [[ $library -ne 18 ]] && [[ $library -ne 19 ]] && [[ $library -ne 20 ]] && [[ $library -ne 21 ]]; then
enable_library "$(get_library_name $library)"
fi
done
BUILD_FULL="1"
;;
--enable-gpl)
GPL_ENABLED="yes"
Expand Down Expand Up @@ -906,6 +903,18 @@ if [[ -n ${DISPLAY_HELP} ]]; then
exit 0
fi

if [[ -n ${BUILD_FULL} ]]; then
for library in {0..50}; do
if [ ${GPL_ENABLED} == "yes" ]; then
enable_library $(get_library_name $library)
else
if [[ $library -ne 17 ]] && [[ $library -ne 18 ]] && [[ $library -ne 19 ]] && [[ $library -ne 20 ]] && [[ $library -ne 21 ]]; then
enable_library $(get_library_name $library)
fi
fi
done
fi

if [[ -z ${BUILD_VERSION} ]]; then
echo -e "\nerror: Can not run git commands in this folder. See build.log.\n"
exit 1
Expand Down
23 changes: 16 additions & 7 deletions tvos.sh
Expand Up @@ -697,6 +697,7 @@ echo -e "\nINFO: Build options: $*\n" 1>>${BASEDIR}/build.log 2>&1
GPL_ENABLED="no"
DISPLAY_HELP=""
BUILD_LTS=""
BUILD_FULL=""
BUILD_TYPE_ID=""
BUILD_FORCE=""
BUILD_VERSION=$(git describe --tags 2>>${BASEDIR}/build.log)
Expand Down Expand Up @@ -746,11 +747,7 @@ while [ ! $# -eq 0 ]; do
rebuild_library ${BUILD_LIBRARY}
;;
--full)
for library in {0..49}; do
if [[ $library -ne 17 ]] && [[ $library -ne 18 ]] && [[ $library -ne 19 ]] && [[ $library -ne 20 ]] && [[ $library -ne 21 ]]; then
enable_library $(get_library_name $library)
fi
done
BUILD_FULL="1"
;;
--enable-gpl)
GPL_ENABLED="yes"
Expand All @@ -773,16 +770,28 @@ while [ ! $# -eq 0 ]; do
done

# DETECT BUILD TYPE
if [[ ! -z ${BUILD_LTS} ]]; then
if [[ -n ${BUILD_LTS} ]]; then
enable_lts_build
BUILD_TYPE_ID+="LTS "
fi

if [[ ! -z ${DISPLAY_HELP} ]]; then
if [[ -n ${DISPLAY_HELP} ]]; then
display_help
exit 0
fi

if [[ -n ${BUILD_FULL} ]]; then
for library in {0..49}; do
if [ ${GPL_ENABLED} == "yes" ]; then
enable_library $(get_library_name $library)
else
if [[ $library -ne 17 ]] && [[ $library -ne 18 ]] && [[ $library -ne 19 ]] && [[ $library -ne 20 ]] && [[ $library -ne 21 ]]; then
enable_library $(get_library_name $library)
fi
fi
done
fi

if [[ -z ${BUILD_VERSION} ]]; then
echo -e "\nerror: Can not run git commands in this folder. See build.log.\n"
exit 1
Expand Down

0 comments on commit 9df1b52

Please sign in to comment.