From c406209c93271a00f52297ba240d32bae2f449c2 Mon Sep 17 00:00:00 2001 From: nanake Date: Thu, 18 Aug 2022 16:59:15 +0900 Subject: [PATCH] Add kvazaar Closes #173 Signed-off-by: nanake --- scripts.d/50-kvazaar.sh | 45 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100755 scripts.d/50-kvazaar.sh diff --git a/scripts.d/50-kvazaar.sh b/scripts.d/50-kvazaar.sh new file mode 100755 index 0000000..cd34ebe --- /dev/null +++ b/scripts.d/50-kvazaar.sh @@ -0,0 +1,45 @@ +#!/bin/bash + +SCRIPT_REPO="https://github.com/ultravideo/kvazaar.git" +SCRIPT_COMMIT="76ce0c7716f593b5f4614aa864603684dd4fae3d" + +ffbuild_enabled() { + return 0 +} + +ffbuild_dockerbuild() { + git-mini-clone "$SCRIPT_REPO" "$SCRIPT_COMMIT" kvazaar + cd kvazaar + + ./autogen.sh + + local myconf=( + --prefix="$FFBUILD_PREFIX" + --disable-shared + --enable-static + --with-pic + ) + + if [[ $TARGET == win* || $TARGET == linux* ]]; then + myconf+=( + --host="$FFBUILD_TOOLCHAIN" + ) + else + echo "Unknown target" + return -1 + fi + + ./configure "${myconf[@]}" + make -j$(nproc) + make install + + echo "Cflags.private: -DKVZ_STATIC_LIB" >> "$FFBUILD_PREFIX"/lib/pkgconfig/kvazaar.pc +} + +ffbuild_configure() { + echo --enable-libkvazaar +} + +ffbuild_unconfigure() { + echo --disable-libkvazaar +}