From patchwork Wed May 13 13:35:54 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Burton X-Patchwork-Id: 88043 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id CFDB5CD4F24 for ; Wed, 13 May 2026 13:36:04 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.msgproc01-g2.7721.1778679363355728490 for ; Wed, 13 May 2026 06:36:03 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="dkim: body hash did not verify" header.i=@arm.com header.s=foss header.b=nW1oL+UE; spf=pass (domain: arm.com, ip: 217.140.110.172, mailfrom: ross.burton@arm.com) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 771951596 for ; Wed, 13 May 2026 06:35:57 -0700 (PDT) Received: from cesw-amp-gbt-1s-m12830-04.lab.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 5C7F83F836 for ; Wed, 13 May 2026 06:36:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=arm.com; s=foss; t=1778679362; bh=1tZ3wrh8ebXrjFbe1Ntcf5is9N1LWzteDgeAfr/sDBg=; h=From:To:Subject:Date:In-Reply-To:References:From; b=nW1oL+UE2c1JHt7kAcQZN/YQlsBnJu6yLdi1YifIG5Zy3XKMOkLz/VELgAzPz51Sb j/9m2jgajGiP6pBcenhp9yVhl58IcIvAC5lA6L5aT+b+G89lzShQn5DtAkcIkQXZ+5 ihmtO4X2EmnV50VP9b6wb+Nv2o0rtU5loMRpUp8A= From: Ross Burton To: openembedded-core@lists.openembedded.org Subject: [PATCH v2 2/5] libportal: split out GTK libraries into sub-packages Date: Wed, 13 May 2026 14:35:54 +0100 Message-ID: <20260513133557.2951262-2-ross.burton@arm.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260513133557.2951262-1-ross.burton@arm.com> References: <20260513133557.2951262-1-ross.burton@arm.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from 45-33-107-173.ip.linodeusercontent.com [45.33.107.173] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Wed, 13 May 2026 13:36:04 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/236981 We shouldn't package the bare libportal and the GTK3 and GTK4 libraries into one package. Instead package the UI libraries into separate packages, so that dependencies are contained. Add PACKAGECONFIGs for the gtk3 and gtk3 libraries so that they can be controlled individually. Keep the existing behaviour of enabling both GTK 3 and 4 as various recipes use both, but this allows building libportal without any GTK dependencies if required. The PACKAGECONFIG logic is "fun": if either of wayland or x11 are enabled then we can enable GTK+3 by default, and if either of those _and_ opengl are enabled then we can also do GTK 4. Signed-off-by: Ross Burton --- meta/recipes-gnome/libportal/libportal_0.9.1.bb | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/meta/recipes-gnome/libportal/libportal_0.9.1.bb b/meta/recipes-gnome/libportal/libportal_0.9.1.bb index f4924355f93..59252e2a67b 100644 --- a/meta/recipes-gnome/libportal/libportal_0.9.1.bb +++ b/meta/recipes-gnome/libportal/libportal_0.9.1.bb @@ -9,14 +9,22 @@ 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" +CAN_GTK = "${@bb.utils.contains_any('DISTRO_FEATURES', '${GTK3DISTROFEATURES}', '1', '0', d)}" -PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'gtk4', '', d)}" +PACKAGECONFIG ??= "${@oe.utils.vartrue('CAN_GTK', 'gtk3', '', d)} \ + ${@oe.utils.vartrue('CAN_GTK', '${@bb.utils.contains("DISTRO_FEATURES", "opengl", "gtk4", "", d)}', '', 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"