Commit 2b266595 authored by wulf's avatar wulf
Browse files

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)
parent 45c258d6
......@@ -585,6 +585,7 @@
SUBDIR += etcd32
SUBDIR += etl
SUBDIR += euca2ools
SUBDIR += evemu
SUBDIR += eventxx
SUBDIR += evolution-gconf-tools
SUBDIR += exercisix
......
# 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>
TIMESTAMP = 1491102615
SHA256 (evemu-2.6.0.tar.xz) = ed81dd4552ffeb92c346b47e56b249c67f1cb37d5b31fc073ea0ad4858ae3dcc
SIZE (evemu-2.6.0.tar.xz) = 507032
--- 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);
--- 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) {
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
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
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment