Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Tomas Mudrunka <tomas.mudrunka@gmail.com>
To: buildroot@buildroot.org
Cc: Adrian Perez de Castro <aperez@igalia.com>,
	Thomas Petazzoni <thomas.petazzoni@bootlin.com>,
	Tomas Mudrunka <tomas.mudrunka@gmail.com>
Subject: [Buildroot] [PATCH v2 2/5] package/hidapi: depend on udev instead of libgudev
Date: Fri, 13 Nov 2026 15:51:58 +0100	[thread overview]
Message-ID: <20261113145201.2357363-3-tomas.mudrunka@gmail.com> (raw)
In-Reply-To: <20261113145201.2357363-1-tomas.mudrunka@gmail.com>

hidapi has never used libgudev: its hidraw backend only links against
libudev (see PKG_CHECK_MODULES([libudev], ...) in configure.ac). The
libgudev dependency is a leftover from commit
e739dd5a11f5b2bd9648a45623bc174adae42b6e ("Use libgudev as regular
dependency"), done when libgudev was split out of eudev.

Depend on the udev virtual package instead, which is what actually
provides libudev, and drop the libgudev select. The BR2_USE_MMU and
BR2_USE_WCHAR dependencies are kept, but their comments are updated:
MMU is needed by the udev providers, and wchar is needed by hidapi
itself (wcsdup(), wcsncpy(), ...).

As hidapi no longer selects libgudev, packages that optionally use
libgudev no longer get it implicitly when hidapi is enabled. libmanette,
which selects hidapi, now selects libgudev itself (see previous patch).
The other packages with optional libgudev support (gst1-plugins-good,
gvfs, libqmi, modem-manager) only got it by accident when hidapi was
also enabled; configurations relying on that need to enable
BR2_PACKAGE_LIBGUDEV explicitly.

Signed-off-by: Tomas Mudrunka <tomas.mudrunka@gmail.com>
---
 package/hidapi/Config.in | 5 ++---
 package/hidapi/hidapi.mk | 2 +-
 2 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/package/hidapi/Config.in b/package/hidapi/Config.in
index fa44288917..72ae32a6d8 100644
--- a/package/hidapi/Config.in
+++ b/package/hidapi/Config.in
@@ -3,10 +3,9 @@ config BR2_PACKAGE_HIDAPI
 	depends on BR2_PACKAGE_HAS_UDEV
 	depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL
 	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 # libusb
-	depends on BR2_USE_MMU # libgudev
-	depends on BR2_USE_WCHAR # libgudev
+	depends on BR2_USE_MMU # udev
+	depends on BR2_USE_WCHAR # wcsdup()
 	select BR2_PACKAGE_LIBUSB
-	select BR2_PACKAGE_LIBGUDEV
 	select BR2_PACKAGE_LIBICONV if !BR2_ENABLE_LOCALE
 	# runtime UTF conversion support
 	select BR2_TOOLCHAIN_GLIBC_GCONV_LIBS_COPY if BR2_TOOLCHAIN_USES_GLIBC
diff --git a/package/hidapi/hidapi.mk b/package/hidapi/hidapi.mk
index c4daf934ee..7e202f0eb5 100644
--- a/package/hidapi/hidapi.mk
+++ b/package/hidapi/hidapi.mk
@@ -12,7 +12,7 @@ HIDAPI_AUTORECONF = YES
 HIDAPI_LICENSE = GPL-3.0 or BSD-3-Clause or HIDAPI license
 HIDAPI_LICENSE_FILES = LICENSE.txt LICENSE-gpl3.txt LICENSE-bsd.txt LICENSE-orig.txt
 
-HIDAPI_DEPENDENCIES = libusb libgudev
+HIDAPI_DEPENDENCIES = libusb udev
 
 ifeq ($(BR2_PACKAGE_LIBICONV),y)
 HIDAPI_DEPENDENCIES += libiconv
-- 
2.56.1

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

  parent reply	other threads:[~2026-11-13 14:54 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-24 13:00 [Buildroot] [PATCH 1/1] package/hidapi: add support for build without hidraw support when udev is not available Tomas Mudrunka
2026-11-13 14:51 ` [Buildroot] [PATCH v2 0/5] package/hidapi: allow building without udev Tomas Mudrunka
2026-11-13 14:51   ` [Buildroot] [PATCH v2 1/5] package/libmanette: select libgudev Tomas Mudrunka
2026-11-13 14:51   ` Tomas Mudrunka [this message]
2026-11-13 14:51   ` [Buildroot] [PATCH v2 3/5] package/hidapi: convert to cmake-package Tomas Mudrunka
2026-11-13 14:52   ` [Buildroot] [PATCH v2 4/5] package/hidapi: make the hidraw backend optional Tomas Mudrunka
2026-11-13 14:52   ` [Buildroot] [PATCH v2 5/5] DEVELOPERS: add Tomas Mudrunka for hidapi Tomas Mudrunka

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=20261113145201.2357363-3-tomas.mudrunka@gmail.com \
    --to=tomas.mudrunka@gmail.com \
    --cc=aperez@igalia.com \
    --cc=buildroot@buildroot.org \
    --cc=thomas.petazzoni@bootlin.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox