From a2c9b4a2d9117e009d2e4b21e264b7dbaab3f099 Mon Sep 17 00:00:00 2001 From: Jakob Meier Date: Sat, 16 Mar 2024 20:40:53 +0100 Subject: [PATCH] updated flatpak manifest to include the gstreamer gtk4 plugin --- flatpak/README.md | 2 +- flatpak/icu.ccw.Melon.json | 121 +++++++++++++++++++++++++------------ flatpak/icu.ccw.Melon.yml | 33 +++++++++- 3 files changed, 115 insertions(+), 41 deletions(-) diff --git a/flatpak/README.md b/flatpak/README.md index 3c177a1..0d90fb4 100644 --- a/flatpak/README.md +++ b/flatpak/README.md @@ -41,7 +41,7 @@ flatpak-builder --user --install --force-clean build icu.ccw.Melon.yml And run it: ```sh -flatpak run icu.ccw.melon +flatpak run icu.ccw.Melon ``` To properly install the app, diff --git a/flatpak/icu.ccw.Melon.json b/flatpak/icu.ccw.Melon.json index d249447..b6723b4 100644 --- a/flatpak/icu.ccw.Melon.json +++ b/flatpak/icu.ccw.Melon.json @@ -1,43 +1,86 @@ { - "app-id" : "icu.ccw.Melon", - "runtime" : "org.gnome.Platform", - "runtime-version" : "45", - "sdk" : "org.gnome.Sdk", - "command" : "melon", - "finish-args" : [ - "--share=network", - "--share=ipc", - "--socket=fallback-x11", - "--device=dri", - "--socket=wayland" - ], - "cleanup" : [ - "/include", - "/lib/pkgconfig", - "/man", - "/share/doc", - "/share/gtk-doc", - "/share/man", - "/share/pkgconfig", - "*.la", - "*.a" - ], - "modules" : [ - "python3-beautifulsoup4.json", - "python3-lxml.json", - "python3-requests.json", - "python3-unidecode.json", + "app-id": "icu.ccw.Melon", + "runtime": "org.gnome.Platform", + "runtime-version": "45", + "sdk": "org.gnome.Sdk", + "command": "melon", + "build-options": { + "env": { + "CARGO_HOME": "/run/build/cargo-c/cargo" + }, + "append-path": "/usr/lib/sdk/rust-stable/bin" + }, + "finish-args": [ + "--share=network", + "--share=ipc", + "--socket=fallback-x11", + "--device=dri", + "--socket=wayland", + "--socket=pulseaudio", + "--talk-name=org.gtk.vfs.*", + "--filesystem=xdg-run/gvfsd" + ], + "cleanup": [ + "/include", + "/lib/pkgconfig", + "/man", + "/share/doc", + "/share/gtk-doc", + "/share/man", + "/share/pkgconfig", + "*.la", + "*.a" + ], + "modules": [ + { + "name": "cargo-c", + "buildsystem": "simple", + "build-commands": [ + "cargo install cargo-c --root /app" + ], + "build-options": { + "build-args": [ + "--share=network" + ] + }, + "cleanup": [ + "*" + ] + }, + { + "name": "gst-plugins-rs", + "buildsystem": "simple", + "sources": [ { - "name" : "melon", - "builddir" : true, - "buildsystem" : "meson", - "sources" : [ - { - "type": "git", - "url": "https://codeberg.org/comcloudway/melon", - "branch": "main" - } - ] + "type": "git", + "url": "https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs", + "branch": "0.10" } - ] + ], + "build-options": { + "build-args": [ + "--share=network" + ] + }, + "build-commands": [ + "cargo cinstall -p gst-plugin-gtk4 --prefix=/app" + ] + }, + "python3-beautifulsoup4.json", + "python3-lxml.json", + "python3-requests.json", + "python3-unidecode.json", + { + "name": "melon", + "builddir": true, + "buildsystem": "meson", + "sources": [ + { + "type": "git", + "url": "https://codeberg.org/comcloudway/melon", + "branch": "main" + } + ] + } + ] } diff --git a/flatpak/icu.ccw.Melon.yml b/flatpak/icu.ccw.Melon.yml index 875ca3d..d9a16bb 100644 --- a/flatpak/icu.ccw.Melon.yml +++ b/flatpak/icu.ccw.Melon.yml @@ -4,12 +4,21 @@ runtime: org.gnome.Platform runtime-version: '45' sdk: org.gnome.Sdk command: melon +# from https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/blob/eb494599378cbb6d133b11748527402f59a97982/video/gtk4/README.md +build-options: + env: + CARGO_HOME: "/run/build/cargo-c/cargo" + append-path: "/usr/lib/sdk/rust-stable/bin" finish-args: - "--share=network" - "--share=ipc" - "--socket=fallback-x11" - "--device=dri" - "--socket=wayland" + - "--socket=pulseaudio" + # from https://docs.flatpak.org/en/latest/sandbox-permissions.html#gvfs-access + - "--talk-name=org.gtk.vfs.*" + - "--filesystem=xdg-run/gvfsd" cleanup: - "/include" - "/lib/pkgconfig" @@ -21,6 +30,28 @@ cleanup: - "*.la" - "*.a" modules: + # gstreamer dependencies + # from https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/blob/eb494599378cbb6d133b11748527402f59a97982/video/gtk4/README.md + - name: "cargo-c" + buildsystem: "simple" + build-commands: + - "cargo install cargo-c --root /app" + build-options: + build-args: + - "--share=network" + cleanup: + - "*" + - name: "gst-plugins-rs" + buildsystem: "simple" + sources: + - type: "git" + url: "https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs" + branch: "0.11.1" # adjusted to match alpine edge + build-options: + build-args: + - "--share=network" + build-commands: + - "cargo cinstall -p gst-plugin-gtk4 --prefix=/app" # dependencies - python3-beautifulsoup4.json - python3-lxml.json @@ -38,7 +69,7 @@ modules: # uncomment to build a specific version # - type: git # url: https://codeberg.org/comcloudway/melon - # tag: "0.1.3" + # tag: "0.2.0" # # build latest main branch # - type: git -- 2.38.5