2017-04-05 21:59:49 +00:00
|
|
|
# GPG 1.4.21 uses an old version of libusb, which
|
|
|
|
# is emulated with the compatibility library.
|
|
|
|
# This is a bit of a hack to set it up.
|
2018-01-05 21:09:07 +00:00
|
|
|
|
2017-04-05 21:59:49 +00:00
|
|
|
modules-$(CONFIG_GPG) += libusb-compat
|
2018-01-05 21:09:07 +00:00
|
|
|
modules-$(CONFIG_GPG2) += libusb-compat
|
2017-04-05 21:59:49 +00:00
|
|
|
|
|
|
|
libusb-compat_version := 0.1.5
|
|
|
|
libusb-compat_dir := libusb-compat-$(libusb-compat_version)
|
|
|
|
libusb-compat_tar := libusb-compat-$(libusb-compat_version).tar.bz2
|
|
|
|
libusb-compat_url := https://downloads.sourceforge.net/project/libusb/libusb-compat-0.1/libusb-compat-$(libusb-compat_version)/$(libusb-compat_tar)
|
|
|
|
libusb-compat_hash := 404ef4b6b324be79ac1bfb3d839eac860fbc929e6acb1ef88793a6ea328bc55a
|
|
|
|
|
|
|
|
libusb-compat_configure := ./configure \
|
2017-04-08 17:23:34 +00:00
|
|
|
$(CROSS_TOOLS) \
|
2021-07-18 17:34:20 +00:00
|
|
|
--host $(MUSL_ARCH)-elf-linux \
|
2017-04-06 20:01:56 +00:00
|
|
|
--prefix "/" \
|
2017-04-05 22:06:42 +00:00
|
|
|
PKG_CONFIG=/bin/false \
|
2017-04-05 22:07:50 +00:00
|
|
|
LIBUSB_1_0_CFLAGS="-I$(INSTALL)/include/libusb-1.0" \
|
2017-04-06 20:01:56 +00:00
|
|
|
LIBUSB_1_0_LIBS="$(INSTALL)/libusb-1.0.so" \
|
2017-04-05 21:59:49 +00:00
|
|
|
|
|
|
|
# Run one build to generate the executables with the pre-defined
|
|
|
|
# exec_prefix and datarootdir, then a second make to install the binaries
|
|
|
|
# into our actual target location
|
|
|
|
libusb-compat_target := $(MAKE_JOBS) \
|
2017-04-06 20:01:56 +00:00
|
|
|
DESTDIR="$(INSTALL)" \
|
2017-04-08 17:23:34 +00:00
|
|
|
$(CROSS_TOOLS) \
|
2017-04-05 21:59:49 +00:00
|
|
|
install \
|
|
|
|
|
|
|
|
libusb-compat_libraries := libusb/.libs/libusb-0.1.so.4
|
|
|
|
|
|
|
|
libusb-compat_depends := libusb $(musl_dep)
|