abinfo "Updating submodules..."
# The upstream use a ssh repo, which can't be handled correctly.
# So I replace it with the HTTP repo in the patch.
# It's manually updated here.
git submodule update --init --recursive

abinfo "Removing bundled ffmpeg libs..."
# The upstream use a bundled amd64 ffmpeg lib, remove it.
rm -rv "$SRCDIR/QtScrcpy/QtScrcpyCore/src/third_party/ffmpeg/lib"

abinfo "Fixing build with FFmpeg >= 8.0..."
ab_apply_patches "$SRCDIR"/autobuild/patches/*.deferred
