2018-09-22 12:07:33 -06:00
|
|
|
package=hidapi
|
|
|
|
$(package)_version=0.8.0-rc1
|
|
|
|
$(package)_download_path=https://github.com/signal11/hidapi/archive
|
|
|
|
$(package)_file_name=$(package)-$($(package)_version).tar.gz
|
|
|
|
$(package)_sha256_hash=3c147200bf48a04c1e927cd81589c5ddceff61e6dac137a605f6ac9793f4af61
|
2018-10-07 11:51:09 -06:00
|
|
|
$(package)_linux_dependencies=libusb eudev
|
2018-09-22 12:07:33 -06:00
|
|
|
|
|
|
|
define $(package)_set_vars
|
2018-10-07 11:51:09 -06:00
|
|
|
$(package)_config_opts=--enable-static --disable-shared
|
2018-09-22 12:07:33 -06:00
|
|
|
$(package)_config_opts+=--prefix=$(host_prefix)
|
2018-10-07 11:51:09 -06: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 14:02:11 -06:00
|
|
|
$(package)_config_opts_linux+=--with-pic
|
2018-09-22 12:07:33 -06:00
|
|
|
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
|