FreeBSD Bugzilla – Attachment 222439 Details for
Bug 253498
[new port] sysutils/hid-tools Python scripts to manipulate HID data
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
sysutils.hid-tools.patch
sysutils.hid-tools.patch (text/plain), 7.10 KB, created by
Vladimir Kondratyev
on 2021-02-14 17:38:02 UTC
(
hide
)
Description:
sysutils.hid-tools.patch
Filename:
MIME Type:
Creator:
Vladimir Kondratyev
Created:
2021-02-14 17:38:02 UTC
Size:
7.10 KB
patch
obsolete
>Index: sysutils/hid-tools/Makefile >=================================================================== >--- sysutils/hid-tools/Makefile (nonexistent) >+++ sysutils/hid-tools/Makefile (working copy) >@@ -0,0 +1,33 @@ >+# Created by: Vladimir Kondratyev <wulf@FreeBSD.org> >+# $FreeBSD$ >+ >+PORTNAME= hid-tools >+PORTVERSION= 0.2 >+CATEGORIES= sysutils python >+MASTER_SITES= https://gitlab.freedesktop.org/libevdev/${PORTNAME}/-/archive/${DISTVERSION}/ >+ >+MAINTAINER= wulf@FreeBSD.org >+COMMENT= Python scripts to manipulate HID data >+ >+LICENSE= GPLv2 >+ >+IGNORE_FreeBSD_11= Is missing a hidraw(4) driver >+ >+RUN_DEPENDS_FreeBSD_12= iichid>=0.0.6:sysutils/iichid >+RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}click>=0:devel/py-click@${PY_FLAVOR} \ >+ ${PYTHON_PKGNAMEPREFIX}parse>=0:textproc/py-parse@${PY_FLAVOR} \ >+ ${PYTHON_PKGNAMEPREFIX}pyudev>=0:devel/py-pyudev@${PY_FLAVOR} \ >+ ${PYTHON_PKGNAMEPREFIX}yaml>=0:devel/py-yaml@${PY_FLAVOR} \ >+ ${RUN_DEPENDS_${OPSYS}_${OSREL:R}} >+ >+USES= python:3.6+ shebangfix tar:bz2 >+USE_PYTHON= autoplist distutils >+ >+OPTIONS_DEFINE= MANPAGES >+OPTIONS_DEFAULT= MANPAGES >+ >+MANPAGES_BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pypandoc>=0:textproc/py-pypandoc@${PY_FLAVOR} >+ >+NO_ARCH= yes >+ >+.include <bsd.port.mk> > >Property changes on: sysutils/hid-tools/Makefile >___________________________________________________________________ >Added: svn:eol-style >## -0,0 +1 ## >+native >\ No newline at end of property >Added: svn:keywords >## -0,0 +1 ## >+FreeBSD=%H >\ No newline at end of property >Added: svn:mime-type >## -0,0 +1 ## >+text/plain >\ No newline at end of property >Index: sysutils/hid-tools/distinfo >=================================================================== >--- sysutils/hid-tools/distinfo (nonexistent) >+++ sysutils/hid-tools/distinfo (working copy) >@@ -0,0 +1,3 @@ >+TIMESTAMP = 1612900435 >+SHA256 (hid-tools-0.2.tar.bz2) = c0a963f75699d69740ecd10549f3ffe32d620703f3090c5e3c55b9af1d469786 >+SIZE (hid-tools-0.2.tar.bz2) = 78530 > >Property changes on: sysutils/hid-tools/distinfo >___________________________________________________________________ >Added: fbsd:nokeywords >## -0,0 +1 ## >+yes >\ No newline at end of property >Added: svn:eol-style >## -0,0 +1 ## >+native >\ No newline at end of property >Added: svn:mime-type >## -0,0 +1 ## >+text/plain >\ No newline at end of property >Index: sysutils/hid-tools/files/patch-hidtools_hidraw.py >=================================================================== >--- sysutils/hid-tools/files/patch-hidtools_hidraw.py (nonexistent) >+++ sysutils/hid-tools/files/patch-hidtools_hidraw.py (working copy) >@@ -0,0 +1,58 @@ >+Fix ioctl(2) definitions to match <sys/ioccom.h> and <dev/hid/hidraw.h> >+ >+--- hidtools/hidraw.py.orig 2019-03-29 01:29:29 UTC >++++ hidtools/hidraw.py >+@@ -36,13 +36,14 @@ def _ioctl(fd, EVIOC, code, return_type, buf=None): >+ >+ >+ # extracted from <asm-generic/ioctl.h> >+-_IOC_WRITE = 1 >++_IOC_VOID = 1 >+ _IOC_READ = 2 >++_IOC_WRITE = 4 >+ >+ _IOC_NRBITS = 8 >+ _IOC_TYPEBITS = 8 >+-_IOC_SIZEBITS = 14 >+-_IOC_DIRBITS = 2 >++_IOC_SIZEBITS = 13 >++_IOC_DIRBITS = 3 >+ >+ _IOC_NRSHIFT = 0 >+ _IOC_TYPESHIFT = _IOC_NRSHIFT + _IOC_NRBITS >+@@ -74,7 +75,7 @@ def _IOW(type, nr, size): >+ >+ # define HIDIOCGRDESCSIZE _IOR('H', 0x01, int) >+ def _IOC_HIDIOCGRDESCSIZE(none, len): >+- return _IOR('H', 0x01, len) >++ return _IOR('U', 30, len) >+ >+ >+ def _HIDIOCGRDESCSIZE(fd): >+@@ -85,7 +86,7 @@ def _HIDIOCGRDESCSIZE(fd): >+ >+ # define HIDIOCGRDESC _IOR('H', 0x02, struct hidraw_report_descriptor) >+ def _IOC_HIDIOCGRDESC(none, len): >+- return _IOR('H', 0x02, len) >++ return _IOC(_IOC_VOID, 'U', 31, 0) >+ >+ >+ def _HIDIOCGRDESC(fd, size): >+@@ -102,7 +103,7 @@ def _HIDIOCGRDESC(fd, size): >+ >+ # define HIDIOCGRAWINFO _IOR('H', 0x03, struct hidraw_devinfo) >+ def _IOC_HIDIOCGRAWINFO(none, len): >+- return _IOR('H', 0x03, len) >++ return _IOR('U', 32, len) >+ >+ >+ def _HIDIOCGRAWINFO(fd): >+@@ -113,7 +114,7 @@ def _HIDIOCGRAWINFO(fd): >+ >+ # define HIDIOCGRAWNAME(len) _IOC(_IOC_READ, 'H', 0x04, len) >+ def _IOC_HIDIOCGRAWNAME(none, len): >+- return _IOC(_IOC_READ, 'H', 0x04, len) >++ return _IOC(_IOC_READ, 'U', 33, len) >+ >+ >+ def _HIDIOCGRAWNAME(fd): > >Property changes on: sysutils/hid-tools/files/patch-hidtools_hidraw.py >___________________________________________________________________ >Added: fbsd:nokeywords >## -0,0 +1 ## >+yes >\ No newline at end of property >Added: svn:eol-style >## -0,0 +1 ## >+native >\ No newline at end of property >Added: svn:keywords >## -0,0 +1 ## >+FreeBSD=%H >\ No newline at end of property >Added: svn:mime-type >## -0,0 +1 ## >+text/plain >\ No newline at end of property >Index: sysutils/hid-tools/files/patch-man_hid-decode.md >=================================================================== >--- sysutils/hid-tools/files/patch-man_hid-decode.md (nonexistent) >+++ sysutils/hid-tools/files/patch-man_hid-decode.md (working copy) >@@ -0,0 +1,25 @@ >+Remove unsupported sysfs-dependent parts from manpage. >+ >+--- man/hid-decode.md.orig 2019-03-29 01:29:29 UTC >++++ man/hid-decode.md >+@@ -11,8 +11,6 @@ SYNOPSIS >+ >+ **hid-decode** */dev/hidraw0* >+ >+-**hid-decode** */dev/input/event0* >+- >+ **hid-decode** *hid-recording* >+ >+ DESCRIPTION >+@@ -20,11 +18,8 @@ DESCRIPTION >+ **hid-decode** decodes one or more HID report descriptors into into >+ human-readable format. It supports a variety of inputs: >+ >+-- a binary format as exported in sysfs, e.g. >+- _/sys/class/input/event0/device/device/report_descriptor_ >+ - the format exported by **hid-recorder(1)** >+ - a _/dev/hidraw_ node >+-- a _/dev/input/event_ node >+ >+ The format is deduced based on the input arguments. Undetected formats are >+ assumed to be binary files. > >Property changes on: sysutils/hid-tools/files/patch-man_hid-decode.md >___________________________________________________________________ >Added: fbsd:nokeywords >## -0,0 +1 ## >+yes >\ No newline at end of property >Added: svn:eol-style >## -0,0 +1 ## >+native >\ No newline at end of property >Added: svn:mime-type >## -0,0 +1 ## >+text/plain >\ No newline at end of property >Index: sysutils/hid-tools/pkg-descr >=================================================================== >--- sysutils/hid-tools/pkg-descr (nonexistent) >+++ sysutils/hid-tools/pkg-descr (working copy) >@@ -0,0 +1,16 @@ >+hid-tools is a set of tools to interact with the kernel's HID subsystem. >+ >+hid-recorder prints the HID Report Descriptor from a /dev/hidraw device >+node and any HID reports coming from that device. The output format can >+be used with hid-replay for debugging. >+ >+hid-replay takes the output from hid-recorder and replays it through a >+virtual HID device that looks exactly like the one recorded. >+ >+hid-decode takes a HID Report Descriptor and prints a human-readable >+version of it. hid-decode takes binary report descriptors, strings of >+bytes, and other formats. >+ >+hid-tools requires hidraw.ko driver to be loaded in to kernel. >+ >+WWW: https://gitlab.freedesktop.org/libevdev/hid-tools > >Property changes on: sysutils/hid-tools/pkg-descr >___________________________________________________________________ >Added: fbsd:nokeywords >## -0,0 +1 ## >+yes >\ No newline at end of property >Added: svn:eol-style >## -0,0 +1 ## >+native >\ No newline at end of property >Added: svn:mime-type >## -0,0 +1 ## >+text/plain >\ No newline at end of property
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 253498
:
222423
|
222424
| 222439