* [Buildroot] [PATCH v2 1/5] package/libmanette: select libgudev
2026-11-13 14:51 ` [Buildroot] [PATCH v2 0/5] package/hidapi: allow building without udev Tomas Mudrunka
@ 2026-11-13 14:51 ` Tomas Mudrunka
2026-11-13 14:51 ` [Buildroot] [PATCH v2 2/5] package/hidapi: depend on udev instead of libgudev Tomas Mudrunka
` (3 subsequent siblings)
4 siblings, 0 replies; 7+ messages in thread
From: Tomas Mudrunka @ 2026-11-13 14:51 UTC (permalink / raw)
To: buildroot; +Cc: Adrian Perez de Castro, Thomas Petazzoni, Tomas Mudrunka
libmanette selects hidapi, which selects libgudev, so libmanette has
always been built with gudev support (-Dgudev=enabled), which it uses
to discover game controllers through udev.
hidapi does not actually need libgudev, and the following patch drops
that dependency. Make libmanette select libgudev explicitly, and
enable gudev unconditionally, so that its behavior does not depend on
what hidapi selects.
All of libgudev's dependencies (BR2_PACKAGE_HAS_UDEV, BR2_USE_MMU,
BR2_USE_WCHAR, threads) are already libmanette dependencies.
Signed-off-by: Tomas Mudrunka <tomas.mudrunka@gmail.com>
---
package/libmanette/Config.in | 1 +
package/libmanette/libmanette.mk | 9 ++-------
2 files changed, 3 insertions(+), 7 deletions(-)
diff --git a/package/libmanette/Config.in b/package/libmanette/Config.in
index d4f45e25ad..0f3a5a7bb0 100644
--- a/package/libmanette/Config.in
+++ b/package/libmanette/Config.in
@@ -9,6 +9,7 @@ config BR2_PACKAGE_LIBMANETTE
select BR2_PACKAGE_HIDAPI
select BR2_PACKAGE_LIBEVDEV
select BR2_PACKAGE_LIBGLIB2
+ select BR2_PACKAGE_LIBGUDEV
help
GObject library which provides access to game controllers.
diff --git a/package/libmanette/libmanette.mk b/package/libmanette/libmanette.mk
index c320b84840..43b44efbe3 100644
--- a/package/libmanette/libmanette.mk
+++ b/package/libmanette/libmanette.mk
@@ -14,6 +14,7 @@ LIBMANETTE_INSTALL_STAGING = YES
LIBMANETTE_DEPENDENCIES = \
libevdev \
libglib2 \
+ libgudev \
hidapi \
$(TARGET_NLS_DEPENDENCIES)
@@ -24,6 +25,7 @@ LIBMANETTE_CONF_OPTS = \
-Dbuild-tests=false \
-Dinstall-tests=false \
-Ddoc=false \
+ -Dgudev=enabled \
-Dvapi=false
ifeq ($(BR2_PACKAGE_GOBJECT_INTROSPECTION),y)
@@ -33,11 +35,4 @@ else
LIBMANETTE_CONF_OPTS += -Dintrospection=false
endif
-ifeq ($(BR2_PACKAGE_LIBGUDEV),y)
-LIBMANETTE_CONF_OPTS += -Dgudev=enabled
-LIBMANETTE_DEPENDENCIES += libgudev
-else
-LIBMANETTE_CONF_OPTS += -Dgudev=disabled
-endif
-
$(eval $(meson-package))
--
2.56.1
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 7+ messages in thread* [Buildroot] [PATCH v2 2/5] package/hidapi: depend on udev instead of libgudev
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
2026-11-13 14:51 ` [Buildroot] [PATCH v2 3/5] package/hidapi: convert to cmake-package Tomas Mudrunka
` (2 subsequent siblings)
4 siblings, 0 replies; 7+ messages in thread
From: Tomas Mudrunka @ 2026-11-13 14:51 UTC (permalink / raw)
To: buildroot; +Cc: Adrian Perez de Castro, Thomas Petazzoni, Tomas Mudrunka
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
^ permalink raw reply related [flat|nested] 7+ messages in thread* [Buildroot] [PATCH v2 3/5] package/hidapi: convert to cmake-package
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 ` [Buildroot] [PATCH v2 2/5] package/hidapi: depend on udev instead of libgudev Tomas Mudrunka
@ 2026-11-13 14:51 ` 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
4 siblings, 0 replies; 7+ messages in thread
From: Tomas Mudrunka @ 2026-11-13 14:51 UTC (permalink / raw)
To: buildroot; +Cc: Adrian Perez de Castro, Thomas Petazzoni, Tomas Mudrunka
Upstream considers the autotools build system deprecated and going to
be obsolete, and recommends using CMake instead (see BUILD.autotools.md
and BUILD.md). The CMake build system also allows to select which
backends are built (see the HIDAPI_WITH_* options), and avoids the
need to autoreconf the package.
Both backends (hidraw and libusb) are still built, so the installed
shared libraries (with the same libhidapi-*.so.0 SONAME), headers and
pkg-config files are unchanged; the .pc files are generated from the
same pc/*.pc.in templates.
The LIBS="-liconv" workaround is no longer needed: the libusb backend
uses find_package(Iconv) and links against libiconv when the C library
does not provide iconv.
As usual with cmake-package, only shared libraries are built when
BR2_SHARED_STATIC_LIBS=y, while the autotools build also installed the
static ones. No in-tree package links statically against hidapi in
that configuration.
The hidtest program and unit tests default to ON only for Debug
builds; disable them explicitly so they are never built.
Signed-off-by: Tomas Mudrunka <tomas.mudrunka@gmail.com>
---
package/hidapi/hidapi.mk | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/package/hidapi/hidapi.mk b/package/hidapi/hidapi.mk
index 7e202f0eb5..5f0c482a95 100644
--- a/package/hidapi/hidapi.mk
+++ b/package/hidapi/hidapi.mk
@@ -7,16 +7,19 @@
HIDAPI_VERSION = 0.15.0
HIDAPI_SITE = $(call github,libusb,hidapi,hidapi-$(HIDAPI_VERSION))
HIDAPI_INSTALL_STAGING = YES
-# No configure provided, so we need to autoreconf.
-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 udev
+HIDAPI_CONF_OPTS = \
+ -DHIDAPI_WITH_HIDRAW=ON \
+ -DHIDAPI_WITH_LIBUSB=ON \
+ -DHIDAPI_WITH_TESTS=OFF \
+ -DHIDAPI_BUILD_HIDTEST=OFF
+
ifeq ($(BR2_PACKAGE_LIBICONV),y)
HIDAPI_DEPENDENCIES += libiconv
-HIDAPI_CONF_ENV += LIBS="-liconv"
endif
-$(eval $(autotools-package))
+$(eval $(cmake-package))
--
2.56.1
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [Buildroot] [PATCH v2 4/5] package/hidapi: make the hidraw backend optional
2026-11-13 14:51 ` [Buildroot] [PATCH v2 0/5] package/hidapi: allow building without udev Tomas Mudrunka
` (2 preceding siblings ...)
2026-11-13 14:51 ` [Buildroot] [PATCH v2 3/5] package/hidapi: convert to cmake-package Tomas Mudrunka
@ 2026-11-13 14:52 ` Tomas Mudrunka
2026-11-13 14:52 ` [Buildroot] [PATCH v2 5/5] DEVELOPERS: add Tomas Mudrunka for hidapi Tomas Mudrunka
4 siblings, 0 replies; 7+ messages in thread
From: Tomas Mudrunka @ 2026-11-13 14:52 UTC (permalink / raw)
To: buildroot; +Cc: Adrian Perez de Castro, Thomas Petazzoni, Tomas Mudrunka
The hidraw backend is the only part of hidapi that needs udev (for
libudev); the libusb backend only needs libusb. Make the hidraw backend
optional through a new BR2_PACKAGE_HIDAPI_HIDRAW option, available
when a udev provider is enabled and enabled by default, so existing
configurations are unchanged.
This allows hidapi (libhidapi-libusb) to be used on small systems
without udev. The BR2_USE_MMU dependency, which was only needed for
udev, is dropped from hidapi.
All in-tree users of hidapi, except libmanette, can use either backend
(they look up hidapi-hidraw and hidapi-libusb, or load either library
at runtime). libmanette only looks up hidapi-hidraw.pc, so make it
select BR2_PACKAGE_HIDAPI_HIDRAW.
Signed-off-by: Tomas Mudrunka <tomas.mudrunka@gmail.com>
---
package/hidapi/Config.in | 23 ++++++++++++++++++-----
package/hidapi/hidapi.mk | 10 ++++++++--
package/libmanette/Config.in | 3 ++-
3 files changed, 28 insertions(+), 8 deletions(-)
diff --git a/package/hidapi/Config.in b/package/hidapi/Config.in
index 72ae32a6d8..aec90e9501 100644
--- a/package/hidapi/Config.in
+++ b/package/hidapi/Config.in
@@ -1,9 +1,7 @@
config BR2_PACKAGE_HIDAPI
bool "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 # udev
depends on BR2_USE_WCHAR # wcsdup()
select BR2_PACKAGE_LIBUSB
select BR2_PACKAGE_LIBICONV if !BR2_ENABLE_LOCALE
@@ -14,11 +12,26 @@ config BR2_PACKAGE_HIDAPI
to interface with USB and Bluetooth HID-Class devices on
Windows, Linux, and Mac OS X.
+ The libusb backend (libhidapi-libusb) is always built.
+
http://github.com/libusb/hidapi/
-comment "hidapi needs udev /dev management and a toolchain w/ NPTL, gcc >= 4.9, wchar"
- depends on BR2_USE_MMU
+if BR2_PACKAGE_HIDAPI
+
+config BR2_PACKAGE_HIDAPI_HIDRAW
+ bool "hidraw backend"
+ default y
+ depends on BR2_PACKAGE_HAS_UDEV
+ help
+ Build the hidraw backend (libhidapi-hidraw), which uses the
+ kernel hidraw interface and needs libudev.
+
+comment "hidraw backend needs udev /dev management"
+ depends on !BR2_PACKAGE_HAS_UDEV
+
+endif
+
+comment "hidapi needs a toolchain w/ NPTL, gcc >= 4.9, wchar"
depends on !BR2_TOOLCHAIN_HAS_THREADS_NPTL || \
- !BR2_PACKAGE_HAS_UDEV || \
!BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 || \
!BR2_USE_WCHAR
diff --git a/package/hidapi/hidapi.mk b/package/hidapi/hidapi.mk
index 5f0c482a95..884912f175 100644
--- a/package/hidapi/hidapi.mk
+++ b/package/hidapi/hidapi.mk
@@ -10,14 +10,20 @@ HIDAPI_INSTALL_STAGING = 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 udev
+HIDAPI_DEPENDENCIES = libusb
HIDAPI_CONF_OPTS = \
- -DHIDAPI_WITH_HIDRAW=ON \
-DHIDAPI_WITH_LIBUSB=ON \
-DHIDAPI_WITH_TESTS=OFF \
-DHIDAPI_BUILD_HIDTEST=OFF
+ifeq ($(BR2_PACKAGE_HIDAPI_HIDRAW),y)
+HIDAPI_CONF_OPTS += -DHIDAPI_WITH_HIDRAW=ON
+HIDAPI_DEPENDENCIES += udev
+else
+HIDAPI_CONF_OPTS += -DHIDAPI_WITH_HIDRAW=OFF
+endif
+
ifeq ($(BR2_PACKAGE_LIBICONV),y)
HIDAPI_DEPENDENCIES += libiconv
endif
diff --git a/package/libmanette/Config.in b/package/libmanette/Config.in
index 0f3a5a7bb0..9377f35a42 100644
--- a/package/libmanette/Config.in
+++ b/package/libmanette/Config.in
@@ -2,11 +2,12 @@ config BR2_PACKAGE_LIBMANETTE
bool "libmanette"
depends on BR2_USE_MMU # libglib2, hidapi
depends on BR2_USE_WCHAR # libglib2, hidapi
- depends on BR2_PACKAGE_HAS_UDEV # hidapi
+ depends on BR2_PACKAGE_HAS_UDEV # hidapi-hidraw
depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL # hidapi
depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_16
depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 # hidapi -> libusb
select BR2_PACKAGE_HIDAPI
+ select BR2_PACKAGE_HIDAPI_HIDRAW # needs hidapi-hidraw.pc
select BR2_PACKAGE_LIBEVDEV
select BR2_PACKAGE_LIBGLIB2
select BR2_PACKAGE_LIBGUDEV
--
2.56.1
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 7+ messages in thread* [Buildroot] [PATCH v2 5/5] DEVELOPERS: add Tomas Mudrunka for hidapi
2026-11-13 14:51 ` [Buildroot] [PATCH v2 0/5] package/hidapi: allow building without udev Tomas Mudrunka
` (3 preceding siblings ...)
2026-11-13 14:52 ` [Buildroot] [PATCH v2 4/5] package/hidapi: make the hidraw backend optional Tomas Mudrunka
@ 2026-11-13 14:52 ` Tomas Mudrunka
4 siblings, 0 replies; 7+ messages in thread
From: Tomas Mudrunka @ 2026-11-13 14:52 UTC (permalink / raw)
To: buildroot; +Cc: Adrian Perez de Castro, Thomas Petazzoni, Tomas Mudrunka
Signed-off-by: Tomas Mudrunka <tomas.mudrunka@gmail.com>
---
DEVELOPERS | 3 +++
1 file changed, 3 insertions(+)
diff --git a/DEVELOPERS b/DEVELOPERS
index 1d2960f9b3..ad3c776d64 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -3412,6 +3412,9 @@ F: support/testing/tests/package/test_redis.py
N: Tobias Waldekranz <tobias@waldekranz.com>
F: package/kmemd/
+N: Tomas Mudrunka <tomas.mudrunka@gmail.com>
+F: package/hidapi/
+
N: Torben Voltmer <mail@t-voltmer.net>
F: package/espflash/
--
2.56.1
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 7+ messages in thread