2023-12-21 01:31:23 +01:00

55 lines
1.1 KiB
Bash
Executable File

#!/bin/bash
SCRIPT_REPO="https://code.videolan.org/rist/librist.git"
SCRIPT_COMMIT="1e805500dc14a507598cebdd49557c32e514899f"
ffbuild_enabled() {
return 0
}
ffbuild_dockerbuild() {
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
}