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

46 lines
894 B
Bash
Raw Normal View History

2020-09-05 15:52:40 +00:00
#!/bin/bash
RAV1E_SRC_PREFIX="https://github.com/xiph/rav1e/releases/download/p20200901"
ffbuild_enabled() {
[[ $TARGET == win32 ]] && return -1
return 0
}
ffbuild_dockerstage() {
to_df "ADD $SELF /stage.sh"
to_df "RUN run_stage"
}
ffbuild_dockerbuild() {
mkdir rav1e && cd rav1e
if [[ $TARGET == win64 ]]; then
wget -O rav1e.zip "${RAV1E_SRC_PREFIX}/rav1e-windows-gnu.zip"
else
echo "Unknown target"
return -1
fi
unzip rav1e.zip
cd rav1e-*
rm -r bin lib/*.dll.a
sed -i "s|^prefix=.*|prefix=${FFBUILD_PREFIX}|" lib/pkgconfig/rav1e.pc
mkdir -p "$FFBUILD_PREFIX"/{include,lib/pkgconfig}
cp -r include/. "$FFBUILD_PREFIX"/include/.
cp -r lib/. "$FFBUILD_PREFIX"/lib/.
cd ..
rm -rf rav1e
}
ffbuild_configure() {
echo --enable-librav1e
}
ffbuild_unconfigure() {
echo --disable-librav1e
}