2020-09-04 16:45:25 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
2022-07-12 15:54:12 +00:00
|
|
|
SCRIPT_REPO="https://chromium.googlesource.com/webm/libvpx"
|
2023-03-19 11:26:11 +00:00
|
|
|
SCRIPT_COMMIT="6788c75055899796c13787ed44cc6f1cc45e09d7"
|
2020-09-04 16:45:25 +00:00
|
|
|
|
|
|
|
ffbuild_enabled() {
|
|
|
|
return 0
|
|
|
|
}
|
|
|
|
|
|
|
|
ffbuild_dockerbuild() {
|
2022-07-12 15:54:12 +00:00
|
|
|
git-mini-clone "$SCRIPT_REPO" "$SCRIPT_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
|
2022-10-30 20:42:22 +00:00
|
|
|
--disable-unit-tests
|
2020-10-27 14:14:07 +00:00
|
|
|
--enable-vp9-highbitdepth
|
2020-09-04 16:45:25 +00:00
|
|
|
--prefix="$FFBUILD_PREFIX"
|
|
|
|
)
|
|
|
|
|
2020-09-27 20:10:05 +00:00
|
|
|
if [[ $TARGET == win64 ]]; then
|
2020-09-04 16:45:25 +00:00
|
|
|
myconf+=(
|
|
|
|
--target=x86_64-win64-gcc
|
|
|
|
)
|
|
|
|
export CROSS="$FFBUILD_CROSS_PREFIX"
|
2020-09-27 20:10:05 +00:00
|
|
|
elif [[ $TARGET == win32 ]]; then
|
|
|
|
myconf+=(
|
|
|
|
--target=x86-win32-gcc
|
|
|
|
)
|
|
|
|
export CROSS="$FFBUILD_CROSS_PREFIX"
|
2022-05-09 22:15:31 +00:00
|
|
|
elif [[ $TARGET == linux64 ]]; then
|
2021-05-14 02:52:29 +00:00
|
|
|
myconf+=(
|
|
|
|
--target=x86_64-linux-gcc
|
|
|
|
)
|
|
|
|
export CROSS="$FFBUILD_CROSS_PREFIX"
|
2022-05-09 22:15:31 +00:00
|
|
|
elif [[ $TARGET == linuxarm64 ]]; then
|
|
|
|
myconf+=(
|
|
|
|
--target=arm64-linux-gcc
|
|
|
|
)
|
|
|
|
export CROSS="$FFBUILD_CROSS_PREFIX"
|
2021-05-14 02:52:29 +00:00
|
|
|
else
|
2020-09-04 16:45:25 +00:00
|
|
|
echo "Unknown target"
|
|
|
|
return -1
|
|
|
|
fi
|
|
|
|
|
2021-04-04 21:20:31 +00:00
|
|
|
./configure "${myconf[@]}"
|
|
|
|
make -j$(nproc)
|
|
|
|
make install
|
2022-11-02 21:09:11 +00:00
|
|
|
|
|
|
|
# Work around strip breaking LTO symbol index
|
|
|
|
"$RANLIB" "$FFBUILD_PREFIX"/lib/libvpx.a
|
2020-09-04 16:45:25 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
ffbuild_configure() {
|
|
|
|
echo --enable-libvpx
|
|
|
|
}
|
|
|
|
|
|
|
|
ffbuild_unconfigure() {
|
|
|
|
echo --disable-libvpx
|
|
|
|
}
|