diff options
author | Tijl Coosemans <tijl@FreeBSD.org> | 2021-03-17 10:01:26 +0000 |
---|---|---|
committer | Tijl Coosemans <tijl@FreeBSD.org> | 2021-03-17 10:01:26 +0000 |
commit | b8491948a5cf8309ff9e3cbcfd1ac9540ac7ce69 (patch) | |
tree | abc4afa1caf923e1c35d192441edd2d207007ac6 /comms | |
parent | adad6941e900f91ac49fe090c7262c5834a27d90 (diff) | |
download | ports-b8491948a5cf8309ff9e3cbcfd1ac9540ac7ce69.tar.gz ports-b8491948a5cf8309ff9e3cbcfd1ac9540ac7ce69.zip |
The libusb project has adopted hidapi. Update to their latest release,
0.10.1. Bump py-hidapi so it gets rebuilt to use new functions.
Hand over to maintainer of py-hidapi so the two can be maintained together.
Reported by: Corey Stephan (marquette.edu)
Tested by: ehaupt
Notes
Notes:
svn path=/head/; revision=568637
Diffstat (limited to 'comms')
-rw-r--r-- | comms/hidapi/Makefile | 17 | ||||
-rw-r--r-- | comms/hidapi/distinfo | 5 | ||||
-rw-r--r-- | comms/hidapi/files/patch-configure.ac | 14 | ||||
-rw-r--r-- | comms/hidapi/files/patch-libusb-hid.c | 45 | ||||
-rw-r--r-- | comms/hidapi/pkg-descr | 2 | ||||
-rw-r--r-- | comms/hidapi/pkg-plist | 6 | ||||
-rw-r--r-- | comms/py-hidapi/Makefile | 1 |
7 files changed, 25 insertions, 65 deletions
diff --git a/comms/hidapi/Makefile b/comms/hidapi/Makefile index 7cc1fc5f1b72..2b512697cd62 100644 --- a/comms/hidapi/Makefile +++ b/comms/hidapi/Makefile @@ -2,27 +2,24 @@ PORTNAME= hidapi DISTVERSIONPREFIX= ${PORTNAME}- -DISTVERSION= 0.8.0-rc1 -PORTREVISION= 3 +DISTVERSION= 0.10.1 CATEGORIES= comms -MAINTAINER= tijl@FreeBSD.org +MAINTAINER= ehaupt@FreeBSD.org COMMENT= Library to access USB HID-class devices LICENSE= BSD3CLAUSE GPLv3 LICENSE_COMB= dual +USES= autoreconf gettext-tools iconv:wchar_t libtool localbase \ + pkgconfig + USE_GITHUB= yes -GH_ACCOUNT= signal11 +GH_ACCOUNT= libusb -USES= autoreconf gettext-tools iconv:wchar_t libtool GNU_CONFIGURE= yes -USE_LDCONFIG= yes INSTALL_TARGET= install-strip -PORTDOCS= * - -CPPFLAGS+= -I${LOCALBASE}/include -LIBS+= -L${LOCALBASE}/lib +USE_LDCONFIG= yes OPTIONS_DEFINE= DOCS diff --git a/comms/hidapi/distinfo b/comms/hidapi/distinfo index 5199f2a12ca5..31cdd9f227f2 100644 --- a/comms/hidapi/distinfo +++ b/comms/hidapi/distinfo @@ -1,2 +1,3 @@ -SHA256 (signal11-hidapi-hidapi-0.8.0-rc1_GH0.tar.gz) = 3c147200bf48a04c1e927cd81589c5ddceff61e6dac137a605f6ac9793f4af61 -SIZE (signal11-hidapi-hidapi-0.8.0-rc1_GH0.tar.gz) = 101833 +TIMESTAMP = 1615890404 +SHA256 (libusb-hidapi-hidapi-0.10.1_GH0.tar.gz) = f71dd8a1f46979c17ee521bc2117573872bbf040f8a4750e492271fc141f2644 +SIZE (libusb-hidapi-hidapi-0.10.1_GH0.tar.gz) = 119581 diff --git a/comms/hidapi/files/patch-configure.ac b/comms/hidapi/files/patch-configure.ac index 6137573b4ca6..6f44ecc78001 100644 --- a/comms/hidapi/files/patch-configure.ac +++ b/comms/hidapi/files/patch-configure.ac @@ -1,18 +1,18 @@ ---- configure.ac.orig 2013-10-06 22:43:37 UTC +--- configure.ac.orig 2020-11-24 11:39:27 UTC +++ configure.ac -@@ -89,11 +89,11 @@ case $host in +@@ -82,13 +82,11 @@ case $host in os="freebsd" threads="pthreads" - CFLAGS="$CFLAGS -I/usr/local/include" - LDFLAGS="$LDFLAGS -L/usr/local/lib" - LIBS="${LIBS}" - AC_CHECK_LIB([usb], [libusb_init], [LIBS_LIBUSB_PRIVATE="${LIBS_LIBUSB_PRIVATE} -lusb"], [hidapi_lib_error libusb]) + PKG_CHECK_MODULES([libusb], [libusb-1.0 >= 1.0.9], true, [hidapi_lib_error libusb-1.0]) + LIBS_LIBUSB_PRIVATE="${LIBS_LIBUSB_PRIVATE} $libusb_LIBS" + CFLAGS_LIBUSB="${CFLAGS_LIBUSB} $libusb_CFLAGS" - AC_CHECK_LIB([iconv], [iconv_open], [LIBS_LIBUSB_PRIVATE="${LIBS_LIBUSB_PRIVATE} -liconv"], [hidapi_lib_error libiconv]) -+ AC_CHECK_DECLS([libusb_get_string_descriptor], [], [], [[#include <libusb.h>]]) -+ AC_CHECK_DECLS([libusb_handle_events_completed], [], [], [[#include <libusb.h>]]) + AM_ICONV + LIBS_LIBUSB_PRIVATE="${LIBS_LIBUSB_PRIVATE} ${LTLIBICONV}" - echo libs_priv: $LIBS_LIBUSB_PRIVATE ;; - *-mingw*) + *-kfreebsd*) + AC_MSG_RESULT([ (kFreeBSD back-end)]) diff --git a/comms/hidapi/files/patch-libusb-hid.c b/comms/hidapi/files/patch-libusb-hid.c deleted file mode 100644 index 446a1f34a649..000000000000 --- a/comms/hidapi/files/patch-libusb-hid.c +++ /dev/null @@ -1,45 +0,0 @@ ---- libusb/hid.c.orig 2013-10-06 22:43:37 UTC -+++ libusb/hid.c -@@ -25,6 +25,8 @@ - - #define _GNU_SOURCE /* needed for wcsdup() before glibc 2.10 */ - -+#include <config.h> -+ - /* C */ - #include <stdio.h> - #include <string.h> -@@ -250,7 +252,7 @@ static int get_usage(uint8_t *report_des - } - #endif /* INVASIVE_GET_USAGE */ - --#ifdef __FreeBSD__ -+#if ! HAVE_DECL_LIBUSB_GET_STRING_DESCRIPTOR - /* The FreeBSD version of libusb doesn't have this funciton. In mainline - libusb, it's inlined in libusb.h. This function will bear a striking - resemblence to that one, because there's about one way to code it. -@@ -333,11 +335,7 @@ static wchar_t *get_usb_string(libusb_de - size_t inbytes; - size_t outbytes; - size_t res; --#ifdef __FreeBSD__ -- const char *inptr; --#else -- char *inptr; --#endif -+ ICONV_CONST char *inptr; - char *outptr; - - /* Determine which language to use. */ -@@ -757,7 +755,11 @@ static void *read_thread(void *param) - libusb_cancel_transfer(dev->transfer); - - while (!dev->cancelled) -+#if HAVE_DECL_LIBUSB_HANDLE_EVENTS_COMPLETED - libusb_handle_events_completed(usb_context, &dev->cancelled); -+#else -+ libusb_handle_events(usb_context); -+#endif - - /* Now that the read thread is stopping, Wake any threads which are - waiting on data (in hid_read_timeout()). Do this under a mutex to diff --git a/comms/hidapi/pkg-descr b/comms/hidapi/pkg-descr index 7b67c9fb323e..78db88b52d31 100644 --- a/comms/hidapi/pkg-descr +++ b/comms/hidapi/pkg-descr @@ -3,4 +3,4 @@ work with USB HID-Class devices. While it can be used to communicate with standard HID devices like keyboards, mice, and joysticks, it is most useful when used with custom (Vendor-Defined) HID devices. -WWW: http://www.signal11.us/oss/hidapi/ +WWW: https://github.com/libusb/hidapi diff --git a/comms/hidapi/pkg-plist b/comms/hidapi/pkg-plist index 04a5e71bdd2f..1fda461121c1 100644 --- a/comms/hidapi/pkg-plist +++ b/comms/hidapi/pkg-plist @@ -4,3 +4,9 @@ lib/libhidapi.so lib/libhidapi.so.0 lib/libhidapi.so.0.0.0 libdata/pkgconfig/hidapi.pc +%%PORTDOCS%%%%DOCSDIR%%/AUTHORS.txt +%%PORTDOCS%%%%DOCSDIR%%/LICENSE-bsd.txt +%%PORTDOCS%%%%DOCSDIR%%/LICENSE-gpl3.txt +%%PORTDOCS%%%%DOCSDIR%%/LICENSE-orig.txt +%%PORTDOCS%%%%DOCSDIR%%/LICENSE.txt +%%PORTDOCS%%%%DOCSDIR%%/README.md diff --git a/comms/py-hidapi/Makefile b/comms/py-hidapi/Makefile index e84c100dab29..b9b1d6a231d7 100644 --- a/comms/py-hidapi/Makefile +++ b/comms/py-hidapi/Makefile @@ -3,6 +3,7 @@ PORTNAME= hidapi PORTVERSION= 0.10.1 +PORTREVISION= 1 CATEGORIES= comms python MASTER_SITES= CHEESESHOP PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} |