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

48 lines
975 B
Bash
Raw Normal View History

2020-09-05 15:52:40 +00:00
#!/bin/bash
2020-09-27 14:17:47 +00:00
RAV1E_SRC_PREFIX="https://github.com/xiph/rav1e/releases/download/p20200922"
2020-09-05 15:52:40 +00:00
ffbuild_enabled() {
[[ $TARGET == win32 ]] && return -1
2020-09-05 16:33:21 +00:00
[[ $VARIANT == *4.2* ]] && return -1
2020-09-05 15:52:40 +00:00
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() {
2020-09-05 16:33:21 +00:00
[[ $VARIANT == *4.2* ]] && return 0
2020-09-05 15:52:40 +00:00
echo --disable-librav1e
}