1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-13 03:03:15 +00:00

New port: devel/evemu

Tools and bindings for kernel input event device emulation and data capture
and replay.

Evemu provides a programmatic API to access the kernel input event devices.
The original and intended purpose is for supporting multi-touch input,
especially with regard to the Ubuntu touch and gesture stack.

WWW: http://www.freedesktop.org/wiki/Evemu

PR:		218383
Approved by:	bapt (mentor)
This commit is contained in:
Vladimir Kondratyev 2017-08-09 21:00:12 +00:00
parent a48cad2320
commit c29ab0a9c9
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=447657
7 changed files with 128 additions and 0 deletions

View File

@ -585,6 +585,7 @@
SUBDIR += etcd32
SUBDIR += etl
SUBDIR += euca2ools
SUBDIR += evemu
SUBDIR += eventxx
SUBDIR += evolution-gconf-tools
SUBDIR += exercisix

55
devel/evemu/Makefile Normal file
View File

@ -0,0 +1,55 @@
# Created by: Vladimir Kondratyev <wulf@FreeBSD.org>
# $FreeBSD$
PORTNAME= evemu
PORTVERSION= 2.6.0
CATEGORIES= devel
MASTER_SITES= http://www.freedesktop.org/software/${PORTNAME}/
MAINTAINER= wulf@FreeBSD.org
COMMENT= Records and replays EVDEV descriptions and events
LICENSE= GPLv3
BUILD_DEPENDS= v4l_compat>=0:multimedia/v4l_compat
LIB_DEPENDS= libevdev.so:devel/libevdev
USES= tar:xz python:2,build pathfix libtool pkgconfig localbase
OPTIONS_DEFINE= MANPAGES PYTHON
OPTIONS_DEFAULT=MANPAGES
OPTIONS_SUB= yes
MANPAGES_BUILD_DEPENDS= minixmlto:textproc/minixmlto \
asciidoc:textproc/asciidoc
MANPAGES_CONFIGURE_ENV= XMLTO=${LOCALBASE}/bin/minixmlto
MANPAGES_CONFIGURE_ENV_OFF= ac_cv_path_XMLTO="" \
ac_cv_path_ASCIIDOC=""
PYTHON_RUN_DEPENDS= ${PYTHON_CMD}:${PYTHON_PORTSDIR}
PYTHON_CONFIGURE_ENABLE= python-bindings
GNU_CONFIGURE= yes
CFLAGS+= -D_WITH_DPRINTF -include stdlib.h
USE_LDCONFIG= yes
INSTALL_TARGET= install-strip
REINPLACE_ARGS= -i ''
TEST_TARGET= check
TEST_WRKSRC= ${WRKSRC}/test
post-patch:
${REINPLACE_CMD} -e 's|program_invocation_short_name|getprogname()|' \
${WRKSRC}/tools/evemu-event.c ${WRKSRC}/tools/evemu-play.c \
${WRKSRC}/tools/evemu-record.c
${REINPLACE_CMD} -e 's|versionsort|alphasort|' \
${WRKSRC}/tools/find_event_devices.c
# Fix evemu-event.1, evemu-play.1 and evemu-record.1 manpages which are broken
# due to docbook-xsl bug: https://sourceforge.net/p/docbook/bugs/1058/
post-install-MANPAGES-on:
.for manpage in evemu-event.1 evemu-play.1 evemu-record.1
@${REINPLACE_CMD} -e 's|^\.so evemu|.so man1/evemu|' \
${STAGEDIR}${MANPREFIX}/man/man1/${manpage}
.endfor
.include <bsd.port.mk>

3
devel/evemu/distinfo Normal file
View File

@ -0,0 +1,3 @@
TIMESTAMP = 1491102615
SHA256 (evemu-2.6.0.tar.xz) = ed81dd4552ffeb92c346b47e56b249c67f1cb37d5b31fc073ea0ad4858ae3dcc
SIZE (evemu-2.6.0.tar.xz) = 507032

View File

@ -0,0 +1,21 @@
--- src/evemu.c.orig 2016-11-08 09:43:24 UTC
+++ src/evemu.c
@@ -456,16 +456,13 @@ int evemu_write(const struct evemu_devic
static int parse_name(struct evemu_device *dev, const char *line)
{
int matched;
- char *devname = NULL;
+ char devname[UINPUT_MAX_NAME_SIZE];
- if ((matched = sscanf(line, "N: %m[^\n\r]\n", &devname)) > 0) {
+ if ((matched = sscanf(line, "N: %[^\n\r]\n", devname)) > 0) {
if (strlen(evemu_get_name(dev)) == 0)
evemu_set_name(dev, devname);
}
- if (devname != NULL)
- free(devname);
-
if (matched <= 0)
error(FATAL, "Expected device name, but got: %s", line);

View File

@ -0,0 +1,12 @@
--- tools/evemu-record.c.orig 2016-03-01 14:10:40 UTC
+++ tools/evemu-record.c
@@ -209,6 +209,9 @@ out:
return rc;
}
+/* Fix broken linux/input.h ioctl define found in multimedia/v4l_compat as of 2017-04-02 */
+#undef EVIOCGRAB
+#define EVIOCGRAB _IOWINT('E', 0x90)
static inline bool test_grab_device(int fd)
{
if (ioctl(fd, EVIOCGRAB, (void*)1) < 0) {

8
devel/evemu/pkg-descr Normal file
View File

@ -0,0 +1,8 @@
Tools and bindings for kernel input event device emulation and data capture
and replay.
Evemu provides a programmatic API to access the kernel input event devices.
The original and intended purpose is for supporting multi-touch input,
especially with regard to the Ubuntu touch and gesture stack.
WWW: http://www.freedesktop.org/wiki/Evemu

28
devel/evemu/pkg-plist Normal file
View File

@ -0,0 +1,28 @@
bin/evemu-describe
bin/evemu-device
bin/evemu-event
bin/evemu-play
bin/evemu-record
include/evemu.h
lib/libevemu.a
lib/libevemu.so
lib/libevemu.so.3
lib/libevemu.so.3.0.3
%%PYTHON%%%%PYTHON_SITELIBDIR%%/evemu/__init__.py
%%PYTHON%%%%PYTHON_SITELIBDIR%%/evemu/__init__.pyc
%%PYTHON%%%%PYTHON_SITELIBDIR%%/evemu/__init__.%%PYTHON_PYOEXTENSION%%
%%PYTHON%%%%PYTHON_SITELIBDIR%%/evemu/base.py
%%PYTHON%%%%PYTHON_SITELIBDIR%%/evemu/base.pyc
%%PYTHON%%%%PYTHON_SITELIBDIR%%/evemu/base.%%PYTHON_PYOEXTENSION%%
%%PYTHON%%%%PYTHON_SITELIBDIR%%/evemu/const.py
%%PYTHON%%%%PYTHON_SITELIBDIR%%/evemu/const.pyc
%%PYTHON%%%%PYTHON_SITELIBDIR%%/evemu/const.%%PYTHON_PYOEXTENSION%%
%%PYTHON%%%%PYTHON_SITELIBDIR%%/evemu/exception.py
%%PYTHON%%%%PYTHON_SITELIBDIR%%/evemu/exception.pyc
%%PYTHON%%%%PYTHON_SITELIBDIR%%/evemu/exception.%%PYTHON_PYOEXTENSION%%
libdata/pkgconfig/evemu.pc
%%MANPAGES%%man/man1/evemu-describe.1.gz
%%MANPAGES%%man/man1/evemu-device.1.gz
%%MANPAGES%%man/man1/evemu-event.1.gz
%%MANPAGES%%man/man1/evemu-play.1.gz
%%MANPAGES%%man/man1/evemu-record.1.gz