[meta-lts-mixins][scarthgap/rust][PATCH 24/35] librsvg: add PACKAGECONFIGs for avif and gdkpixbuf

Scott Murray <[email protected]> Fri, 31 Jul 2026 07:32:54 -0400
Newsgroups org.yoctoproject.lists.yocto-patches
Message-ID <df6ede8888c01a6f63e2a1048dec9a1ca34e08ae.1785496469.git.scott.murray@konsulko.com>
From: Ross Burton <[email protected]>

The existing gdkpixbuf PACKAGECONFIG is actually for the gdk-pixbuf SVG
loader.  Rename this to gdkpixbuf-loader and add another PACKAGECONFIG
that controls whether gdk-pixbuf support is enabled, and enable this by
default to preserve behaviour.

Add a new PACKAGECONFIG to enable support for embedded AVIF[1] files.
This is disabled out of the box as it depends on dav1d, part of meta-oe.

[1] https://en.wikipedia.org/wiki/AVIF

Signed-off-by: Ross Burton <[email protected]>
Signed-off-by: Mathieu Dubois-Briand <[email protected]>
Signed-off-by: Richard Purdie <[email protected]>
(adapted from oe-core commit 9797142b3f80ac93966e16896e92c4ca3bce8101)
Signed-off-by: Scott Murray <[email protected]>
---
 recipes-gnome/librsvg/librsvg_2.61.3.bb | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/recipes-gnome/librsvg/librsvg_2.61.3.bb b/recipes-gnome/librsvg/librsvg_2.61.3.bb
index cf8b1b6..19ceb69 100644
--- a/recipes-gnome/librsvg/librsvg_2.61.3.bb
+++ b/recipes-gnome/librsvg/librsvg_2.61.3.bb
@@ -10,7 +10,7 @@ LICENSE = "LGPL-2.1-or-later"
 LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=4fbd65380cdd255951079008b364516c"
 
 SECTION = "x11/utils"
-DEPENDS = "cairo gdk-pixbuf glib-2.0 libxml2 pango python3-docutils-native cargo-native cargo-c-native"
+DEPENDS = "cairo glib-2.0 libxml2 pango python3-docutils-native cargo-native cargo-c-native"
 RDEPENDS:${PN}-ptest += "rsvg"
 BBCLASSEXTEND = "native nativesdk"
 
@@ -56,11 +56,14 @@ LDFLAGS += " -L${B}/rsvg"
 # needed on ubuntu 20.04/debian 11 to avoid 'undefined reference to `dlsym'' errors
 BUILD_LDFLAGS += " -ldl"
 
-PACKAGECONFIG ??= "gdkpixbuf \
+PACKAGECONFIG ??= "gdkpixbuf gdkpixbuf-loader \
                    ${@bb.utils.contains('PTEST_ENABLED', '1', 'apitest', '', d)} \
                    ${@bb.utils.contains('GI_DATA_ENABLED', 'True', 'vala', '', d)}"
-# The gdk-pixbuf loader
-PACKAGECONFIG[gdkpixbuf] = "-Dpixbuf-loader=enabled,-Dpixbuf-loader=disabled,gdk-pixbuf-native"
+
+PACKAGECONFIG[avif] = "-Davif=enabled,-Davif=disabled,dav1d"
+PACKAGECONFIG[gdkpixbuf] = "-Dpixbuf=enabled,-Dpixbuf=disabled,gdk-pixbuf"
+# The gdk-pixbuf loader (depends on gdkpixbuf)
+PACKAGECONFIG[gdkpixbuf-loader] = "-Dpixbuf-loader=enabled,-Dpixbuf-loader=disabled,gdk-pixbuf-native"
 PACKAGECONFIG[vala] = "-Dvala=enabled,-Dvala=disabled"
 PACKAGECONFIG[apitest] = "-Dtests=true,-Dtests=false"
 
-- 
2.55.0