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

54 lines
1,006 B
Bash
Raw Normal View History

2020-09-04 16:45:25 +00:00
#!/bin/bash
LIBVPX_REPO="https://chromium.googlesource.com/webm/libvpx"
2020-09-27 14:17:47 +00:00
LIBVPX_COMMIT="aea631263d38e45a7f119d39ccc3dc065db01f08"
2020-09-04 16:45:25 +00:00
ffbuild_enabled() {
return 0
}
ffbuild_dockerstage() {
2020-09-05 14:38:11 +00:00
to_df "ADD $SELF /stage.sh"
to_df "RUN run_stage"
2020-09-04 16:45:25 +00:00
}
ffbuild_dockerbuild() {
2020-09-05 20:34:23 +00:00
git-mini-clone "$LIBVPX_REPO" "$LIBVPX_COMMIT" libvpx
2020-09-04 16:45:25 +00:00
cd libvpx
local myconf=(
--disable-shared
--enable-static
--enable-pic
--disable-examples
--disable-tools
--disable-docs
--prefix="$FFBUILD_PREFIX"
)
if [[ $TARGET == win* ]]; then
myconf+=(
--target=x86_64-win64-gcc
)
export CROSS="$FFBUILD_CROSS_PREFIX"
else
echo "Unknown target"
return -1
fi
./configure "${myconf[@]}" || return -1
make -j$(nproc) || return -1
make install || return -1
cd ..
rm -rf libvpx
}
ffbuild_configure() {
echo --enable-libvpx
}
ffbuild_unconfigure() {
echo --disable-libvpx
}