diff options
| author | Czarek Nakamoto <cyjan@mrcyjanek.net> | 2024-12-04 12:33:43 -0500 |
|---|---|---|
| committer | Czarek Nakamoto <cyjan@mrcyjanek.net> | 2024-12-04 12:33:43 -0500 |
| commit | 5b135aa861c36f399002cef1c83ba73c64bc337e (patch) | |
| tree | 0cf5ee3271dc17f4c73d5e66626bbdaf15754338 /contrib/depends/packages/hidapi.mk | |
| parent | ecc31787c2174a829848aac403bd13e663fe33c3 (diff) | |
| parent | 2a38bf29618a8ce163f9d6f83b7ae86924752e32 (diff) | |
Merge branch 'develop' into zano
Diffstat (limited to 'contrib/depends/packages/hidapi.mk')
| -rw-r--r-- | contrib/depends/packages/hidapi.mk | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/contrib/depends/packages/hidapi.mk b/contrib/depends/packages/hidapi.mk new file mode 100644 index 0000000..2f04be1 --- /dev/null +++ b/contrib/depends/packages/hidapi.mk @@ -0,0 +1,38 @@ +package=hidapi +$(package)_version=0.13.1 +$(package)_download_path=https://github.com/libusb/hidapi/archive/refs/tags +$(package)_file_name=$(package)-$($(package)_version).tar.gz +$(package)_sha256_hash=476a2c9a4dc7d1fc97dd223b84338dbea3809a84caea2dcd887d9778725490e3 +$(package)_linux_dependencies=libusb eudev +$(package)_patches=missing_win_include.patch + +define $(package)_set_vars +$(package)_config_opts=--enable-static --disable-shared +$(package)_config_opts+=--prefix=$(host_prefix) +$(package)_config_opts_linux+=libudev_LIBS="-L$(host_prefix)/lib -ludev" +$(package)_config_opts_linux+=libudev_CFLAGS=-I$(host_prefix)/include +$(package)_config_opts_linux+=libusb_LIBS="-L$(host_prefix)/lib -lusb-1.0" +$(package)_config_opts_linux+=libusb_CFLAGS=-I$(host_prefix)/include/libusb-1.0 +$(package)_config_opts_linux+=--with-pic +endef + +define $(package)_preprocess_cmds + patch -p1 < $($(package)_patch_dir)/missing_win_include.patch && ./bootstrap +endef + +define $(package)_config_cmds + $($(package)_autoconf) AR_FLAGS=$($(package)_arflags) +endef + +define $(package)_build_cmds + $(MAKE) -j$(NUM_CORES) +endef + +define $(package)_stage_cmds + $(MAKE) -j$(NUM_CORES) DESTDIR=$($(package)_staging_dir) install +endef + +define $(package)_postprocess_cmds + rm lib/*.la +endef + |
