git: 0e98988ddc78 - main - devel/py-evdev: Use the evdev headers from base
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sat, 24 Oct 2026 09:00:02 UTC
The branch main has been updated by arrowd:
URL: https://cgit.FreeBSD.org/ports/commit/?id=0e98988ddc7859f7eb5e15c310be1bf9c9b46002
commit 0e98988ddc7859f7eb5e15c310be1bf9c9b46002
Author: Pattems <patrick@crandol.com>
AuthorDate: 2026-10-23 21:01:24 +0000
Commit: Gleb Popov <arrowd@FreeBSD.org>
CommitDate: 2026-10-24 08:59:56 +0000
devel/py-evdev: Use the evdev headers from base
evdev 1.9 expects the UI_FF_* constants from uinput.h, but the port
generated its ecodes module only from devel/evdev-proto's
linux/input.h and linux/input-event-codes.h, so "import evdev" fails
with KeyError: 'UI_FF'.
files/patch-v4l_compat, added with the port in 2015 when base had no
dev/evdev headers, removes upstream's #ifdef __FreeBSD__ branches for
<dev/evdev/...> and makes the port build against evdev-proto instead.
Base now installs dev/evdev/input.h, input-event-codes.h and uinput.h,
which evdev's setup.py uses on FreeBSD by default, and build_ext
generates the ecodes module itself. Drop the patch, the evdev-proto
dependency, USES=localbase and the build_ecodes, --evdev-headers and
--include-dirs arguments, and bump PORTREVISION.
The 14.5 and 15.1 base headers define FF_MAX_EFFECTS; older ones
(13.5, 14.2, 14.3, 14.4 and 15.0) lack it, and evdev falls back for it.
While here, add concurrent to USE_PYTHON and fix portlint warnings.
PR: 299872
---
devel/py-evdev/Makefile | 19 +++-----------
devel/py-evdev/files/patch-v4l_compat | 48 -----------------------------------
2 files changed, 3 insertions(+), 64 deletions(-)
diff --git a/devel/py-evdev/Makefile b/devel/py-evdev/Makefile
index cb38248f6af0..8bd1d7da4671 100644
--- a/devel/py-evdev/Makefile
+++ b/devel/py-evdev/Makefile
@@ -1,6 +1,6 @@
PORTNAME= evdev
PORTVERSION= 1.9.1
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= devel python
MASTER_SITES= PYPI
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
@@ -12,21 +12,8 @@ WWW= https://pypi.org/project/evdev/
LICENSE= BSD3CLAUSE
LICENSE_FILE= ${WRKSRC}/LICENSE
-BUILD_DEPENDS= ${LOCALBASE}/include/linux/input.h:devel/evdev-proto
-
-USES= localbase python
-USE_PYTHON= autoplist distutils
-
-EVDEV_INCLUDES= ${LOCALBASE}/include
-
-PYDISTUTILS_BUILD_TARGET= build_ecodes
-PYDISTUTILS_BUILDARGS+= --evdev-headers ${EVDEV_INCLUDES}/linux/input.h:${EVDEV_INCLUDES}/linux/input-event-codes.h
-PYDISTUTILS_BUILDARGS+= build_ext
-PYDISTUTILS_BUILDARGS+= --include-dirs ${EVDEV_INCLUDES}
-
-# Supply install target with evdev headers path
-PYDISTUTILS_INSTALL_TARGET= ${PYDISTUTILS_BUILD_TARGET} \
- ${PYDISTUTILS_BUILDARGS} install
+USES= python
+USE_PYTHON= autoplist concurrent distutils
post-install:
${FIND} ${STAGEDIR}${PYTHONPREFIX_SITELIBDIR} \
diff --git a/devel/py-evdev/files/patch-v4l_compat b/devel/py-evdev/files/patch-v4l_compat
deleted file mode 100644
index ff7bd1b4e4de..000000000000
--- a/devel/py-evdev/files/patch-v4l_compat
+++ /dev/null
@@ -1,48 +0,0 @@
-# XXX Patch churn from GSoC 2014, expect v4l_compat for now
-
---- src/evdev/genecodes_c.py.orig 2020-01-11 21:45:04 UTC
-+++ src/evdev/genecodes_c.py
-@@ -36,13 +36,8 @@
- # -----------------------------------------------------------------------------
- template_ecodes = r"""
- #include <Python.h>
--#ifdef __FreeBSD__
--#include <dev/evdev/input.h>
--#include <dev/evdev/uinput.h>
--#else
- #include <linux/input.h>
- #include <linux/uinput.h>
--#endif
-
- /* Automatically generated by evdev.genecodes */
- /* Generated on %s */
---- src/evdev/input.c.orig 2020-01-11 23:01:08 UTC
-+++ src/evdev/input.c
-@@ -18,11 +18,7 @@
- #include <fcntl.h>
- #include <unistd.h>
-
--#ifdef __FreeBSD__
--#include <dev/evdev/input.h>
--#else
- #include <linux/input.h>
--#endif
-
- #ifndef input_event_sec
- #define input_event_sec time.tv_sec
---- src/evdev/uinput.c.orig 2020-01-11 22:09:18 UTC
-+++ src/evdev/uinput.c
-@@ -8,13 +8,8 @@
- #include <fcntl.h>
- #include <unistd.h>
-
--#ifdef __FreeBSD__
--#include <dev/evdev/input.h>
--#include <dev/evdev/uinput.h>
--#else
- #include <linux/input.h>
- #include <linux/uinput.h>
--#endif
-
- #ifndef input_event_sec
- #define input_event_sec time.tv_sec