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:   nia
Date:           Mon Jul  8 12:52:42 UTC 2019

Modified Files:
        pkgsrc/comms/libhidapi: Makefile PLIST distinfo
Added Files:
        pkgsrc/comms/libhidapi/patches: patch-Makefile.am patch-configure.ac
            patch-libusb_Makefile.am
Removed Files:
        pkgsrc/comms/libhidapi/patches: patch-Makefile patch-linux_hid-libusb.c

Log Message:
libhidapi: Update to 0.9.0

pkg-config and libtool support.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 pkgsrc/comms/libhidapi/Makefile \
    pkgsrc/comms/libhidapi/distinfo
cvs rdiff -u -r1.1 -r1.2 pkgsrc/comms/libhidapi/PLIST
cvs rdiff -u -r1.1 -r0 pkgsrc/comms/libhidapi/patches/patch-Makefile \
    pkgsrc/comms/libhidapi/patches/patch-linux_hid-libusb.c
cvs rdiff -u -r0 -r1.1 pkgsrc/comms/libhidapi/patches/patch-Makefile.am \
    pkgsrc/comms/libhidapi/patches/patch-configure.ac \
    pkgsrc/comms/libhidapi/patches/patch-libusb_Makefile.am

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/Makefile
diff -u pkgsrc/comms/libhidapi/Makefile:1.2 pkgsrc/comms/libhidapi/Makefile:1.3
--- pkgsrc/comms/libhidapi/Makefile:1.2 Fri Apr  3 22:36:02 2015
+++ pkgsrc/comms/libhidapi/Makefile     Mon Jul  8 12:52:42 2019
@@ -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"
-
-CFLAGS+=               -fPIC
+pre-configure:
+       cd ${WRKSRC} && ${SH} ./bootstrap
 
+.include "../../devel/gettext-lib/buildlink3.mk"
 .include "../../devel/libusb1/buildlink3.mk"
 .include "../../mk/bsd.pkg.mk"
Index: pkgsrc/comms/libhidapi/distinfo
diff -u pkgsrc/comms/libhidapi/distinfo:1.2 pkgsrc/comms/libhidapi/distinfo:1.3
--- pkgsrc/comms/libhidapi/distinfo:1.2 Tue Nov  3 01:34:54 2015
+++ pkgsrc/comms/libhidapi/distinfo     Mon Jul  8 12:52:42 2019
@@ -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

Index: pkgsrc/comms/libhidapi/PLIST
diff -u pkgsrc/comms/libhidapi/PLIST:1.1 pkgsrc/comms/libhidapi/PLIST:1.2
--- pkgsrc/comms/libhidapi/PLIST:1.1    Fri Apr  3 22:29:12 2015
+++ pkgsrc/comms/libhidapi/PLIST        Mon Jul  8 12:52:42 2019
@@ -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

Added files:

Index: pkgsrc/comms/libhidapi/patches/patch-Makefile.am
diff -u /dev/null pkgsrc/comms/libhidapi/patches/patch-Makefile.am:1.1
--- /dev/null   Mon Jul  8 12:52:42 2019
+++ pkgsrc/comms/libhidapi/patches/patch-Makefile.am    Mon Jul  8 12:52:42 2019
@@ -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
Index: pkgsrc/comms/libhidapi/patches/patch-configure.ac
diff -u /dev/null pkgsrc/comms/libhidapi/patches/patch-configure.ac:1.1
--- /dev/null   Mon Jul  8 12:52:42 2019
+++ pkgsrc/comms/libhidapi/patches/patch-configure.ac   Mon Jul  8 12:52:42 2019
@@ -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])
Index: pkgsrc/comms/libhidapi/patches/patch-libusb_Makefile.am
diff -u /dev/null pkgsrc/comms/libhidapi/patches/patch-libusb_Makefile.am:1.1
--- /dev/null   Mon Jul  8 12:52:42 2019
+++ pkgsrc/comms/libhidapi/patches/patch-libusb_Makefile.am     Mon Jul  8 12:52:42 2019
@@ -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
+ 



Home | Main Index | Thread Index | Old Index