From e888fcea665dbd795f5f91c9b1c943fe784f3469 Mon Sep 17 00:00:00 2001 From: Komh Date: Thu, 20 Aug 2026 22:41:07 +0800 Subject: [PATCH 1/6] feat(prebuilt): add nine standalone library stacks MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Groundwork for moving dk.nikse.subtitleedit's build dependencies out of FlatPark's OSTree repository (flatpark/flatpark#238). Each is its own release rather than one bundle, so an app can pin exactly what it needs and a version bump touches one stack instead of a monolith: x264 libx264.so.165 H.264 encoder x265 libx265.so.216 H.265 encoder, 8-bit only lame libmp3lame.so.0 MP3 encoder rubberband librubberband.so.3 time-stretch / pitch-shift libass libass.so.9 (0.17.4) ASS/SSA subtitle rendering libvpl libvpl.so.2 Intel QSV dispatcher uchardet libuchardet.so.0 charset detection leptonica libleptonica.so.6 image processing, Tesseract's base sevenzip bin/7zr .7z extractor, one dependency-free binary All dev-complete (library + headers + pkg-config, and CMake config where upstream installs one) so ffmpeg-full.yml and tesseract.yml can build against them, which is what they are for in the first place. libass is deliberately its own release. mpv-stack builds its own copy today, so an app shipping both mpv-stack and an ffmpeg built against a different libass gets two libass.so.9 files contending for one soname in /app/lib, decided by module order. One release consumed from both ends settles that by construction rather than per app. Two things settled by building rather than by assumption: * rubberband's meson picks its BUILT-IN FFT and resampler even though fftw3, libsamplerate and speexdsp are all in the GNOME SDK. Pinned explicitly with -Dfft=builtin -Dresampler=builtin so a change in upstream's defaults cannot silently add a DT_NEEDED. The result links nothing beyond libstdc++/libm/ libgcc/libc. Its LADSPA plugin is dropped: unpacked under an app's /app/extra no LADSPA host can ever find it. * leptonica's dependency closure resolves completely inside org.gnome.Platform//50 — libtiff, libgif, libopenjp2, libwebp, libzstd and the rest are all there, nothing has to travel with the archive. Every stack drops *.a and *.la; a .la records absolute build paths and misleads a downstream libtool link. Each built locally against org.gnome.Sdk//50 and its contents checked. Co-Authored-By: Claude Opus 5 --- lame.yml | 38 ++++++++++++++++++++++++++++++++++++++ leptonica.yml | 38 ++++++++++++++++++++++++++++++++++++++ libass.yml | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ libvpl.yml | 42 ++++++++++++++++++++++++++++++++++++++++++ rubberband.yml | 46 ++++++++++++++++++++++++++++++++++++++++++++++ sevenzip.yml | 35 +++++++++++++++++++++++++++++++++++ uchardet.yml | 39 +++++++++++++++++++++++++++++++++++++++ x264.yml | 39 +++++++++++++++++++++++++++++++++++++++ x265.yml | 44 ++++++++++++++++++++++++++++++++++++++++++++ 9 files changed, 370 insertions(+) create mode 100644 lame.yml create mode 100644 leptonica.yml create mode 100644 libass.yml create mode 100644 libvpl.yml create mode 100644 rubberband.yml create mode 100644 sevenzip.yml create mode 100644 uchardet.yml create mode 100644 x264.yml create mode 100644 x265.yml diff --git a/lame.yml b/lame.yml new file mode 100644 index 0000000..61bc77a --- /dev/null +++ b/lame.yml @@ -0,0 +1,38 @@ +# LAME, prebuilt for FlatPark apps. +# +# libmp3lame is the MP3 encoder ffmpeg links for `-c:a libmp3lame`. Neither +# runtime ships it, and the runtime's own ffmpeg is built without it, so an app +# offering MP3 output has to bring its own. +# +# Dev-complete (library + headers + pkg-config) so a consumer can build against +# it; ffmpeg-full.yml does. The `lame`/`mp3rtp` command-line front ends are not +# built: consumers link the library. +id: org.flatpark.Prebuilt.Lame +runtime: org.gnome.Platform +runtime-version: "50" +sdk: org.gnome.Sdk +command: /usr/bin/true +build-options: + # no-debuginfo suppresses the .Debug extension but does NOT strip: on its own + # it leaves full DWARF inside every library in the archive. Strip explicitly. + # A consumer that needs symbols rebuilds from this manifest at its release tag. + no-debuginfo: true + strip: true +cleanup: + - "*.a" + # .la files record absolute build paths and mislead a downstream libtool link. + - "*.la" + - /share/doc + - /share/man + +modules: + - name: lame + buildsystem: autotools + config-opts: + - --libdir=/app/lib + - --disable-static + - --disable-frontend + sources: + - type: archive + url: https://downloads.sourceforge.net/project/lame/lame/3.100/lame-3.100.tar.gz + sha256: ddfe36cab873794038ae2c1210557ad34857a4b6bdc515785d1da9e175b1da1e diff --git a/leptonica.yml b/leptonica.yml new file mode 100644 index 0000000..1fa5e4c --- /dev/null +++ b/leptonica.yml @@ -0,0 +1,38 @@ +# Leptonica, prebuilt for FlatPark apps. +# +# Image-processing library. On its own it is a general-purpose toolkit, but the +# reason it is here is that Tesseract is built on it and links it directly: an +# app doing OCR needs both, and tesseract.yml consumes this release rather than +# rebuilding it. +# +# Dev-complete (library + headers + pkg-config) so a consumer can build against +# it. The command-line programs are not built — they are a large set of demos and +# converters that nothing downstream calls. Its image codecs (zlib, libpng, +# libjpeg, libtiff, libwebp, giflib) come from the runtime. +id: org.flatpark.Prebuilt.Leptonica +runtime: org.gnome.Platform +runtime-version: "50" +sdk: org.gnome.Sdk +command: /usr/bin/true +build-options: + # no-debuginfo suppresses the .Debug extension but does NOT strip: on its own + # it leaves full DWARF inside every library in the archive. Strip explicitly. + # A consumer that needs symbols rebuilds from this manifest at its release tag. + no-debuginfo: true + strip: true +cleanup: + - "*.a" + +modules: + - name: leptonica + buildsystem: cmake-ninja + builddir: true + config-opts: + - -DCMAKE_BUILD_TYPE=Release + - -DCMAKE_INSTALL_LIBDIR=lib + - -DBUILD_SHARED_LIBS=ON + - -DBUILD_PROG=OFF + sources: + - type: archive + url: https://github.com/DanBloomberg/leptonica/releases/download/1.85.0/leptonica-1.85.0.tar.gz + sha256: 3745ae3bf271a6801a2292eead83ac926e3a9bc1bf622e9cd4dd0f3786e17205 diff --git a/libass.yml b/libass.yml new file mode 100644 index 0000000..3abac36 --- /dev/null +++ b/libass.yml @@ -0,0 +1,49 @@ +# libass, prebuilt for FlatPark apps. +# +# ASS/SSA subtitle renderer. Two quite different consumers need it: +# +# * ffmpeg, for the `ass` and `subtitles` filters — burning subtitles into a +# video. An ffmpeg built without libass fails at filter-graph parse time, +# not at run time, so the feature is simply absent. +# * mpv, which renders subtitles through it during playback. +# +# It exists as its own release precisely because of that overlap. mpv-stack +# currently builds its own copy, which means an app that ships both mpv-stack and +# an ffmpeg built against a different libass ends up with two libass.so.9 files +# fighting over the same soname in /app/lib, resolved by module ordering. Pinning +# one release here is the fix at the root: consume this from both and there is +# one libass in the tree, at one version, by construction. +# +# Dev-complete (library + headers + pkg-config) so consumers can build against it. +id: org.flatpark.Prebuilt.Libass +runtime: org.gnome.Platform +runtime-version: "50" +sdk: org.gnome.Sdk +command: /usr/bin/true +build-options: + # no-debuginfo suppresses the .Debug extension but does NOT strip: on its own + # it leaves full DWARF inside every library in the archive. Strip explicitly. + # A consumer that needs symbols rebuilds from this manifest at its release tag. + no-debuginfo: true + strip: true +cleanup: + - "*.a" + # .la files record absolute build paths and mislead a downstream libtool link. + - "*.la" + +modules: + - name: libass + buildsystem: autotools + config-opts: + - --libdir=/app/lib + - --disable-static + # ASM rasteriser paths; nasm comes from the SDK. + - --enable-asm + # Font lookup through the runtime's fontconfig, so a subtitle naming a + # font by family resolves against the host's fonts rather than failing. + - --enable-fontconfig + sources: + - type: git + url: https://github.com/libass/libass.git + tag: "0.17.4" + commit: bbb3c7f1570a4a021e52683f3fbdf74fe492ae84 diff --git a/libvpl.yml b/libvpl.yml new file mode 100644 index 0000000..526d641 --- /dev/null +++ b/libvpl.yml @@ -0,0 +1,42 @@ +# Intel VPL dispatcher, prebuilt for FlatPark apps. +# +# libvpl is the dispatcher half of Intel's Video Processing Library: it is what +# ffmpeg's `--enable-libvpl` links, and at run time it loads whatever Intel media +# driver the host provides (or finds none and the QSV encoders simply do not +# appear). The driver itself is never shipped here — only the dispatcher, which +# is the part that has to be present at link time. +# +# Dev-complete (library + headers + pkg-config) so a consumer can build against +# it; ffmpeg-full.yml does. Tests, examples and the example source install are +# all off: nothing downstream links them. +id: org.flatpark.Prebuilt.Libvpl +runtime: org.gnome.Platform +runtime-version: "50" +sdk: org.gnome.Sdk +command: /usr/bin/true +build-options: + # no-debuginfo suppresses the .Debug extension but does NOT strip: on its own + # it leaves full DWARF inside every library in the archive. Strip explicitly. + # A consumer that needs symbols rebuilds from this manifest at its release tag. + no-debuginfo: true + strip: true +cleanup: + - "*.a" + - /share + # An env-setup script for a non-Flatpak install layout; nothing sources it here. + - /etc + +modules: + - name: libvpl + buildsystem: cmake-ninja + config-opts: + - -DCMAKE_BUILD_TYPE=Release + - -DCMAKE_INSTALL_LIBDIR=lib + - -DBUILD_TESTS=OFF + - -DBUILD_EXAMPLES=OFF + - -DINSTALL_EXAMPLE_CODE=OFF + sources: + - type: git + url: https://github.com/intel/libvpl.git + tag: v2.15.0 + commit: c45b5d786bf7cdabbe49ff1bab78693ad78feb78 diff --git a/rubberband.yml b/rubberband.yml new file mode 100644 index 0000000..c99c4aa --- /dev/null +++ b/rubberband.yml @@ -0,0 +1,46 @@ +# Rubber Band, prebuilt for FlatPark apps. +# +# Time-stretching and pitch-shifting library. ffmpeg links it for the +# `rubberband` audio filter — changing playback speed without changing pitch, +# which is what a subtitle or media editor uses when retiming audio to video. +# +# Dev-complete (library + headers + pkg-config) so a consumer can build against +# it; ffmpeg-full.yml does. The FFT and resampler backends are pinned to the +# built-in implementations rather than left on autodetection: fftw3, libsamplerate +# and speexdsp are all present in the GNOME SDK, so meson would happily pick a +# different backend if upstream ever changed its defaults, and the archive would +# silently gain a DT_NEEDED. Built-in is also what upstream selects by default. +# The result links nothing outside libstdc++/libm/libgcc/libc. +id: org.flatpark.Prebuilt.Rubberband +runtime: org.gnome.Platform +runtime-version: "50" +sdk: org.gnome.Sdk +command: /usr/bin/true +build-options: + # no-debuginfo suppresses the .Debug extension but does NOT strip: on its own + # it leaves full DWARF inside every library in the archive. Strip explicitly. + # A consumer that needs symbols rebuilds from this manifest at its release tag. + no-debuginfo: true + strip: true +cleanup: + - "*.a" + - /share/doc + - /share/man + # A LADSPA plugin is only reachable from a LADSPA host scanning a system plugin + # path; unpacked under an app's /app/extra it can never be found. The + # rubberband/rubberband-r3 CLIs are kept — they are this library's own front end. + - /lib/ladspa + - /share/ladspa + +modules: + - name: rubberband + buildsystem: meson + config-opts: + - --libdir=lib + - -Dfft=builtin + - -Dresampler=builtin + sources: + - type: git + url: https://github.com/breakfastquay/rubberband.git + tag: v4.0.0 + commit: 1d95888bec3ae0a17c0c4af791810d5a63f6bc35 diff --git a/sevenzip.yml b/sevenzip.yml new file mode 100644 index 0000000..90ff0c5 --- /dev/null +++ b/sevenzip.yml @@ -0,0 +1,35 @@ +# 7-Zip's 7zr, prebuilt for FlatPark apps. +# +# A standalone extractor, not a library. Apps that download .7z archives at run +# time — model files, OCR data, tool bundles that upstream only publishes in that +# format — need something that can unpack them, and neither runtime ships a 7z +# implementation. `7zr` is upstream's reduced build: the .7z format only, no +# zip/rar/tar handlers, no GUI, one binary with no dependencies beyond libc. +# +# The archive therefore ships a single file, bin/7zr. A consuming app puts that +# bin/ on PATH. +id: org.flatpark.Prebuilt.Sevenzip +runtime: org.gnome.Platform +runtime-version: "50" +sdk: org.gnome.Sdk +command: /usr/bin/true +build-options: + # no-debuginfo suppresses the .Debug extension but does NOT strip: on its own + # it leaves full DWARF inside the binary. Strip explicitly. A consumer that + # needs symbols rebuilds from this manifest at its release tag. + no-debuginfo: true + strip: true + +modules: + - name: sevenzip + buildsystem: simple + build-commands: + # Upstream ships plain makefiles, no configure and no install target. + - make -C CPP/7zip/Bundles/Alone7z -f makefile.gcc -j$FLATPAK_BUILDER_N_JOBS + - install -Dm755 CPP/7zip/Bundles/Alone7z/_o/7zr /app/bin/7zr + sources: + - type: archive + url: https://github.com/ip7z/7zip/releases/download/25.01/7z2501-src.tar.xz + sha256: ed087f83ee789c1ea5f39c464c55a5c9d4008deb0efe900814f2df262b82c36e + # The tarball has no top-level directory to strip. + strip-components: 0 diff --git a/uchardet.yml b/uchardet.yml new file mode 100644 index 0000000..c27b55a --- /dev/null +++ b/uchardet.yml @@ -0,0 +1,39 @@ +# uchardet, prebuilt for FlatPark apps. +# +# Mozilla's charset detector, maintained at freedesktop. An app that opens text +# files it did not write — subtitle files being the obvious case, which arrive as +# CP1252, Big5, Shift_JIS or GB18030 with nothing declaring which — uses it to +# guess the encoding before decoding. Neither runtime ships it. +# +# Dev-complete (library + headers + pkg-config) so a consumer can build against +# it. The `uchardet` CLI is not shipped: consumers link the library. +id: org.flatpark.Prebuilt.Uchardet +runtime: org.gnome.Platform +runtime-version: "50" +sdk: org.gnome.Sdk +command: /usr/bin/true +build-options: + # no-debuginfo suppresses the .Debug extension but does NOT strip: on its own + # it leaves full DWARF inside every library in the archive. Strip explicitly. + # A consumer that needs symbols rebuilds from this manifest at its release tag. + no-debuginfo: true + strip: true +cleanup: + - "*.a" + - /bin + - /share/man + +modules: + - name: uchardet + buildsystem: cmake-ninja + config-opts: + - -DCMAKE_BUILD_TYPE=Release + - -DCMAKE_INSTALL_LIBDIR=lib + - -DBUILD_STATIC=0 + # uchardet 0.0.8 declares cmake_minimum_required below 3.5, which CMake 4 + # refuses outright. + - -DCMAKE_POLICY_VERSION_MINIMUM=3.5 + sources: + - type: archive + url: https://www.freedesktop.org/software/uchardet/releases/uchardet-0.0.8.tar.xz + sha256: e97a60cfc00a1c147a674b097bb1422abd9fa78a2d9ce3f3fdcc2e78a34ac5f0 diff --git a/x264.yml b/x264.yml new file mode 100644 index 0000000..ce9dc09 --- /dev/null +++ b/x264.yml @@ -0,0 +1,39 @@ +# x264, prebuilt for FlatPark apps. +# +# H.264/AVC encoder. Neither the GNOME nor the freedesktop runtime ships it — +# org.freedesktop.Platform.codecs-extra carries a libx264 for the runtime's own +# ffmpeg, but it is an extension the app cannot link against at build time and +# cannot rely on being installed. Apps that encode H.264 therefore have to bring +# their own; this is that copy, built once. +# +# Dev-complete (library + headers + pkg-config) so a consumer can build against +# it — ffmpeg-full.yml does exactly that. Upstream cuts no release tags, so the +# pin is a bare commit; that is the only thing there is to pin. +id: org.flatpark.Prebuilt.X264 +runtime: org.gnome.Platform +runtime-version: "50" +sdk: org.gnome.Sdk +command: /usr/bin/true +build-options: + # no-debuginfo suppresses the .Debug extension but does NOT strip: on its own + # it leaves full DWARF inside every library in the archive. Strip explicitly. + # A consumer that needs symbols rebuilds from this manifest at its release tag. + no-debuginfo: true + strip: true +cleanup: + - "*.a" + - /share/man + +modules: + - name: x264 + buildsystem: simple + build-commands: + # --libdir so the .so lands in /app/lib rather than a multiarch path, which + # is where a consuming app's LD_LIBRARY_PATH entry points. + - ./configure --prefix=/app --libdir=/app/lib --disable-cli --enable-shared + - make -j$FLATPAK_BUILDER_N_JOBS + - make install + sources: + - type: git + url: https://code.videolan.org/videolan/x264.git + commit: 0480cb05fa188d37ae87e8f4fd8f1aea3711f7ee diff --git a/x265.yml b/x265.yml new file mode 100644 index 0000000..2b3dce7 --- /dev/null +++ b/x265.yml @@ -0,0 +1,44 @@ +# x265, prebuilt for FlatPark apps. +# +# H.265/HEVC encoder, the counterpart to x264.yml and absent from both runtimes +# for the same reason. Apps that offer HEVC output have to ship it themselves. +# +# Dev-complete (library + headers + pkg-config) so a consumer can build against +# it; ffmpeg-full.yml does. Only the 8-bit depth build is shipped — the 10/12-bit +# libraries are a separate multilib dance that no FlatPark consumer has needed, +# and adding them later is a new tag, not a silent change. +id: org.flatpark.Prebuilt.X265 +runtime: org.gnome.Platform +runtime-version: "50" +sdk: org.gnome.Sdk +command: /usr/bin/true +build-options: + # no-debuginfo suppresses the .Debug extension but does NOT strip: on its own + # it leaves full DWARF inside every library in the archive. Strip explicitly. + # A consumer that needs symbols rebuilds from this manifest at its release tag. + no-debuginfo: true + strip: true +cleanup: + - "*.a" + - /share/man + - /share/doc + +modules: + - name: x265 + buildsystem: cmake-ninja + # x265's CMakeLists lives in source/, not at the repository root. + subdir: source + config-opts: + - -DCMAKE_BUILD_TYPE=Release + - -DCMAKE_INSTALL_LIBDIR=lib + # x265 4.2 still declares cmake_minimum_required below 3.5, which CMake 4 + # refuses outright. + - -DCMAKE_POLICY_VERSION_MINIMUM=3.5 + - -DENABLE_SHARED=ON + # The x265 CLI is not what consumers link; ffmpeg drives the library. + - -DENABLE_CLI=OFF + sources: + - type: git + url: https://bitbucket.org/multicoreware/x265_git.git + tag: "4.2" + commit: e7a37608685a1ea61c59342cb19208d688928287 From 5db8b8f5b1a354284fe0049a7fa143446eb0112b Mon Sep 17 00:00:00 2001 From: Komh Date: Thu, 20 Aug 2026 23:06:21 +0800 Subject: [PATCH 2/6] feat(prebuilt): add tesseract and ffmpeg-full MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The two stacks that build against the nine leaf releases from the previous commit, completing the set dk.nikse.subtitleedit needs (flatpark/flatpark#238). ffmpeg-full: ffmpeg n9.0 + ffprobe, shared. The runtimes do ship an ffmpeg, but without libass — so the `ass` and `subtitles` filters do not exist and burning subtitles into a video fails at filter-graph parse time. The encoder set covers what a media application's export dialog offers end to end: libx264, libx265, libvpx-vp9 and prores_ks in software, NVENC / AMF / QSV / VAAPI where the hardware provides them, aac / ac3 / libmp3lame / libopus / libvorbis for audio. tesseract: the OCR engine and its command-line driver. Both consume their dependencies from the leaf releases at build time and then clean every trace of them out of the archive — x264, x265, lame, rubberband, libass and libvpl for ffmpeg-full, leptonica for tesseract. The consuming app pins those releases itself and puts each lib/ on LD_LIBRARY_PATH, the same split wemeet-screenshare-hook already uses for opencv-imgproc. That is what makes the granularity worth having: an app keeps ONE libass even when it also ships mpv, and x265 can move to a new version without re-cutting ffmpeg for apps that only ever wanted the encoder. tesseract ships no language data — a .traineddata file is ~20 MB, versioned independently of the engine, and every app wants a different set. It does ship share/tessdata/{configs,tessconfigs}, the output-format presets read from TESSDATA_PREFIX, so a consuming app stages its .traineddata into that same directory and points TESSDATA_PREFIX at it. tesseract verified against leptonica-v1: the archive carries no libleptonica, and inside org.gnome.Platform//50 with only the leptonica release's lib/ added to LD_LIBRARY_PATH, bin/tesseract resolves with zero unresolved sonames. Co-Authored-By: Claude Opus 5 --- ffmpeg-full.yml | 168 ++++++++++++++++++++++++++++++++++++++++++++++++ tesseract.yml | 67 +++++++++++++++++++ 2 files changed, 235 insertions(+) create mode 100644 ffmpeg-full.yml create mode 100644 tesseract.yml diff --git a/ffmpeg-full.yml b/ffmpeg-full.yml new file mode 100644 index 0000000..5ba943b --- /dev/null +++ b/ffmpeg-full.yml @@ -0,0 +1,168 @@ +# FFmpeg, prebuilt for FlatPark apps. +# +# A full-featured ffmpeg/ffprobe pair. The runtimes do ship an ffmpeg, but it is +# built for the runtime's own needs: no libass, so the `ass` and `subtitles` +# filters do not exist and any attempt to burn subtitles into a video dies at +# filter-graph parse time rather than at run time; and no hardware encoders +# beyond the basics. Apps that drive ffmpeg as a tool need their own. +# +# The encoder set is chosen to cover what a media application's export dialog +# typically offers end to end: libx264, libx265, libvpx-vp9 and prores_ks in +# software, plus NVENC, AMF, QSV and VAAPI where the user's hardware provides +# them, with aac, ac3, libmp3lame, libopus and libvorbis for audio. First +# consumer: dk.nikse.subtitleedit (flatpark/flatpark#238). +# +# Codec libraries the runtime lacks come from their OWN releases here — x264, +# x265, lame, rubberband, libass, libvpl — pinned below and used for the build. +# They are then cleaned OUT of this archive: each is a separate release that the +# consuming app pins and unpacks alongside this one, putting every lib/ on +# LD_LIBRARY_PATH. That keeps one copy of libass in an app even when it also +# ships mpv, and lets x265 move to a new version without re-cutting ffmpeg for +# apps that only wanted the encoder. +# +# Everything else ffmpeg links here — gnutls, dav1d, freetype, opus, theora, +# v4l2, vorbis, vpx, webp, xml2, vulkan — is present in both org.gnome.Sdk//50 +# and org.gnome.Platform//50, so it resolves against the runtime and travels +# with nothing. +id: org.flatpark.Prebuilt.FfmpegFull +runtime: org.gnome.Platform +runtime-version: "50" +sdk: org.gnome.Sdk +command: /usr/bin/true +build-options: + # no-debuginfo suppresses the .Debug extension but does NOT strip: on its own + # it leaves full DWARF inside every library in the archive. Strip explicitly. + # A consumer that needs symbols rebuilds from this manifest at its release tag. + no-debuginfo: true + strip: true +cleanup: + - "*.a" + - "*.la" + - /include + - /lib/pkgconfig + - /lib/cmake + - /share/ffmpeg/examples + # Build-time input from the stacks below: shipped by the consuming app from + # their own releases, not from here. + - /lib/libx264.so* + - /lib/libx265.so* + - /lib/libmp3lame.so* + - /lib/librubberband.so* + - /lib/libass.so* + - /lib/libvpl.so* + - /bin/rubberband + - /bin/rubberband-r3 + - /etc + +modules: + # Codec libraries for the build, each from its own reusable release. All + # cleaned out of the final archive above; the consuming app ships them. + - name: x264 + buildsystem: simple + build-commands: + - cp -a ./. /app/ + sources: + - type: archive + url: https://github.com/flatpark/prebuilt/releases/download/x264-v1/x264-x264-v1-gnome-50-x86_64.tar.xz + sha256: f6d5ecf8620a60164d191aeb83ae9ba371e17fb0b3f217cce3d371f260c5f63f + + - name: x265 + buildsystem: simple + build-commands: + - cp -a ./. /app/ + sources: + - type: archive + url: https://github.com/flatpark/prebuilt/releases/download/x265-v1/x265-x265-v1-gnome-50-x86_64.tar.xz + sha256: 0e11378f93862669a832cfb58ae016d039aa65d2acbb8c64fc2a5a9db41a337e + + - name: lame + buildsystem: simple + build-commands: + - cp -a ./. /app/ + sources: + - type: archive + url: https://github.com/flatpark/prebuilt/releases/download/lame-v1/lame-lame-v1-gnome-50-x86_64.tar.xz + sha256: cf65e7f57f5532f692ed7107af0cafb36afb2277f31c7cb749da206f56f0b396 + + - name: rubberband + buildsystem: simple + build-commands: + - cp -a ./. /app/ + sources: + - type: archive + url: https://github.com/flatpark/prebuilt/releases/download/rubberband-v1/rubberband-rubberband-v1-gnome-50-x86_64.tar.xz + sha256: 8f88a7640b9eba33cba667d14f72b1261934e28fa6ba9dfbaa1396eac0c63f5f + + - name: libass + buildsystem: simple + build-commands: + - cp -a ./. /app/ + sources: + - type: archive + url: https://github.com/flatpark/prebuilt/releases/download/libass-v1/libass-libass-v1-gnome-50-x86_64.tar.xz + sha256: 2b246bd7d9f658b0678e366c8196d40daf1088433daeab9a01b06c15884b375d + + - name: libvpl + buildsystem: simple + build-commands: + - cp -a ./. /app/ + sources: + - type: archive + url: https://github.com/flatpark/prebuilt/releases/download/libvpl-v1/libvpl-libvpl-v1-gnome-50-x86_64.tar.xz + sha256: a1133f442a1c11b96090cdc1fb156622d524050d3bd6ca120805610014aaf5de + + # Headers only, and not shipped: the AMF runtime is part of the user's AMD + # driver, which ffmpeg dlopens. Without these headers --enable-amf does not + # configure; with them the encoder is present and simply finds no device on + # non-AMD hardware. + - name: amf-headers + buildsystem: simple + build-commands: + - mkdir -p /app/include/AMF + - cp -a amf/public/include/. /app/include/AMF/ + cleanup: + - "*" + sources: + - type: git + url: https://github.com/GPUOpen-LibrariesAndSDKs/AMF.git + tag: v1.5.2 + commit: eae4a4b7efc35f8b0a3977a0984c0d642efc4e63 + + - name: ffmpeg + buildsystem: autotools + config-opts: + - --disable-debug + - --disable-doc + - --disable-static + - --enable-shared + - --enable-gnutls + # GPL + version3 are required by x264, x265 and rubberband. + - --enable-gpl + - --enable-version3 + - --enable-libass + - --enable-libdav1d + - --enable-libfreetype + - --enable-libmp3lame + - --enable-libopus + - --enable-librubberband + - --enable-libtheora + - --enable-libv4l2 + - --enable-libvorbis + - --enable-libvpx + - --enable-libwebp + - --enable-libx264 + - --enable-libx265 + - --enable-libxml2 + - --enable-vulkan + - --enable-encoder=png + # Hardware encoders. Each is a dispatcher or a dlopen at run time, so a + # machine without the matching device simply does not expose them. + - --enable-vaapi + - --enable-nvenc + - --enable-amf + - --enable-libvpl + sources: + - type: git + url: https://github.com/FFmpeg/FFmpeg.git + tag: n9.0 + commit: 5b9252abfe2fda0ccb71ed45cd7a954cc45d2b6f diff --git a/tesseract.yml b/tesseract.yml new file mode 100644 index 0000000..c41b2bf --- /dev/null +++ b/tesseract.yml @@ -0,0 +1,67 @@ +# Tesseract OCR, prebuilt for FlatPark apps. +# +# The OCR engine itself plus its `tesseract` command-line driver, which is how +# most applications actually use it — they write an image out and shell out. +# Neither runtime ships it. +# +# Leptonica is needed at BUILD time (headers, and libtesseract links it) and at +# RUNTIME (that DT_NEEDED does not go away), but it is NOT shipped in this +# archive: it is its own release, and a consuming app pins leptonica-v1 as well +# and puts both lib/ directories on LD_LIBRARY_PATH. Same split as +# wemeet-screenshare-hook and opencv-imgproc. Keeping one leptonica per app +# rather than one per dependent stack is the whole point of releasing it +# separately. +# +# No language data. `eng.traineddata` and friends are ~20 MB each, versioned +# independently of the engine, and an app usually wants a different set of them; +# they belong in the consuming app as extra-data. The archive DOES carry +# share/tessdata/{configs,tessconfigs}, the output-format presets tesseract reads +# from TESSDATA_PREFIX (`hocr`, `tsv`, `pdf`, ...) — so a consuming app should +# stage its .traineddata files INTO this archive's share/tessdata/ and point +# TESSDATA_PREFIX there, keeping presets and language data in one directory. +# The training tools are not built — they are for producing that data, not using it. +id: org.flatpark.Prebuilt.Tesseract +runtime: org.gnome.Platform +runtime-version: "50" +sdk: org.gnome.Sdk +command: /usr/bin/true +build-options: + # no-debuginfo suppresses the .Debug extension but does NOT strip: on its own + # it leaves full DWARF inside every library in the archive. Strip explicitly. + # A consumer that needs symbols rebuilds from this manifest at its release tag. + no-debuginfo: true + strip: true +cleanup: + - "*.a" + - "*.la" + # Leptonica is build-time input from its own release; drop every trace of it + # so this archive carries Tesseract and nothing else. + - /lib/libleptonica.* + - /lib/cmake/leptonica + - /lib/pkgconfig/lept* + - /include/leptonica + +modules: + # Leptonica headers and library for the build only, from the reusable release. + # Cleaned out of the final archive above. + - name: leptonica + buildsystem: simple + build-commands: + - cp -a ./. /app/ + sources: + - type: archive + url: https://github.com/flatpark/prebuilt/releases/download/leptonica-v1/leptonica-leptonica-v1-gnome-50-x86_64.tar.xz + sha256: 150639275c0b5487d530289610a62f9626e9e74c51aa45cba865461937a7bead + + - name: tesseract + buildsystem: cmake-ninja + builddir: true + config-opts: + - -DCMAKE_BUILD_TYPE=Release + - -DCMAKE_INSTALL_LIBDIR=lib + - -DBUILD_SHARED_LIBS=ON + - -DBUILD_TRAINING_TOOLS=OFF + sources: + - type: archive + url: https://github.com/tesseract-ocr/tesseract/archive/refs/tags/5.5.1.tar.gz + sha256: a7a3f2a7420cb6a6a94d80c24163e183cf1d2f1bed2df3bbc397c81808a57237 From c889e084670d02a76fda6987e3bece09c3922c2d Mon Sep 17 00:00:00 2001 From: Komh Date: Thu, 20 Aug 2026 23:24:57 +0800 Subject: [PATCH 3/6] fix(prebuilt): drop ffplay and the stray manifest from the built stacks MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Two things the first cut of ffmpeg-full-v1 and tesseract-v1 got wrong, both found by unpacking the released artifacts. ffplay was being built and shipped. It is an SDL2 debug player nothing here drives, and shipping it puts an `ffplay` command on the consuming app's PATH — a behaviour surface this stack has no business adding, since an application that probes for ffplay would find one. --disable-ffplay. Each `cp -a ./. /app/` also copied the source archive's own manifest.json. flatpak-builder then renamed it to manifest-base-1.json and wrote its own, so ffmpeg-full shipped libvpl's build record under a name suggesting it described ffmpeg. It cannot be cleaned away — flatpak-builder writes those files after cleanup runs — so the copy skips manifest.json instead. Both tags are re-cut rather than superseded by a -v2: nothing consumes them yet, and a v2 differing only in this would be noise in the release list. Co-Authored-By: Claude Opus 5 --- ffmpeg-full.yml | 40 ++++++++++++++++++++++++++++++++++------ tesseract.yml | 6 +++++- 2 files changed, 39 insertions(+), 7 deletions(-) diff --git a/ffmpeg-full.yml b/ffmpeg-full.yml index 5ba943b..3ddb8c7 100644 --- a/ffmpeg-full.yml +++ b/ffmpeg-full.yml @@ -60,7 +60,11 @@ modules: - name: x264 buildsystem: simple build-commands: - - cp -a ./. /app/ + # Skip the archive's own manifest.json: copying it would leave a stale + # record of an unrelated stack in this release, renamed to the misleading + # manifest-base-N.json (flatpak-builder writes its own after cleanup runs, + # so it cannot be cleaned away). + - 'find . -mindepth 1 -maxdepth 1 ! -name manifest.json -exec cp -a {} /app/ \;' sources: - type: archive url: https://github.com/flatpark/prebuilt/releases/download/x264-v1/x264-x264-v1-gnome-50-x86_64.tar.xz @@ -69,7 +73,11 @@ modules: - name: x265 buildsystem: simple build-commands: - - cp -a ./. /app/ + # Skip the archive's own manifest.json: copying it would leave a stale + # record of an unrelated stack in this release, renamed to the misleading + # manifest-base-N.json (flatpak-builder writes its own after cleanup runs, + # so it cannot be cleaned away). + - 'find . -mindepth 1 -maxdepth 1 ! -name manifest.json -exec cp -a {} /app/ \;' sources: - type: archive url: https://github.com/flatpark/prebuilt/releases/download/x265-v1/x265-x265-v1-gnome-50-x86_64.tar.xz @@ -78,7 +86,11 @@ modules: - name: lame buildsystem: simple build-commands: - - cp -a ./. /app/ + # Skip the archive's own manifest.json: copying it would leave a stale + # record of an unrelated stack in this release, renamed to the misleading + # manifest-base-N.json (flatpak-builder writes its own after cleanup runs, + # so it cannot be cleaned away). + - 'find . -mindepth 1 -maxdepth 1 ! -name manifest.json -exec cp -a {} /app/ \;' sources: - type: archive url: https://github.com/flatpark/prebuilt/releases/download/lame-v1/lame-lame-v1-gnome-50-x86_64.tar.xz @@ -87,7 +99,11 @@ modules: - name: rubberband buildsystem: simple build-commands: - - cp -a ./. /app/ + # Skip the archive's own manifest.json: copying it would leave a stale + # record of an unrelated stack in this release, renamed to the misleading + # manifest-base-N.json (flatpak-builder writes its own after cleanup runs, + # so it cannot be cleaned away). + - 'find . -mindepth 1 -maxdepth 1 ! -name manifest.json -exec cp -a {} /app/ \;' sources: - type: archive url: https://github.com/flatpark/prebuilt/releases/download/rubberband-v1/rubberband-rubberband-v1-gnome-50-x86_64.tar.xz @@ -96,7 +112,11 @@ modules: - name: libass buildsystem: simple build-commands: - - cp -a ./. /app/ + # Skip the archive's own manifest.json: copying it would leave a stale + # record of an unrelated stack in this release, renamed to the misleading + # manifest-base-N.json (flatpak-builder writes its own after cleanup runs, + # so it cannot be cleaned away). + - 'find . -mindepth 1 -maxdepth 1 ! -name manifest.json -exec cp -a {} /app/ \;' sources: - type: archive url: https://github.com/flatpark/prebuilt/releases/download/libass-v1/libass-libass-v1-gnome-50-x86_64.tar.xz @@ -105,7 +125,11 @@ modules: - name: libvpl buildsystem: simple build-commands: - - cp -a ./. /app/ + # Skip the archive's own manifest.json: copying it would leave a stale + # record of an unrelated stack in this release, renamed to the misleading + # manifest-base-N.json (flatpak-builder writes its own after cleanup runs, + # so it cannot be cleaned away). + - 'find . -mindepth 1 -maxdepth 1 ! -name manifest.json -exec cp -a {} /app/ \;' sources: - type: archive url: https://github.com/flatpark/prebuilt/releases/download/libvpl-v1/libvpl-libvpl-v1-gnome-50-x86_64.tar.xz @@ -135,6 +159,10 @@ modules: - --disable-doc - --disable-static - --enable-shared + # ffplay is an SDL2 debug player no consumer drives, and shipping it puts + # an `ffplay` command on the consuming app's PATH — a behaviour surface + # this stack has no reason to add. + - --disable-ffplay - --enable-gnutls # GPL + version3 are required by x264, x265 and rubberband. - --enable-gpl diff --git a/tesseract.yml b/tesseract.yml index c41b2bf..9feb3c5 100644 --- a/tesseract.yml +++ b/tesseract.yml @@ -47,7 +47,11 @@ modules: - name: leptonica buildsystem: simple build-commands: - - cp -a ./. /app/ + # Skip the archive's own manifest.json: copying it would leave a stale + # record of an unrelated stack in this release, renamed to the misleading + # manifest-base-N.json (flatpak-builder writes its own after cleanup runs, + # so it cannot be cleaned away). + - 'find . -mindepth 1 -maxdepth 1 ! -name manifest.json -exec cp -a {} /app/ \;' sources: - type: archive url: https://github.com/flatpark/prebuilt/releases/download/leptonica-v1/leptonica-leptonica-v1-gnome-50-x86_64.tar.xz From 2ced8f284fbd2a8f8864496a5ff6254c99d9d352 Mon Sep 17 00:00:00 2001 From: Komh Date: Thu, 20 Aug 2026 23:51:21 +0800 Subject: [PATCH 4/6] fix(ffmpeg-full): drop QSV and AMF, add harfbuzz for drawtext MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit QSV and AMF cannot work in a Flatpak, and enabling them is worse than leaving them out. Both are two-layer. ffmpeg links a dispatcher (libvpl for QSV) or dlopens a vendor library (libamfrt64.so.1 for AMF); the layer that actually encodes ships with the vendor's userspace — libmfx-gen.so from intel-media-driver, or AMD's proprietary driver. Flatpak has no extension for either, so neither can ever be present in the sandbox. Measured inside one on an Intel Arc 140V, the hardware QSV exists for, with --device=dri: h264_vaapi encode succeeded, exit 0 h264_qsv Error creating a MFX session: -9 (dispatcher found no runtime) h264_amf DLL libamfrt64.so.1 failed to open The GPU and the render node were never the problem: VAAPI encoded through the same /dev/dri/renderD128, because org.freedesktop.Platform.VAAPI.Intel and the GL.* extensions do put a driver in the sandbox. NVENC stays for that same reason — org.freedesktop.Platform.GL.nvidia-* ships NVIDIA's userspace (463 such extensions on Flathub), so on an NVIDIA host the library is there. Not verified here; no NVIDIA GPU. Leaving them enabled would actively recreate a bug upstream just fixed. Subtitle Edit 5.2 probes `ffmpeg -encoders` and hides what is missing (SubtitleEdit/subtitleedit#13915), but that probe sees "the encoder is compiled in" and cannot see "the vendor runtime is absent" — so h264_qsv and h264_amf would stay in the user's dropdown and fail at encode time, which is exactly what the probe was added to prevent. Upstream reached the same conclusion in that PR's follow-up note. Also --enable-libharfbuzz: freetype alone stopped being enough for the drawtext filter in FFmpeg 7+, so drawtext was silently absent from the first cut. Both the SDK (harfbuzz 11.4.5) and the Platform (libharfbuzz.so.0) have it. libvpl.yml keeps its release but leads with the caveat, so the next person to reach for it learns why ffmpeg-full does not. ffmpeg-full-v1 is re-cut rather than superseded: nothing consumes it yet. Co-Authored-By: Claude Opus 5 --- ffmpeg-full.yml | 78 +++++++++++++++++++++++-------------------------- libvpl.yml | 15 ++++++++-- 2 files changed, 50 insertions(+), 43 deletions(-) diff --git a/ffmpeg-full.yml b/ffmpeg-full.yml index 3ddb8c7..2d927fe 100644 --- a/ffmpeg-full.yml +++ b/ffmpeg-full.yml @@ -6,14 +6,37 @@ # filter-graph parse time rather than at run time; and no hardware encoders # beyond the basics. Apps that drive ffmpeg as a tool need their own. # -# The encoder set is chosen to cover what a media application's export dialog -# typically offers end to end: libx264, libx265, libvpx-vp9 and prores_ks in -# software, plus NVENC, AMF, QSV and VAAPI where the user's hardware provides -# them, with aac, ac3, libmp3lame, libopus and libvorbis for audio. First -# consumer: dk.nikse.subtitleedit (flatpark/flatpark#238). +# The encoder set covers what a media application's export dialog typically +# offers end to end: libx264, libx265, libvpx-vp9 and prores_ks in software, +# VAAPI and NVENC for hardware, and aac, ac3, libmp3lame, libopus and libvorbis +# for audio. First consumer: dk.nikse.subtitleedit (flatpark/flatpark#238). +# +# QSV and AMF are deliberately NOT enabled, and this is structural rather than a +# preference. Both are two-layer: ffmpeg links a dispatcher (libvpl for QSV) or +# dlopens a vendor library (libamfrt64.so.1 for AMF), and the layer that actually +# encodes ships with the vendor's userspace — `libmfx-gen.so` from +# intel-media-driver, or AMD's proprietary driver. Flatpak has no extension for +# either, so neither can ever be present in a sandbox. Measured on an Intel +# Arc 140V, the hardware QSV exists for, with --device=dri: +# +# h264_vaapi encode succeeded (exit 0) +# h264_qsv Error creating a MFX session: -9 (dispatcher found no runtime) +# h264_amf DLL libamfrt64.so.1 failed to open +# +# The GPU and the render node were never the problem — VAAPI used the same +# /dev/dri/renderD128, because org.freedesktop.Platform.VAAPI.Intel and the +# GL.* extensions do put a driver in the sandbox. NVENC is kept for the same +# reason: org.freedesktop.Platform.GL.nvidia-* ships NVIDIA's userspace, so on an +# NVIDIA host the library is there (not verified here — no NVIDIA GPU). +# +# Enabling them anyway is worse than leaving them out. Subtitle Edit 5.2 probes +# `ffmpeg -encoders` and hides what is missing (SubtitleEdit/subtitleedit#13915), +# but that probe sees "the encoder is compiled in" and cannot see "the vendor +# runtime is absent" — so the entries would come back to the user's dropdown and +# fail at encode time, which is the bug that probe was added to fix. # # Codec libraries the runtime lacks come from their OWN releases here — x264, -# x265, lame, rubberband, libass, libvpl — pinned below and used for the build. +# x265, lame, rubberband and libass — pinned below and used for the build. # They are then cleaned OUT of this archive: each is a separate release that the # consuming app pins and unpacks alongside this one, putting every lib/ on # LD_LIBRARY_PATH. That keeps one copy of libass in an app even when it also @@ -49,7 +72,6 @@ cleanup: - /lib/libmp3lame.so* - /lib/librubberband.so* - /lib/libass.so* - - /lib/libvpl.so* - /bin/rubberband - /bin/rubberband-r3 - /etc @@ -122,36 +144,6 @@ modules: url: https://github.com/flatpark/prebuilt/releases/download/libass-v1/libass-libass-v1-gnome-50-x86_64.tar.xz sha256: 2b246bd7d9f658b0678e366c8196d40daf1088433daeab9a01b06c15884b375d - - name: libvpl - buildsystem: simple - build-commands: - # Skip the archive's own manifest.json: copying it would leave a stale - # record of an unrelated stack in this release, renamed to the misleading - # manifest-base-N.json (flatpak-builder writes its own after cleanup runs, - # so it cannot be cleaned away). - - 'find . -mindepth 1 -maxdepth 1 ! -name manifest.json -exec cp -a {} /app/ \;' - sources: - - type: archive - url: https://github.com/flatpark/prebuilt/releases/download/libvpl-v1/libvpl-libvpl-v1-gnome-50-x86_64.tar.xz - sha256: a1133f442a1c11b96090cdc1fb156622d524050d3bd6ca120805610014aaf5de - - # Headers only, and not shipped: the AMF runtime is part of the user's AMD - # driver, which ffmpeg dlopens. Without these headers --enable-amf does not - # configure; with them the encoder is present and simply finds no device on - # non-AMD hardware. - - name: amf-headers - buildsystem: simple - build-commands: - - mkdir -p /app/include/AMF - - cp -a amf/public/include/. /app/include/AMF/ - cleanup: - - "*" - sources: - - type: git - url: https://github.com/GPUOpen-LibrariesAndSDKs/AMF.git - tag: v1.5.2 - commit: eae4a4b7efc35f8b0a3977a0984c0d642efc4e63 - - name: ffmpeg buildsystem: autotools config-opts: @@ -170,6 +162,11 @@ modules: - --enable-libass - --enable-libdav1d - --enable-libfreetype + # freetype alone is not enough for the drawtext filter in FFmpeg 7+; it + # also needs harfbuzz, and without it drawtext is silently absent. + # harfbuzz 11.4.5 is in org.gnome.Sdk//50 and libharfbuzz.so.0 in the + # Platform, so this costs nothing and travels with nothing. + - --enable-libharfbuzz - --enable-libmp3lame - --enable-libopus - --enable-librubberband @@ -183,12 +180,11 @@ modules: - --enable-libxml2 - --enable-vulkan - --enable-encoder=png - # Hardware encoders. Each is a dispatcher or a dlopen at run time, so a - # machine without the matching device simply does not expose them. + # Hardware encoders, limited to the two whose userspace Flatpak actually + # distributes (see the header). Both dlopen at run time, so a machine + # without the matching device simply does not expose them. - --enable-vaapi - --enable-nvenc - - --enable-amf - - --enable-libvpl sources: - type: git url: https://github.com/FFmpeg/FFmpeg.git diff --git a/libvpl.yml b/libvpl.yml index 526d641..b2a530e 100644 --- a/libvpl.yml +++ b/libvpl.yml @@ -6,9 +6,20 @@ # appear). The driver itself is never shipped here — only the dispatcher, which # is the part that has to be present at link time. # +# CAVEAT, read before pinning this: the dispatcher ALONE cannot encode. It +# enumerates oneVPL implementations at run time and the one that does the work, +# `libmfx-gen.so`, ships with Intel's media driver — which no Flatpak extension +# provides. Measured inside a sandbox on an Intel Arc 140V with --device=dri, +# the hardware QSV exists for: `h264_qsv` fails with "Error creating a MFX +# session: -9", while `h264_vaapi` encodes successfully through the same +# /dev/dri/renderD128. So an ffmpeg built --enable-libvpl offers QSV encoders +# that can never run in a Flatpak; ffmpeg-full.yml deliberately does not enable +# it. This release exists for a consumer that has its own way to supply the +# runtime. VAAPI is the path Intel and AMD GPUs actually take here. +# # Dev-complete (library + headers + pkg-config) so a consumer can build against -# it; ffmpeg-full.yml does. Tests, examples and the example source install are -# all off: nothing downstream links them. +# it. Tests, examples and the example source install are all off: nothing +# downstream links them. id: org.flatpark.Prebuilt.Libvpl runtime: org.gnome.Platform runtime-version: "50" From 28810a7c54a50afb0fb61f9bea7643d8aee962e5 Mon Sep 17 00:00:00 2001 From: Komh Date: Thu, 20 Aug 2026 23:59:29 +0800 Subject: [PATCH 5/6] chore(prebuilt): drop libvpl, document the new stacks, move the hook to opencv v2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit libvpl is deleted, manifest and release both. It was cut for ffmpeg-full's QSV support, which the previous commit removed for good: the dispatcher alone cannot encode, the oneVPL runtime that can ships with Intel's media driver, and no Flatpak extension provides it — so no app in this ecosystem can ever consume this stack usefully. Keeping it with a warning in the header would just be a trap with a sign on it. wemeet-screenshare-hook now pins opencv-imgproc-v2 for its build. v1 is the unstripped 140 MB tree; v2 is the same sources stripped and without the unusable objdetect cascade data. The released hook-v1 artifact is unaffected and is not re-cut: re-pinning it would change com.tencent.wemeet's commit and make every user re-download the 197 MB payload for no functional gain. opencv-v1 is kept until the hook is next cut for a reason of its own, which is the point at which it can be deleted. README: the ten new stacks in the table, and the extra-data list brought up to date. Co-Authored-By: Claude Opus 5 --- README.md | 14 +++++++++- libvpl.yml | 53 ------------------------------------- wemeet-screenshare-hook.yml | 4 +-- 3 files changed, 15 insertions(+), 56 deletions(-) delete mode 100644 libvpl.yml diff --git a/README.md b/README.md index aa1b99d..e879d54 100644 --- a/README.md +++ b/README.md @@ -33,6 +33,16 @@ rebuilding from the manifest at the tag, not by shipping them to every user. | `openssl-1.1-compat` | OpenSSL 1.1.1w shared libraries only (`libssl.so.1.1`, `libcrypto.so.1.1`) — no headers, runtime shim | `org.freedesktop.Sdk//25.08` | Legacy payloads whose bundled runtime predates OpenSSL 3 support (e.g. self-contained .NET 5) — **1.1.1 is EOL, see the manifest header** | | `wemeet-screenshare-hook` | libportal 0.9.1 + xuwd1/wemeet-wayland-screenshare `libhook.so` (built against `opencv-imgproc`; OpenCV not shipped but **dlopen'd at runtime**, so the app must also ship `opencv-imgproc`) | `org.freedesktop.Sdk//25.08` | `com.tencent.wemeet` (XWayland screen-share hook) | | `krb5-gss` | MIT krb5 1.22.1, the load-time closure of `libgssapi_krb5.so.2` and nothing else (`libkrb5`, `libk5crypto`, `libcom_err`, `libkrb5support`) — no KDC/kadmin libraries, no plugin tree, no headers | `org.freedesktop.Sdk//25.08` | Payloads bundling a Qt built with the GSSAPI feature, whose `libQt6Network` then hard-links `libgssapi_krb5.so.2` — `com.interactivebrokers.ibkrdesktop`. **Consumed as extra-data**, see below | +| `x264` | x264 (commit `0480cb05`), `libx264.so.165`, dev-complete; no CLI | `org.gnome.Sdk//50` | Apps encoding H.264; `ffmpeg-full` builds against it | +| `x265` | x265 4.2, `libx265.so.216`, 8-bit only, dev-complete; no CLI | `org.gnome.Sdk//50` | Apps encoding H.265; `ffmpeg-full` builds against it | +| `lame` | LAME 3.100, `libmp3lame.so.0`, dev-complete; no front ends | `org.gnome.Sdk//50` | Apps encoding MP3; `ffmpeg-full` builds against it | +| `rubberband` | Rubber Band v4.0.0, `librubberband.so.3` + its CLIs; built-in FFT and resampler pinned, so it links nothing beyond libstdc++/libm/libgcc/libc | `org.gnome.Sdk//50` | Time-stretch / pitch-shift; `ffmpeg-full` builds against it for the `rubberband` filter | +| `libass` | libass 0.17.4, `libass.so.9`, dev-complete, fontconfig enabled | `org.gnome.Sdk//50` | ASS/SSA rendering — `ffmpeg-full` (the `ass` and `subtitles` filters) and, in future, mpv. Released separately so an app shipping both does not end up with two `libass.so.9` deciding by module order | +| `ffmpeg-full` | FFmpeg n9.0, `ffmpeg` + `ffprobe` + `libav*`; libx264, libx265, libvpx-vp9, prores_ks, VAAPI and NVENC, aac/ac3/libmp3lame/libopus/libvorbis, `ass`/`subtitles`/`drawtext`. **No QSV or AMF** — see the manifest header | `org.gnome.Sdk//50` | Apps that drive ffmpeg as a tool because the runtime's own has no libass — `dk.nikse.subtitleedit`. Ships none of the codec libraries it links; the app pins those releases too | +| `leptonica` | Leptonica 1.85.0, `libleptonica.so.6`, dev-complete; no demo programs | `org.gnome.Sdk//50` | Image processing; `tesseract` builds against it and the consuming app ships both | +| `tesseract` | Tesseract 5.5.1, `libtesseract.so.5` + the `tesseract` CLI + `share/tessdata` presets. No leptonica, no language data, no training tools | `org.gnome.Sdk//50` | OCR — `dk.nikse.subtitleedit`. Stage `.traineddata` into its `share/tessdata` and point `TESSDATA_PREFIX` there | +| `uchardet` | uchardet 0.0.8, `libuchardet.so.0`, dev-complete; no CLI | `org.gnome.Sdk//50` | Guessing the encoding of text files an app did not write, e.g. subtitle files | +| `sevenzip` | 7-Zip 25.01 `7zr`, one dependency-free binary; .7z only | `org.gnome.Sdk//50` | Apps unpacking .7z downloads at run time | ## Archive module or extra-data @@ -43,7 +53,9 @@ A stack can be consumed either way, and the choice decides where the bytes live: it becomes part of the app's OSTree commit and is stored in FlatPark's own repository. Content-addressed storage means a stack shared by many apps is held once; `ayatana-stack` is one object set for thirteen apps. -- **`type: extra-data`** (`krb5-gss`, `openssl-1.1-compat`, `opencv-imgproc`) — +- **`type: extra-data`** (`krb5-gss`, `openssl-1.1-compat`, `opencv-imgproc`, and the + ffmpeg and OCR stacks: `x264`, `x265`, `lame`, `rubberband`, `libass`, + `ffmpeg-full`, `leptonica`, `tesseract`, `uchardet`, `sevenzip`) — the archive is downloaded from this repository's release at install time and unpacked by the app's `apply_extra` into `/app/extra//`. FlatPark's repository holds nothing, and the diff --git a/libvpl.yml b/libvpl.yml deleted file mode 100644 index b2a530e..0000000 --- a/libvpl.yml +++ /dev/null @@ -1,53 +0,0 @@ -# Intel VPL dispatcher, prebuilt for FlatPark apps. -# -# libvpl is the dispatcher half of Intel's Video Processing Library: it is what -# ffmpeg's `--enable-libvpl` links, and at run time it loads whatever Intel media -# driver the host provides (or finds none and the QSV encoders simply do not -# appear). The driver itself is never shipped here — only the dispatcher, which -# is the part that has to be present at link time. -# -# CAVEAT, read before pinning this: the dispatcher ALONE cannot encode. It -# enumerates oneVPL implementations at run time and the one that does the work, -# `libmfx-gen.so`, ships with Intel's media driver — which no Flatpak extension -# provides. Measured inside a sandbox on an Intel Arc 140V with --device=dri, -# the hardware QSV exists for: `h264_qsv` fails with "Error creating a MFX -# session: -9", while `h264_vaapi` encodes successfully through the same -# /dev/dri/renderD128. So an ffmpeg built --enable-libvpl offers QSV encoders -# that can never run in a Flatpak; ffmpeg-full.yml deliberately does not enable -# it. This release exists for a consumer that has its own way to supply the -# runtime. VAAPI is the path Intel and AMD GPUs actually take here. -# -# Dev-complete (library + headers + pkg-config) so a consumer can build against -# it. Tests, examples and the example source install are all off: nothing -# downstream links them. -id: org.flatpark.Prebuilt.Libvpl -runtime: org.gnome.Platform -runtime-version: "50" -sdk: org.gnome.Sdk -command: /usr/bin/true -build-options: - # no-debuginfo suppresses the .Debug extension but does NOT strip: on its own - # it leaves full DWARF inside every library in the archive. Strip explicitly. - # A consumer that needs symbols rebuilds from this manifest at its release tag. - no-debuginfo: true - strip: true -cleanup: - - "*.a" - - /share - # An env-setup script for a non-Flatpak install layout; nothing sources it here. - - /etc - -modules: - - name: libvpl - buildsystem: cmake-ninja - config-opts: - - -DCMAKE_BUILD_TYPE=Release - - -DCMAKE_INSTALL_LIBDIR=lib - - -DBUILD_TESTS=OFF - - -DBUILD_EXAMPLES=OFF - - -DINSTALL_EXAMPLE_CODE=OFF - sources: - - type: git - url: https://github.com/intel/libvpl.git - tag: v2.15.0 - commit: c45b5d786bf7cdabbe49ff1bab78693ad78feb78 diff --git a/wemeet-screenshare-hook.yml b/wemeet-screenshare-hook.yml index 0b6b2dc..0b9e2ac 100644 --- a/wemeet-screenshare-hook.yml +++ b/wemeet-screenshare-hook.yml @@ -42,8 +42,8 @@ modules: - cp -a ./. /app/ sources: - type: archive - url: https://github.com/flatpark/prebuilt/releases/download/opencv-imgproc-v1/opencv-imgproc-opencv-imgproc-v1-fd-25.08-x86_64.tar.xz - sha256: 853c61fe34d0a6d51ce296ea3bb394b0b80a24eae7fcb55d84b890245f18df7f + url: https://github.com/flatpark/prebuilt/releases/download/opencv-imgproc-v2/opencv-imgproc-opencv-imgproc-v2-fd-25.08-x86_64.tar.xz + sha256: 6d211fcdfe97026f65433e24f261d284c0c5da2ef55de7ec4b88dfcce407ad2d - name: libportal buildsystem: meson From 47ac8021142e7a297eb796d526c7e0adbc3c514c Mon Sep 17 00:00:00 2001 From: Komh Date: Fri, 21 Aug 2026 00:09:59 +0800 Subject: [PATCH 6/6] fix(ffmpeg-full): enable libfontconfig so drawtext takes a font name MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit freetype and harfbuzz get the drawtext filter compiled in, but without fontconfig it only accepts fontfile=/abs/path — font=Sans fails with "No font filename provided". Verified in a sandbox: drawtext rendered correctly with an explicit fontfile and the text came back through tesseract exactly, so the filter itself was fine; only the lookup was missing. fontconfig is in org.gnome.Sdk//50 and the Platform, and libass in this same stack already resolves fonts through it, so nothing new travels. Co-Authored-By: Claude Opus 5 --- ffmpeg-full.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ffmpeg-full.yml b/ffmpeg-full.yml index 2d927fe..0784af4 100644 --- a/ffmpeg-full.yml +++ b/ffmpeg-full.yml @@ -167,6 +167,10 @@ modules: # harfbuzz 11.4.5 is in org.gnome.Sdk//50 and libharfbuzz.so.0 in the # Platform, so this costs nothing and travels with nothing. - --enable-libharfbuzz + # ...and fontconfig on top of those two, or drawtext only accepts + # fontfile=/abs/path and refuses font=Sans. libass already resolves fonts + # this way, and fontconfig is in both the SDK and the Platform. + - --enable-libfontconfig - --enable-libmp3lame - --enable-libopus - --enable-librubberband