All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bartosz Golaszewski <brgl@bgdev.pl>
To: Khem Raj <raj.khem@gmail.com>,
	Max Krummenacher <max.oss.09@gmail.com>,
	Martin Jansa <martin.jansa@gmail.com>,
	Bruce Ashfield <bruce.ashfield@gmail.com>,
	openembedded-devel@lists.openembedded.org
Cc: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Subject: [meta-oe][PATCH] libgpiod: selectively enable GObject introspection
Date: Wed, 30 Oct 2024 21:53:31 +0100	[thread overview]
Message-ID: <20241030205334.10278-1-brgl@bgdev.pl> (raw)

From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>

The oe-core bbclass for GObject introspection sets GI_DATA_ENABLED if
the relevant distro feature is enabled. That means that it's up to the
inheriting recipe to disable it if needed.

For libgpiod: we only want to enable it if any of the GLib based
packages is being generated (GLib bindings, D-Bus daemon or ptest).

This also effectively reverts commit 78a332939f8b (libgpiod_2.2: depend
on glib-2.0) which indiscriminately pulls in GLib for all packages
generated by this recipe which feels like shooting a fly with a cannon.

Fixes: 9626e8a2c8f2 ("libgpiod: update to v2.2")
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
---
 meta-oe/recipes-support/libgpiod/libgpiod_2.2.bb | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/meta-oe/recipes-support/libgpiod/libgpiod_2.2.bb b/meta-oe/recipes-support/libgpiod/libgpiod_2.2.bb
index 3d9758e27a..25f3734a16 100644
--- a/meta-oe/recipes-support/libgpiod/libgpiod_2.2.bb
+++ b/meta-oe/recipes-support/libgpiod/libgpiod_2.2.bb
@@ -9,8 +9,6 @@ LIC_FILES_CHKSUM = " \
     file://LICENSES/CC-BY-SA-4.0.txt;md5=fba3b94d88bfb9b81369b869a1e9a20f \
 "
 
-DEPENDS += "glib-2.0"
-
 FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}-2.x:"
 
 SRC_URI += "file://gpio-manager.init"
@@ -61,6 +59,10 @@ python __anonymous() {
         d.setVar("SYSTEMD_SERVICE:{}-manager".format(pn), "gpio-manager.service")
     else:
         d.appendVar("EXTRA_OECONF", " --disable-systemd")
+
+    # Disable gobject introspection set by the bbclass if we don't want it.
+    if not any(cfg in ["glib", "dbus", "ptest"] for cfg in packageconfig):
+        d.setVar("GI_DATA_ENABLED", "False")
 }
 
 UPDATERCPN = "${PN}-manager"
-- 
2.45.2



             reply	other threads:[~2024-10-30 20:54 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-30 20:53 Bartosz Golaszewski [this message]
2024-10-30 21:02 ` [meta-oe][PATCH] libgpiod: selectively enable GObject introspection Martin Jansa
2024-10-31 16:41   ` Bartosz Golaszewski
2024-10-31 16:46     ` Martin Jansa

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20241030205334.10278-1-brgl@bgdev.pl \
    --to=brgl@bgdev.pl \
    --cc=bartosz.golaszewski@linaro.org \
    --cc=bruce.ashfield@gmail.com \
    --cc=martin.jansa@gmail.com \
    --cc=max.oss.09@gmail.com \
    --cc=openembedded-devel@lists.openembedded.org \
    --cc=raj.khem@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.