depends: remove eudev

This commit is contained in:
tobtoht 2025-01-04 04:31:50 +01:00
parent 650331f4b8
commit 19e3b3c778
No known key found for this signature in database
GPG key ID: E45B10DD027D2472
6 changed files with 13 additions and 39 deletions

View file

@ -41,13 +41,17 @@ if(HIDAPI_FOUND)
set(HIDAPI_LIBRARIES "${HIDAPI_LIBRARY}")
if((STATIC AND UNIX AND NOT APPLE) OR (DEPENDS AND CMAKE_SYSTEM_NAME STREQUAL "Linux") OR ANDROID)
find_library(LIBUSB-1.0_LIBRARY usb-1.0)
find_library(LIBUDEV_LIBRARY udev)
if(LIBUSB-1.0_LIBRARY)
set(HIDAPI_LIBRARIES "${HIDAPI_LIBRARIES};${LIBUSB-1.0_LIBRARY}")
if(LIBUDEV_LIBRARY)
set(HIDAPI_LIBRARIES "${HIDAPI_LIBRARIES};${LIBUDEV_LIBRARY}")
elseif(NOT ANDROID)
message(WARNING "libudev library not found, binaries may fail to link.")
# Hidapi is built without the udev backend in depends
if (NOT DEPENDS)
find_library(LIBUDEV_LIBRARY udev)
if(LIBUDEV_LIBRARY)
set(HIDAPI_LIBRARIES "${HIDAPI_LIBRARIES}")
elseif(NOT ANDROID)
message(WARNING "libudev library not found, binaries may fail to link.")
endif()
endif()
else()
message(WARNING "libusb-1.0 library not found, binaries may fail to link.")

View file

@ -119,7 +119,7 @@ if ( LibUSB_FOUND )
list(APPEND TEST_COMPILE_EXTRA_LIBRARIES ${LibUSB_LIBRARIES})
set(CMAKE_REQUIRED_LIBRARIES ${TEST_COMPILE_EXTRA_LIBRARIES})
if((STATIC AND UNIX AND NOT APPLE AND NOT FREEBSD) OR (DEPENDS AND CMAKE_SYSTEM_NAME STREQUAL "Linux") OR ANDROID)
if((STATIC AND UNIX AND NOT APPLE AND NOT FREEBSD AND NOT DEPENDS) OR ANDROID)
find_library(LIBUDEV_LIBRARY udev)
if(LIBUDEV_LIBRARY)
set(LibUSB_LIBRARIES "${LibUSB_LIBRARIES};${LIBUDEV_LIBRARY}")

View file

@ -1,29 +0,0 @@
package=eudev
$(package)_version=3.2.14
$(package)_download_path=https://github.com/eudev-project/eudev/releases/download/v$($(package)_version)/
$(package)_file_name=$(package)-$($(package)_version).tar.gz
$(package)_sha256_hash=8da4319102f24abbf7fff5ce9c416af848df163b29590e666d334cc1927f006f
define $(package)_set_vars
$(package)_config_opts=--disable-gudev --disable-introspection --disable-hwdb --disable-manpages --disable-shared
endef
define $(package)_config_cmds
$($(package)_autoconf) AR_FLAGS=$($(package)_arflags)
endef
define $(package)_build_cmd
$(MAKE)
endef
define $(package)_preprocess_cmds
cd $($(package)_build_subdir); autoreconf -f -i
endef
define $(package)_stage_cmds
$(MAKE) DESTDIR=$($(package)_staging_dir) install
endef
define $(package)_postprocess_cmds
rm lib/*.la
endef

View file

@ -3,10 +3,10 @@ $(package)_version=0.14.0
$(package)_download_path=https://github.com/libusb/hidapi/archive/refs/tags
$(package)_file_name=$(package)-$($(package)_version).tar.gz
$(package)_sha256_hash=a5714234abe6e1f53647dd8cba7d69f65f71c558b7896ed218864ffcf405bcbd
$(package)_linux_dependencies=libusb eudev
$(package)_linux_dependencies=libusb
define $(package)_set_vars
$(package)_config_opts+=-DBUILD_SHARED_LIBS=OFF
$(package)_config_opts+=-DBUILD_SHARED_LIBS=OFF -DHIDAPI_WITH_HIDRAW=OFF
endef
define $(package)_config_cmds

View file

@ -13,7 +13,7 @@ darwin_packages = ncurses readline $(hardware_packages)
freebsd_native_packages = freebsd_base $(hardware_native_packages)
freebsd_packages = ncurses readline protobuf libusb
linux_packages = eudev ncurses readline $(hardware_packages)
linux_packages = ncurses readline $(hardware_packages)
linux_native_packages = $(hardware_native_packages)
ifeq ($(build_tests),ON)

View file

@ -275,7 +275,6 @@ chain for " target " development."))
autoconf-2.71 ; defaults to 2.69, which does not recognize the aarch64-apple-darwin target
automake
pkg-config
gperf ; required to build eudev in depends
cmake-minimal
;; Scripting