On 11/25/19 2:15 PM, William Orr wrote:
Brian Callahan writes:
On 2019-11-24 6:35 PM, William Orr wrote:
Hey,
This is an update to devel/libusb1 1.0.23.
Includes a switch to the github upstream, and features
some small changes to the build system.
Tested on amd64
Thanks!
Index: devel/libusb1/Makefile
===================================================================
RCS file: /cvs/ports/devel/libusb1/Makefile,v
retrieving revision 1.29
diff -u -p -u -r1.29 Makefile
--- devel/libusb1/Makefile 19 Jul 2018 12:36:34 -0000 1.29
+++ devel/libusb1/Makefile 24 Nov 2019 23:18:42 -0000
@@ -2,8 +2,7 @@
COMMENT = library for USB device access from userspace
-VERSION = 1.0.21
-REVISION = 1
+VERSION = 1.0.23
DISTNAME = libusb-${VERSION}
PKGNAME = libusb1-${VERSION}
@@ -20,8 +19,11 @@ PERMIT_PACKAGE_CDROM = Yes
WANTLIB = pthread
-MASTER_SITES = ${MASTER_SITE_SOURCEFORGE:=libusb/}
-EXTRACT_SUFX = .tar.bz2
+
+GH_ACCOUNT = libusb
+GH_PROJECT = libusb
+GH_TAGNAME = v${VERSION}
+MASTER_SITES = ${MASTER_SITES_GITHUB}
The releases page has an uploaded tarball with the configure script already
generated. Could we use that instead?
https://github.com/libusb/libusb/releases/tag/v1.0.23
~Brian
CONFIGURE_STYLE = gnu
@@ -29,5 +31,13 @@ CONFIGURE_STYLE = gnu
CONFIGURE_ARGS += --enable-debug-log \
--enable-examples-build
.endif
+
+AUTOCONF_VERSION= 2.69
+AUTOMAKE_VERSION= 1.16
+
+do-gen:
+ cd ${WRKSRC}; AUTOCONF_VERSION=${AUTOCONF_VERSION} \
+ AUTOMAKE_VERSION=${AUTOMAKE_VERSION} ./autogen.sh
+
.include <bsd.port.mk>
Index: devel/libusb1/distinfo
===================================================================
RCS file: /cvs/ports/devel/libusb1/distinfo,v
retrieving revision 1.5
diff -u -p -u -r1.5 distinfo
--- devel/libusb1/distinfo 19 Apr 2017 06:09:02 -0000 1.5
+++ devel/libusb1/distinfo 24 Nov 2019 23:18:42 -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.gz) = AmIHCMTup+c2JApiOwsVZlDDm/qToUvPpfPgUnAxPro=
+SIZE (libusb-1.0.23.tar.gz) = 393929
Index: devel/libusb1/patches/patch-libusb_core_c
===================================================================
RCS file: /cvs/ports/devel/libusb1/patches/patch-libusb_core_c,v
retrieving revision 1.5
diff -u -p -u -r1.5 patch-libusb_core_c
--- devel/libusb1/patches/patch-libusb_core_c 19 Apr 2017 06:09:02 -0000
1.5
+++ devel/libusb1/patches/patch-libusb_core_c 24 Nov 2019 23:18:42 -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: devel/libusb1/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 -u -r1.7 patch-libusb_os_openbsd_usb_c
--- devel/libusb1/patches/patch-libusb_os_openbsd_usb_c 19 Jul 2018 12:36:34
-0000 1.7
+++ devel/libusb1/patches/patch-libusb_os_openbsd_usb_c 24 Nov 2019 23:18:42
-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;
Thanks for the review. I've updated the patch per your comment.
Index: devel/libusb1/Makefile
===================================================================
RCS file: /cvs/ports/devel/libusb1/Makefile,v
retrieving revision 1.29
diff -u -p -r1.29 Makefile
--- devel/libusb1/Makefile 19 Jul 2018 12:36:34 -0000 1.29
+++ devel/libusb1/Makefile 25 Nov 2019 19:10:33 -0000
@@ -2,8 +2,7 @@
COMMENT = library for USB device access from userspace
-VERSION = 1.0.21
-REVISION = 1
+VERSION = 1.0.23
DISTNAME = libusb-${VERSION}
PKGNAME = libusb1-${VERSION}
@@ -20,8 +19,11 @@ PERMIT_PACKAGE_CDROM = Yes
WANTLIB = pthread
-MASTER_SITES = ${MASTER_SITE_SOURCEFORGE:=libusb/}
-EXTRACT_SUFX = .tar.bz2
+EXTRACT_SUFX = .tar.bz2
+GH_ACCOUNT = libusb
+GH_PROJECT = libusb
+GH_TAGNAME = v${VERSION}
+MASTER_SITES :=
https://github.com/${GH_ACCOUNT}/${GH_PROJECT}/releases/download/${GH_TAGNAME}/
Ah, it's one or the other. I forgot to mention that, sorry.
So you don't need the GH_* variables, just
MASTER_SITES =
https://github.com/libusb/libusb/releases/download/v${VERSION}/
will suffice.
(Sorry, I've not actually tested yet so this is just a read-test but
plan to shortly.)
~Brian
CONFIGURE_STYLE = gnu
Index: devel/libusb1/distinfo
===================================================================
RCS file: /cvs/ports/devel/libusb1/distinfo,v
retrieving revision 1.5
diff -u -p -r1.5 distinfo
--- devel/libusb1/distinfo 19 Apr 2017 06:09:02 -0000 1.5
+++ devel/libusb1/distinfo 25 Nov 2019 19:10:33 -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: devel/libusb1/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
--- devel/libusb1/patches/patch-libusb_core_c 19 Apr 2017 06:09:02 -0000
1.5
+++ devel/libusb1/patches/patch-libusb_core_c 25 Nov 2019 19:10:33 -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: devel/libusb1/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
--- devel/libusb1/patches/patch-libusb_os_openbsd_usb_c 19 Jul 2018 12:36:34
-0000 1.7
+++ devel/libusb1/patches/patch-libusb_os_openbsd_usb_c 25 Nov 2019 19:10:33
-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;