mirror of
https://git.FreeBSD.org/ports.git
synced 2025-01-18 08:02:48 +00:00
sysutils/hid-tools: Update to 0.8
Sponsored by: Future Crew, LLC PR: 283038 Approved by: fuz
This commit is contained in:
parent
e8cf6a0dda
commit
e201272684
@ -1,6 +1,5 @@
|
||||
PORTNAME= hid-tools
|
||||
DISTVERSION= 0.3.1
|
||||
PORTREVISION= 1
|
||||
DISTVERSION= 0.8
|
||||
CATEGORIES= sysutils python
|
||||
|
||||
MAINTAINER= wulf@FreeBSD.org
|
||||
@ -9,23 +8,21 @@ WWW= https://gitlab.freedesktop.org/libevdev/hid-tools
|
||||
|
||||
LICENSE= GPLv2
|
||||
|
||||
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}pyyaml>=0:devel/py-pyyaml@${PY_FLAVOR} \
|
||||
${RUN_DEPENDS_${OPSYS}_${OSREL:R}}
|
||||
BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}hatchling>=0:devel/py-hatchling@${PY_FLAVOR} \
|
||||
${PYTHON_PKGNAMEPREFIX}pypandoc>=0:textproc/py-pypandoc@${PY_FLAVOR}
|
||||
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}pyyaml>=0:devel/py-pyyaml@${PY_FLAVOR}
|
||||
|
||||
USES= python shebangfix
|
||||
USE_GITLAB= yes
|
||||
GL_SITE= https://gitlab.freedesktop.org/
|
||||
GL_ACCOUNT= libevdev
|
||||
GL_TAGNAME= 0f71fd65d83b28b744a2fe0a6cc1e3139921c721
|
||||
USE_PYTHON= autoplist noflavors distutils
|
||||
USE_PYTHON= autoplist pep517
|
||||
|
||||
OPTIONS_DEFINE= MANPAGES
|
||||
OPTIONS_DEFAULT= MANPAGES
|
||||
|
||||
MANPAGES_BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pypandoc>=0:textproc/py-pypandoc@${PY_FLAVOR}
|
||||
python_OLD_CMD= "/bin/env python3"
|
||||
SHEBANG_GLOB= *.py
|
||||
|
||||
NO_ARCH= yes
|
||||
|
||||
|
@ -1,3 +1,3 @@
|
||||
TIMESTAMP = 1665854737
|
||||
SHA256 (libevdev-hid-tools-0f71fd65d83b28b744a2fe0a6cc1e3139921c721_GL0.tar.gz) = 06b1443cc17ce4f177675cb28a3fa3338fd3a33965e6d7a8ba8de28cd9927cd6
|
||||
SIZE (libevdev-hid-tools-0f71fd65d83b28b744a2fe0a6cc1e3139921c721_GL0.tar.gz) = 162075
|
||||
TIMESTAMP = 1732351551
|
||||
SHA256 (hid-tools-0.8.tar.bz2) = 019fad5c42e51631077fd5a7d9194e6bf97ffb7a15713ede2edc57300eba2d9c
|
||||
SIZE (hid-tools-0.8.tar.bz2) = 139381
|
||||
|
@ -1,58 +1,76 @@
|
||||
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.orig 2024-07-29 08:55:11 UTC
|
||||
+++ hidtools/hidraw.py
|
||||
@@ -36,13 +36,14 @@ def _ioctl(fd, EVIOC, code, return_type, buf=None):
|
||||
@@ -39,13 +39,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_WRITE: Final = 1
|
||||
+_IOC_VOID: Final = 1
|
||||
_IOC_READ: Final = 2
|
||||
+_IOC_WRITE: Final = 4
|
||||
|
||||
_IOC_NRBITS = 8
|
||||
_IOC_TYPEBITS = 8
|
||||
-_IOC_SIZEBITS = 14
|
||||
-_IOC_DIRBITS = 2
|
||||
+_IOC_SIZEBITS = 13
|
||||
+_IOC_DIRBITS = 3
|
||||
_IOC_NRBITS: Final = 8
|
||||
_IOC_TYPEBITS: Final = 8
|
||||
-_IOC_SIZEBITS: Final = 14
|
||||
-_IOC_DIRBITS: Final = 2
|
||||
+_IOC_SIZEBITS: Final = 13
|
||||
+_IOC_DIRBITS: Final = 3
|
||||
|
||||
_IOC_NRSHIFT = 0
|
||||
_IOC_TYPESHIFT = _IOC_NRSHIFT + _IOC_NRBITS
|
||||
@@ -74,7 +75,7 @@ def _IOW(type, nr, size):
|
||||
_IOC_NRSHIFT: Final = 0
|
||||
_IOC_TYPESHIFT: Final = _IOC_NRSHIFT + _IOC_NRBITS
|
||||
@@ -79,7 +80,7 @@ def _IOC_HIDIOCGRDESCSIZE(none, len):
|
||||
|
||||
# define HIDIOCGRDESCSIZE _IOR('H', 0x01, int)
|
||||
def _IOC_HIDIOCGRDESCSIZE(none, len):
|
||||
- return _IOR('H', 0x01, len)
|
||||
+ return _IOR('U', 30, len)
|
||||
- return _IOR("H", 0x01, len)
|
||||
+ return _IOR("U", 30, len)
|
||||
|
||||
|
||||
def _HIDIOCGRDESCSIZE(fd):
|
||||
@@ -85,7 +86,7 @@ def _HIDIOCGRDESCSIZE(fd):
|
||||
@@ -90,7 +91,7 @@ def _IOC_HIDIOCGRDESC(none, len):
|
||||
|
||||
# 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)
|
||||
- return _IOR("H", 0x02, len)
|
||||
+ return _IOC(_IOC_VOID, "U", 31, 0)
|
||||
|
||||
|
||||
def _HIDIOCGRDESC(fd, size):
|
||||
@@ -102,7 +103,7 @@ def _HIDIOCGRDESC(fd, size):
|
||||
@@ -106,7 +107,7 @@ def _IOC_HIDIOCGRAWINFO(none, len):
|
||||
|
||||
# define HIDIOCGRAWINFO _IOR('H', 0x03, struct hidraw_devinfo)
|
||||
def _IOC_HIDIOCGRAWINFO(none, len):
|
||||
- return _IOR('H', 0x03, len)
|
||||
+ return _IOR('U', 32, len)
|
||||
- return _IOR("H", 0x03, len)
|
||||
+ return _IOR("U", 32, len)
|
||||
|
||||
|
||||
def _HIDIOCGRAWINFO(fd):
|
||||
@@ -113,7 +114,7 @@ def _HIDIOCGRAWINFO(fd):
|
||||
@@ -117,7 +118,7 @@ def _IOC_HIDIOCGRAWNAME(none, len):
|
||||
|
||||
# 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)
|
||||
- return _IOC(_IOC_READ, "H", 0x04, len)
|
||||
+ return _IOC(_IOC_READ, "U", 33, len)
|
||||
|
||||
|
||||
def _HIDIOCGRAWNAME(fd):
|
||||
@@ -130,7 +131,7 @@ def _IOC_HIDIOCGFEATURE(none, len):
|
||||
|
||||
# define HIDIOCGFEATURE(len) _IOC(_IOC_WRITE|_IOC_READ, 'H', 0x07, len)
|
||||
def _IOC_HIDIOCGFEATURE(none, len):
|
||||
- return _IOC(_IOC_WRITE | _IOC_READ, "H", 0x07, len)
|
||||
+ return _IOC(_IOC_WRITE | _IOC_READ, "U", 36, len)
|
||||
|
||||
|
||||
def _HIDIOCGFEATURE(fd, report_id, rsize):
|
||||
@@ -145,7 +146,7 @@ def _IOC_HIDIOCSFEATURE(none, len):
|
||||
|
||||
# define HIDIOCSFEATURE(len) _IOC(_IOC_WRITE|_IOC_READ, 'H', 0x06, len)
|
||||
def _IOC_HIDIOCSFEATURE(none, len):
|
||||
- return _IOC(_IOC_WRITE | _IOC_READ, "H", 0x06, len)
|
||||
+ return _IOC(_IOC_WRITE, "U", 35, len)
|
||||
|
||||
|
||||
def _HIDIOCSFEATURE(fd, data):
|
||||
|
11
sysutils/hid-tools/files/patch-pyproject.toml
Normal file
11
sysutils/hid-tools/files/patch-pyproject.toml
Normal file
@ -0,0 +1,11 @@
|
||||
--- pyproject.toml.orig 2024-11-23 09:55:52 UTC
|
||||
+++ pyproject.toml
|
||||
@@ -52,7 +52,7 @@ dependencies = [
|
||||
|
||||
[tool.hatch.build.targets.wheel.hooks.custom]
|
||||
dependencies = [
|
||||
- "pypandoc_binary",
|
||||
+ "pypandoc",
|
||||
]
|
||||
|
||||
[tool.hatch.build.targets.wheel.shared-data]
|
Loading…
Reference in New Issue
Block a user