Add librist

This commit is contained in:
nanake 2021-11-19 07:54:46 +09:00 committed by BtbN
parent 31dadc6444
commit cf8de5ee5e
2 changed files with 54 additions and 2 deletions

View file

@ -2,10 +2,9 @@
MBEDTLS_REPO="https://github.com/ARMmbed/mbedtls.git"
# HEAD of development_2.x
MBEDTLS_COMMIT="d599dc7f1bd26889d85092b9774cdef37e62e3c0"
MBEDTLS_COMMIT="1d7f7a7c6e625e48a4996bc751c39fb16a8be868"
ffbuild_enabled() {
[[ $TARGET == win* ]] && return -1
return 0
}
@ -24,5 +23,6 @@ ffbuild_dockerbuild() {
}
ffbuild_configure() {
[[ $TARGET == win* ]] && return -1
echo --enable-mbedtls
}

View file

@ -0,0 +1,52 @@
#!/bin/bash
LIBRIST_REPO="https://code.videolan.org/rist/librist.git"
LIBRIST_COMMIT="0b1aaf995c4cad83d562ec7887180cc6ee132c84"
ffbuild_enabled() {
return 0
}
ffbuild_dockerbuild() {
git-mini-clone "$LIBRIST_REPO" "$LIBRIST_COMMIT" librist
cd 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
}