37 lines
1.0 KiB
Makefile
Raw Normal View History

package=hidapi
2024-12-24 10:04:06 +01:00
$(package)_version=0.14.0
$(package)_download_path=https://github.com/libusb/hidapi/archive/refs/tags
$(package)_file_name=$(package)-$($(package)_version).tar.gz
2024-12-24 10:04:06 +01:00
$(package)_sha256_hash=a5714234abe6e1f53647dd8cba7d69f65f71c558b7896ed218864ffcf405bcbd
2025-01-04 04:31:50 +01:00
$(package)_linux_dependencies=libusb
2025-02-08 13:35:58 +01:00
# -DHIDAPI_NO_ICONV=ON
#
# `FindIconv.cmake` in CMake 3.16 fails to detect iconv for riscv64, arm, and aarch64 linux targets.
# Disable it if we're not building in a release environment.
define $(package)_set_vars
2025-02-08 13:35:58 +01:00
$(package)_config_opts := -DBUILD_SHARED_LIBS=OFF
$(package)_config_opts += -DHIDAPI_WITH_HIDRAW=OFF
ifeq ($(GUIX_ENVIRONMENT),)
$(package)_config_opts += -DHIDAPI_NO_ICONV=ON
endif
endef
2024-12-24 10:04:06 +01:00
# Remove blobs
2021-11-10 00:40:54 +01:00
define $(package)_preprocess_cmds
2024-12-24 10:04:06 +01:00
rm -rf documentation testgui windows/test/data m4
2021-11-10 00:40:54 +01:00
endef
define $(package)_config_cmds
2024-12-24 10:04:06 +01:00
$($(package)_cmake) .
endef
define $(package)_build_cmds
$(MAKE)
endef
define $(package)_stage_cmds
$(MAKE) DESTDIR=$($(package)_staging_dir) install
endef