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

56 lines
1.0 KiB
Bash
Executable File

#!/bin/bash
SCRIPT_REPO="https://code.videolan.org/rist/librist.git"
SCRIPT_COMMIT="234c2e224c1dc60276a7b427acd3cc0f8bdb3bda"
ffbuild_enabled() {
return 0
}
ffbuild_dockerdl() {
git-mini-clone "$SCRIPT_REPO" "$SCRIPT_COMMIT" librist
}
ffbuild_dockerbuild() {
cd "$FFBUILD_DLDIR"/librist
mkdir build && cd build
local myconf=(
--prefix="$FFBUILD_PREFIX"
--buildtype=release
--default-library=static
-Duse_mbedtls=true
-Dbuiltin_mbedtls=false
-Dbuilt_tools=false
-Dtest=false
)
if [[ $TARGET == win* ]]; then
myconf+=(
-Dhave_mingw_pthreads=true
)
fi
if [[ $TARGET == win* || $TARGET == linux* ]]; then
myconf+=(
--cross-file=/cross.meson
)
else
echo "Unknown target"
return -1
fi
meson "${myconf[@]}" ..
ninja -j"$(nproc)"
ninja install
}
ffbuild_configure() {
echo --enable-librist
}
ffbuild_unconfigure() {
echo --disable-librist
}