Skip to content

Commit

Permalink
Make ffmpeg repo overridable
Browse files Browse the repository at this point in the history
  • Loading branch information
BtbN committed Nov 13, 2021
1 parent 482c7d7 commit c26651f
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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' \
Expand Down

0 comments on commit c26651f

Please sign in to comment.