summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Klug <john.klug@multitech.com>2022-01-14 12:07:31 -0600
committerJohn Klug <john.klug@multitech.com>2022-02-01 11:18:45 -0600
commita2d3e7aaf7514c1cdf751147bc390931faee2984 (patch)
tree5e297336554117eb5d5451a6e9f81c0eeb4922c7
parente1dcecb31cb9406a9acb96a7979b460350589b21 (diff)
downloadmeta-mlinux-a2d3e7aaf7514c1cdf751147bc390931faee2984.tar.gz
meta-mlinux-a2d3e7aaf7514c1cdf751147bc390931faee2984.tar.bz2
meta-mlinux-a2d3e7aaf7514c1cdf751147bc390931faee2984.zip
USB-Tools 1.5 initial integration
-rw-r--r--recipes-core/libusb/usb-tools/001-nohidapi.patch57
-rw-r--r--recipes-core/libusb/usb-tools_1.5.bb22
2 files changed, 79 insertions, 0 deletions
diff --git a/recipes-core/libusb/usb-tools/001-nohidapi.patch b/recipes-core/libusb/usb-tools/001-nohidapi.patch
new file mode 100644
index 0000000..a065494
--- /dev/null
+++ b/recipes-core/libusb/usb-tools/001-nohidapi.patch
@@ -0,0 +1,57 @@
+*
+* Openembedded does not appear to have an HID API (Human Interface Devices).
+* We should not need those tests.
+*
+====================================================================================
+diff --git a/README.md b/README.md
+index 7feb63d..4ae3d1d 100644
+--- a/README.md
++++ b/README.md
+@@ -21,7 +21,7 @@ debian-based distros, the following command should do the right thing:
+
+ ```
+ $ sudo apt-get update
+-$ sudo apt install libusb-1.0-0-dev libssl-dev libhidapi-dev
++$ sudo apt install libusb-1.0-0-dev libssl-dev
+ ```
+
+ After these are installed, the usual autotools-based setup should be followed:
+diff --git a/configure.ac b/configure.ac
+index b34b6be..b5956ea 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -33,10 +33,6 @@ PKG_CHECK_MODULES([libusb], [libusb-1.0])
+ # libssl
+ PKG_CHECK_MODULES([ssl], [openssl])
+
+-# hidapi
+-PKG_CHECK_MODULES([hid], [hidapi], [], [
+- PKG_CHECK_MODULES([hid], [hidapi-hidraw], [], [
+- PKG_CHECK_MODULES([hid], [hidapi-libusb])])])
+
+ # libpthread
+ m4_include([m4/ax_pthread.m4])
+diff --git a/src/Makefile.am b/src/Makefile.am
+index cb55f05..072e564 100644
+--- a/src/Makefile.am
++++ b/src/Makefile.am
+@@ -9,7 +9,6 @@ dist_bin_SCRIPTS = msc.sh scptest.sh test.sh usbpwrtest
+ bin_PROGRAMS = \
+ acmc \
+ acmd \
+- cleware \
+ companion-desc \
+ control \
+ device-reset \
+@@ -44,11 +43,6 @@ switchbox_SOURCES = switchbox.c
+ switchbox_CFLAGS = $(AM_CFLAGS)
+ switchbox_LDADD =
+
+-# This needs HIDAPI
+-cleware_SOURCES = cleware.c
+-cleware_CFLAGS = $(AM_CFLAGS) $(hid_CFLAGS)
+-cleware_LDADD = $(hid_LIBS)
+-
+ # These need libusb-1.0
+ companion_desc_SOURCES = companion-desc.c
+ companion_desc_CFLAGS = $(AM_CFLAGS) $(libusb_CFLAGS)
diff --git a/recipes-core/libusb/usb-tools_1.5.bb b/recipes-core/libusb/usb-tools_1.5.bb
new file mode 100644
index 0000000..22c70c9
--- /dev/null
+++ b/recipes-core/libusb/usb-tools_1.5.bb
@@ -0,0 +1,22 @@
+SUMMARY = "Utilities for testing USB"
+HOMEPAGE = "https://github.com/felipebalbi/usb-tools"
+SECTION = "core"
+
+DEPENDS += "libusb1 openssl"
+
+LICENSE = "GPLv3"
+LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
+BP = "git"
+
+
+SRC_URI = "git://github.com/felipebalbi/usb-tools.git \
+ file://001-nohidapi.patch \
+ "
+SRCREV = "v${PV}"
+
+inherit autotools pkgconfig
+
+# Don't configure udev by default since it will cause a circular
+# dependecy with udev package, which depends on libusb
+# EXTRA_OECONF = "--libdir=${base_libdir} --disable-udev"
+