pkgsrc-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: pkgsrc/comms/libhidapi
Module Name: pkgsrc
Committed By: tsutsui
Date: Tue Mar 17 19:13:40 UTC 2026
Modified Files:
pkgsrc/comms/libhidapi: DESCR distinfo
pkgsrc/comms/libhidapi/patches: patch-netbsd_hid.c
Log Message:
libhidapi: reduce diffs from ustream implementation.
Tested with ch32fun and UIAPduino on NetBSD/i386 10.1 with
both ohci and xhci.
Also sync DESCR with the latest version.
To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 pkgsrc/comms/libhidapi/DESCR
cvs rdiff -u -r1.10 -r1.11 pkgsrc/comms/libhidapi/distinfo
cvs rdiff -u -r1.1 -r1.2 pkgsrc/comms/libhidapi/patches/patch-netbsd_hid.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: pkgsrc/comms/libhidapi/DESCR
diff -u pkgsrc/comms/libhidapi/DESCR:1.1 pkgsrc/comms/libhidapi/DESCR:1.2
--- pkgsrc/comms/libhidapi/DESCR:1.1 Fri Apr 3 22:29:12 2015
+++ pkgsrc/comms/libhidapi/DESCR Tue Mar 17 19:13:40 2026
@@ -7,6 +7,7 @@ HIDAPI has four back-ends:
* Windows (using hid.dll)
* Linux/hidraw (using the Kernel's hidraw driver)
* Linux/libusb (using libusb-1.0)
+ * NetBSD (using uhid(4) and drvctl(4))
* Mac (using IOHidManager)
-This package includes only the libusb backend.
+This package includes the libusb, Linux hidraw, and NetBSD backend.
Index: pkgsrc/comms/libhidapi/distinfo
diff -u pkgsrc/comms/libhidapi/distinfo:1.10 pkgsrc/comms/libhidapi/distinfo:1.11
--- pkgsrc/comms/libhidapi/distinfo:1.10 Fri Mar 13 10:37:25 2026
+++ pkgsrc/comms/libhidapi/distinfo Tue Mar 17 19:13:40 2026
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.10 2026/03/13 10:37:25 tsutsui Exp $
+$NetBSD: distinfo,v 1.11 2026/03/17 19:13:40 tsutsui Exp $
BLAKE2s (hidapi-0.15.0.tar.gz) = 194b619bd498bee0708388a97dd04f2af6e0065deb74d4aafa8572f6195e97d4
SHA512 (hidapi-0.15.0.tar.gz) = a4ddd13a80a84956872fa52aa861b40e4959f301d8d91afe0feaf9dbd87394561e1fdd20cbf8cf47200845f80a8db8a934bc2e3025fe6f16435e37c17621e7b6
@@ -7,4 +7,4 @@ SHA1 (patch-Makefile.am) = 8e39fc4650601
SHA1 (patch-configure.ac) = caf23d94ec0af608f63dfd3acba7b3624af78bdc
SHA1 (patch-libusb_Makefile.am) = 2caf718bd7538bcc43b7eaea75dc5a7024f12581
SHA1 (patch-netbsd_CMakeLists.txt) = 6a9ddb4e69be23cc34f59aee71520e17795b647a
-SHA1 (patch-netbsd_hid.c) = 1a882a1fc276fcc0175b1c0b84d27efdb7eeb748
+SHA1 (patch-netbsd_hid.c) = 4bd7079c86b34e5a43e12c5b609d7f1e209fedf0
Index: pkgsrc/comms/libhidapi/patches/patch-netbsd_hid.c
diff -u pkgsrc/comms/libhidapi/patches/patch-netbsd_hid.c:1.1 pkgsrc/comms/libhidapi/patches/patch-netbsd_hid.c:1.2
--- pkgsrc/comms/libhidapi/patches/patch-netbsd_hid.c:1.1 Fri Mar 13 10:37:25 2026
+++ pkgsrc/comms/libhidapi/patches/patch-netbsd_hid.c Tue Mar 17 19:13:40 2026
@@ -1,4 +1,4 @@
-$NetBSD: patch-netbsd_hid.c,v 1.1 2026/03/13 10:37:25 tsutsui Exp $
+$NetBSD: patch-netbsd_hid.c,v 1.2 2026/03/17 19:13:40 tsutsui Exp $
- don't assume roothub addr is always zero (see NetBSD PR/60073)
- check iconv(3) arg type properly
@@ -24,22 +24,25 @@ $NetBSD: patch-netbsd_hid.c,v 1.1 2026/0
strlcpy(devpath, "/dev/", sizeof(devpath));
strlcat(devpath, arr[i], sizeof(devpath));
-@@ -732,7 +737,13 @@ struct hid_device_info HID_API_EXPORT *
+@@ -732,7 +737,17 @@ struct hid_device_info HID_API_EXPORT *
if (bus == -1)
continue;
-- enumerate_usb_devices(bus, 0, hid_enumerate_callback, &hed);
-+ /* ehci/ohci/uhci/dwctwo etc. use 'addr 1' for root hubs */
++ /*
++ * ehci/ohci/uhci/dwctwo etc. use 'addr 1' for root hubs
++ * but xhci uses 'addr 0' on NetBSD.
++ * Check addr 0 (that would be unused on other than xhci)
++ * and then check addr 1 if there is no device at addr 0.
++ */
+ prev_end = hed.end;
-+ enumerate_usb_devices(bus, 1, hid_enumerate_callback, &hed);
-+ /* xhci uses 'addr 0' so check it if no device at addr 1 */
+ enumerate_usb_devices(bus, 0, hid_enumerate_callback, &hed);
+ if (hed.end == prev_end)
-+ enumerate_usb_devices(bus, 0,
++ enumerate_usb_devices(bus, 1,
+ hid_enumerate_callback, &hed);
close(bus);
}
-@@ -1087,7 +1098,7 @@ int HID_API_EXPORT_CALL hid_get_indexed_
+@@ -1087,7 +1102,7 @@ int HID_API_EXPORT_CALL hid_get_indexed_
struct usb_string_desc usd;
usb_string_descriptor_t *str;
iconv_t ic;
@@ -48,7 +51,7 @@ $NetBSD: patch-netbsd_hid.c,v 1.1 2026/0
size_t srcleft;
char *dst;
size_t dstleft;
-@@ -1131,7 +1142,7 @@ int HID_API_EXPORT_CALL hid_get_indexed_
+@@ -1131,7 +1146,7 @@ int HID_API_EXPORT_CALL hid_get_indexed_
return -1;
}
Home |
Main Index |
Thread Index |
Old Index