2023-10-24 02:12:52 +02:00

57 lines
1.2 KiB
Bash
Executable File

#!/bin/bash
SCRIPT_REPO="https://code.videolan.org/rist/librist.git"
SCRIPT_COMMIT="8fc343a3bc12a3f631d7f38c817604328b7ec7e1"
ffbuild_enabled() {
return 0
}
ffbuild_dockerbuild() {
cd "$FFBUILD_DLDIR/$SELF"
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
if [[ $TARGET == win* ]]; then
# This works around mbedtls not having pkg-config, while recently having added a new dependency.
echo "Libs.private: -lbcrypt -lws2_32" >> "$FFBUILD_PREFIX"/lib/pkgconfig/librist.pc
fi
}
ffbuild_configure() {
echo --enable-librist
}
ffbuild_unconfigure() {
echo --disable-librist
}