2020-09-05 15:52:40 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
2021-04-04 02:08:20 +00:00
|
|
|
RAV1E_REPO="https://github.com/xiph/rav1e.git"
|
|
|
|
RAV1E_COMMIT="d6e4b5c714f107f9cc6991d44927fd029ba53a72"
|
2020-09-05 15:52:40 +00:00
|
|
|
|
|
|
|
ffbuild_enabled() {
|
|
|
|
[[ $TARGET == win32 ]] && return -1
|
|
|
|
return 0
|
|
|
|
}
|
|
|
|
|
|
|
|
ffbuild_dockerstage() {
|
|
|
|
to_df "ADD $SELF /stage.sh"
|
|
|
|
to_df "RUN run_stage"
|
|
|
|
}
|
|
|
|
|
|
|
|
ffbuild_dockerbuild() {
|
2021-04-04 02:08:20 +00:00
|
|
|
git-mini-clone "$RAV1E_REPO" "$RAV1E_COMMIT" rav1e
|
|
|
|
cd rav1e
|
2020-09-05 15:52:40 +00:00
|
|
|
|
2021-04-04 02:08:20 +00:00
|
|
|
cargo cinstall \
|
|
|
|
--target="$FFBUILD_RUST_TARGET" \
|
|
|
|
--prefix="$FFBUILD_PREFIX" \
|
2021-04-04 20:58:11 +00:00
|
|
|
--library-type=staticlib \
|
2021-04-04 02:08:20 +00:00
|
|
|
--crt-static \
|
|
|
|
--release
|
2020-09-05 15:52:40 +00:00
|
|
|
|
|
|
|
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
|
|
|
|
}
|