2018-09-22 20:07:33 +02:00
|
|
|
package=hidapi
|
2021-11-10 00:40:54 +01:00
|
|
|
$(package)_version=0.11.0
|
2019-06-27 00:55:10 +02:00
|
|
|
$(package)_download_path=https://github.com/libusb/hidapi/archive
|
2018-09-22 20:07:33 +02:00
|
|
|
$(package)_file_name=$(package)-$($(package)_version).tar.gz
|
2021-11-10 00:40:54 +01:00
|
|
|
$(package)_sha256_hash=391d8e52f2d6a5cf76e2b0c079cfefe25497ba1d4659131297081fc0cd744632
|
2018-10-07 19:16:22 +02:00
|
|
|
$(package)_linux_dependencies=libusb eudev
|
2021-11-10 00:40:54 +01:00
|
|
|
$(package)_patches=missing_win_include.patch
|
2018-09-22 20:07:33 +02:00
|
|
|
|
|
|
|
define $(package)_set_vars
|
2018-10-07 19:16:22 +02:00
|
|
|
$(package)_config_opts=--enable-static --disable-shared
|
2018-09-22 20:07:33 +02:00
|
|
|
$(package)_config_opts+=--prefix=$(host_prefix)
|
2018-10-07 19:16:22 +02:00
|
|
|
$(package)_config_opts_darwin+=RANLIB="$(host_prefix)/native/bin/x86_64-apple-darwin11-ranlib" AR="$(host_prefix)/native/bin/x86_64-apple-darwin11-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
|
2018-10-08 12:25:45 +02:00
|
|
|
$(package)_config_opts_linux+=--with-pic
|
2018-09-22 20:07:33 +02:00
|
|
|
endef
|
|
|
|
|
2021-11-10 00:40:54 +01:00
|
|
|
define $(package)_preprocess_cmds
|
|
|
|
patch -p1 < $($(package)_patch_dir)/missing_win_include.patch
|
|
|
|
endef
|
|
|
|
|
2018-09-22 20:07:33 +02:00
|
|
|
define $(package)_config_cmds
|
|
|
|
./bootstrap &&\
|
2019-11-13 14:50:17 +01:00
|
|
|
$($(package)_autoconf) $($(package)_config_opts) AR_FLAGS=$($(package)_arflags)
|
2018-09-22 20:07:33 +02:00
|
|
|
endef
|
|
|
|
|
|
|
|
define $(package)_build_cmds
|
|
|
|
$(MAKE)
|
|
|
|
endef
|
|
|
|
|
|
|
|
define $(package)_stage_cmds
|
|
|
|
$(MAKE) DESTDIR=$($(package)_staging_dir) install
|
|
|
|
endef
|
2019-06-17 11:25:10 +02:00
|
|
|
|
|
|
|
define $(package)_postprocess_cmds
|
|
|
|
rm lib/*.la
|
|
|
|
endef
|
|
|
|
|