Skip to content

Commit

Permalink
depends: remove eudev
Browse files Browse the repository at this point in the history
  • Loading branch information
tobtoht committed Jan 4, 2025
1 parent 650331f commit 19e3b3c
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 39 deletions.
14 changes: 9 additions & 5 deletions cmake/FindHIDAPI.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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.")
Expand Down
2 changes: 1 addition & 1 deletion cmake/FindLibUSB.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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}")
Expand Down
29 changes: 0 additions & 29 deletions contrib/depends/packages/eudev.mk

This file was deleted.

4 changes: 2 additions & 2 deletions contrib/depends/packages/hidapi.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion contrib/depends/packages/packages.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
1 change: 0 additions & 1 deletion contrib/guix/manifest.scm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 19e3b3c

Please sign in to comment.