Make ffmpeg repo overridable

This commit is contained in:
BtbN 2021-11-13 17:41:55 +01:00
parent 482c7d7987
commit c26651fc14

View file

@ -50,6 +50,11 @@ rm -f "$TESTFILE"
rm -rf ffbuild
mkdir ffbuild
FFMPEG_REPO="${FFMPEG_REPO:-https://github.com/FFmpeg/FFmpeg.git}"
FFMPEG_REPO="${FFMPEG_REPO_OVERRIDE:-$FFMPEG_REPO}"
GIT_BRANCH="${GIT_BRANCH:-master}"
GIT_BRANCH="${GIT_BRANCH_OVERRIDE:-$GIT_BRANCH}"
BUILD_SCRIPT="$(mktemp)"
trap "rm -f -- '$BUILD_SCRIPT'" EXIT
@ -58,9 +63,8 @@ cat <<EOF >"$BUILD_SCRIPT"
cd /ffbuild
rm -rf ffmpeg prefix
git clone https://github.com/FFmpeg/FFmpeg.git ffmpeg
git clone --filter=blob:none --branch='$GIT_BRANCH' '$FFMPEG_REPO' ffmpeg
cd ffmpeg
git checkout $GIT_BRANCH
./configure --prefix=/ffbuild/prefix --pkg-config-flags="--static" \$FFBUILD_TARGET_FLAGS $FF_CONFIGURE \
--extra-cflags='$FF_CFLAGS' --extra-cxxflags='$FF_CXXFLAGS' \