diff --git a/builder/scripts.d/50-rkmpp.sh b/builder/scripts.d/50-rkmpp.sh new file mode 100644 index 00000000000..c53aed24da1 --- /dev/null +++ b/builder/scripts.d/50-rkmpp.sh @@ -0,0 +1,36 @@ +#!/bin/bash + +SCRIPT_REPO="https://github.com/nyanmisaka/mpp.git" +SCRIPT_COMMIT="66af270e1e54432d0767cf929a5c4aee2b456d8c" + +ffbuild_enabled() { + [[ $TARGET == linux* ]] && [[ $TARGET == *arm64 ]] && return 0 + return -1 +} + +ffbuild_dockerbuild() { + git-mini-clone "$SCRIPT_REPO" "$SCRIPT_COMMIT" rkmpp + cd rkmpp + + mkdir rkmpp_build && cd rkmpp_build + + cmake -GNinja \ + -DCMAKE_TOOLCHAIN_FILE="$FFBUILD_CMAKE_TOOLCHAIN" \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_INSTALL_PREFIX="$FFBUILD_PREFIX" \ + -DBUILD_TEST=OFF \ + -DBUILD_SHARED_LIBS=OFF .. + + ninja -j$(nproc) + ninja install + + echo "Libs.private: -lstdc++" >> "$FFBUILD_PREFIX"/lib/pkgconfig/rockchip_mpp.pc +} + +ffbuild_configure() { + echo --enable-rkmpp +} + +ffbuild_unconfigure() { + echo --disable-rkmpp +} diff --git a/builder/scripts.d/50-rkrga.sh b/builder/scripts.d/50-rkrga.sh new file mode 100644 index 00000000000..6ad8af59552 --- /dev/null +++ b/builder/scripts.d/50-rkrga.sh @@ -0,0 +1,51 @@ +#!/bin/bash + +SCRIPT_REPO="https://github.com/nyanmisaka/rk-mirrors.git" +SCRIPT_COMMIT="a9fc19e6b906d7cecd6bcefbd45e5e151831d33f" + +ffbuild_enabled() { + [[ $TARGET == linux* ]] && [[ $TARGET == *arm64 ]] && return 0 + return -1 +} + +ffbuild_dockerbuild() { + git-mini-clone "$SCRIPT_REPO" "$SCRIPT_COMMIT" rkrga + cd rkrga + + sed -i 's/shared_library/library/g' meson.build + + mkdir rkrga_build && cd rkrga_build + + local myconf=( + --prefix="$FFBUILD_PREFIX" + --buildtype=release + --default-library=static + -Dcpp_args=-fpermissive + -Dlibdrm=false + -Dlibrga_demo=false + ) + + if [[ $TARGET == linux* ]]; then + myconf+=( + --cross-file=/cross.meson + ) + else + echo "Unknown target" + return -1 + fi + + meson "${myconf[@]}" .. + + ninja -j$(nproc) + ninja install + + echo "Libs.private: -lstdc++" >> "$FFBUILD_PREFIX"/lib/pkgconfig/librga.pc +} + +ffbuild_configure() { + echo --enable-rkrga +} + +ffbuild_unconfigure() { + echo --disable-rkrga +} \ No newline at end of file diff --git a/debian/patches/0058-add-full-hwa-pipeline-for-rockchip-rk3588-platform.patch b/debian/patches/0058-add-full-hwa-pipeline-for-rockchip-rk3588-platform.patch index 23701e00ff8..43782ca70c6 100644 --- a/debian/patches/0058-add-full-hwa-pipeline-for-rockchip-rk3588-platform.patch +++ b/debian/patches/0058-add-full-hwa-pipeline-for-rockchip-rk3588-platform.patch @@ -140,8 +140,8 @@ Index: jellyfin-ffmpeg/configure { enabled libdrm || die "ERROR: rkmpp requires --enable-libdrm"; } } -+enabled rkrga && require rkrga rga/RgaApi.h c_RkRgaBlit -lrga && -+ { require rkrga rga/im2d.h querystring -lrga && ++enabled rkrga && require_pkg_config rkrga librga rga/RgaApi.h c_RkRgaBlit && ++ { require_pkg_config rkrga librga rga/im2d.h querystring && + { enabled rkmpp || + die "ERROR: rkrga requires --enable-rkmpp"; } + }