diff mbox series

[meta-gnome] glycin: Install the loaders along with libglycin

Message ID 20260911083958.42600-1-f_l_k@t-online.de
State New
Headers show
Series [meta-gnome] glycin: Install the loaders along with libglycin | expand

Commit Message

Markus Volk Sept. 11, 2026, 8:39 a.m. UTC
libglycin spawns the sandboxed loader binaries from
${libexecdir}/glycin-loaders at runtime, so a rootfs that only carries
libglycin-2.so cannot decode a single image. Nothing pulled in the
loaders package, which left users of libglycin (gnome-shell wallpapers,
nautilus) without any decoder at all.

Let ${PN} rdepend on ${PN}-loaders whenever loaders are built, and make
the loaders -> thumbnailer dependency a recommendation so the runtime
dependency graph stays free of cycles.

Tested by rebuilding gnome-image: libglycin-2-loaders and
libglycin-2-thumbnailer are now part of the rootfs manifest and
/usr/libexec/glycin-loaders/ carries the image-rs, jxl and svg loaders.

AI-Generated: Uses Claude Code (Claude Opus 5)
Signed-off-by: Markus Volk <f_l_k@t-online.de>
---
 meta-gnome/recipes-gnome/glycin/glycin_2.1.5.bb | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/meta-gnome/recipes-gnome/glycin/glycin_2.1.5.bb b/meta-gnome/recipes-gnome/glycin/glycin_2.1.5.bb
index 6fce80d4ec..a34c2425a2 100644
--- a/meta-gnome/recipes-gnome/glycin/glycin_2.1.5.bb
+++ b/meta-gnome/recipes-gnome/glycin/glycin_2.1.5.bb
@@ -74,11 +74,14 @@  PACKAGECONFIG[jxl] = ",,libjxl"
 PACKAGECONFIG[raw] = ",,"
 PACKAGECONFIG[svg] = ",,librsvg cairo"
 
-def glycin_loaders(d):
+def glycin_loader_list(d):
     known = (("heif", "glycin-heif"), ("image-rs", "glycin-image-rs"),
              ("jxl", "glycin-jxl"), ("raw", "glycin-raw"), ("svg", "glycin-svg"))
     enabled = d.getVar("PACKAGECONFIG").split()
-    loaders = [name for flag, name in known if flag in enabled]
+    return [name for flag, name in known if flag in enabled]
+
+def glycin_loaders(d):
+    loaders = glycin_loader_list(d)
     if not loaders:
         return "-Dglycin-loaders=false"
     return "-Dglycin-loaders=true -Dloaders=" + ",".join(loaders)
@@ -101,6 +104,8 @@  FILES:${PN}-thumbnailer = "${bindir}/glycin-thumbnailer \
                            ${datadir}/thumbnailers \
                            "
 
-RDEPENDS:${PN}-loaders += "${@bb.utils.contains('PACKAGECONFIG', 'thumbnailer', '${PN}-thumbnailer', '', d)}"
+RDEPENDS:${PN} += "${@d.getVar('PN') + '-loaders' if glycin_loader_list(d) else ''}"
+RDEPENDS:${PN}[vardeps] += "PACKAGECONFIG"
+RRECOMMENDS:${PN}-loaders += "${@bb.utils.contains('PACKAGECONFIG', 'thumbnailer', '${PN}-thumbnailer', '', d)}"
 RDEPENDS:${PN}-thumbnailer += "${PN}"