2018-09-22 14:07:33 -04:00
|
|
|
package=libusb
|
2023-01-18 13:21:13 -05:00
|
|
|
$(package)_version=1.0.26
|
|
|
|
$(package)_download_path=https://github.com/libusb/libusb/releases/download/v$($(package)_version)
|
2018-09-22 14:07:33 -04:00
|
|
|
$(package)_file_name=$(package)-$($(package)_version).tar.bz2
|
2023-01-18 13:21:13 -05:00
|
|
|
$(package)_sha256_hash=12ce7a61fc9854d1d2a1ffe095f7b5fac19ddba095c259e6067a46500381b5a5
|
2023-09-29 13:13:37 -04:00
|
|
|
$(package)_patches=fix_osx_avail.patch
|
2018-09-22 14:07:33 -04:00
|
|
|
|
|
|
|
define $(package)_preprocess_cmds
|
2023-09-29 13:13:37 -04:00
|
|
|
patch -p1 < $($(package)_patch_dir)/fix_osx_avail.patch &&\
|
2018-09-22 14:07:33 -04:00
|
|
|
autoreconf -i
|
|
|
|
endef
|
|
|
|
|
|
|
|
define $(package)_set_vars
|
|
|
|
$(package)_config_opts=--disable-shared
|
2018-11-04 18:38:58 -05:00
|
|
|
$(package)_config_opts_linux=--with-pic --disable-udev
|
2018-12-04 16:01:03 -05:00
|
|
|
$(package)_config_opts_mingw32=--disable-udev
|
|
|
|
$(package)_config_opts_darwin=--disable-udev
|
2023-09-29 13:13:37 -04:00
|
|
|
$(package)_config_opts_freebsd=--with-pic --disable-udev
|
2018-09-22 14:07:33 -04:00
|
|
|
endef
|
|
|
|
|
2018-12-04 16:01:03 -05:00
|
|
|
ifneq ($(host_os),darwin)
|
|
|
|
define $(package)_config_cmds
|
|
|
|
cp -f $(BASEDIR)/config.guess config.guess &&\
|
|
|
|
cp -f $(BASEDIR)/config.sub config.sub &&\
|
2019-11-13 08:50:17 -05:00
|
|
|
$($(package)_autoconf) AR_FLAGS=$($(package)_arflags)
|
2018-12-04 16:01:03 -05:00
|
|
|
endef
|
|
|
|
else
|
|
|
|
define $(package)_config_cmds
|
2019-11-13 08:50:17 -05:00
|
|
|
$($(package)_autoconf) AR_FLAGS=$($(package)_arflags)
|
2018-12-04 16:01:03 -05:00
|
|
|
endef
|
|
|
|
endif
|
2018-09-22 14:07:33 -04:00
|
|
|
|
|
|
|
define $(package)_build_cmd
|
|
|
|
$(MAKE)
|
|
|
|
endef
|
|
|
|
|
|
|
|
define $(package)_stage_cmds
|
|
|
|
$(MAKE) DESTDIR=$($(package)_staging_dir) install
|
|
|
|
endef
|
|
|
|
|
2018-12-04 16:01:03 -05:00
|
|
|
define $(package)_postprocess_cmds cp -f lib/libusb-1.0.a lib/libusb.a
|
2018-09-22 14:07:33 -04:00
|
|
|
endef
|