Skip to content

Commit

Permalink
Merge pull request #9675
Browse files Browse the repository at this point in the history
e7e00df depends: remove eudev (tobtoht)
  • Loading branch information
tobtoht committed Feb 4, 2025
2 parents 4118bd8 + e7e00df commit c57a429
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 35 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};${LIBUDEV_LIBRARY}")
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
25 changes: 0 additions & 25 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

# Remove blobs
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 @@ -16,7 +16,7 @@ packages += ncurses readline
endif

linux_native_packages :=
linux_packages := eudev
linux_packages :=

freebsd_native_packages := freebsd_base
freebsd_packages :=
Expand Down
1 change: 0 additions & 1 deletion contrib/guix/manifest.scm
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,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 c57a429

Please sign in to comment.