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/ffmpeg-full.yml b/ffmpeg-full.yml new file mode 100644 index 0000000..0784af4 --- /dev/null +++ b/ffmpeg-full.yml @@ -0,0 +1,196 @@ +# 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 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 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 +# 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* + - /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: + # 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 + sha256: f6d5ecf8620a60164d191aeb83ae9ba371e17fb0b3f217cce3d371f260c5f63f + + - name: x265 + 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/x265-v1/x265-x265-v1-gnome-50-x86_64.tar.xz + sha256: 0e11378f93862669a832cfb58ae016d039aa65d2acbb8c64fc2a5a9db41a337e + + - name: lame + 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/lame-v1/lame-lame-v1-gnome-50-x86_64.tar.xz + sha256: cf65e7f57f5532f692ed7107af0cafb36afb2277f31c7cb749da206f56f0b396 + + - name: rubberband + 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/rubberband-v1/rubberband-rubberband-v1-gnome-50-x86_64.tar.xz + sha256: 8f88a7640b9eba33cba667d14f72b1261934e28fa6ba9dfbaa1396eac0c63f5f + + - name: libass + 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/libass-v1/libass-libass-v1-gnome-50-x86_64.tar.xz + sha256: 2b246bd7d9f658b0678e366c8196d40daf1088433daeab9a01b06c15884b375d + + - name: ffmpeg + buildsystem: autotools + config-opts: + - --disable-debug + - --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 + - --enable-version3 + - --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 + # ...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 + - --enable-libtheora + - --enable-libv4l2 + - --enable-libvorbis + - --enable-libvpx + - --enable-libwebp + - --enable-libx264 + - --enable-libx265 + - --enable-libxml2 + - --enable-vulkan + - --enable-encoder=png + # 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 + sources: + - type: git + url: https://github.com/FFmpeg/FFmpeg.git + tag: n9.0 + commit: 5b9252abfe2fda0ccb71ed45cd7a954cc45d2b6f 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/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/tesseract.yml b/tesseract.yml new file mode 100644 index 0000000..9feb3c5 --- /dev/null +++ b/tesseract.yml @@ -0,0 +1,71 @@ +# 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: + # 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 + 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 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/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 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