diff options
author | mef <mef> | 2013-12-03 01:30:06 +0000 |
---|---|---|
committer | mef <mef> | 2013-12-03 01:30:06 +0000 |
commit | 9eec5add42c2266aa4bce3e68d1380b6d566bb66 (patch) | |
tree | 60c88c88d2d6016c68517ddbd6b0c4714e6d3d6a /devel | |
parent | 922c0cb1b3702dcc837b389816493be5b9c53f0b (diff) | |
download | pkgsrc-9eec5add42c2266aa4bce3e68d1380b6d566bb66.tar.gz |
Import libhid-0.2.16 as devel/libhid.
libhid is a rewrite of libHID[0] and aims to provide the same functionality
from a more organised framework. It aims to provide a layer of abstraction for
accessing HID-class devices over USB or serial lines (similar to what libusb
provides for the base USB protocol).
http://www.ghz.cc/~clepple/libHID/doc/html/
libhid has been designed because it is needed in two other projects
(libphdigets and nut). As such, it does not have a complete featureset yet but
is rather a work in progress (alpha state). We invite everyone to contribute
or get in touch with us for additional features.
Please find more information on the project website:
http://libhid.alioth.debian.org
Diffstat (limited to 'devel')
-rw-r--r-- | devel/libhid/DESCR | 11 | ||||
-rw-r--r-- | devel/libhid/Makefile | 34 | ||||
-rw-r--r-- | devel/libhid/PLIST | 18 | ||||
-rw-r--r-- | devel/libhid/buildlink3.mk | 12 | ||||
-rw-r--r-- | devel/libhid/distinfo | 8 | ||||
-rw-r--r-- | devel/libhid/patches/patch-configure | 28 | ||||
-rw-r--r-- | devel/libhid/patches/patch-src_bsd_c | 23 | ||||
-rw-r--r-- | devel/libhid/patches/patch-test_lshid_c | 26 |
8 files changed, 160 insertions, 0 deletions
diff --git a/devel/libhid/DESCR b/devel/libhid/DESCR new file mode 100644 index 00000000000..6517e224de5 --- /dev/null +++ b/devel/libhid/DESCR @@ -0,0 +1,11 @@ +libhid is a rewrite of libHID[0] and aims to provide the same functionality +from a more organised framework. It aims to provide a layer of abstraction for +accessing HID-class devices over USB or serial lines (similar to what libusb +provides for the base USB protocol). + http://www.ghz.cc/~clepple/libHID/doc/html/ +libhid has been designed because it is needed in two other projects +(libphdigets and nut). As such, it does not have a complete featureset yet but +is rather a work in progress (alpha state). We invite everyone to contribute +or get in touch with us for additional features. +Please find more information on the project website: + http://libhid.alioth.debian.org diff --git a/devel/libhid/Makefile b/devel/libhid/Makefile new file mode 100644 index 00000000000..56a9e07e9e7 --- /dev/null +++ b/devel/libhid/Makefile @@ -0,0 +1,34 @@ +# $NetBSD: Makefile,v 1.1 2013/12/03 01:30:06 mef Exp $ + +DISTNAME= libhid-0.2.16 + +CATEGORIES= devel +MASTER_SITES= http://sourceforge.net/projects/salix-sbo/files/13.37/libhid/ +LICENSE= gnu-gpl-v2 + +MAINTAINER= pkgsrc-users@NetBSD.org +HOMEPAGE= http://libhid.alioth.debian.org/ +COMMENT= Abstract'n layer for HID-class devices over USB/serial +#' # to close above apostrophe +USE_TOOLS+= gmake +USE_LIBTOOL= yes + +BUILD_DEPENDS+= docbook-[0-9]*:../../textproc/docbook +#BUILD_DEPENDS+= swig-[0-9]*:../../devel/swig + +PLIST_SUBST+= PYSITELIB=${PYSITELIB} + +GNU_CONFIGURE= yes + +.include "../../lang/python/pyversion.mk" +.include "../../lang/${PYPACKAGE}/buildlink3.mk" +.include "../../lang/python/application.mk" +# PLIST_SUBST+= PYSITELIB=${PYSITELIB} +#.include "../../lang/python/extension.mk" +#.include "../../lang/python/distutils.mk" + +.include "../../devel/libusb/buildlink3.mk" +.include "../../devel/swig/buildlink3.mk" +.include "../../textproc/libxslt/buildlink3.mk" + +.include "../../mk/bsd.pkg.mk" diff --git a/devel/libhid/PLIST b/devel/libhid/PLIST new file mode 100644 index 00000000000..5baa715b13f --- /dev/null +++ b/devel/libhid/PLIST @@ -0,0 +1,18 @@ +@comment $NetBSD: PLIST,v 1.1 2013/12/03 01:30:06 mef Exp $ +bin/libhid-detach-device +include/hid.h +include/hidparser.h +include/hidtypes.h +lib/libhid.la +lib/pkgconfig/libhid.pc +${PYSITELIB}/libhid/__init__.py +${PYSITELIB}/libhid/__init__.pyc +${PYSITELIB}/libhid/__init__.pyo +${PYSITELIB}/libhid/_hid.la +${PYSITELIB}/libhid/hid.py +${PYSITELIB}/libhid/hid.pyc +${PYSITELIB}/libhid/hid.pyo +${PYSITELIB}/libhid/hidwrap.py +${PYSITELIB}/libhid/hidwrap.pyc +${PYSITELIB}/libhid/hidwrap.pyo +man/man1/libhid-detach-device.1 diff --git a/devel/libhid/buildlink3.mk b/devel/libhid/buildlink3.mk new file mode 100644 index 00000000000..544fe1aff78 --- /dev/null +++ b/devel/libhid/buildlink3.mk @@ -0,0 +1,12 @@ +# $NetBSD: buildlink3.mk,v 1.1 2013/12/03 01:30:06 mef Exp $ + +BUILDLINK_TREE+= libhid + +.if !defined(LIBHID_BUILDLINK3_MK) +LIBHID_BUILDLINK3_MK:= + +BUILDLINK_API_DEPENDS.libhid+= libhid>=0.2 +BUILDLINK_PKGSRCDIR.libhid?= ../../devel/libhid +.endif # LIBHID_BUILDLINK3_MK + +BUILDLINK_TREE+= -libhid diff --git a/devel/libhid/distinfo b/devel/libhid/distinfo new file mode 100644 index 00000000000..d2b4a171824 --- /dev/null +++ b/devel/libhid/distinfo @@ -0,0 +1,8 @@ +$NetBSD: distinfo,v 1.1 2013/12/03 01:30:06 mef Exp $ + +SHA1 (libhid-0.2.16.tar.gz) = 9a25fef674e8f20f97fea6700eb91c21ebbbcc02 +RMD160 (libhid-0.2.16.tar.gz) = f61f016ae54bc5532202fd676d38d1f684e7ab8d +Size (libhid-0.2.16.tar.gz) = 435245 bytes +SHA1 (patch-configure) = 25b58acacaaa8dd783cc84e3908bc8489b0c9ee8 +SHA1 (patch-src_bsd_c) = 5087ed4eb594f5e6ce66b6ca3d01fbceebf0848f +SHA1 (patch-test_lshid_c) = 2f655da7bc316354987efd22a5d2b1f60342be91 diff --git a/devel/libhid/patches/patch-configure b/devel/libhid/patches/patch-configure new file mode 100644 index 00000000000..87e83d7e229 --- /dev/null +++ b/devel/libhid/patches/patch-configure @@ -0,0 +1,28 @@ +$NetBSD: patch-configure,v 1.1 2013/12/03 01:30:06 mef Exp $ + +(1) +ERROR: [check-portability.awk] => Found test ... == ...: +ERROR: [check-portability.awk] configure: if test "$py_version" == "None"; then +(2) +Add DragonflyBSD + +--- configure.orig 2007-04-26 09:25:25.000000000 +0900 ++++ configure 2013-10-10 07:33:08.485190000 +0900 +@@ -2757,7 +2757,7 @@ _ACEOF + { echo "$as_me:$LINENO: result: Linux" >&5 + echo "${ECHO_T}Linux" >&6; } + ;; +- *-freebsd*|*-openbsd*|*-netbsd*|*-k*bsd*-gnu) ++ *-freebsd*|*-openbsd*|*-netbsd*|*-k*bsd*-gnu|*-dragonfly*) + + cat >>confdefs.h <<\_ACEOF + #define OS_BSD +@@ -22774,7 +22774,7 @@ echo $ECHO_N "checking for Python librar + py_version=`$PYTHON -c "from distutils.sysconfig import *; \ + from string import join; \ + print join(get_config_vars('VERSION'))"` +- if test "$py_version" == "None"; then ++ if test "$py_version" = "None"; then + if test -n "$PYTHON_VERSION"; then + py_version=$PYTHON_VERSION + else diff --git a/devel/libhid/patches/patch-src_bsd_c b/devel/libhid/patches/patch-src_bsd_c new file mode 100644 index 00000000000..98f40580ccc --- /dev/null +++ b/devel/libhid/patches/patch-src_bsd_c @@ -0,0 +1,23 @@ +$NetBSD: patch-src_bsd_c,v 1.1 2013/12/03 01:30:06 mef Exp $ + + clang 3.3 warns on following line: + assigning a variable of type 'unsigned short' to itself + [-Werror,-Wself-assign] + retries = retries; + ~~~~~~~ ^ ~~~~~~~ + +--- src/bsd.c.orig 2006-02-01 21:35:49.000000000 +0900 ++++ src/bsd.c 2013-10-08 01:17:34.000000000 +0900 +@@ -10,9 +10,11 @@ + #include <assert.h> + + hid_return hid_os_force_claim(HIDInterface* const hidif, int const interface, +- HIDInterfaceMatcher const* const matcher, unsigned short retries) ++ HIDInterfaceMatcher const* const matcher, unsigned short retries __attribute__((unused))) + { ++#if 0 + retries = retries; ++#endif + + if (!hidif) { + ERROR("cannot open NULL HIDInterface."); diff --git a/devel/libhid/patches/patch-test_lshid_c b/devel/libhid/patches/patch-test_lshid_c new file mode 100644 index 00000000000..701e37a6af2 --- /dev/null +++ b/devel/libhid/patches/patch-test_lshid_c @@ -0,0 +1,26 @@ +$NetBSD: patch-test_lshid_c,v 1.1 2013/12/03 01:30:06 mef Exp $ + +lshid.c:32:87: error: parameter 'len' set but not used [-Werror=unused-but-set-parameter] + +--- test/lshid.c.orig 2007-03-31 23:27:51.000000000 +0900 ++++ test/lshid.c 2013-10-10 07:40:18.961805000 +0900 +@@ -29,7 +29,7 @@ char *hid_id[32]; /* FIXME: 32 devices M + + struct usb_dev_handle; + +-bool device_iterator (struct usb_dev_handle const* usbdev, void* custom, unsigned int len) ++bool device_iterator (struct usb_dev_handle const* usbdev, void* custom __attribute((unused)), unsigned int len __attribute((unused))) + { + bool ret = false; + int i; +@@ -37,8 +37,10 @@ bool device_iterator (struct usb_dev_han + const struct usb_device *device = usb_device((struct usb_dev_handle *)usbdev); + + /* only here to prevent the unused warning */ ++#if 0 + /* TODO remove */ + len = *((unsigned long*)custom); ++#endif + + /* Obtain the device's full path */ + //sprintf(current_dev_path, "%s/%s", usbdev->bus->dirname, usbdev->device->filename); |