All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH v2] package/libcamera: add explicit dependency on libevent if libevent package to be built
@ 2022-07-11 13:18 Quentin Schulz
  2022-07-11 19:53 ` Kieran Bingham
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Quentin Schulz @ 2022-07-11 13:18 UTC (permalink / raw)
  To: buildroot; +Cc: Quentin Schulz, Quentin Schulz, Kieran Bingham

From: Quentin Schulz <quentin.schulz@theobroma-systems.com>

The cam application requires libevent. Since there's no Kconfig option
for it, cam building ability is checked by meson build system by default.

If libevent is present in the sysroot, cam is built.

The issue is that there's no explicit dependency on libevent in
libcamera package. This means that it is possible for libevent AND
libcamera to be built, but have libcamera be built before libevent.
Meaning that even if all requirements seem to be fulfilled, cam still
won't be enabled in some cases.

This fixes the possible race by expliciting the dependency to libevent
if the libevent package is enabled. Otherwise, explicitly disable cam
building as it's already known that it isn't going to build.

Cc: Quentin Schulz <foss+buildroot@0leil.net>
Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
---

v2:
 - added -Dcam=enabled when libevent package is enabled, to catch
 possible additional dependencies to cam in later upgrades,

 package/libcamera/libcamera.mk | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/package/libcamera/libcamera.mk b/package/libcamera/libcamera.mk
index 41d6a5abef..3f336cb797 100644
--- a/package/libcamera/libcamera.mk
+++ b/package/libcamera/libcamera.mk
@@ -84,6 +84,13 @@ else
 LIBCAMERA_CONF_OPTS += -Dqcam=disabled
 endif
 
+ifeq ($(BR2_PACKAGE_LIBEVENT),y)
+LIBCAMERA_CONF_OPTS += -Dcam=enabled
+LIBCAMERA_DEPENDENCIES += libevent
+else
+LIBCAMERA_CONF_OPTS += -Dcam=disabled
+endif
+
 ifeq ($(BR2_PACKAGE_TIFF),y)
 LIBCAMERA_DEPENDENCIES += tiff
 endif
-- 
2.36.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2022-08-10 10:22 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-07-11 13:18 [Buildroot] [PATCH v2] package/libcamera: add explicit dependency on libevent if libevent package to be built Quentin Schulz
2022-07-11 19:53 ` Kieran Bingham
2022-07-12  8:00   ` Quentin Schulz
2022-07-13  9:02     ` Kieran Bingham
2022-07-17 12:59       ` Yann E. MORIN
2022-07-17 12:56 ` Yann E. MORIN
2022-08-10 10:22 ` Peter Korsgaard

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.