diff --git a/devel/Makefile b/devel/Makefile index d418277bd8eb..207f26eb485f 100644 --- a/devel/Makefile +++ b/devel/Makefile @@ -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 diff --git a/devel/py-evdev/Makefile b/devel/py-evdev/Makefile new file mode 100644 index 000000000000..e93bc54de2ca --- /dev/null +++ b/devel/py-evdev/Makefile @@ -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 diff --git a/devel/py-evdev/distinfo b/devel/py-evdev/distinfo new file mode 100644 index 000000000000..399a3b2dac4a --- /dev/null +++ b/devel/py-evdev/distinfo @@ -0,0 +1,2 @@ +SHA256 (evdev-0.5.0.tar.gz) = 509f0f6ce5a12315fcad0b7f9b41cbdfc5c5f49a7cecdd6a88ce5c1d04f6827c +SIZE (evdev-0.5.0.tar.gz) = 23931 diff --git a/devel/py-evdev/files/patch-v4l_compat b/devel/py-evdev/files/patch-v4l_compat new file mode 100644 index 000000000000..49edbad18ea0 --- /dev/null +++ b/devel/py-evdev/files/patch-v4l_compat @@ -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 +-#ifdef __FreeBSD__ +-#include +-#else + #include +-#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 + #include + +-#ifdef __FreeBSD__ +-#include +-#else + #include +-#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 + #include + +-#ifdef __FreeBSD__ +-#include +-#include +-#else + #include + #include +-#endif + + int _uinput_close(int fd) + { diff --git a/devel/py-evdev/pkg-descr b/devel/py-evdev/pkg-descr new file mode 100644 index 000000000000..deb1fbe469c2 --- /dev/null +++ b/devel/py-evdev/pkg-descr @@ -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