FFmpeg-Builds/scripts.d/50-aom.sh

41 lines
984 B
Bash
Raw Normal View History

2020-09-06 16:28:49 +00:00
#!/bin/bash
AOM_REPO="https://aomedia.googlesource.com/aom"
2021-02-19 16:08:32 +00:00
AOM_COMMIT="08eb1d45f2f8c5dbeb2b77ba211c33c32b0fbe53"
2020-09-06 16:28:49 +00:00
ffbuild_enabled() {
return 0
}
ffbuild_dockerstage() {
to_df "ADD $SELF /stage.sh"
to_df "RUN run_stage"
}
ffbuild_dockerbuild() {
git-mini-clone "$AOM_REPO" "$AOM_COMMIT" aom
cd aom
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"
2020-12-22 21:34:59 +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 .. || return -1
2020-09-06 16:28:49 +00:00
make -j$(nproc) || return -1
make install || return -1
echo "Requires.private: libvmaf" >> "$FFBUILD_PREFIX/lib/pkgconfig/aom.pc"
cd ../..
rm -rf aom
}
ffbuild_configure() {
echo --enable-libaom
}
ffbuild_unconfigure() {
echo --disable-libaom
}