1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-26 09:46:09 +00:00

devel/py-evdev: add new port

This package provides bindings to the generic input event interface in
Linux. The evdev interface serves the purpose of passing events
generated in the kernel directly to userspace through character
devices that are typically located in /dev/input/.

This package also comes with bindings to uinput, the userspace input
subsystem. Uinput allows userspace programs to create and handle input
devices that can inject events directly into the input subsystem.

https://pypi.python.org/pypi/evdev
This commit is contained in:
Jan Beich 2015-09-17 04:14:08 +00:00
parent 80241e2d56
commit 6f735c89fc
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=397098
5 changed files with 88 additions and 0 deletions

View File

@ -3961,6 +3961,7 @@
SUBDIR += py-eggtestinfo
SUBDIR += py-enum34
SUBDIR += py-epsilon
SUBDIR += py-evdev
SUBDIR += py-event
SUBDIR += py-experimental.cssselect
SUBDIR += py-extras

29
devel/py-evdev/Makefile Normal file
View File

@ -0,0 +1,29 @@
# $FreeBSD$
PORTNAME= evdev
PORTVERSION= 0.5.0
CATEGORIES= devel python
MASTER_SITES= CHEESESHOP
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
MAINTAINER= hselasky@FreeBSD.org
COMMENT= Bindings to the Linux input handling subsystem
LICENSE= BSD3CLAUSE
LICENSE_FILE= ${WRKSRC}/LICENSE
BUILD_DEPENDS= v4l_compat>=1.0.20110603:${PORTSDIR}/multimedia/v4l_compat
USES= python
USE_PYTHON= autoplist distutils
CPPFLAGS+= -I${LOCALBASE}/include # v4l_compat
post-patch:
@${REINPLACE_CMD} -e '/header/s,/usr,${LOCALBASE},' \
${WRKSRC}/${PYSETUP}
post-install:
${FIND} ${STAGEDIR}${PYTHONPREFIX_SITELIBDIR} \
-name '*.so' -exec ${STRIP_CMD} {} +
.include <bsd.port.mk>

2
devel/py-evdev/distinfo Normal file
View File

@ -0,0 +1,2 @@
SHA256 (evdev-0.5.0.tar.gz) = 509f0f6ce5a12315fcad0b7f9b41cbdfc5c5f49a7cecdd6a88ce5c1d04f6827c
SIZE (evdev-0.5.0.tar.gz) = 23931

View File

@ -0,0 +1,46 @@
# XXX Patch churn from GSoC 2014, expect v4l_compat for now
--- evdev/genecodes.py~ 2014-10-07 20:16:56 UTC
+++ evdev/genecodes.py
@@ -11,11 +11,7 @@ import os, sys, re
template = r'''
#include <Python.h>
-#ifdef __FreeBSD__
-#include <dev/evdev/input.h>
-#else
#include <linux/input.h>
-#endif
/* Automatically generated by evdev.genecodes */
/* Generated on %s */
--- evdev/input.c.orig 2014-10-07 20:16:59 UTC
+++ 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
#define MAX_NAME_SIZE 256
--- evdev/uinput.c.orig 2014-10-07 20:17:06 UTC
+++ 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
int _uinput_close(int fd)
{

10
devel/py-evdev/pkg-descr Normal file
View File

@ -0,0 +1,10 @@
This package provides bindings to the generic input event interface in
Linux. The evdev interface serves the purpose of passing events
generated in the kernel directly to userspace through character
devices that are typically located in /dev/input/.
This package also comes with bindings to uinput, the userspace input
subsystem. Uinput allows userspace programs to create and handle input
devices that can inject events directly into the input subsystem.
WWW: https://pypi.python.org/pypi/evdev