Skip to content

Commit

Permalink
add patch for rkrga
Browse files Browse the repository at this point in the history
  • Loading branch information
bjia56 authored Jun 20, 2024
1 parent de096e9 commit 293227e
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 4 deletions.
27 changes: 27 additions & 0 deletions builder/patches/rkrga/0000-build-static.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
From 2a8381af76eab5bec53b74ca72f7855576ba780d Mon Sep 17 00:00:00 2001
From: Brett Jia <[email protected]>
Date: Wed, 19 Jun 2024 21:52:59 -0400
Subject: [PATCH] switch meson to build static lib

---
meson.build | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/meson.build b/meson.build
index be2c2e9bb249..6f774754d628 100644
--- a/meson.build
+++ b/meson.build
@@ -30,12 +30,11 @@ librga_srcs = [

incdir = include_directories('include', 'im2d_api', 'core/hardware', 'core/utils', 'core/3rdparty/libdrm/include/drm')

-librga = shared_library(
+librga = static_library(
'rga',
librga_srcs,
dependencies : [libthreads_dep],
include_directories : incdir,
- version : meson.project_version(),
cpp_args : ['-w'],
install : true,
)
13 changes: 9 additions & 4 deletions builder/scripts.d/60-rkrga.sh
Original file line number Diff line number Diff line change
@@ -1,22 +1,27 @@
#!/bin/bash

SCRIPT_REPO="https://github.com/bjia56/rk-mirrors.git"
SCRIPT_COMMIT="jellyfin-rga-1"
#"a9fc19e6b906d7cecd6bcefbd45e5e151831d33f"
SCRIPT_REPO="https://github.com/nyanmisaka/rk-mirrors.git"
SCRIPT_COMMIT="a9fc19e6b906d7cecd6bcefbd45e5e151831d33f"

ffbuild_enabled() {
[[ $TARGET == linux* ]] && [[ $TARGET == *arm64 ]] && return 0
return -1
}

ffbuild_dockerstage() {
to_df "RUN --mount=src=${SELF},dst=/stage.sh --mount=src=patches/rkmpp,dst=/patches run_stage /stage.sh"
to_df "RUN --mount=src=${SELF},dst=/stage.sh --mount=src=patches/rkrga,dst=/patches run_stage /stage.sh"
}

ffbuild_dockerbuild() {
git clone "$SCRIPT_REPO" rkrga
cd rkrga
git checkout "$SCRIPT_COMMIT"

for patch in /patches/*.patch; do
echo "Applying $patch"
patch -p1 < "$patch"
done

cd ..

meson setup rkrga rkrga_build \
Expand Down

0 comments on commit 293227e

Please sign in to comment.