default_pre_build &&
cd "$SOURCE_DIRECTORY" &&
# fix for qt5-15
apply_patch_dir patches &&
# remove refs to non-existent vpx formats, remove in vpc-1.8
sed -i \
-e '/VPX_IMG_FMT_RGB555/D;/VPX_IMG_FMT_RGB565/D' \
-e '/VPX_IMG_FMT_RGB24/D;/VPX_IMG_FMT_RGB32/D' \
-e '/VPX_IMG_FMT_ARGB/D;/VPX_IMG_FMT_ARGB_LE/D' \
-e '/VPX_IMG_FMT_444A/D;/VPX_IMG_FMT_YUY2/D;/VPX_IMG_FMT_UYVY/D;/VPX_IMG_FMT_YVYU/D' \
  modules/codec/vpx.c &&
# Deprecation and actual removal of API just to get nicer names
# should banned, worldwide! Anyhow, it is strange how long vlc
# development needs to catch up with this, too, given that they
# _partially_ deal with the Lua API changes already.
# Grep check is faster than sed over all files.
find . -type f | xargs grep -m 1 -H luaL_checkint | cut -f 1 -d : \
| xargs sed -i 's:luaL_checkint( :luaL_checkinteger( :'
