From a2d3e7aaf7514c1cdf751147bc390931faee2984 Mon Sep 17 00:00:00 2001 From: John Klug Date: Fri, 14 Jan 2022 12:07:31 -0600 Subject: USB-Tools 1.5 initial integration --- recipes-core/libusb/usb-tools/001-nohidapi.patch | 57 ++++++++++++++++++++++++ recipes-core/libusb/usb-tools_1.5.bb | 22 +++++++++ 2 files changed, 79 insertions(+) create mode 100644 recipes-core/libusb/usb-tools/001-nohidapi.patch create mode 100644 recipes-core/libusb/usb-tools_1.5.bb 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" + -- cgit v1.2.3