2022-06-02 12:50:33 +00:00
|
|
|
package=hidapi
|
2023-01-06 15:34:59 +00:00
|
|
|
$(package)_version=0.13.0
|
|
|
|
$(package)_download_path=https://github.com/libusb/hidapi/archive/refs/tags
|
2022-06-02 12:50:33 +00:00
|
|
|
$(package)_file_name=$(package)-$($(package)_version).tar.gz
|
2023-01-06 15:34:59 +00:00
|
|
|
$(package)_sha256_hash=e35eabe4ad59bd6e24dce6136f084997cdecd9bb7f6e83b40f3cc15b0ea8d56f
|
2022-06-02 12:50:33 +00:00
|
|
|
$(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_darwin+=RANLIB="$(host_prefix)/native/bin/x86_64-apple-darwin-ranlib" AR="$(host_prefix)/native/bin/x86_64-apple-darwin-ar" CC="$(host_prefix)/native/bin/$($(package)_cc)"
|
|
|
|
$(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
|
|
|
|
endef
|
|
|
|
|
|
|
|
define $(package)_config_cmds
|
|
|
|
./bootstrap &&\
|
|
|
|
$($(package)_autoconf) $($(package)_config_opts)
|
|
|
|
endef
|
|
|
|
|
|
|
|
define $(package)_build_cmds
|
|
|
|
$(MAKE)
|
|
|
|
endef
|
|
|
|
|
|
|
|
define $(package)_stage_cmds
|
|
|
|
$(MAKE) DESTDIR=$($(package)_staging_dir) install
|
|
|
|
endef
|
|
|
|
|
|
|
|
define $(package)_postprocess_cmds
|
|
|
|
rm lib/*.la
|
|
|
|
endef
|
|
|
|
|