app-id: io.github.obaidaalbitar.gsub runtime: org.gnome.Platform # GNOME 50 (libadwaita 1.9): the app needs Adw 1.8+ (Adw.ShortcutsDialog); # runtime 48 only ships libadwaita 1.7 and is end-of-life anyway. runtime-version: '50' sdk: org.gnome.Sdk command: gsub # Portals (GtkFileChooser / drag-and-drop) provide file access, so no # --filesystem permissions are needed. finish-args: - --share=ipc - --socket=fallback-x11 - --socket=wayland - --device=dri - --socket=pulseaudio modules: # --- libmpv toolchain -------------------------------------------------- # mpv brings its own FFmpeg (decoders/demuxers only), libass for subtitle # rendering, libplacebo (mpv hard dependency), and uchardet so embedded # subtitle tracks get charset-detected by libmpv itself. - name: ffmpeg config-opts: - --enable-shared - --disable-static - --disable-debug - --disable-doc - --disable-programs - --disable-encoders - --disable-muxers - --disable-devices cleanup: - /include - /lib/pkgconfig - /share/ffmpeg sources: - type: archive url: https://ffmpeg.org/releases/ffmpeg-8.1.2.tar.xz sha256: 464beb5e7bf0c311e68b45ae2f04e9cc2af88851abb4082231742a74d97b524c - name: uchardet buildsystem: cmake-ninja # CMAKE_POLICY_VERSION_MINIMUM: CMake 4 (GNOME 50 SDK) rejects uchardet's # ancient cmake_minimum_required; the override restores compatibility. config-opts: - -DCMAKE_BUILD_TYPE=Release - -DBUILD_STATIC=0 - -DCMAKE_POLICY_VERSION_MINIMUM=3.5 cleanup: - /bin - /include - /lib/pkgconfig - /share/man sources: - type: archive url: https://gitlab.freedesktop.org/uchardet/uchardet/-/archive/v0.0.8/uchardet-v0.0.8.tar.gz sha256: 5aa402a1b5b1dbb8d81096f141ff1224e079f4d3a1db0f79ecca782756d3a416 - name: libass config-opts: - --disable-static cleanup: - /include - /lib/pkgconfig sources: - type: archive url: https://github.com/libass/libass/releases/download/0.17.5/libass-0.17.5.tar.xz sha256: 2dca25c0e0c837ddf00b52011b3f82cac1e4ddd3ad018227806b0c2288864acc - name: libplacebo buildsystem: meson config-opts: # GL/EGL only — gsub renders through GTK's GLArea via mpv's render API. - -Dvulkan=disabled - -Dshaderc=disabled - -Dglslang=disabled - -Dd3d11=disabled - -Dlibdovi=disabled - -Ddemos=false cleanup: - /include - /lib/pkgconfig sources: # git source (not a tag archive): flatpak-builder initialises the # vendored glad submodule under 3rdparty/, which archives omit. - type: git url: https://github.com/haasn/libplacebo.git tag: v7.360.1 commit: 719cc95244a1f1d648dd72459822e026e6530f22 - name: libmpv buildsystem: meson config-opts: - -Dlibmpv=true - -Dcplayer=false - -Dbuild-date=false - -Dmanpage-build=disabled - -Dlua=disabled - -Djavascript=disabled - -Ddvdnav=disabled - -Dcdda=disabled - -Ddvbin=disabled - -Dlibarchive=disabled - -Dvulkan=disabled cleanup: - /include - /lib/pkgconfig sources: - type: archive url: https://github.com/mpv-player/mpv/archive/refs/tags/v0.41.0.tar.gz sha256: ee21092a5ee427353392360929dc64645c54479aefdb5babc5cfbb5fad626209 # --- build tools --------------------------------------------------------- - name: blueprint-compiler buildsystem: meson sources: - type: archive url: https://gitlab.gnome.org/GNOME/blueprint-compiler/-/archive/v0.22.2/blueprint-compiler-v0.22.2.tar.gz sha256: ba4dddeb22a1929ed5987e74cb69c592e22bc74f0c04cfdb9028b907cf688af6 # --- Python dependencies ------------------------------------------------- - name: python-deps buildsystem: simple # flatpak-builder sandboxes module builds without network; pip needs it. build-options: build-args: - --share=network build-commands: # PyGObject/pycairo are NOT installed here: the GNOME runtime already # ships them (3.52.4 in runtime 48, above our >=3.42 floor), and pip # cannot uninstall the SDK copy (no RECORD file) to replace it. - pip3 install --no-deps --prefix=/app python-mpv==1.0.8 PyOpenGL==3.1.10 charset-normalizer==3.5.1 # PyAV is built from source against the bundled FFmpeg so the whole app # shares one copy of libav* (its wheel would bundle a second, conflicting # set of FFmpeg libraries in the same process). - PKG_CONFIG_PATH=/app/lib/pkgconfig pip3 install --no-deps --prefix=/app --no-binary=av av==18.1.0 # --- the app --------------------------------------------------------------- - name: gsub buildsystem: meson sources: - type: dir path: .