pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/comms/libhidapi libhidapi: Update to 0.9.0
details: https://anonhg.NetBSD.org/pkgsrc/rev/3d53ef853ea0
branches: trunk
changeset: 397976:3d53ef853ea0
user: nia <nia%pkgsrc.org@localhost>
date: Mon Jul 08 12:52:42 2019 +0000
description:
libhidapi: Update to 0.9.0
pkg-config and libtool support.
diffstat:
comms/libhidapi/Makefile | 23 +++++----
comms/libhidapi/PLIST | 13 +++-
comms/libhidapi/distinfo | 15 +++--
comms/libhidapi/patches/patch-Makefile | 44 ------------------
comms/libhidapi/patches/patch-Makefile.am | 17 +++++++
comms/libhidapi/patches/patch-configure.ac | 57 ++++++++++++++++++++++++
comms/libhidapi/patches/patch-libusb_Makefile.am | 20 ++++++++
comms/libhidapi/patches/patch-linux_hid-libusb.c | 15 ------
8 files changed, 123 insertions(+), 81 deletions(-)
diffs (254 lines):
diff -r 189672963893 -r 3d53ef853ea0 comms/libhidapi/Makefile
--- a/comms/libhidapi/Makefile Mon Jul 08 10:47:26 2019 +0000
+++ b/comms/libhidapi/Makefile Mon Jul 08 12:52:42 2019 +0000
@@ -1,27 +1,28 @@
-# $NetBSD: Makefile,v 1.2 2015/04/03 22:36:02 rodent Exp $
+# $NetBSD: Makefile,v 1.3 2019/07/08 12:52:42 nia Exp $
GITHUB_PROJECT= hidapi
-GITHUB_TAG= ${GITHUB_PROJECT}-0.7.0
+GITHUB_TAG= ${GITHUB_PROJECT}-0.9.0
DISTNAME= ${GITHUB_TAG}
PKGNAME= lib${DISTNAME}
CATEGORIES= comms devel
-MASTER_SITES= ${MASTER_SITE_GITHUB:=signal11/}
+MASTER_SITES= ${MASTER_SITE_GITHUB:=libusb/}
MAINTAINER= nathanialsloss%yahoo.com.au@localhost
-HOMEPAGE= http://www.signal11.us/oss/hidapi/
+HOMEPAGE= https://github.com/libusb/hidapi
COMMENT= Library for comunicating with bluetooth and usb hid devices
LICENSE= gnu-gpl-v3 OR modified-bsd
USE_LANGUAGES= c c++
-USE_TOOLS+= gmake pkg-config
+USE_TOOLS+= autoreconf autoconf automake
+USE_TOOLS+= pkg-config gmake
-NO_CONFIGURE= yes
-WRKSRC= ${WRKDIR}/${GITHUB_PROJECT}-${GITHUB_TAG}
-INSTALLATION_DIRS+= include/${GITHUB_PROJECT} lib
+HAS_CONFIGURE= yes
+GNU_CONFIGURE= yes
+USE_LIBTOOL= yes
-.include "../../mk/bsd.fast.prefs.mk"
+pre-configure:
+ cd ${WRKSRC} && ${SH} ./bootstrap
-CFLAGS+= -fPIC
-
+.include "../../devel/gettext-lib/buildlink3.mk"
.include "../../devel/libusb1/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"
diff -r 189672963893 -r 3d53ef853ea0 comms/libhidapi/PLIST
--- a/comms/libhidapi/PLIST Mon Jul 08 10:47:26 2019 +0000
+++ b/comms/libhidapi/PLIST Mon Jul 08 12:52:42 2019 +0000
@@ -1,5 +1,10 @@
-@comment $NetBSD: PLIST,v 1.1 2015/04/03 22:29:12 rodent Exp $
+@comment $NetBSD: PLIST,v 1.2 2019/07/08 12:52:42 nia Exp $
include/hidapi/hidapi.h
-lib/libhidapi.so
-lib/libhidapi.so.0
-lib/libhidapi.so.${PKGVERSION}
+lib/libhidapi.la
+lib/pkgconfig/hidapi.pc
+share/doc/hidapi/AUTHORS.txt
+share/doc/hidapi/LICENSE-bsd.txt
+share/doc/hidapi/LICENSE-gpl3.txt
+share/doc/hidapi/LICENSE-orig.txt
+share/doc/hidapi/LICENSE.txt
+share/doc/hidapi/README.md
diff -r 189672963893 -r 3d53ef853ea0 comms/libhidapi/distinfo
--- a/comms/libhidapi/distinfo Mon Jul 08 10:47:26 2019 +0000
+++ b/comms/libhidapi/distinfo Mon Jul 08 12:52:42 2019 +0000
@@ -1,8 +1,9 @@
-$NetBSD: distinfo,v 1.2 2015/11/03 01:34:54 agc Exp $
+$NetBSD: distinfo,v 1.3 2019/07/08 12:52:42 nia Exp $
-SHA1 (hidapi-0.7.0.tar.gz) = caed4fd63098293fec487e8673ea992d35db04ba
-RMD160 (hidapi-0.7.0.tar.gz) = 02ccd173c547cda5e65144eea331d608a5aff414
-SHA512 (hidapi-0.7.0.tar.gz) = eb90f679cf9c996897af16ff773dbb4bb3a6ea3da46f8bac49d8552148a355701f87f2a3d7378de8b62f1b622984914133d562c46a66def3f1ba2e6de7e03bb3
-Size (hidapi-0.7.0.tar.gz) = 1618395 bytes
-SHA1 (patch-Makefile) = 9cc8e81d22a05a1132cf35c3d62656202e0788b9
-SHA1 (patch-linux_hid-libusb.c) = 908032c29cbdb0e4aef0eaa370d840a8a8696eea
+SHA1 (hidapi-0.9.0.tar.gz) = 185700ba358bd8d1bd2a21291a448c7bf76d277e
+RMD160 (hidapi-0.9.0.tar.gz) = 1b8a2051fc2b5de284785661269fde2d4c2cbf38
+SHA512 (hidapi-0.9.0.tar.gz) = d9f28d394b78daece7d2dfb946e62349a56b388b3a06241585c6fad5a4e24dc914723de6c0f12a9e51cd23fb245f6b5ac9b3721319646d5ba5912bbe0a3f9a52
+Size (hidapi-0.9.0.tar.gz) = 112963 bytes
+SHA1 (patch-Makefile.am) = 8e39fc4650601af39c510107ca2b3c85029fb2df
+SHA1 (patch-configure.ac) = 4926a26ec43ea113cb873708e0943f53ed0229d9
+SHA1 (patch-libusb_Makefile.am) = 4e325f56caff55f6e3b26948a43afd3f30606cd7
diff -r 189672963893 -r 3d53ef853ea0 comms/libhidapi/patches/patch-Makefile
--- a/comms/libhidapi/patches/patch-Makefile Mon Jul 08 10:47:26 2019 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,44 +0,0 @@
-$NetBSD: patch-Makefile,v 1.1 2015/04/03 22:29:12 rodent Exp $
-
-Makefile for libhidapi.so
-
---- Makefile.orig 2014-01-08 11:11:31.000000000 +0000
-+++ Makefile
-@@ -0,0 +1,37 @@
-+###########################################
-+# Simple Makefile for HIDAPI test program
-+#
-+# Alan Ott
-+# Signal 11 Software
-+# 2010-06-01
-+###########################################
-+
-+all: libhidapi.so.0.7.0
-+
-+CC ?= gcc
-+CFLAGS ?= -Wall -g
-+
-+CXX ?= g++
-+CXXFLAGS ?= -Wall -g
-+
-+COBJS = linux/hid-libusb.o
-+OBJS = $(COBJS)
-+LIBS = `pkg-config libusb-1.0 --libs`
-+INCLUDES ?= -Ihidapi `pkg-config libusb-1.0 --cflags`
-+
-+
-+libhidapi.so.0.7.0: $(OBJS)
-+ $(CC) $(CFLAGS) -shared $(LDFLAGS) $^ $(LIBS) -o libhidapi.so.0.7.0
-+
-+$(COBJS): %.o: %.c
-+ $(CC) $(CFLAGS) -c $(INCLUDES) $< -o $@
-+
-+install:
-+ ${BSD_INSTALL_DATA} hidapi/* $(DESTDIR)$(PREFIX)/include/hidapi
-+ ${BSD_INSTALL_LIB} libhidapi.so.0.7.0 $(DESTDIR)$(PREFIX)/lib
-+ ln -s libhidapi.so.0.7.0 $(DESTDIR)$(PREFIX)/lib/libhidapi.so.0
-+ ln -s libhidapi.so.0.7.0 $(DESTDIR)$(PREFIX)/lib/libhidapi.so
-+clean:
-+ rm -f $(OBJS) libhidapi.so.0.7.0
-+
-+.PHONY: clean
diff -r 189672963893 -r 3d53ef853ea0 comms/libhidapi/patches/patch-Makefile.am
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/comms/libhidapi/patches/patch-Makefile.am Mon Jul 08 12:52:42 2019 +0000
@@ -0,0 +1,17 @@
+$NetBSD: patch-Makefile.am,v 1.1 2019/07/08 12:52:42 nia Exp $
+
+Support NetBSD.
+
+--- Makefile.am.orig 2019-06-19 10:34:38.000000000 +0000
++++ Makefile.am
+@@ -31,6 +31,10 @@ if OS_KFREEBSD
+ SUBDIRS += libusb
+ endif
+
++if OS_NETBSD
++SUBDIRS += libusb
++endif
++
+ if OS_WINDOWS
+ SUBDIRS += windows
+ endif
diff -r 189672963893 -r 3d53ef853ea0 comms/libhidapi/patches/patch-configure.ac
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/comms/libhidapi/patches/patch-configure.ac Mon Jul 08 12:52:42 2019 +0000
@@ -0,0 +1,57 @@
+$NetBSD: patch-configure.ac,v 1.1 2019/07/08 12:52:42 nia Exp $
+
+Always use pkg-config to find libusb1.
+
+Support NetBSD.
+
+--- configure.ac.orig 2019-06-19 10:34:38.000000000 +0000
++++ configure.ac
+@@ -92,9 +92,10 @@ case $host in
+ 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])
+- echo libs_priv: $LIBS_LIBUSB_PRIVATE
+ ;;
+ *-kfreebsd*)
+ AC_MSG_RESULT([ (kFreeBSD back-end)])
+@@ -104,8 +105,25 @@ case $host in
+ os="kfreebsd"
+ threads="pthreads"
+
+- AC_CHECK_LIB([usb], [libusb_init], [LIBS_LIBUSB_PRIVATE="${LIBS_LIBUSB_PRIVATE} -lusb"], [hidapi_lib_error libusb])
+- echo libs_priv: $LIBS_LIBUSB_PRIVATE
++ 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"
++ ;;
++*-netbsd*)
++ AC_MSG_RESULT([ (NetBSD back-end)])
++ AC_DEFINE(OS_NETBSD, 1, [NetBSD implementation])
++ AC_SUBST(OS_NETBSD)
++ backend="libusb"
++ os="netbsd"
++ threads="pthreads"
++
++ CFLAGS="${CFLAGS}"
++ LDFLAGS="${LDFLAGS}"
++ LIBS="${LIBS}"
++ AC_CHECK_LIB([iconv], [iconv_open], [LIBS_LIBUSB_PRIVATE="${LIBS_LIBUSB_PRIVATE} -liconv"], [hidapi_lib_error libiconv])
++ 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"
+ ;;
+ *-mingw*)
+ AC_MSG_RESULT([ (Windows back-end, using MinGW)])
+@@ -213,6 +231,7 @@ AM_CONDITIONAL(OS_LINUX, test "x$os" = x
+ AM_CONDITIONAL(OS_DARWIN, test "x$os" = xdarwin)
+ AM_CONDITIONAL(OS_FREEBSD, test "x$os" = xfreebsd)
+ AM_CONDITIONAL(OS_KFREEBSD, test "x$os" = xkfreebsd)
++AM_CONDITIONAL(OS_NETBSD, test "x$os" = xnetbsd)
+ AM_CONDITIONAL(OS_WINDOWS, test "x$os" = xwindows)
+
+ AC_CONFIG_HEADERS([config.h])
diff -r 189672963893 -r 3d53ef853ea0 comms/libhidapi/patches/patch-libusb_Makefile.am
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/comms/libhidapi/patches/patch-libusb_Makefile.am Mon Jul 08 12:52:42 2019 +0000
@@ -0,0 +1,20 @@
+$NetBSD: patch-libusb_Makefile.am,v 1.1 2019/07/08 12:52:42 nia Exp $
+
+Support NetBSD.
+
+--- libusb/Makefile.am.orig 2019-06-19 10:34:38.000000000 +0000
++++ libusb/Makefile.am
+@@ -21,6 +21,13 @@ libhidapi_la_LDFLAGS = $(LTLDFLAGS)
+ libhidapi_la_LIBADD = $(LIBS_LIBUSB)
+ endif
+
++if OS_NETBSD
++lib_LTLIBRARIES = libhidapi.la
++libhidapi_la_SOURCES = hid.c
++libhidapi_la_LDFLAGS = $(LTLDFLAGS)
++libhidapi_la_LIBADD = $(LIBS_LIBUSB)
++endif
++
+ hdrdir = $(includedir)/hidapi
+ hdr_HEADERS = $(top_srcdir)/hidapi/hidapi.h
+
diff -r 189672963893 -r 3d53ef853ea0 comms/libhidapi/patches/patch-linux_hid-libusb.c
--- a/comms/libhidapi/patches/patch-linux_hid-libusb.c Mon Jul 08 10:47:26 2019 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,15 +0,0 @@
-$NetBSD: patch-linux_hid-libusb.c,v 1.1 2015/04/03 22:29:12 rodent Exp $
-
-inptr has to be type casted for iconv on NetBSD.
-
---- linux/hid-libusb.c.orig 2011-10-26 00:58:17.000000000 +0000
-+++ linux/hid-libusb.c
-@@ -351,7 +351,7 @@ static wchar_t *get_usb_string(libusb_de
- inbytes = len-2;
- outptr = (char*) wbuf;
- outbytes = sizeof(wbuf);
-- res = iconv(ic, &inptr, &inbytes, &outptr, &outbytes);
-+ res = iconv(ic, (const char **) &inptr, &inbytes, &outptr, &outbytes);
- if (res == (size_t)-1)
- goto err;
-
Home |
Main Index |
Thread Index |
Old Index