From 26f0441601546cfff36eef09d7f91ab0d190c417 Mon Sep 17 00:00:00 2001 From: kenmays Date: Sun, 24 Jan 2021 01:49:59 -0800 Subject: [PATCH] libusb: bump to 1.0.24 (#5593) * libusb: bump to libusb-1.0.24 --- ...usb-1.0.23.recipe => libusb-1.0.24.recipe} | 13 ++-- .../libusb/patches/libusb-1.0.23.patchset | 64 ------------------- 2 files changed, 6 insertions(+), 71 deletions(-) rename dev-libs/libusb/{libusb-1.0.23.recipe => libusb-1.0.24.recipe} (88%) delete mode 100644 dev-libs/libusb/patches/libusb-1.0.23.patchset diff --git a/dev-libs/libusb/libusb-1.0.23.recipe b/dev-libs/libusb/libusb-1.0.24.recipe similarity index 88% rename from dev-libs/libusb/libusb-1.0.23.recipe rename to dev-libs/libusb/libusb-1.0.24.recipe index 5eeb97e32..e16eed835 100644 --- a/dev-libs/libusb/libusb-1.0.23.recipe +++ b/dev-libs/libusb/libusb-1.0.24.recipe @@ -2,10 +2,10 @@ SUMMARY="A library that provides generic access to USB devices" DESCRIPTION="libusb is meant to facilitate the communication with USB hardware. - portable: Using a single cross-platform API, it provides access to USB \ -devices on Linux, OS X, Windows and OpenBSD. +devices on Linux, Windows, Android, macOS, BSD, Haiku, etc. - user-mode: No special privilege or elevation is required for the \ application to communicate with a device. -- version-agnostic: All versions of the USB protocol, from 1.0 to 3.0 \ +- version-agnostic: All versions of the USB protocol, from 1.0 to 3.1 \ (latest), are supported." HOMEPAGE="https://libusb.info/" COPYRIGHT="2001 Johannes Erdfelt @@ -22,14 +22,13 @@ COPYRIGHT="2001 Johannes Erdfelt LICENSE="GNU LGPL v2.1" REVISION="1" SOURCE_URI="https://github.com/libusb/libusb/archive/v$portVersion.tar.gz" -CHECKSUM_SHA256="02620708c4eea7e736240a623b0b156650c39bfa93a14bcfa5f3e05270313eba" +CHECKSUM_SHA256="b7724c272dfc5713dce88ff717efd60f021ca5b7c8e30f08ebb2c42d2eea08ae" SOURCE_FILENAME="libusb-$portVersion.tar.gz" -PATCHES="libusb-$portVersion.patchset" -ARCHITECTURES="x86 x86_64 x86_gcc2" -SECONDARY_ARCHITECTURES="x86_gcc2 x86" +ARCHITECTURES="!x86_gcc2 x86_64 " +SECONDARY_ARCHITECTURES="x86" -libVersion="0.2.0" +libVersion="0.3.0" libVersionCompat="$libVersion compat >= ${libVersion%%.*}" portVers="${portVersion%.*}" diff --git a/dev-libs/libusb/patches/libusb-1.0.23.patchset b/dev-libs/libusb/patches/libusb-1.0.23.patchset deleted file mode 100644 index 267e3a585..000000000 --- a/dev-libs/libusb/patches/libusb-1.0.23.patchset +++ /dev/null @@ -1,64 +0,0 @@ -From b8b9f6edc122afe05cb6b1095c396a8913498bf6 Mon Sep 17 00:00:00 2001 -From: Adrien Destugues -Date: Wed, 15 Aug 2018 10:03:17 +0200 -Subject: implement clear_halt and provide reset_device - -Fix crashes in ec2drv. - -diff --git a/libusb/os/haiku_usb_backend.cpp b/libusb/os/haiku_usb_backend.cpp -index 539a996..16d7528 100644 ---- a/libusb/os/haiku_usb_backend.cpp -+++ b/libusb/os/haiku_usb_backend.cpp -@@ -309,7 +309,7 @@ USBDeviceHandle::SetAltSetting(int inumber, int alt) - return LIBUSB_SUCCESS; - } - -- -+/* - int - USBDevice::ClearHalt(int endpoint) - { -@@ -325,6 +325,23 @@ USBDevice::ClearHalt(int endpoint) - return _errno_to_libusb(command.control.status); - } - } -+*/ -+ -+int -+USBDeviceHandle::ClearHalt(int endpoint) -+{ -+ usb_raw_command command; -+ command.control.request_type = USB_REQTYPE_ENDPOINT_OUT; -+ command.control.request = USB_REQUEST_CLEAR_FEATURE; -+ command.control.value = USB_FEATURE_ENDPOINT_HALT; -+ command.control.index = endpoint; -+ command.control.length = 0; -+ -+ if (ioctl(fRawFD, B_USB_RAW_COMMAND_CONTROL_TRANSFER, &command, sizeof(command)) || -+ command.control.status != B_USB_RAW_STATUS_SUCCESS) { -+ return _errno_to_libusb(command.config.status); -+ } -+} - - - USBDevice::USBDevice(const char *path) -@@ -449,6 +466,7 @@ USBDevice::EndpointToInterface(uint8 address) const - int - USBDevice::Initialise() //Do we need more error checking, etc? How to report? - { -+ usbi_dbg("Haiku init dev %s", fPath); - int fRawFD = open(fPath, O_RDWR | O_CLOEXEC); - if (fRawFD < 0) - return B_ERROR; -@@ -479,7 +497,7 @@ USBDevice::Initialise() //Do we need more error checking, etc? How to report? - command.config_etc.descriptor = (usb_configuration_descriptor*)fConfigurationDescriptors[i]; - command.config_etc.length = tmp_config.total_length; - command.config_etc.config_index = i; -- if (ioctl(fRawFD, B_USB_COMMAND_GET_CONFIGURATION_DESCRIPTOR_ETC, &command, sizeof(command)) || -+ if (ioctl(fRawFD, B_USB_RAW_COMMAND_GET_CONFIGURATION_DESCRIPTOR_ETC, &command, sizeof(command)) || - command.config_etc.status != B_USB_RAW_STATUS_SUCCESS) { - usbi_err(NULL, "failed retrieving full configuration descriptor"); - close(fRawFD); --- -2.26.0 -