Skip to contentSkip to conversation

libportal: add explicit PACKAGECONFIG for gtk4 support

PATCH Superseded Ross Burton 2 participants 7 messages May 12

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/5 libportal: add explicit PACKAGECONFIG for gtk4 support

Instead of using the presence of the opengl DISTRO_FEATURE to control whether the GTK 4 integration is built, add a PACKAGECONFIG for it.

---
 meta/recipes-gnome/libportal/libportal_0.9.1.bb | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
meta/recipes-gnome/libportal/libportal_0.9.1.bb +4 -1
index 9713f70dbb1..f4924355f93 100644
@@ -14,6 +14,9 @@ GIDOCGEN_MESON_OPTION = 'docs'
 
 ANY_OF_DISTRO_FEATURES = "${GTK3DISTROFEATURES}"
 
-DEPENDS += "glib-2.0 glib-2.0-native gtk+3 ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'gtk4', '', d)}"
+DEPENDS += "glib-2.0 glib-2.0-native gtk+3"
+
+PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'gtk4', '', d)}"
+PACKAGECONFIG[gtk4] = "-Dbackend-gtk4=enabled,-Dbackend-gtk4=disabled,gtk4"
 
 EXTRA_OEMESON = "${@bb.utils.contains('GI_DATA_ENABLED', 'True', '-Dvapi=true', '-Dvapi=false', d)} -Dbackend-qt5=disabled"
Signature · 1 line
2.43.0
#1 lore raw

PATCH 2/5 libportal split out gtk libs

---
 meta/recipes-gnome/libportal/libportal_0.9.1.bb | 14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)
meta/recipes-gnome/libportal/libportal_0.9.1.bb +10 -4
index f4924355f93..be58eeeaea1 100644
@@ -9,14 +9,20 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=3000208d539ec061b899bce1d9ce9404"
 SRC_URI = "git://github.com/flatpak/${BPN}.git;protocol=https;branch=main"
 SRCREV = "8f5dc8d192f6e31dafe69e35219e3b707bde71ce"
 
-inherit meson gi-docgen gobject-introspection vala features_check pkgconfig
+inherit meson gi-docgen gobject-introspection vala pkgconfig
 GIDOCGEN_MESON_OPTION = 'docs'
 
-ANY_OF_DISTRO_FEATURES = "${GTK3DISTROFEATURES}"
+DEPENDS += "glib-2.0 glib-2.0-native"
 
-DEPENDS += "glib-2.0 glib-2.0-native gtk+3"
+PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', '${GTK3DISTROFEATURES}', 'gtk3', '', d)} \
+                   ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'gtk4', '', d)}"
 
-PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'gtk4', '', d)}"
+PACKAGECONFIG[gtk3] = "-Dbackend-gtk3=enabled,-Dbackend-gtk3=disabled,gtk+3"
 PACKAGECONFIG[gtk4] = "-Dbackend-gtk4=enabled,-Dbackend-gtk4=disabled,gtk4"
 
 EXTRA_OEMESON = "${@bb.utils.contains('GI_DATA_ENABLED', 'True', '-Dvapi=true', '-Dvapi=false', d)} -Dbackend-qt5=disabled"
+
+PACKAGES =+ "${PN}-gtk3 ${PN}-gtk4"
+
+FILES:${PN}-gtk3 = "${libdir}/libportal-gtk3${SOLIBS} ${libdir}/girepository-1.0/*Gtk3-1.0.typelib"
+FILES:${PN}-gtk4 = "${libdir}/libportal-gtk4${SOLIBS} ${libdir}/girepository-1.0/*Gtk4-1.0.typelib"
Signature · 1 line
2.43.0
#2 lore raw

Patchtest results for [PATCH 2/5] libportal split out gtk libs

Thank you for your submission. Patchtest identified one or more issues with the patch. Please see the log below for more information:

---
Testing patch /home/patchtest/share/mboxes/2-5-libportal-split-out-gtk-libs.patch

FAIL: test Signed-off-by presence: Mbox is missing Signed-off-by. Add it manually or with "git commit --amend -s" (test_mbox.TestMbox.test_signed_off_by_presence)
FAIL: test commit message presence: Please include a commit message on your patch explaining the change (test_mbox.TestMbox.test_commit_message_presence)
FAIL: test shortlog format: Commit shortlog (first line of commit message) should follow the format "<target>: <summary>" (test_mbox.TestMbox.test_shortlog_format)

PASS: test author valid (test_mbox.TestMbox.test_author_valid)
PASS: test commit message user tags (test_mbox.TestMbox.test_commit_message_user_tags)
PASS: test mbox format (test_mbox.TestMbox.test_mbox_format)
PASS: test non-AUH upgrade (test_mbox.TestMbox.test_non_auh_upgrade)
PASS: test shortlog length (test_mbox.TestMbox.test_shortlog_length)
PASS: test target mailing list (test_mbox.TestMbox.test_target_mailing_list)

SKIP: pretest pylint: No python related patches, skipping test (test_python_pylint.PyLint.pretest_pylint)
SKIP: test CVE tag format: No new CVE patches introduced (test_patch.TestPatch.test_cve_tag_format)
SKIP: test Signed-off-by presence: No new CVE patches introduced (test_patch.TestPatch.test_signed_off_by_presence)
SKIP: test Upstream-Status presence: No new CVE patches introduced (test_patch.TestPatch.test_upstream_status_presence_format)
SKIP: test bugzilla entry format: No bug ID found (test_mbox.TestMbox.test_bugzilla_entry_format)
SKIP: test pylint: No python related patches, skipping test (test_python_pylint.PyLint.test_pylint)
SKIP: test series merge on head: Merge test is disabled for now (test_mbox.TestMbox.test_series_merge_on_head)

---

Please address the issues identified and
submit a new revision of the patch, or alternatively, reply to this email with an explanation of why the patch should be accepted. If you believe these results are due to an error in patchtest, please submit a bug at https://bugzilla.yoctoproject.org/ (use the 'Patchtest' category under 'Yocto Project Subprojects'). For more information on specific failures, see: https://wiki.yoctoproject.org/wiki/Patchtest. Thank you!

#3 lore raw

Re: Patchtest results for [PATCH 2/5] libportal split out gtk libs

Whoops, forgot to reword that. I’ll send a v2 shortly.

Ross

Quoted 38 lines · On 12 May 2026, at 18:46, [email protected] wrote:

Thank you for your submission. Patchtest identified one or more issues with the patch. Please see the log below for more information:

---
Testing patch /home/patchtest/share/mboxes/2-5-libportal-split-out-gtk-libs.patch

FAIL: test Signed-off-by presence: Mbox is missing Signed-off-by. Add it manually or with "git commit --amend -s" (test_mbox.TestMbox.test_signed_off_by_presence)
FAIL: test commit message presence: Please include a commit message on your patch explaining the change (test_mbox.TestMbox.test_commit_message_presence)
FAIL: test shortlog format: Commit shortlog (first line of commit message) should follow the format "<target>: <summary>" (test_mbox.TestMbox.test_shortlog_format)

PASS: test author valid (test_mbox.TestMbox.test_author_valid)
PASS: test commit message user tags (test_mbox.TestMbox.test_commit_message_user_tags)
PASS: test mbox format (test_mbox.TestMbox.test_mbox_format)
PASS: test non-AUH upgrade (test_mbox.TestMbox.test_non_auh_upgrade)
PASS: test shortlog length (test_mbox.TestMbox.test_shortlog_length)
PASS: test target mailing list (test_mbox.TestMbox.test_target_mailing_list)

SKIP: pretest pylint: No python related patches, skipping test (test_python_pylint.PyLint.pretest_pylint)
SKIP: test CVE tag format: No new CVE patches introduced (test_patch.TestPatch.test_cve_tag_format)
SKIP: test Signed-off-by presence: No new CVE patches introduced (test_patch.TestPatch.test_signed_off_by_presence)
SKIP: test Upstream-Status presence: No new CVE patches introduced (test_patch.TestPatch.test_upstream_status_presence_format)
SKIP: test bugzilla entry format: No bug ID found (test_mbox.TestMbox.test_bugzilla_entry_format)
SKIP: test pylint: No python related patches, skipping test (test_python_pylint.PyLint.test_pylint)
SKIP: test series merge on head: Merge test is disabled for now (test_mbox.TestMbox.test_series_merge_on_head)

---

Please address the issues identified and
submit a new revision of the patch, or alternatively, reply to this email with an explanation of why the patch should be accepted. If you believe these results are due to an error in patchtest, please submit a bug at https://bugzilla.yoctoproject.org/ (use the 'Patchtest' category under 'Yocto Project Subprojects'). For more information on specific failures, see: https://wiki.yoctoproject.org/wiki/Patchtest. Thank you!

#4 lore raw

PATCH 3/5 gcr: remove obsolete DEPENDS

In reply to Ross Burton

libxslt-native was added back in 2017 to gcr-3.2.0 as a needed dependency when building with gobject-introspection[1], but this no longer appears to be the case.

gnupg-native was added in 2020[1] but we now pass the correct paths to Meson so this is no longer needed.

[1] oe-core 58922a43f93 ("gcr: add missing dependency on xsltproc if introspection is enabled")
[2] oe-core afa5ec0dee8 ("gcr: depends on gnupg-native")

---
 meta/recipes-gnome/gcr/gcr_4.4.0.1.bb | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
meta/recipes-gnome/gcr/gcr_4.4.0.1.bb +1 -2
index f3288c8d36e..1f4d2f48001 100644
@@ -8,8 +8,7 @@ BUGTRACKER = "https://gitlab.gnome.org/GNOME/gcr/issues"
 LICENSE = "LGPL-2.0-only"
 LIC_FILES_CHKSUM = "file://COPYING;md5=55ca817ccb7d5b5b66355690e9abc605"
 
-DEPENDS = "p11-kit glib-2.0 libgcrypt gnupg-native \
-           ${@bb.utils.contains('GI_DATA_ENABLED', 'True', 'libxslt-native', '', d)}"
+DEPENDS = "p11-kit glib-2.0 libgcrypt"
 
 CFLAGS += "-D_GNU_SOURCE"
 
Signature · 1 line
2.43.0
#5 lore raw

PATCH 4/5 gcr: remove obsolete packaging

In reply to Ross Burton

Previously the package contained UI libraries but they were removed in the 4.0.0 release:

- gcr4 will no longer ship UI libraries, i.e. gcr-gtk3 or gcr-gtk4.

Remove a large amount of packaging metadata that is no longer needed, and add an optional and disabled PACKAGECONFIG for the viewer tool which is packaged separately from the libraries.

---
 meta/recipes-gnome/gcr/gcr_4.4.0.1.bb | 16 ++++------------
 1 file changed, 4 insertions(+), 12 deletions(-)
meta/recipes-gnome/gcr/gcr_4.4.0.1.bb +4 -12
index 1f4d2f48001..fa769759c14 100644
@@ -13,31 +13,23 @@ DEPENDS = "p11-kit glib-2.0 libgcrypt"
 CFLAGS += "-D_GNU_SOURCE"
 
 GTKDOC_MESON_OPTION = "gtk_doc"
-inherit gnomebase gtk-icon-cache gi-docgen features_check vala gobject-introspection gettext mime mime-xdg
+inherit gnomebase gi-docgen vala gobject-introspection lib_package
 UPSTREAM_CHECK_REGEX = "gcr-(?P<pver>\d+\.\d+\.(?!9\d+)\d+(\.\d+)?)"
 
-REQUIRED_DISTRO_FEATURES = "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'opengl', '', d)}"
-
 SRC_URI[archive.sha256sum] = "0c3c341e49f9f4f2532a4884509804190a0c2663e6120360bb298c5d174a8098"
 
 PACKAGECONFIG ??= " \
 	${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)} \
-	${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'gtk', '', d)} \
-	${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'gtk', '', d)} \
 	${@bb.utils.contains('GI_DATA_ENABLED', 'True', 'vapi', '', d)} \
 "
-PACKAGECONFIG[gtk] = "-Dgtk4=true,-Dgtk4=false,gtk4"
 PACKAGECONFIG[ssh_agent] = "-Dssh_agent=true,-Dssh_agent=false,libsecret,openssh"
 #'Use systemd socket activation for server programs'
 PACKAGECONFIG[systemd] = "-Dsystemd=enabled,-Dsystemd=disabled,systemd"
 PACKAGECONFIG[vapi] = "-Dvapi=true,-Dvapi=false,"
+# A tool to view certificates
+PACKAGECONFIG[viewer] = "-Dgtk4=true,-Dgtk4=false,gtk4"
 
-FILES:${PN} += " \
-    ${datadir}/dbus-1 \
-    ${datadir}/gcr-4 \
-    ${systemd_user_unitdir}/gcr-ssh-agent.socket \
-    ${systemd_user_unitdir}/gcr-ssh-agent.service \
-"
+FILES:${PN} += "${systemd_user_unitdir}/gcr-ssh-agent.*"
 
 # http://errors.yoctoproject.org/Errors/Details/20229/
 ARM_INSTRUCTION_SET:armv4 = "arm"
Signature · 1 line
2.43.0
#6 lore raw

PATCH 5/5 gcr: package the ssh-agent into a separate package

In reply to Ross Burton

The agent is a separate component to the library, so package it into a new package.

The systemd dependency is only relevant to the ssh-agent, so don't enable it by default as we don't enable the agent either.

---
 meta/recipes-gnome/gcr/gcr_4.4.0.1.bb | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)
meta/recipes-gnome/gcr/gcr_4.4.0.1.bb +6 -7
index fa769759c14..493c8c2a0d0 100644
@@ -18,18 +18,17 @@ UPSTREAM_CHECK_REGEX = "gcr-(?P<pver>\d+\.\d+\.(?!9\d+)\d+(\.\d+)?)"
 
 SRC_URI[archive.sha256sum] = "0c3c341e49f9f4f2532a4884509804190a0c2663e6120360bb298c5d174a8098"
 
-PACKAGECONFIG ??= " \
-	${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)} \
-	${@bb.utils.contains('GI_DATA_ENABLED', 'True', 'vapi', '', d)} \
-"
-PACKAGECONFIG[ssh_agent] = "-Dssh_agent=true,-Dssh_agent=false,libsecret,openssh"
-#'Use systemd socket activation for server programs'
+PACKAGECONFIG ??= "${@bb.utils.contains('GI_DATA_ENABLED', 'True', 'vapi', '', d)}"
+PACKAGECONFIG[ssh_agent] = "-Dssh_agent=true,-Dssh_agent=false,libsecret"
+# Socket activation for the ssh-agent
 PACKAGECONFIG[systemd] = "-Dsystemd=enabled,-Dsystemd=disabled,systemd"
 PACKAGECONFIG[vapi] = "-Dvapi=true,-Dvapi=false,"
 # A tool to view certificates
 PACKAGECONFIG[viewer] = "-Dgtk4=true,-Dgtk4=false,gtk4"
 
-FILES:${PN} += "${systemd_user_unitdir}/gcr-ssh-agent.*"
+PACKAGE_BEFORE_PN += "${PN}-ssh-agent"
+FILES:${PN}-ssh-agent = "${libexecdir}/gcr-ssh-agent ${systemd_user_unitdir}/gcr-ssh-agent.*"
+RDEPENDS:${PN}-ssh-agent += "openssh"
 
 # http://errors.yoctoproject.org/Errors/Details/20229/
 ARM_INSTRUCTION_SET:armv4 = "arm"
Signature · 1 line
2.43.0