2020-09-06 16:28:49 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
2022-07-12 15:54:12 +00:00
|
|
|
SCRIPT_REPO="https://aomedia.googlesource.com/aom"
|
2023-05-29 12:10:36 +00:00
|
|
|
SCRIPT_COMMIT="d954a78fdae80b49229cb7c4b7032f5c0e67b0e8"
|
2020-09-06 16:28:49 +00:00
|
|
|
|
|
|
|
ffbuild_enabled() {
|
|
|
|
return 0
|
|
|
|
}
|
|
|
|
|
2021-04-15 19:43:35 +00:00
|
|
|
ffbuild_dockerstage() {
|
|
|
|
to_df "RUN --mount=src=${SELF},dst=/stage.sh --mount=src=patches/aom,dst=/patches run_stage /stage.sh"
|
|
|
|
}
|
|
|
|
|
2020-09-06 16:28:49 +00:00
|
|
|
ffbuild_dockerbuild() {
|
2022-07-12 15:54:12 +00:00
|
|
|
git-mini-clone "$SCRIPT_REPO" "$SCRIPT_COMMIT" aom
|
2020-09-06 16:28:49 +00:00
|
|
|
cd aom
|
|
|
|
|
2021-04-15 19:43:35 +00:00
|
|
|
for patch in /patches/*.patch; do
|
|
|
|
echo "Applying $patch"
|
|
|
|
git am < "$patch"
|
|
|
|
done
|
|
|
|
|
2020-09-06 16:28:49 +00:00
|
|
|
mkdir cmbuild && cd cmbuild
|
|
|
|
|
2021-02-19 16:08:32 +00:00
|
|
|
# Workaround broken build system
|
|
|
|
export CFLAGS="$CFLAGS -pthread -I/opt/ffbuild/include/libvmaf"
|
|
|
|
|
2021-04-04 21:20:31 +00:00
|
|
|
cmake -DCMAKE_TOOLCHAIN_FILE="$FFBUILD_CMAKE_TOOLCHAIN" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="$FFBUILD_PREFIX" -DBUILD_SHARED_LIBS=OFF -DENABLE_EXAMPLES=NO -DENABLE_TESTS=NO -DENABLE_TOOLS=NO -DCONFIG_TUNE_VMAF=1 ..
|
|
|
|
make -j$(nproc)
|
|
|
|
make install
|
2020-09-06 16:28:49 +00:00
|
|
|
|
|
|
|
echo "Requires.private: libvmaf" >> "$FFBUILD_PREFIX/lib/pkgconfig/aom.pc"
|
|
|
|
}
|
|
|
|
|
|
|
|
ffbuild_configure() {
|
|
|
|
echo --enable-libaom
|
|
|
|
}
|
|
|
|
|
|
|
|
ffbuild_unconfigure() {
|
|
|
|
echo --disable-libaom
|
|
|
|
}
|