Stuart Henderson writes:
> The update looks better like this (I've only build-tested libusb1 itself > and *not* build or run tested any dependencies). > > But while we're there, the DEBUG handling isn't right, ports shouldn't > build additional things based on DEBUG being set (it's meant for setting > flags for the compiler/linker and choosing whether to strip binaries - > in particular this means we can't add a debug package for this as-is, > because it will enable the debug-log code in all packages). That should > probably be converted to a flavour instead. > > snip Per a request from Martin, I've removed him as the maintainer. Updated diff; sorry for the churn. As a side note, since he mentioned to indicate which tools I tested, I used security/gnupg2, security/pcsc-lite, sysutils/usbutils and a local copy of yubikey-manager that I've been hacking on to test. Thanks! Index: Makefile =================================================================== RCS file: /cvs/ports/devel/libusb1/Makefile,v retrieving revision 1.30 diff -u -p -r1.30 Makefile --- Makefile 12 Jul 2019 20:44:40 -0000 1.30 +++ Makefile 27 Nov 2019 19:04:56 -0000 @@ -2,30 +2,30 @@ COMMENT = library for USB device access from userspace -VERSION = 1.0.21 -REVISION = 1 +VERSION = 1.0.23 DISTNAME = libusb-${VERSION} PKGNAME = libusb1-${VERSION} +EXTRACT_SUFX = .tar.bz2 -SHARED_LIBS += usb-1.0 1.1 # 1.0 +SHARED_LIBS += usb-1.0 1.2 # 2.0 CATEGORIES = devel HOMEPAGE = http://www.libusb.info -MAINTAINER = Martin Pieuchot <m...@openbsd.org> +FLAVORS = debug +FLAVOR ?= # LGPL 2.1 PERMIT_PACKAGE = Yes WANTLIB = pthread -MASTER_SITES = ${MASTER_SITE_SOURCEFORGE:=libusb/} -EXTRACT_SUFX = .tar.bz2 +MASTER_SITES = https://github.com/libusb/libusb/releases/download/v${VERSION}/ CONFIGURE_STYLE = gnu -.ifdef DEBUG +.if ${FLAVOR:Mdebug} CONFIGURE_ARGS += --enable-debug-log \ --enable-examples-build .endif Index: distinfo =================================================================== RCS file: /cvs/ports/devel/libusb1/distinfo,v retrieving revision 1.5 diff -u -p -r1.5 distinfo --- distinfo 19 Apr 2017 06:09:02 -0000 1.5 +++ distinfo 27 Nov 2019 19:04:56 -0000 @@ -1,2 +1,2 @@ -SHA256 (libusb-1.0.21.tar.bz2) = fc6czpqBGUtwZe6RK81V7v/rq2lOpAP/uRtn22axgks= -SIZE (libusb-1.0.21.tar.bz2) = 607417 +SHA256 (libusb-1.0.23.tar.bz2) = 2xHAbpWKgtrFLPPGXLTdLD8znIqYhmURDg0k0ZMSrY0= +SIZE (libusb-1.0.23.tar.bz2) = 602860 Index: patches/patch-libusb_core_c =================================================================== RCS file: /cvs/ports/devel/libusb1/patches/patch-libusb_core_c,v retrieving revision 1.5 diff -u -p -r1.5 patch-libusb_core_c --- patches/patch-libusb_core_c 19 Apr 2017 06:09:02 -0000 1.5 +++ patches/patch-libusb_core_c 27 Nov 2019 19:04:56 -0000 @@ -4,9 +4,10 @@ On OpenBSD USB controllers are shown as itinial limit too small. On a recent machine this value is almost always exceeded, so bump it. ---- libusb/core.c.orig Wed Sep 14 19:17:29 2016 -+++ libusb/core.c Tue Apr 18 20:06:32 2017 -@@ -615,7 +615,7 @@ libusb_free_device_list(list, 1); +Index: libusb/core.c +--- libusb/core.c.orig ++++ libusb/core.c +@@ -612,7 +612,7 @@ libusb_free_device_list(list, 1); * which grows when required. it can be freed once discovery has completed, * eliminating the need for a list node in the libusb_device structure * itself. */ Index: patches/patch-libusb_os_openbsd_usb_c =================================================================== RCS file: /cvs/ports/devel/libusb1/patches/patch-libusb_os_openbsd_usb_c,v retrieving revision 1.7 diff -u -p -r1.7 patch-libusb_os_openbsd_usb_c --- patches/patch-libusb_os_openbsd_usb_c 19 Jul 2018 12:36:34 -0000 1.7 +++ patches/patch-libusb_os_openbsd_usb_c 27 Nov 2019 19:04:56 -0000 @@ -5,7 +5,7 @@ Export port number, fix github #314. Index: libusb/os/openbsd_usb.c --- libusb/os/openbsd_usb.c.orig +++ libusb/os/openbsd_usb.c -@@ -201,6 +201,7 @@ obsd_get_device_list(struct libusb_context * ctx, +@@ -183,6 +183,7 @@ obsd_get_device_list(struct libusb_context * ctx, dev->bus_number = di.udi_bus; dev->device_address = di.udi_addr; dev->speed = di.udi_speed; Index: pkg/PLIST =================================================================== RCS file: /cvs/ports/devel/libusb1/pkg/PLIST,v retrieving revision 1.2 diff -u -p -r1.2 PLIST --- pkg/PLIST 16 Mar 2015 18:07:43 -0000 1.2 +++ pkg/PLIST 27 Nov 2019 19:04:56 -0000 @@ -1,7 +1,7 @@ @comment $OpenBSD: PLIST,v 1.2 2015/03/16 18:07:43 naddy Exp $ include/libusb-1.0/ include/libusb-1.0/libusb.h -lib/libusb-1.0.a +@static-lib lib/libusb-1.0.a lib/libusb-1.0.la @lib lib/libusb-1.0.so.${LIBusb-1.0_VERSION} lib/pkgconfig/libusb-1.0.pc