From 67b89ec87ace90c918994964aa7281f74021ced1 Mon Sep 17 00:00:00 2001 From: skmpz Date: Sat, 5 Feb 2022 10:01:27 +0400 Subject: [PATCH] libusb: update to 1.0.25. --- .../patches/fix-descriptor-parsing.patch | 35 ------------------- .../libusb/patches/portability-fixes.patch | 16 --------- srcpkgs/libusb/template | 9 ++--- 3 files changed, 5 insertions(+), 55 deletions(-) delete mode 100644 srcpkgs/libusb/patches/fix-descriptor-parsing.patch delete mode 100644 srcpkgs/libusb/patches/portability-fixes.patch diff --git a/srcpkgs/libusb/patches/fix-descriptor-parsing.patch b/srcpkgs/libusb/patches/fix-descriptor-parsing.patch deleted file mode 100644 index b891a79ba5fa..000000000000 --- a/srcpkgs/libusb/patches/fix-descriptor-parsing.patch +++ /dev/null @@ -1,35 +0,0 @@ ---- a/libusb/os/linux_usbfs.c -+++ b/libusb/os/linux_usbfs.c -@@ -641,7 +641,12 @@ static int seek_to_next_config(struct libusb_context *ctx, - uint8_t *buffer, size_t len) - { - struct usbi_descriptor_header *header; -- int offset = 0; -+ int offset; -+ -+ /* Start seeking past the config descriptor */ -+ offset = LIBUSB_DT_CONFIG_SIZE; -+ buffer += LIBUSB_DT_CONFIG_SIZE; -+ len -= LIBUSB_DT_CONFIG_SIZE; - - while (len > 0) { - if (len < 2) { -@@ -718,7 +723,7 @@ static int parse_config_descriptors(struct libusb_device *dev) - } - - if (priv->sysfs_dir) { -- /* -+ /* - * In sysfs wTotalLength is ignored, instead the kernel returns a - * config descriptor with verified bLength fields, with descriptors - * with an invalid bLength removed. -@@ -727,8 +732,7 @@ static int parse_config_descriptors(struct libusb_device *dev) - int offset; - - if (num_configs > 1 && idx < num_configs - 1) { -- offset = seek_to_next_config(ctx, buffer + LIBUSB_DT_CONFIG_SIZE, -- remaining - LIBUSB_DT_CONFIG_SIZE); -+ offset = seek_to_next_config(ctx, buffer, remaining); - if (offset < 0) - return offset; - sysfs_config_len = (uint16_t)offset; diff --git a/srcpkgs/libusb/patches/portability-fixes.patch b/srcpkgs/libusb/patches/portability-fixes.patch deleted file mode 100644 index 39ff1e37722f..000000000000 --- a/srcpkgs/libusb/patches/portability-fixes.patch +++ /dev/null @@ -1,16 +0,0 @@ ---- a/libusb/io.c 2014-01-11 16:34:55.811463881 +0100 -+++ b/libusb/io.c 2014-01-11 16:35:26.138281377 +0100 -@@ -34,6 +34,13 @@ - #include - #endif - -+#ifndef TIMESPEC_TO_TIMEVAL -+#define TIMESPEC_TO_TIMEVAL(tv, ts) { \ -+ (tv)->tv_sec = (ts)->tv_sec; \ -+ (tv)->tv_usec = (ts)->tv_nsec / 1000; \ -+} -+#endif -+ - #include "libusbi.h" - - /** diff --git a/srcpkgs/libusb/template b/srcpkgs/libusb/template index 8c5ff6054eed..7b63b401f2a6 100644 --- a/srcpkgs/libusb/template +++ b/srcpkgs/libusb/template @@ -1,16 +1,17 @@ # Template file for 'libusb' pkgname=libusb -version=1.0.24 -revision=2 +version=1.0.25 +revision=1 build_style=gnu-configure hostmakedepends="pkg-config" makedepends="eudev-libudev-devel" short_desc="Library which allows userspace access to USB devices" -maintainer="Orphaned " +maintainer="skmpz " license="LGPL-2.1-or-later" homepage="https://libusb.info" +changelog="https://raw.githubusercontent.com/libusb/libusb/master/ChangeLog" distfiles="https://github.com/libusb/libusb/releases/download/v${version}/libusb-${version}.tar.bz2" -checksum=7efd2685f7b327326dcfb85cee426d9b871fd70e22caa15bb68d595ce2a2b12a +checksum=8a28ef197a797ebac2702f095e81975e2b02b2eeff2774fa909c78a74ef50849 libusb-devel_package() { short_desc+=" - development files"