Page MenuHomeFreeBSD

D7588.id25394.diff
No OneTemporary

D7588.id25394.diff

Index: audio/baresip/Makefile
===================================================================
--- audio/baresip/Makefile
+++ audio/baresip/Makefile
@@ -30,7 +30,7 @@
L16 OPUS OSS PORTAUDIO SDL SNDFILE SPEEX SRTP STDIO UUID V4L V4L2 X11 \
DTLS_SRTP AUBRIDGE VIDBRIDGE HTTPD DSHOW DIRECTFB ACCOUNT \
NATPMP SDL MIW SNAPSHOT SELFVIEW VUMETER AULOOP CONTACT \
- MENU PRESENCE SYSLOG VIDLOOP
+ MENU PRESENCE SYSLOG VIDLOOP EVDEV
OPTIONS_DEFAULT=CONS G711 G722 G726 L16
AULOOP_DESC= Audio-loop test module
@@ -38,6 +38,7 @@
CONTACT_DESC= Contacts module
CONS_DESC= Console input driver
DTLS_SRTP_DESC= DTLS Secure RTP module [broken]
+EVDEV_DESC= Input event device interface module
G711_DESC= G.711 audio codec
G722_DESC= G.722 audio codec
G722_1_DESC= G.722.1 audio codec
Index: audio/baresip/Makefile.depends
===================================================================
--- audio/baresip/Makefile.depends
+++ audio/baresip/Makefile.depends
@@ -4,7 +4,7 @@
BV32_DEPEND= # nonexistent
CONS_DEPEND= # unnecessary
DTLS_SRTP_DEPEND= # unnecessary
-EVDEV_DEPEND=
+EVDEV_DEPEND= ${LOCALBASE}/include/linux/input.h:devel/libevdev-headers
FFMPEG_DEPEND= ${LOCALBASE}/include/libavcodec/avcodec.h:multimedia/ffmpeg
G711_DEPEND= ${LOCALBASE}/include/spandsp/g711.h:comms/spandsp
G722_DEPEND= ${LOCALBASE}/include/spandsp/g722.h:comms/spandsp
Index: comms/lirc/Makefile
===================================================================
--- comms/lirc/Makefile
+++ comms/lirc/Makefile
@@ -11,7 +11,7 @@
MAINTAINER= ports@FreeBSD.org
COMMENT= Linux Infrared Remote Control
-BUILD_DEPENDS= v4l_compat>=1.0.20110603:multimedia/v4l_compat
+BUILD_DEPENDS= ${LOCALBASE}/include/linux/input.h:devel/libevdev-headers
INSTALL_TARGET= install-strip
USES= alias autoreconf gmake libtool python tar:bzip2
Index: comms/svxlink/Makefile
===================================================================
--- comms/svxlink/Makefile
+++ comms/svxlink/Makefile
@@ -17,14 +17,13 @@
libsigc-2.0.so:devel/libsigc++20 \
libpopt.so:devel/popt \
libopus.so:audio/opus
-BUILD_DEPENDS= pkg-config:devel/pkgconf \
- ${LOCALBASE}/include/linux/input.h:multimedia/v4l_compat
+BUILD_DEPENDS= ${LOCALBASE}/include/linux/input.h:devel/libevdev-headers
USE_GITHUB= yes
GH_ACCOUNT= sm0svx
GH_PROJECT= svxlink
-USES= cmake tcl
+USES= cmake tcl pkgconfig
CMAKE_SOURCE_PATH= ${WRKSRC}/src
CMAKE_ARGS+= -DMAN_INSTALL_DIR:FILEPATH=${MANDIRS} \
-DLOCAL_STATE_DIR=/var
Index: devel/evemu/Makefile
===================================================================
--- devel/evemu/Makefile
+++ devel/evemu/Makefile
@@ -0,0 +1,45 @@
+# Created by: Vladimir Kondratyev <wulf@cicgroup.ru>
+# $FreeBSD$
+
+PORTNAME= evemu
+PORTVERSION= 2.6.0
+CATEGORIES= devel
+MASTER_SITES= http://www.freedesktop.org/software/${PORTNAME}/
+
+MAINTAINER= wulf@cicgroup.ru
+COMMENT= Records and replays EVDEV descriptions and events
+
+LICENSE= GPLv3
+
+BUILD_DEPENDS= ${LOCALBASE}/include/linux/input.h:devel/libevdev-headers
+LIB_DEPENDS= libevdev.so:devel/libevdev
+
+USES= tar:xz python pathfix libtool pkgconfig localbase
+
+OPTIONS_DEFINE= MANPAGES
+OPTIONS_DEFAULT=MANPAGES
+OPTIONS_SUB= yes
+
+# evemu-event.1, evemu-play.1 and evemu-record.1 manpages are broken
+# due to docbook-xsl bug: https://sourceforge.net/p/docbook/bugs/1058/
+MANPAGES_BUILD_DEPENDS= xmlto:textproc/xmlto \
+ asciidoc:textproc/asciidoc
+MANPAGES_CONFIGURE_ENV_OFF= ac_cv_path_XMLTO="" \
+ ac_cv_path_ASCIIDOC=""
+
+GNU_CONFIGURE= yes
+CFLAGS+= -D_WITH_DPRINTF -include stdlib.h
+USE_LDCONFIG= yes
+INSTALL_TARGET= install-strip
+
+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
+
+.include <bsd.port.mk>
Index: devel/evemu/distinfo
===================================================================
--- devel/evemu/distinfo
+++ devel/evemu/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1484752371
+SHA256 (evemu-2.6.0.tar.xz) = ed81dd4552ffeb92c346b47e56b249c67f1cb37d5b31fc073ea0ad4858ae3dcc
+SIZE (evemu-2.6.0.tar.xz) = 507032
Index: devel/evemu/files/patch-src_evemu.c
===================================================================
--- devel/evemu/files/patch-src_evemu.c
+++ devel/evemu/files/patch-src_evemu.c
@@ -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);
+
Index: devel/evemu/pkg-descr
===================================================================
--- devel/evemu/pkg-descr
+++ devel/evemu/pkg-descr
@@ -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
Index: devel/evemu/pkg-plist
===================================================================
--- devel/evemu/pkg-plist
+++ devel/evemu/pkg-plist
@@ -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_SITELIBDIR%%/evemu/__init__.py
+%%PYTHON_SITELIBDIR%%/evemu/__init__.pyc
+%%PYTHON_SITELIBDIR%%/evemu/__init__.%%PYTHON_PYOEXTENSION%%
+%%PYTHON_SITELIBDIR%%/evemu/base.py
+%%PYTHON_SITELIBDIR%%/evemu/base.pyc
+%%PYTHON_SITELIBDIR%%/evemu/base.%%PYTHON_PYOEXTENSION%%
+%%PYTHON_SITELIBDIR%%/evemu/const.py
+%%PYTHON_SITELIBDIR%%/evemu/const.pyc
+%%PYTHON_SITELIBDIR%%/evemu/const.%%PYTHON_PYOEXTENSION%%
+%%PYTHON_SITELIBDIR%%/evemu/exception.py
+%%PYTHON_SITELIBDIR%%/evemu/exception.pyc
+%%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
Index: devel/libevdev-headers/Makefile
===================================================================
--- devel/libevdev-headers/Makefile
+++ devel/libevdev-headers/Makefile
@@ -0,0 +1,29 @@
+# $FreeBSD$
+
+PORTNAME= libevdev
+PORTREVISION= 0
+PKGNAMESUFFIX= -headers
+
+COMMENT= Input event device header files
+
+LICENSE= GPLv2
+
+NO_BUILD= yes
+NO_ARCH= yes
+
+MASTERDIR= ${.CURDIR}/../../devel/libevdev
+DESCR= ${.CURDIR}/pkg-descr
+PLIST= ${.CURDIR}/pkg-plist
+LIBEVDEV_SLAVE= headers
+
+HEADERS= input.h input-event-codes.h uinput.h
+PLIST_FILES= ${HEADERS:S|^|include/linux/|}
+
+do-install:
+ @${MKDIR} ${STAGEDIR}${PREFIX}/include/linux/
+.for i in ${HEADERS}
+ ${INSTALL_DATA} ${WRKSRC}/include/linux/${i} \
+ ${STAGEDIR}${PREFIX}/include/linux/
+.endfor
+
+.include "${MASTERDIR}/Makefile"
Index: devel/libevdev-headers/pkg-descr
===================================================================
--- devel/libevdev-headers/pkg-descr
+++ devel/libevdev-headers/pkg-descr
@@ -0,0 +1 @@
+This port installs the event device header files.
Index: devel/libevdev/Makefile
===================================================================
--- devel/libevdev/Makefile
+++ devel/libevdev/Makefile
@@ -1,32 +1,69 @@
# $FreeBSD$
PORTNAME= libevdev
-PORTVERSION= 1.4.4
+PORTVERSION= 1.5.6
CATEGORIES= devel
MASTER_SITES= http://freedesktop.org/software/${PORTNAME}/
MAINTAINER= hselasky@FreeBSD.org
COMMENT= Linux Event Device library
-LICENSE= MIT # without linux/*.h
-LICENSE_FILE= ${WRKSRC}/COPYING
+LICENSE?= MIT # without linux/*.h
+
+LIBEVDEV_SLAVE?= no
-BUILD_DEPENDS= v4l_compat>=1.0.20110603:multimedia/v4l_compat
-RUN_DEPENDS= v4l_compat>=1.0.20110603:multimedia/v4l_compat
+USES= tar:xz
-USES= gmake libtool pathfix python:build tar:xz
-EXTRACT_AFTER_ARGS= --exclude include # v4l_compat
+.if ${LIBEVDEV_SLAVE} != headers
+LICENSE_FILE= ${WRKSRC}/COPYING
+USES+= gmake libtool pathfix python:build
GNU_CONFIGURE= yes
+BUILD_DEPENDS= ${PORTNAME}-headers>0:devel/${PORTNAME}-headers
CONFIGURE_ENV= ac_cv_path_DOXYGEN=""
-CPPFLAGS+= -I${LOCALBASE}/include # v4l_compat
INSTALL_TARGET= install-strip
USE_LDCONFIG= yes
+OPTIONS_DEFINE+= TEST
+TEST_USES+= pkgconfig
+TEST_LIB_DEPENDS= libcheck.so:devel/check
+TEST_TARGET= check
+TEST_WRKSRC= ${WRKSRC}/test
+
+# XXX test requires /dev/uinput and should be run as root
+#.if ! exists(/usr/include/dev/evdev/input.h)
+# test-libevdev current results: "98%: Checks: 115, Failures: 2, Errors: 0"
+OPTIONS_EXCLUDE= TEST
+#.endif
+.endif
+
post-patch:
- @${REINPLACE_CMD} -e '/input\.h/s,top_srcdir,LOCALBASE,' \
- ${WRKSRC}/libevdev/Makefile.in
-# XXX tools require signalfd(2), test require /dev/uinput
- @${REINPLACE_CMD} -e '/^SUBDIRS/s,tools test,,' \
+ @${REINPLACE_CMD} -i '' -E -e \
+ 's/__u([[:digit:]]+)/uint\1_t/g ; \
+ s/__s([[:digit:]]+)/int\1_t/g ; \
+ /# *include/ s|<sys/ioctl.h>|<sys/ioccom.h>| ; \
+ /# *include[[:space:]]+<linux\/types.h>/d ; \
+ /EVIOC(RMFF|GRAB|REVOKE)/ s/_IOW(.*), *int/_IOWINT\1/ ; \
+ /EVIOCGKEYCODE/ s/_IOR/_IOWR/ ; \
+ /EVIOCGMASK/ s/_IOR/_IOW/ ; \
+ /EVIOCGMTSLOTS/ s/_IOC_READ/IOC_INOUT/ ; \
+ /#define/ s/_IOC_READ/IOC_OUT/ ; \
+ /#define/ s/_IOC_WRITE/IOC_IN/' \
+ ${WRKSRC}/include/linux/input.h
+ @${REINPLACE_CMD} -i '' -E -e \
+ 's/__u([[:digit:]]+)/uint\1_t/g ; \
+ s/__s([[:digit:]]+)/int\1_t/g ; \
+ /# *include/s|<linux/types.h>|<sys/types.h>| ; \
+ /#define/ s/_IOW(.*), *int/_IOWINT\1/ ; \
+ /#define/ s/_IOW(.*), *char\*/_IO\1/ ; \
+ /#define/ s/_IOC_READ/IOC_OUT/' \
+ ${WRKSRC}/include/linux/uinput.h
+ @${REINPLACE_CMD} -e 's|program_invocation_short_name|getprogname()|' \
+ ${WRKSRC}/tools/mouse-dpi-tool.c \
+ ${WRKSRC}/tools/touchpad-edge-detector.c \
+ ${WRKSRC}/tools/libevdev-tweak-device.c
+
+post-patch-TEST-off:
+ ${REINPLACE_CMD} -e '/^SUBDIRS/s,test,,' \
${WRKSRC}/Makefile.in
.include <bsd.port.mk>
Index: devel/libevdev/distinfo
===================================================================
--- devel/libevdev/distinfo
+++ devel/libevdev/distinfo
@@ -1,2 +1,3 @@
-SHA256 (libevdev-1.4.4.tar.xz) = ed9979369b6a6e28f5897d099538549ecffb2b7c00c1b717eb77c31d85bc45a9
-SIZE (libevdev-1.4.4.tar.xz) = 409856
+TIMESTAMP = 1484751595
+SHA256 (libevdev-1.5.6.tar.xz) = ecec7e9d66b1d3692f10b3b20aa97fb25e874a784c5552a7b1698091fef5a688
+SIZE (libevdev-1.5.6.tar.xz) = 407024
Index: devel/libevdev/files/patch-libevdev_libevdev-uinput.c
===================================================================
--- devel/libevdev/files/patch-libevdev_libevdev-uinput.c
+++ devel/libevdev/files/patch-libevdev_libevdev-uinput.c
@@ -0,0 +1,40 @@
+--- libevdev/libevdev-uinput.c.orig 2016-04-28 00:40:58 UTC
++++ libevdev/libevdev-uinput.c
+@@ -182,6 +182,7 @@ libevdev_uinput_get_fd(const struct libe
+ return uinput_dev->fd;
+ }
+
++#if defined(linux)
+ static int is_event_device(const struct dirent *dent) {
+ return strncmp("event", dent->d_name, 5) == 0;
+ }
+@@ -213,10 +214,12 @@ fetch_device_node(const char *path)
+ static int is_input_device(const struct dirent *dent) {
+ return strncmp("input", dent->d_name, 5) == 0;
+ }
++#endif
+
+ static int
+ fetch_syspath_and_devnode(struct libevdev_uinput *uinput_dev)
+ {
++#if defined(linux)
+ struct dirent **namelist;
+ int ndev, i;
+ int rc;
+@@ -290,6 +293,16 @@ fetch_syspath_and_devnode(struct libevde
+ free(namelist);
+
+ return uinput_dev->devnode ? 0 : -1;
++#elif defined(__FreeBSD__)
++ char devnode[80];
++ if (ioctl(uinput_dev->fd, UI_GET_SYSNAME(sizeof(devnode)), devnode) < 0)
++ return -1;
++ asprintf(&uinput_dev->devnode, "/dev/input/%s", devnode);
++ uinput_dev->syspath = strdup(uinput_dev->devnode);
++ return 0;
++#else
++ return -1;
++#endif
+ }
+
+ static int
Index: devel/libevdev/files/patch-test_test-libevdev-events.c
===================================================================
--- devel/libevdev/files/patch-test_test-libevdev-events.c
+++ devel/libevdev/files/patch-test_test-libevdev-events.c
@@ -0,0 +1,20 @@
+--- test/test-libevdev-events.c.orig 2016-04-28 00:40:58 UTC
++++ test/test-libevdev-events.c
+@@ -1057,7 +1057,7 @@ START_TEST(test_syn_delta_late_sync)
+ } while (rc >= 0);
+
+ /* force enough events to trigger a SYN_DROPPED */
+- for (i = 0; i < 100; i++) {
++ for (i = 0; i < 200; i++) {
+ uinput_device_event(uidev, EV_ABS, ABS_X, 100 + i);
+ uinput_device_event(uidev, EV_ABS, ABS_Y, 500 + i);
+ uinput_device_event(uidev, EV_ABS, ABS_MT_POSITION_X, 100 + i);
+@@ -1152,7 +1152,7 @@ START_TEST(test_syn_delta_late_sync)
+ } while (rc >= 0);
+
+ /* force enough events to trigger a SYN_DROPPED */
+- for (i = 0; i < 100; i++) {
++ for (i = 0; i < 200; i++) {
+ uinput_device_event(uidev, EV_ABS, ABS_X, 100 + i);
+ uinput_device_event(uidev, EV_ABS, ABS_Y, 500 + i);
+ uinput_device_event(uidev, EV_ABS, ABS_MT_POSITION_X, 100 + i);
Index: devel/libevdev/files/patch-test_test-libevdev-init.c
===================================================================
--- devel/libevdev/files/patch-test_test-libevdev-init.c
+++ devel/libevdev/files/patch-test_test-libevdev-init.c
@@ -0,0 +1,11 @@
+--- test/test-libevdev-init.c.orig 2016-04-28 00:40:58 UTC
++++ test/test-libevdev-init.c
+@@ -490,7 +490,7 @@ START_TEST(test_set_clock_id)
+ rc = libevdev_set_clock_id(dev, CLOCK_MONOTONIC);
+ ck_assert_int_eq(rc, 0);
+
+- rc = libevdev_set_clock_id(dev, CLOCK_MONOTONIC_RAW);
++ rc = libevdev_set_clock_id(dev, CLOCK_MONOTONIC_FAST);
+ ck_assert_int_eq(rc, -EINVAL);
+
+ uinput_device_free(uidev);
Index: devel/libevdev/files/patch-test_test-main.c
===================================================================
--- devel/libevdev/files/patch-test_test-main.c
+++ devel/libevdev/files/patch-test_test-main.c
@@ -0,0 +1,26 @@
+--- test/test-main.c.orig 2015-06-10 04:49:41 UTC
++++ test/test-main.c
+@@ -41,6 +41,7 @@ extern Suite *uinput_suite(void);
+ static int
+ is_debugger_attached(void)
+ {
++#if defined (linux)
+ int status;
+ int rc;
+ int pid = fork();
+@@ -64,6 +65,15 @@ is_debugger_attached(void)
+ }
+
+ return rc;
++#else
++ /*
++ * Skip useless gdb test as setting CK_FORK environment variable in
++ * absence of attached debugger gives no harm to user.
++ * Moreover this test is broken on most nonlinux systems, look at
++ * discussion here: http://stackoverflow.com/questions/3596781/
++ */
++ return 1;
++#endif
+ }
+
+ int main(int argc, char **argv)
Index: devel/libevdev/files/patch-tools_mouse-dpi-tool.c
===================================================================
--- devel/libevdev/files/patch-tools_mouse-dpi-tool.c
+++ devel/libevdev/files/patch-tools_mouse-dpi-tool.c
@@ -0,0 +1,55 @@
+--- tools/mouse-dpi-tool.c.orig 2016-04-28 00:40:58 UTC
++++ tools/mouse-dpi-tool.c
+@@ -26,7 +26,6 @@
+ #endif
+
+ #include <libevdev/libevdev.h>
+-#include <sys/signalfd.h>
+ #include <errno.h>
+ #include <fcntl.h>
+ #include <limits.h>
+@@ -47,6 +46,15 @@ struct measurements {
+ uint64_t us;
+ };
+
++
++static volatile int sigint_catched = 0;
++static void
++sigint_handler(int signo)
++{
++ if (signo == SIGINT)
++ sigint_catched = 1;
++}
++
+ static int
+ usage(void) {
+ printf("Usage: %s /dev/input/event0\n", program_invocation_short_name);
+@@ -128,24 +136,18 @@ handle_event(struct measurements *m, con
+
+ static int
+ mainloop(struct libevdev *dev, struct measurements *m) {
+- struct pollfd fds[2];
+- sigset_t mask;
++ struct pollfd fds[1];
+
+ fds[0].fd = libevdev_get_fd(dev);
+ fds[0].events = POLLIN;
+
+- sigemptyset(&mask);
+- sigaddset(&mask, SIGINT);
+- fds[1].fd = signalfd(-1, &mask, SFD_NONBLOCK);
+- fds[1].events = POLLIN;
+-
+- sigprocmask(SIG_BLOCK, &mask, NULL);
++ signal(SIGINT, sigint_handler);
+
+- while (poll(fds, 2, -1)) {
++ while (poll(fds, 1, -1)) {
+ struct input_event ev;
+ int rc;
+
+- if (fds[1].revents)
++ if (sigint_catched)
+ break;
+
+ do {
Index: devel/libevdev/files/patch-tools_touchpad-edge-detector.c
===================================================================
--- devel/libevdev/files/patch-tools_touchpad-edge-detector.c
+++ devel/libevdev/files/patch-tools_touchpad-edge-detector.c
@@ -0,0 +1,54 @@
+--- tools/touchpad-edge-detector.c.orig 2016-04-28 00:40:58 UTC
++++ tools/touchpad-edge-detector.c
+@@ -26,7 +26,6 @@
+ #endif
+
+ #include <libevdev/libevdev.h>
+-#include <sys/signalfd.h>
+ #include <errno.h>
+ #include <fcntl.h>
+ #include <limits.h>
+@@ -54,6 +53,14 @@ struct dimensions {
+ int top, bottom, left, right;
+ };
+
++static volatile int sigint_catched = 0;
++static void
++sigint_handler(int signo)
++{
++ if (signo == SIGINT)
++ sigint_catched = 1;
++}
++
+ static int
+ print_current_values(const struct dimensions *d)
+ {
+@@ -99,24 +106,18 @@ handle_event(struct dimensions *d, const
+
+ static int
+ mainloop(struct libevdev *dev, struct dimensions *dim) {
+- struct pollfd fds[2];
+- sigset_t mask;
++ struct pollfd fds[1];
+
+ fds[0].fd = libevdev_get_fd(dev);
+ fds[0].events = POLLIN;
+
+- sigemptyset(&mask);
+- sigaddset(&mask, SIGINT);
+- fds[1].fd = signalfd(-1, &mask, SFD_NONBLOCK);
+- fds[1].events = POLLIN;
+-
+- sigprocmask(SIG_BLOCK, &mask, NULL);
++ signal(SIGINT, sigint_handler);
+
+- while (poll(fds, 2, -1)) {
++ while (poll(fds, 1, -1)) {
+ struct input_event ev;
+ int rc;
+
+- if (fds[1].revents)
++ if (sigint_catched)
+ break;
+
+ do {
Index: devel/libevdev/pkg-plist
===================================================================
--- devel/libevdev/pkg-plist
+++ devel/libevdev/pkg-plist
@@ -1,8 +1,11 @@
+bin/libevdev-tweak-device
+bin/mouse-dpi-tool
+bin/touchpad-edge-detector
include/libevdev-1.0/libevdev/libevdev-uinput.h
include/libevdev-1.0/libevdev/libevdev.h
lib/libevdev.a
lib/libevdev.so
lib/libevdev.so.2
-lib/libevdev.so.2.1.10
+lib/libevdev.so.2.1.18
libdata/pkgconfig/libevdev.pc
man/man3/libevdev.3.gz
Index: devel/libmtdev/Makefile
===================================================================
--- devel/libmtdev/Makefile
+++ devel/libmtdev/Makefile
@@ -12,8 +12,7 @@
LICENSE= MIT
LICENSE_FILE= ${WRKSRC}/COPYING
-BUILD_DEPENDS= v4l_compat>=1.0.20110603:multimedia/v4l_compat
-RUN_DEPENDS= v4l_compat>=1.0.20110603:multimedia/v4l_compat
+BUILD_DEPENDS= ${LOCALBASE}/include/linux/input.h:devel/libevdev-headers
USES= libtool pathfix tar:bz2
GNU_CONFIGURE= yes
Index: devel/libmtdev/files/patch-test-mtdev-test.c
===================================================================
--- devel/libmtdev/files/patch-test-mtdev-test.c
+++ devel/libmtdev/files/patch-test-mtdev-test.c
@@ -0,0 +1,16 @@
+--- test/mtdev-test.c.orig 2014-02-28 22:48:23.000000000 +0400
++++ test/mtdev-test.c 2015-04-03 02:57:56.890923000 +0300
+@@ -28,11 +28,12 @@
+
+ #include <mtdev.h>
+ #include <stdio.h>
++#include <stdint.h>
+ #include <unistd.h>
+ #include <fcntl.h>
+
+ /* year-proof millisecond event time */
+-typedef __u64 mstime_t;
++typedef uint64_t mstime_t;
+
+ static int use_event(const struct input_event *ev)
+ {
Index: devel/libudev-devd/Makefile
===================================================================
--- devel/libudev-devd/Makefile
+++ devel/libudev-devd/Makefile
@@ -9,14 +9,13 @@
LICENSE= BSD2CLAUSE
-BUILD_DEPENDS= v4l_compat>=0:multimedia/v4l_compat
-LIB_DEPENDS= libevdev.so:devel/libevdev
+BUILD_DEPENDS= ${LOCALBASE}/include/linux/input.h:devel/libevdev-headers
USE_GITHUB= yes
GH_ACCOUNT= FreeBSDDesktop
GH_TAGNAME= 5a9d2b9
-USES= dos2unix autoreconf gmake libtool localbase pathfix pkgconfig
+USES= autoreconf gmake libtool localbase pathfix pkgconfig
USE_LDCONFIG= yes
GNU_CONFIGURE= yes
INSTALL_TARGET= install-strip
Index: devel/py-evdev/Makefile
===================================================================
--- devel/py-evdev/Makefile
+++ devel/py-evdev/Makefile
@@ -1,7 +1,7 @@
# $FreeBSD$
PORTNAME= evdev
-PORTVERSION= 0.5.0
+PORTVERSION= 0.6.4
CATEGORIES= devel python
MASTER_SITES= CHEESESHOP
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
@@ -12,15 +12,22 @@
LICENSE= BSD3CLAUSE
LICENSE_FILE= ${WRKSRC}/LICENSE
-BUILD_DEPENDS= v4l_compat>=1.0.20110603:multimedia/v4l_compat
+BUILD_DEPENDS= ${LOCALBASE}/include/linux/input.h:devel/libevdev-headers
USES= python
USE_PYTHON= autoplist distutils
CPPFLAGS+= -I${LOCALBASE}/include # v4l_compat
-post-patch:
- @${REINPLACE_CMD} -e '/header/s,/usr,${LOCALBASE},' \
- ${WRKSRC}/${PYSETUP}
+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
post-install:
${FIND} ${STAGEDIR}${PYTHONPREFIX_SITELIBDIR} \
Index: devel/py-evdev/distinfo
===================================================================
--- devel/py-evdev/distinfo
+++ devel/py-evdev/distinfo
@@ -1,2 +1,3 @@
-SHA256 (evdev-0.5.0.tar.gz) = 509f0f6ce5a12315fcad0b7f9b41cbdfc5c5f49a7cecdd6a88ce5c1d04f6827c
-SIZE (evdev-0.5.0.tar.gz) = 23931
+TIMESTAMP = 1484753892
+SHA256 (evdev-0.6.4.tar.gz) = 5268744d8493c273614036cf6423fa175952c64fc1d8d265210e48a4437a6af2
+SIZE (evdev-0.6.4.tar.gz) = 21957
Index: multimedia/kdenlive/Makefile
===================================================================
--- multimedia/kdenlive/Makefile
+++ multimedia/kdenlive/Makefile
@@ -26,7 +26,7 @@
# Keep in sync with multimedia/mlt, possibly.
FFMPEG_SUFX= # Currently empty.
-OPTIONS_DEFINE= DOCS DVDWIZARD FREI0R LADSPA NLS SCREENCAST V4L XINE
+OPTIONS_DEFINE= DOCS DVDWIZARD FREI0R LADSPA NLS SCREENCAST V4L XINE JOGSHUTTLE
OPTIONS_DEFAULT=DVDWIZARD FREI0R LADSPA SCREENCAST V4L XINE
OPTIONS_SUB= yes
@@ -34,6 +34,7 @@
SCREENCAST_DESC=Screen capture support via recordMyDesktop
V4L_DESC= Webcam support via Video4Linux
XINE_DESC= DVD preview support via xine
+JOGSHUTTLE_DESC=Jog/Shuttle support
DOCS_CMAKE_OFF= -DBUILD_doc:BOOL=FALSE
@@ -55,9 +56,18 @@
XINE_RUN_DEPENDS= xine:multimedia/xine
+# XXX: webcamd Jog/Shuttle support is not tested
+JOGSHUTTLE_BUILD_DEPENDS= ${LOCALBASE}/include/linux/input.h:devel/libevdev-headers
+JOGSHUTTLE_RUN_DEPENDS= webcamd:multimedia/webcamd
+JOGSHUTTLE_CMAKE_OFF= -DWITH_JogShuttle:BOOL=FALSE
+
post-patch:
@${REINPLACE_CMD} -E -e '/${PORTNAME}.(menu|xpm)/ d' \
-e '/^update_xdg_mimetypes/ d; /SharedMimeInfo/ d' \
${PATCH_WRKSRC}/data/CMakeLists.txt
+post-patch-JOGSHUTTLE-on:
+ @${REINPLACE_CMD} -e '/#include <asm\/types\.h>/d' \
+ ${WRKSRC}/src/lib/external/media_ctrl/mediactrl.c
+
.include <bsd.port.mk>
Index: multimedia/lives/Makefile
===================================================================
--- multimedia/lives/Makefile
+++ multimedia/lives/Makefile
@@ -12,7 +12,7 @@
LICENSE= GPLv3
-BUILD_DEPENDS= ${LOCALBASE}/include/linux/input.h:multimedia/v4l_compat \
+BUILD_DEPENDS= ${LOCALBASE}/include/linux/videodev.h:multimedia/v4l_compat \
${LOCALBASE}/bin/analyseplugin:audio/ladspa
LIB_DEPENDS= libasound.so:audio/alsa-lib \
libjack.so:audio/jack \
Index: multimedia/v4l_compat/Makefile
===================================================================
--- multimedia/v4l_compat/Makefile
+++ multimedia/v4l_compat/Makefile
@@ -14,8 +14,7 @@
PLIST= ${.CURDIR}/pkg-plist
LIBV4L_SLAVE= compat
-BASE_HEADERS= input.h uinput.h ivtv.h v4l2-controls.h \
- v4l2-common.h videodev2.h
+BASE_HEADERS= ivtv.h v4l2-controls.h v4l2-common.h videodev2.h
DVB_HEADERS= audio.h dmx.h frontend.h video.h
EXTRA_HEADERS= ca.h osd.h version.h
Index: multimedia/v4l_compat/pkg-plist
===================================================================
--- multimedia/v4l_compat/pkg-plist
+++ multimedia/v4l_compat/pkg-plist
@@ -5,9 +5,7 @@
include/linux/dvb/osd.h
include/linux/dvb/version.h
include/linux/dvb/video.h
-include/linux/input.h
include/linux/ivtv.h
-include/linux/uinput.h
include/linux/v4l2-common.h
include/linux/v4l2-controls.h
include/linux/videodev.h
Index: x11-drivers/xf86-input-evdev/Makefile
===================================================================
--- x11-drivers/xf86-input-evdev/Makefile
+++ x11-drivers/xf86-input-evdev/Makefile
@@ -10,10 +10,9 @@
LICENSE= MIT # various styles
LICENSE_FILE= ${WRKSRC}/COPYING
-BUILD_DEPENDS= v4l_compat>=1.0.20110603:multimedia/v4l_compat
+BUILD_DEPENDS= ${LOCALBASE}/include/linux/input.h:devel/libevdev-headers
LIB_DEPENDS= libevdev.so:devel/libevdev \
libmtdev.so:devel/libmtdev
-RUN_DEPENDS= webcamd>=3.1.0.1:multimedia/webcamd
XORG_CAT= driver
USES= pathfix
Index: x11-drivers/xf86-input-libinput/Makefile
===================================================================
--- x11-drivers/xf86-input-libinput/Makefile
+++ x11-drivers/xf86-input-libinput/Makefile
@@ -10,6 +10,7 @@
LICENSE= MIT # various styles
LICENSE_FILE= ${WRKSRC}/COPYING
+BUILD_DEPENDS= ${LOCALBASE}/include/linux/input.h:devel/libevdev-headers
LIB_DEPENDS= libinput.so:x11/libinput
XORG_CAT= driver
Index: x11-drivers/xf86-input-synaptics/Makefile
===================================================================
--- x11-drivers/xf86-input-synaptics/Makefile
+++ x11-drivers/xf86-input-synaptics/Makefile
@@ -18,7 +18,7 @@
EVDEV_DESC= Use evdev for input events (requires kernel support)
EVDEV_CONFIGURE_ENV= BUILD_EVENTCOMM=yes
-EVDEV_BUILD_DEPENDS= ${LOCALBASE}/include/linux/input.h:multimedia/v4l_compat
+EVDEV_BUILD_DEPENDS= ${LOCALBASE}/include/linux/input.h:devel/libevdev-headers
EVDEV_LIB_DEPENDS= libevdev.so:devel/libevdev
.include <bsd.port.mk>
Index: x11-drivers/xf86-input-wacom/Makefile
===================================================================
--- x11-drivers/xf86-input-wacom/Makefile
+++ x11-drivers/xf86-input-wacom/Makefile
@@ -11,7 +11,7 @@
LICENSE= GPLv2+
-BUILD_DEPENDS= v4l_compat>=1.0.20110603:multimedia/v4l_compat
+BUILD_DEPENDS= ${LOCALBASE}/include/linux/input.h:devel/libevdev-headers
RUN_DEPENDS= webcamd>=3.1.0.1:multimedia/webcamd
USES= pathfix
Index: x11-drivers/xf86-input-wacom/files/patch-src-wcmValidateDevice.c
===================================================================
--- x11-drivers/xf86-input-wacom/files/patch-src-wcmValidateDevice.c
+++ x11-drivers/xf86-input-wacom/files/patch-src-wcmValidateDevice.c
@@ -29,6 +29,15 @@
if (match)
xf86Msg(X_WARNING, "%s: device file already in use by %s. "
"Ignoring.\n", pInfo->name, pDevices->name);
+@@ -123,7 +124,7 @@ ret:
+ static struct
+ {
+ const char* type;
+- __u16 tool[3]; /* tool array is terminated by 0 */
++ uint16_t tool[3]; /* tool array is terminated by 0 */
+ } wcmType [] =
+ {
+ { "stylus", { BTN_TOOL_PEN, 0 } },
@@ -205,6 +206,10 @@ int wcmDeviceTypeKeys(InputInfoPtr pInfo
case 0x314: /* Intuos Pro S */
case 0x315: /* Intuos Pro M */
Index: x11-servers/xorg-server/files/patch-config_devd.c
===================================================================
--- x11-servers/xorg-server/files/patch-config_devd.c
+++ x11-servers/xorg-server/files/patch-config_devd.c
@@ -1,6 +1,6 @@
---- config/devd.c.orig 2017-01-19 15:20:42 UTC
-+++ config/devd.c
-@@ -0,0 +1,532 @@
+--- /dev/null 2016-08-20 16:05:18.000000000 +0300
++++ config/devd.c 2016-08-20 16:09:28.076064000 +0300
+@@ -0,0 +1,892 @@
+/*
+ * Copyright (c) 2012 Baptiste Daroussin
+ * Copyright (c) 2013, 2014 Alex Kozlov
@@ -33,20 +33,27 @@
+#include <dix-config.h>
+#endif
+
-+#include <sys/types.h>
++#include <sys/param.h>
++#include <sys/ioccom.h>
+#include <sys/kbio.h>
++#include <sys/queue.h>
+#include <sys/socket.h>
+#include <sys/stat.h>
+#include <sys/sysctl.h>
+#include <sys/un.h>
+
+#include <ctype.h>
++#include <dirent.h>
+#include <errno.h>
+#include <fcntl.h>
++#include <limits.h>
++#include <stddef.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <stdbool.h>
++#include <string.h>
+#include <unistd.h>
++#include <paths.h>
+
+#include "input.h"
+#include "inputstr.h"
@@ -56,260 +63,611 @@
+
+#define DEVD_SOCK_PATH "/var/run/devd.pipe"
+
-+#define DEVD_EVENT_ADD '+'
-+#define DEVD_EVENT_REMOVE '-'
-+
-+#define RECONNECT_DELAY 5 * 1000
++#define RECONNECT_DELAY (5 * 1000)
+
+static int sock_devd;
-+static bool is_console_kbd = false;
+static bool is_kbdmux = false;
-+static OsTimerPtr rtimer = NULL;
++static bool is_kernel_evdev = false;
++static OsTimerPtr rtimer;
+
+struct hw_type {
+ const char *driver;
+ int flag;
+ const char *xdriver;
++ const char *sysctldesc;
+};
+
-+static struct hw_type hw_types[] = {
-+ { "ukbd", ATTR_KEYBOARD, "kbd" },
-+ { "atkbd", ATTR_KEYBOARD, "kbd" },
-+ { "kbdmux", ATTR_KEYBOARD, "kbd" },
-+ { "sysmouse", ATTR_POINTER, "mouse" },
-+ { "ums", ATTR_POINTER, "mouse" },
-+ { "psm", ATTR_POINTER, "mouse" },
-+ { "vboxguest", ATTR_POINTER, "vboxmouse" },
-+ { "joy", ATTR_JOYSTICK, NULL },
-+ { "atp", ATTR_TOUCHPAD, NULL },
-+ { "uep", ATTR_TOUCHSCREEN, NULL },
-+ { NULL, -1, NULL },
++static const struct hw_type hw_types0[] = {
++ { _PATH_DEV "sysmouse", ATTR_POINTER, "mouse", NULL },
++ { _PATH_DEV "vboxguest", ATTR_POINTER, "vboxmouse", NULL },
++ { NULL, 0, NULL, NULL },
+};
+
-+static bool
-+sysctl_exists(const struct hw_type *device, int unit,
-+ char *devname, size_t devname_len)
++static const struct hw_type hw_types1[] = {
++ { _PATH_DEV "ukbd%d", ATTR_KEYBOARD, "kbd", "ukbd" },
++ { _PATH_DEV "atkbd%d", ATTR_KEYBOARD, "kbd", "atkbd" },
++ { _PATH_DEV "kbdmux%d", ATTR_KEYBOARD, "kbd", NULL },
++ { _PATH_DEV "ums%d", ATTR_POINTER, "mouse", "ums" },
++ { _PATH_DEV "psm%d", ATTR_POINTER, "mouse", "psm" },
++ { _PATH_DEV "joy%d", ATTR_JOYSTICK, "mouse", "joy" },
++ { _PATH_DEV "atp%d", ATTR_TOUCHPAD, "mouse", "atp" },
++ { _PATH_DEV "wsp%d", ATTR_TOUCHPAD, "mouse", "wsp" },
++ { _PATH_DEV "uep%d", ATTR_TOUCHSCREEN, "mouse", "uep" },
++ { _PATH_DEV "input/event%d", 0, "evdev", NULL },
++ { NULL, 0, NULL, NULL },
++};
++
++/* like basename() but returns a pointer to incoming string */
++static char *
++bname(const char *path)
+{
-+ char sysctlname[PATH_MAX];
-+ size_t len;
-+ int ret;
++ char *slash = NULL;
+
-+ if (device == NULL || device->driver == NULL)
-+ return false;
++ if (path != NULL)
++ slash = strrchr(path, '/');
++ return (slash == NULL) ? (char *)path : slash + 1;
++}
+
-+ /* Check if a sysctl exists. */
-+ snprintf(sysctlname, sizeof(sysctlname), "dev.%s.%i.%%desc",
-+ device->driver, unit);
-+ ret = sysctlbyname(sysctlname, NULL, &len, NULL, 0);
++struct dev_entry {
++ SLIST_ENTRY(dev_entry) next;
++ char name[];
++};
++SLIST_HEAD(dev_list, dev_entry);
+
-+ if (ret == 0 && len > 0) {
-+ snprintf(devname, devname_len, "%s%i", device->driver, unit);
-+ return true;
++#define dev_list_init(dev_list) SLIST_INIT(dev_list)
++#define dev_list_empty(dev_list) SLIST_EMPTY(dev_list)
++
++static void
++dev_list_insert(struct dev_list *devs, const char *dev_name)
++{
++ struct dev_entry *dev;
++
++ dev = malloc(offsetof(struct dev_entry, name) + strlen(dev_name) + 1);
++ if (dev != NULL) {
++ strcpy(dev->name, dev_name);
++ SLIST_INSERT_HEAD(devs, dev, next);
+ }
++}
+
-+ return false;
++static void
++dev_list_destroy(struct dev_list *devs)
++{
++ struct dev_entry *dev;
++
++ while (!SLIST_EMPTY(devs)) {
++ dev = SLIST_FIRST(devs);
++ SLIST_REMOVE_HEAD(devs, next);
++ free(dev);
++ }
+}
+
+static bool
-+devpath_exists(const struct hw_type *device,
-+ char *devname, size_t devname_len)
++dev_list_search(struct dev_list *devs, const char *dev_name)
+{
-+ char *devpath;
-+ struct stat st;
-+ int ret;
++ struct dev_entry *dev;
+
-+ if (device == NULL || device->driver == NULL)
-+ return false;
++ if (dev_name != NULL)
++ SLIST_FOREACH(dev, devs, next)
++ if (strcmp(dev_name, dev->name) == 0)
++ return true;
++ return false;
++}
+
-+ /* Check if /dev/$driver exists. */
-+ asprintf(&devpath, "/dev/%s", device->driver);
-+ if (devpath == NULL)
-+ return false;
++/* Some definitions from linux/input.h */
++struct input_id {
++ uint16_t bustype;
++ uint16_t vendor;
++ uint16_t product;
++ uint16_t version;
++};
+
-+ ret = stat(devpath, &st);
-+ free(devpath);
++#define EVIOCGBIT(ev,len) _IOC(IOC_OUT, 'E', 0x20 + (ev), len)
++#define EVIOCGID _IOR('E', 0x02, struct input_id)
++#define EVIOCGNAME(len) _IOC(IOC_OUT, 'E', 0x06, len)
++#define EVIOCGPHYS(len) _IOC(IOC_OUT, 'E', 0x07, len)
++
++#define EV_KEY 0x01
++#define EV_REL 0x02
++#define EV_ABS 0x03
++#define BTN_MISC 0x100
++#define BTN_LEFT 0x110
++#define BTN_RIGHT 0x111
++#define BTN_MIDDLE 0x112
++#define BTN_JOYSTICK 0x120
++#define BTN_TOOL_PEN 0x140
++#define BTN_TOOL_FINGER 0x145
++#define BTN_TOUCH 0x14a
++#define BTN_STYLUS 0x14b
++#define BTN_STYLUS2 0x14c
++#define KEY_MAX 0x2ff
++#define KEY_CNT (KEY_MAX+1)
++#define REL_X 0x00
++#define REL_Y 0x01
++#define REL_MAX 0x0f
++#define REL_CNT (REL_MAX+1)
++#define ABS_X 0x00
++#define ABS_Y 0x01
++#define ABS_PRESSURE 0x18
++#define ABS_MT_SLOT 0x2f
++#define ABS_MAX 0x3f
++#define ABS_CNT (ABS_MAX+1)
++
++#define LONG_BITS (sizeof(long) * 8)
++#define NLONGS(x) (((x) + LONG_BITS - 1) / LONG_BITS)
+
-+ if (ret == 0) {
-+ strncpy(devname, device->driver, devname_len);
-+ return true;
-+ }
++static inline bool
++bit_is_set(const unsigned long *array, int bit)
++{
++ return !!(array[bit / LONG_BITS] & (1LL << (bit % LONG_BITS)));
++}
++
++static inline bool
++bit_find(const unsigned long *array, int start, int stop)
++{
++ int i;
++
++ for (i = start; i < stop; i++)
++ if (bit_is_set(array, i))
++ return true;
+
+ return false;
+}
+
-+static char *
-+sysctl_get_str(const char *sysctlname)
++/*
++ * Event device type detection routine.
++ * Derived from EvdevProbe() function of xf86-input-evdev driver
++ */
++static void
++get_evdev_attrs(InputAttributes *attrs, const char *devicename)
+{
-+ char *dest = NULL;
-+ size_t len;
++ int fd, flags;
++ bool has_keys, has_buttons, has_lmr;
++ bool has_rel_axes, has_abs_axes, has_mt;
++ unsigned long key_bits[NLONGS(KEY_CNT)];
++ unsigned long rel_bits[NLONGS(REL_CNT)];
++ unsigned long abs_bits[NLONGS(ABS_CNT)];
++ struct input_id id;
++ char name[80];
++ char *walk;
+
-+ if (sysctlname == NULL)
-+ return NULL;
++ flags = 0;
+
-+ if (sysctlbyname(sysctlname, NULL, &len, NULL, 0) == 0) {
-+ dest = malloc(len + 1);
-+ if (dest) {
-+ if (sysctlbyname(sysctlname, dest, &len, NULL, 0) == 0)
-+ dest[len] = '\0';
-+ else {
-+ free(dest);
-+ dest = NULL;
++ fd = open(devicename, O_RDONLY | O_CLOEXEC);
++ if (fd < 0)
++ goto out;
++ if (ioctl(fd, EVIOCGNAME(sizeof(name) - 1), name) < 0 ||
++ ioctl(fd, EVIOCGID, &id) < 0 ||
++ ioctl(fd, EVIOCGBIT(EV_REL, sizeof(rel_bits)), rel_bits) < 0 ||
++ ioctl(fd, EVIOCGBIT(EV_ABS, sizeof(abs_bits)), abs_bits) < 0 ||
++ ioctl(fd, EVIOCGBIT(EV_KEY, sizeof(key_bits)), key_bits) < 0) {
++ close(fd);
++ goto out;
++ }
++ close(fd);
++
++ if ((walk = strchr(name, ',')) != NULL)
++ *walk = '\0'; /* strip name */
++
++ attrs->product = strdup(name);
++ asprintf(&attrs->usb_id, "%04x:%04x", id.vendor, id.product);
++ asprintf(&attrs->vendor, "0x%04x", id.vendor);
++
++ has_keys = bit_find(key_bits, 0, BTN_MISC);
++ has_buttons = bit_find(key_bits, BTN_MISC, BTN_JOYSTICK);
++ has_lmr = bit_find(key_bits, BTN_LEFT, BTN_MIDDLE + 1);
++ has_rel_axes = bit_find(rel_bits, 0, REL_CNT);
++ has_abs_axes = bit_find(abs_bits, 0, ABS_CNT);
++ has_mt = bit_find(abs_bits, ABS_MT_SLOT, ABS_CNT);
++
++ if (has_abs_axes) {
++ if (has_mt) {
++ if (!has_buttons) {
++ /*
++ * XXX: I'm not sure that joystick detection is
++ * done right. xf86-evdev does not support them.
++ */
++ if (bit_is_set(key_bits, BTN_JOYSTICK)) {
++ flags = ATTR_JOYSTICK;
++ goto out;
++ } else {
++ has_buttons = true;
++ }
++ }
++ }
++
++ if (bit_is_set(abs_bits, ABS_X) &&
++ bit_is_set(abs_bits, ABS_Y)) {
++ if (bit_is_set(key_bits, BTN_TOOL_PEN) ||
++ bit_is_set(key_bits, BTN_STYLUS) ||
++ bit_is_set(key_bits, BTN_STYLUS2)) {
++ flags = ATTR_TABLET;
++ goto out;
++ } else if (bit_is_set(abs_bits, ABS_PRESSURE) ||
++ bit_is_set(key_bits, BTN_TOUCH)) {
++ if (has_lmr ||
++ bit_is_set(key_bits, BTN_TOOL_FINGER)) {
++ flags = ATTR_TOUCHPAD;
++ } else {
++ flags = ATTR_TOUCHSCREEN;
++ }
++ goto out;
++ } else if (!(bit_is_set(rel_bits, REL_X) &&
++ bit_is_set(rel_bits, REL_Y)) &&
++ has_lmr) {
++ /* some touchscreens use BTN_LEFT rather than BTN_TOUCH */
++ flags = ATTR_TOUCHSCREEN;
++ goto out;
+ }
+ }
+ }
+
-+ return dest;
++ if (has_keys)
++ flags = ATTR_KEYBOARD;
++ else if (has_rel_axes || has_abs_axes || has_buttons)
++ flags = ATTR_POINTER;
++
++out:
++ attrs->flags |= flags;
+}
+
++/* Returns list of devices supporting evdev protocol */
+static void
-+device_added(const char *devname)
++get_evdev_blacklist(struct dev_list *devs)
+{
-+ char path[PATH_MAX];
-+ char sysctlname[PATH_MAX];
-+ char *vendor;
-+ char *product = NULL;
-+ char *config_info = NULL;
-+ char *walk;
-+ InputOption *options = NULL;
-+ InputAttributes attrs = { };
-+ DeviceIntPtr dev = NULL;
-+ int i;
++ struct dirent *entry;
++ DIR *dp;
++ static const char ev_dir[] = _PATH_DEV "input";
++#define EV_LEN nitems(ev_dir)
++ char path[PATH_MAX + 1];
++ char phys[80];
+ int fd;
+
-+ for (i = 0; hw_types[i].driver != NULL; i++) {
-+ size_t len;
++ snprintf(path, sizeof(path), "%s/", ev_dir);
++ if ((dp = opendir(ev_dir)) == NULL)
++ return;
+
-+ len = strlen(hw_types[i].driver);
-+ if (strcmp(devname, hw_types[i].driver) == 0 ||
-+ (strncmp(devname, hw_types[i].driver, len) == 0 &&
-+ isnumber(*(devname + len)))) {
-+ attrs.flags |= hw_types[i].flag;
-+ break;
-+ }
++ while ((entry = readdir(dp)) != NULL) {
++ if (entry->d_type != DT_CHR)
++ continue;
++ if (strncmp(entry->d_name, "event", 5) != 0)
++ continue;
++ strlcpy(path + EV_LEN, entry->d_name, sizeof(path) - EV_LEN);
++ fd = open(path, O_RDONLY | O_CLOEXEC);
++ if (fd < 0)
++ continue;
++ /* XXX: Should uinput- and cuse-backed devices be skipped? */
++ if (ioctl(fd, EVIOCGPHYS(sizeof(phys) - 1), phys) == 0 &&
++ phys[0] != 0)
++ dev_list_insert(devs, bname(phys));
++ close(fd);
+ }
++ closedir(dp);
++ return;
++}
+
-+ if (hw_types[i].driver == NULL || hw_types[i].xdriver == NULL) {
-+ LogMessage(X_INFO, "config/devd: ignoring device %s\n",
-+ devname);
-+ return;
++static void
++get_usb_id(char **pptr, int fd)
++{
++ unsigned short vendor;
++ unsigned short product;
++ unsigned int speed;
++#define WEBCAMD_IOCTL_GET_USB_VENDOR_ID _IOR('q', 250, unsigned short)
++#define WEBCAMD_IOCTL_GET_USB_PRODUCT_ID _IOR('q', 251, unsigned short)
++#define WEBCAMD_IOCTL_GET_USB_SPEED _IOR('q', 252, unsigned int)
++ if (ioctl(fd, WEBCAMD_IOCTL_GET_USB_VENDOR_ID, &vendor) == 0 &&
++ ioctl(fd, WEBCAMD_IOCTL_GET_USB_PRODUCT_ID, &product) == 0 &&
++ ioctl(fd, WEBCAMD_IOCTL_GET_USB_SPEED, &speed) == 0) {
++ if (asprintf(pptr, "%04x:%04x", vendor, product) == -1)
++ *pptr = NULL;
+ }
++}
+
-+ /* Skip keyboard devices if kbdmux is enabled */
-+ if (is_kbdmux && is_console_kbd && hw_types[i].flag & ATTR_KEYBOARD) {
-+ LogMessage(X_INFO, "config/devd: kbdmux is enabled, ignoring device %s\n",
-+ devname);
-+ return;
-+ }
++static char *
++get_prop_value(const char *buf, const char *prop, size_t *len)
++{
++ char *prop_pos, *val_pos, *walk;
++ size_t prop_len;
+
-+ snprintf(path, sizeof(path), "/dev/%s", devname);
++ prop_len = strlen(prop);
++ prop_pos = strstr(buf, prop);
++ if (prop_pos == NULL ||
++ (prop_pos != buf && prop_pos[-1] != ' ') ||
++ prop_pos[prop_len] != '=')
++ return (NULL);
++
++ val_pos = prop_pos + prop_len + 1;
++ if ((walk = strchr(val_pos, ' ')) == NULL)
++ *len = strlen(val_pos);
++ else
++ *len = walk - val_pos;
++ return (val_pos);
++}
+
-+ options = input_option_new(NULL, "_source", "server/devd");
-+ if (!options)
++static void
++get_sysctl_attrs(InputAttributes *attrs, const char* driver, int unit)
++{
++ char mib[32], name[80], pnpinfo[1024], *pnp_id, *walk;
++ const char *vendorstr, *prodstr, *devicestr;
++ size_t len, vendorlen, prodlen, devicelen, pnplen;
++ uint32_t product, vendor;
++
++ snprintf(mib, sizeof(mib), "dev.%s.%d.%%desc", driver, unit);
++ len = sizeof(name);
++ if (sysctlbyname(mib, name, &len, NULL, 0) < 0)
++ return;
++ if ((walk = strchr(name, ',')) != NULL)
++ *walk = '\0'; /* strip name */
++ attrs->product = strdup(name);
++
++ snprintf(mib, sizeof(mib), "dev.%s.%d.%%pnpinfo", driver, unit);
++ len = sizeof(pnpinfo);
++ if (sysctlbyname(mib, pnpinfo, &len, NULL, 0) < 0)
+ return;
+
-+ snprintf(sysctlname, sizeof(sysctlname), "dev.%s.%s.%%desc",
-+ hw_types[i].driver, devname + strlen(hw_types[i].driver));
-+ vendor = sysctl_get_str(sysctlname);
-+ if (vendor == NULL) {
-+ options = input_option_new(options, "name", devname);
-+ }
-+ else {
-+ if ((walk = strchr(vendor, ' ')) != NULL) {
-+ walk[0] = '\0';
-+ walk++;
-+ product = walk;
-+ if ((walk = strchr(product, ',')) != NULL)
-+ walk[0] = '\0';
-+ }
++ vendorstr = get_prop_value(pnpinfo, "vendor", &vendorlen);
++ prodstr = get_prop_value(pnpinfo, "product", &prodlen);
++ devicestr = get_prop_value(pnpinfo, "device", &devicelen);
++ pnp_id = get_prop_value(pnpinfo, "_HID", &pnplen);
++ if (pnp_id != NULL && pnplen == 4 && strncmp(pnp_id, "none", 4) == 0)
++ pnp_id = NULL;
++ if (pnp_id != NULL) {
++ pnp_id[pnplen] = '\0';
++ attrs->pnp_id = strdup(pnp_id);
++ }
++ if (prodstr != NULL && vendorstr != NULL) {
++ /* bus = BUS_USB; */
++ vendor = strtol(vendorstr, NULL, 0);
++ product = strtol(prodstr, NULL, 0);
++ } else if (devicestr != NULL && vendorstr != NULL) {
++ /* bus = BUS_PCI; */
++ vendor = strtol(vendorstr, NULL, 0);
++ product = strtol(devicestr, NULL, 0);
++ } else
++ return;
+
-+ attrs.vendor = strdup(vendor);
-+ if (product) {
-+ attrs.product = strdup(product);
-+ options = input_option_new(options, "name", product);
-+ }
-+ else
-+ options = input_option_new(options, "name", "(unnamed)");
++ asprintf(&attrs->usb_id, "%04x:%04x", vendor, product);
++ asprintf(&attrs->vendor, "0x%04x", vendor);
+
-+ free(vendor);
-+ }
++ return;
++}
+
-+ /* XXX implement usb_id */
-+ attrs.usb_id = NULL;
-+ attrs.device = strdup(path);
-+ options = input_option_new(options, "driver", hw_types[i].xdriver);
++static const char *
++skip_path_dev(const char *ptr)
++{
++ if (strstr(ptr, _PATH_DEV) == ptr)
++ ptr += strlen(_PATH_DEV);
++ return (ptr);
++}
+
-+ fd = open(path, O_RDONLY);
-+ if (fd > 0) {
-+ close(fd);
-+ options = input_option_new(options, "device", path);
++static void
++device_added(const char *devicename, struct dev_list *blacklist)
++{
++ InputAttributes attrs = { };
++ InputOption *options = NULL;
++ char *config_info = NULL;
++ DeviceIntPtr dev = NULL;
++ struct hw_type hw_type;
++ int unit = 0;
++ int fd = -1;
++ int i;
++ bool allow_no_device = false;
++
++ for (i = 0; hw_types0[i].driver != NULL; i++) {
++ if (strcmp(devicename, hw_types0[i].driver) == 0) {
++ hw_type = hw_types0[i];
++ goto found;
++ }
++ }
++ for (i = 0; hw_types1[i].driver != NULL; i++) {
++ if (sscanf(devicename, hw_types1[i].driver, &unit) == 1) {
++ hw_type = hw_types1[i];
++ goto found;
++ }
+ }
-+ else {
-+ if (attrs.flags & ~ATTR_KEYBOARD) {
-+ LogMessage(X_INFO, "config/devd: device %s already opened\n",
-+ path);
++ goto ignore;
+
++found:
++ if (hw_type.xdriver == NULL)
++ goto ignore;
++
++ /* set flags, if any */
++ attrs.flags |= hw_type.flag;
++
++ if (strcmp(hw_type.xdriver, "evdev") == 0) {
++ get_evdev_attrs(&attrs, devicename);
++ /* Set keyboard rules explicitly for libinput */
++ if (attrs.flags & ATTR_KEYBOARD) {
++ options = input_option_new(options, "xkb_rules",
++ "evdev");
++ if (options == NULL)
++ goto error;
++ }
++ } else {
++ if (is_kernel_evdev) {
++ if (dev_list_empty(blacklist))
++ get_evdev_blacklist(blacklist);
+ /*
-+ * Fail if cannot open device, it breaks AllowMouseOpenFail,
-+ * but it should not matter when config/devd enabled
++ * Prefer evdev input kernel interface to native one.
++ * Assume that both evdev 'physical path' and non-evdev
++ * character device path endings are device names so
++ * we can compare them and skip latter.
+ */
-+ goto unwind;
++ if (dev_list_search(blacklist, bname(devicename)))
++ goto ignore;
+ }
++ }
+
-+ if (is_console_kbd) {
-+ /*
-+ * There can be only one keyboard attached to console and
-+ * it is already added.
-+ */
-+ LogMessage(X_WARNING, "config/devd: console keyboard is "
-+ "already added, ignoring %s (%s)\n",
-+ attrs.product, path);
-+ goto unwind;
++ if (strcmp(hw_type.xdriver, "kbd") == 0) {
++ bool match = (strstr(hw_type.driver,
++ _PATH_DEV "kbdmux") == hw_type.driver);
++
++ if (is_kbdmux) {
++ allow_no_device = true;
++ if (!match)
++ goto ignore;
++ } else {
++ if (match)
++ goto ignore;
+ }
-+ else
-+ /*
-+ * Don't pass "device" option if the keyboard is already
-+ * attached to the console (ie. open() fails).
-+ * This would activate a special logic in xf86-input-keyboard.
-+ * Prevent any other attached to console keyboards being
-+ * processed. There can be only one such device.
-+ */
-+ is_console_kbd = true;
+ }
+
-+ if (asprintf(&config_info, "devd:%s", devname) == -1) {
++ options = input_option_new(options, "_source", "server/devd");
++ if (options == NULL)
++ goto error;
++
++ if (hw_type.sysctldesc != NULL)
++ get_sysctl_attrs(&attrs, hw_type.sysctldesc, unit);
++
++ if (attrs.product == NULL)
++ attrs.product = strdup(skip_path_dev(devicename));
++
++ options = input_option_new(options, "name", attrs.product);
++ if (options == NULL)
++ goto error;
++
++ attrs.device = strdup(devicename);
++
++ fd = open(devicename, O_RDONLY);
++ if (fd > -1) {
++ if (attrs.usb_id == NULL)
++ get_usb_id(&attrs.usb_id, fd);
++ close(fd);
++ options = input_option_new(options, "device", devicename);
++ if (options == NULL)
++ goto error;
++ } else if (allow_no_device) {
++ /*
++ * Don't pass "device" option if the keyboard is
++ * already attached to the console (ie. open() fails).
++ * This would activate a special logic in
++ * xf86-input-keyboard. Prevent any other attached to
++ * console keyboards being processed. There can be
++ * only one such device.
++ */
++ } else {
++ goto ignore;
++ }
++
++ options = input_option_new(options, "driver", hw_type.xdriver);
++ if (options == NULL)
++ goto error;
++
++ if (asprintf(&config_info, "devd:%s",
++ skip_path_dev(devicename)) == -1) {
+ config_info = NULL;
-+ goto unwind;
++ goto error;
+ }
+
-+ if (device_is_duplicate(config_info)) {
-+ LogMessage(X_WARNING, "config/devd: device %s (%s) already added. "
-+ "ignoring\n", attrs.product, path);
-+ goto unwind;
-+ }
++ if (device_is_duplicate(config_info))
++ goto duplicate;
+
+ options = input_option_new(options, "config_info", config_info);
-+ LogMessage(X_INFO, "config/devd: adding input device %s (%s)\n",
-+ attrs.product, path);
++ if (options == NULL)
++ goto error;
++
++ LogMessage(X_INFO, "config/devd: adding input device '%s'\n",
++ devicename);
+
+ NewInputDeviceRequest(options, &attrs, &dev);
++ goto done;
++
++duplicate:
++ LogMessage(X_WARNING, "config/devd: device '%s' already "
++ "added. Ignoring\n", devicename);
++ goto done;
++
++error:
++ LogMessage(X_INFO, "config/devd: error adding device '%s'\n",
++ devicename);
++ goto done;
++
++ignore:
++ LogMessage(X_INFO, "config/devd: ignoring device '%s'\n",
++ devicename);
++ goto done;
+
-+unwind:
++done:
+ free(config_info);
+ input_option_free_list(&options);
+ free(attrs.usb_id);
++ free(attrs.pnp_id);
+ free(attrs.product);
+ free(attrs.device);
+ free(attrs.vendor);
+}
+
+static void
-+device_removed(char *devname)
++devpath_scan_sub(char *path, int off, int rem, void *udata)
++{
++ struct dirent *entry;
++ DIR *dp;
++
++ if ((dp = opendir(path)) == NULL) {
++ LogMessage(X_INFO, "Cannot open directory '%s'\n", path);
++ return;
++ }
++ while ((entry = readdir(dp)) != NULL) {
++ int len = strlen(entry->d_name);
++ if (len > rem)
++ continue;
++ strcpy(path + off, entry->d_name);
++ off += len;
++ rem -= len;
++ switch (entry->d_type) {
++ case DT_DIR:
++ if (strcmp(entry->d_name, ".") == 0 ||
++ strcmp(entry->d_name, "..") == 0)
++ break;
++ if (rem < 1)
++ break;
++ path[off] = '/';
++ path[off+1] = '\0';
++ off++;
++ rem--;
++ /* recurse */
++ devpath_scan_sub(path, off, rem, udata);
++ off--;
++ rem++;
++ break;
++ case DT_SOCK:
++ case DT_FIFO:
++ case DT_LNK:
++ case DT_CHR:
++ /* add device, if any */
++ device_added(path, udata);
++ break;
++ default:
++ break;
++ }
++ off -= len;
++ rem += len;
++ }
++ closedir(dp);
++}
++
++static void
++devpath_scan(void *udata)
++{
++ char path[PATH_MAX + 1];
++
++ strlcpy(path, _PATH_DEV, sizeof(path));
++
++ devpath_scan_sub(path, strlen(path), PATH_MAX - strlen(path), udata);
++}
++
++static void
++device_removed(char *devicename)
+{
+ char *config_info;
+
-+ if (asprintf(&config_info, "devd:%s", devname) == -1)
++ if (asprintf(&config_info, "devd:%s",
++ skip_path_dev(devicename)) == -1)
+ return;
+
++ if (device_is_duplicate(config_info)) {
++ LogMessage(X_INFO, "config/devd: removing input device '%s'\n",
++ devicename);
++ }
+ remove_devices("devd", config_info);
+
+ free(config_info);
@@ -318,8 +676,7 @@
+static bool is_kbdmux_enabled(void)
+{
+ /* Xorg uses /dev/ttyv0 as a console device */
-+ /* const char device[]="/dev/console"; */
-+ const char device[]="/dev/ttyv0";
++ static const char device[]= { _PATH_DEV "ttyv0" };
+ keyboard_info_t info;
+ int fd;
+
@@ -449,8 +806,13 @@
+static void
+wakeup_handler(void *data, int err, void *read_mask)
+{
++ static const char cdev_create[] = { "!system=DEVFS subsystem=CDEV type=CREATE cdev=" };
++ static const char cdev_destroy[] = { "!system=DEVFS subsystem=CDEV type=DESTROY cdev=" };
++ static const char cdev_path[] = { _PATH_DEV };
+ char *line = NULL;
++ char *devicename;
+ char *walk;
++ struct dev_list blacklist;
+
+ if (err < 0)
+ return;
@@ -458,20 +820,23 @@
+ if (FD_ISSET(sock_devd, (fd_set *) read_mask)) {
+ if (socket_getline(sock_devd, &line) < 0)
+ return;
-+
-+ walk = strchr(line + 1, ' ');
-+ if (walk != NULL)
-+ walk[0] = '\0';
-+
-+ switch (*line) {
-+ case DEVD_EVENT_ADD:
-+ device_added(line + 1);
-+ break;
-+ case DEVD_EVENT_REMOVE:
-+ device_removed(line + 1);
-+ break;
-+ default:
-+ break;
++ if (strstr(line, cdev_create) == line) {
++ devicename = line + strlen(cdev_create) - strlen(cdev_path);
++ memcpy(devicename, cdev_path, strlen(cdev_path));
++ walk = strchr(devicename, ' ');
++ if (walk != NULL)
++ walk[0] = '\0';
++ /* Blacklist is lazy-populated in device_added() */
++ dev_list_init(&blacklist);
++ device_added(devicename, &blacklist);
++ dev_list_destroy(&blacklist);
++ } else if (strstr(line, cdev_destroy) == line) {
++ devicename = line + strlen(cdev_destroy) - strlen(cdev_path);
++ memcpy(devicename, cdev_path, strlen(cdev_path));
++ walk = strchr(devicename, ' ');
++ if (walk != NULL)
++ walk[0] = '\0';
++ device_removed(devicename);
+ }
+ free(line);
+ }
@@ -485,35 +850,31 @@
+int
+config_devd_init(void)
+{
-+ char devicename[1024];
-+ int i, j;
++ struct dev_list blacklist;
+
+ LogMessage(X_INFO, "config/devd: probing input devices...\n");
+
-+ /*
-+ * Add fake keyboard and give up on keyboards management
-+ * if kbdmux is enabled
-+ */
-+ if ((is_kbdmux = is_kbdmux_enabled()) == true)
-+ device_added("kbdmux");
-+
-+ for (i = 0; hw_types[i].driver != NULL; i++) {
-+ /* First scan the sysctl to determine the hardware */
-+ for (j = 0; j < 16; j++) {
-+ if (sysctl_exists(&hw_types[i], j,
-+ devicename, sizeof(devicename)) != 0)
-+ device_added(devicename);
-+ }
++ /* Blacklist is lazy-populated in device_added() */
++ dev_list_init(&blacklist);
+
-+ if (devpath_exists(&hw_types[i], devicename, sizeof(devicename)) != 0)
-+ device_added(devicename);
-+ }
++ /* Check if kbdmux is enabled */
++ is_kbdmux = is_kbdmux_enabled();
+
++ /* Check if evdev support is compiled into kernel */
++ is_kernel_evdev = feature_present("evdev") != 0;
++
++ /* Connect to devd, so that we don't loose any events */
+ if ((sock_devd = connect_devd()) < 0)
+ return 0;
+
++ /* Scan what is currently connected */
++ devpath_scan(&blacklist);
++
++ /* Register wakeup handler */
+ RegisterBlockAndWakeupHandlers(block_handler, wakeup_handler, NULL);
+
++ dev_list_destroy(&blacklist);
++
+ return 1;
+}
+
@@ -530,6 +891,4 @@
+ disconnect_devd(sock_devd);
+
+ RemoveBlockAndWakeupHandlers(block_handler, wakeup_handler, NULL);
-+
-+ is_console_kbd = false;
+}
Index: x11-servers/xorg-server/files/patch-hw_xfree86_os-support_bsd_bsd_init.c
===================================================================
--- x11-servers/xorg-server/files/patch-hw_xfree86_os-support_bsd_bsd_init.c
+++ x11-servers/xorg-server/files/patch-hw_xfree86_os-support_bsd_bsd_init.c
@@ -0,0 +1,45 @@
+--- hw/xfree86/os-support/bsd/bsd_init.c.orig 2015-08-03 17:44:08.000000000 +0300
++++ hw/xfree86/os-support/bsd/bsd_init.c 2016-10-16 12:41:09.231720000 +0300
+@@ -48,6 +48,7 @@ static int devConsoleFd = -1;
+ #if defined (SYSCONS_SUPPORT) || defined (PCVT_SUPPORT)
+ static int VTnum = -1;
+ static int initialVT = -1;
++static struct termios tty_attr;
+ #endif
+
+ #ifdef PCCONS_SUPPORT
+@@ -253,6 +254,7 @@ xf86OpenConsole()
+ #endif
+ acquire_vt:
+ if (!xf86Info.ShareVTs) {
++ struct termios nTty;
+ /*
+ * now get the VT
+ */
+@@ -287,6 +289,18 @@ xf86OpenConsole()
+ if (ioctl(xf86Info.consoleFd, KDSETMODE, KD_GRAPHICS) < 0) {
+ FatalError("xf86OpenConsole: KDSETMODE KD_GRAPHICS failed");
+ }
++
++ tcgetattr(xf86Info.consoleFd, &tty_attr);
++ nTty = tty_attr;
++ nTty.c_iflag = IGNPAR | IGNBRK;
++ nTty.c_oflag = 0;
++ nTty.c_cflag = CREAD | CS8;
++ nTty.c_lflag = 0;
++ nTty.c_cc[VTIME] = 0;
++ nTty.c_cc[VMIN] = 1;
++ cfsetispeed(&nTty, 9600);
++ cfsetospeed(&nTty, 9600);
++ tcsetattr(xf86Info.consoleFd, TCSANOW, &nTty);
+ }
+ else { /* xf86Info.ShareVTs */
+ close(xf86Info.consoleFd);
+@@ -594,6 +608,7 @@ xf86CloseConsole()
+ case SYSCONS:
+ case PCVT:
+ ioctl(xf86Info.consoleFd, KDSETMODE, KD_TEXT); /* Back to text mode */
++ tcsetattr(xf86Info.consoleFd, TCSANOW, &tty_attr);
+ if (ioctl(xf86Info.consoleFd, VT_GETMODE, &VT) != -1) {
+ VT.mode = VT_AUTO;
+ ioctl(xf86Info.consoleFd, VT_SETMODE, &VT); /* dflt vt handling */
Index: x11/kf5-kwayland/Makefile
===================================================================
--- x11/kf5-kwayland/Makefile
+++ x11/kf5-kwayland/Makefile
@@ -8,7 +8,7 @@
MAINTAINER= kde@FreeBSD.org
COMMENT= KF5 Client and Server library wrapper for the Wayland libraries
-BUILD_DEPENDS= ${LOCALBASE}/include/linux/input.h:multimedia/v4l_compat
+BUILD_DEPENDS= ${LOCALBASE}/include/linux/input.h:devel/libevdev-headers
LIB_DEPENDS= libwayland-client.so:graphics/wayland
USES= cmake:outsource compiler:c++11-lib gettext kde:5 pkgconfig \
Index: x11/libinput/Makefile
===================================================================
--- x11/libinput/Makefile
+++ x11/libinput/Makefile
@@ -8,23 +8,38 @@
MAINTAINER= x11@FreeBSD.org
COMMENT= Generic input library
-BUILD_DEPENDS= v4l_compat>=0:multimedia/v4l_compat
+LICENSE= MIT
+
+BUILD_DEPENDS= ${LOCALBASE}/include/linux/input.h:devel/libevdev-headers
LIB_DEPENDS= libevdev.so:devel/libevdev \
- libepoll-shim.so:devel/libepoll-shim \
- libwacom.so:x11/libwacom \
libudev.so:devel/libudev-devd \
libmtdev.so:devel/libmtdev
+OPTIONS_DEFINE= EVENT_GUI LIBWACOM
+OPTIONS_DEFAULT=
+EVENT_GUI_DESC= Build the GUI event viewer
+LIBWACOM_DESC= Libwacom support
+OPTIONS_SUB= yes
+
+EVENT_GUI_USE= GNOME=gtk30,glib20,cairo
+EVENT_GUI_CONFIGURE_ENABLE= event-gui
+LIBWACOM_LIB_DEPENDS= libwacom.so:x11/libwacom
+LIBWACOM_CONFIGURE_ENABLE= libwacom
+
USES= autoreconf gmake libtool pathfix pkgconfig tar:xz
USE_LDCONFIG= yes
GNU_CONFIGURE= yes
-CPPFLAGS+= -I${LOCALBASE}/include/libepoll-shim
+CPPFLAGS+= -I${WRKSRC}/shims
+CONFIGURE_ARGS= --disable-tests --without-libunwind
INSTALL_TARGET= install-strip
post-patch:
- ${REINPLACE_CMD} -e 's|program_invocation_short_name|getprogname()|' \
- ${WRKSRC}/tools/libinput-list-devices.c \
- ${WRKSRC}/tools/ptraccel-debug.c ${WRKSRC}/tools/shared.c
+ ${RM} ${WRKSRC}/include/linux/input.h
+ ${REINPLACE_CMD} -e '/SUBDIR/ s/udev//g' ${WRKSRC}/Makefile.am
+
+post-install-EVENT_GUI-on:
+ ${INSTALL_PROGRAM} ${WRKSRC}/tools/event-gui \
+ ${STAGEDIR}${PREFIX}/bin/libinput-event-gui
.include <bsd.port.mk>
Index: x11/libinput/files/patch-Makefile.am
===================================================================
--- x11/libinput/files/patch-Makefile.am
+++ x11/libinput/files/patch-Makefile.am
@@ -1,8 +0,0 @@
---- Makefile.am.orig 2017-02-11 05:10:33 UTC
-+++ Makefile.am
-@@ -1,4 +1,4 @@
--SUBDIRS = src doc test tools udev
-+SUBDIRS = src doc tools udev
-
- ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
-
Index: x11/libinput/files/patch-configure.ac
===================================================================
--- x11/libinput/files/patch-configure.ac
+++ x11/libinput/files/patch-configure.ac
@@ -0,0 +1,11 @@
+--- configure.ac.orig 2017-01-19 22:28:48 UTC
++++ configure.ac
+@@ -74,7 +74,7 @@ PKG_CHECK_MODULES(LIBUDEV, [libudev])
+ PKG_CHECK_MODULES(LIBEVDEV, [libevdev >= 0.4])
+
+ AC_CHECK_LIB([m], [atan2])
+-AC_CHECK_LIB([rt], [clock_gettime])
++AC_SEARCH_LIBS([clock_gettime], [rt])
+
+ if test "x$GCC" = "xyes"; then
+ GCC_CXXFLAGS="-Wall -Wextra -Wno-unused-parameter -g -fvisibility=hidden"
Index: x11/libinput/files/patch-include_linux_input.h
===================================================================
--- x11/libinput/files/patch-include_linux_input.h
+++ x11/libinput/files/patch-include_linux_input.h
@@ -1,38 +0,0 @@
---- include/linux/input.h.orig 2016-12-05 05:15:21 UTC
-+++ include/linux/input.h
-@@ -11,7 +11,17 @@
- #include <sys/time.h>
- #include <sys/ioctl.h>
- #include <sys/types.h>
-+#ifdef __FreeBSD__
-+#define __u8 uint8_t
-+#define __u16 uint16_t
-+#define __u32 uint32_t
-+#define __s16 int16_t
-+#define __s32 int32_t
-+#define _IOC_READ IOC_OUT
-+#define _IOC_WRITE IOC_IN
-+#else
- #include <linux/types.h>
-+#endif
-
- /*
- * The event structure itself
-@@ -132,7 +142,7 @@ struct input_keymap_entry {
- *
- * If the request code is not an ABS_MT value, -EINVAL is returned.
- */
--#define EVIOCGMTSLOTS(len) _IOC(_IOC_READ, 'E', 0x0a, len)
-+#define EVIOCGMTSLOTS(len) _IOC(IOC_INOUT, 'E', 0x0a, len)
-
- #define EVIOCGKEY(len) _IOC(_IOC_READ, 'E', 0x18, len) /* get global key state */
- #define EVIOCGLED(len) _IOC(_IOC_READ, 'E', 0x19, len) /* get all LEDs */
-@@ -147,7 +157,7 @@ struct input_keymap_entry {
- #define EVIOCRMFF _IOW('E', 0x81, int) /* Erase a force effect */
- #define EVIOCGEFFECTS _IOR('E', 0x84, int) /* Report number of effects playable at the same time */
-
--#define EVIOCGRAB _IOW('E', 0x90, int) /* Grab/Release device */
-+#define EVIOCGRAB _IO('E', 0x90) /* Grab/Release device */
- #define EVIOCREVOKE _IOW('E', 0x91, int) /* Revoke device access */
-
- #define EVIOCSCLOCKID _IOW('E', 0xa0, int) /* Set clockid to be used for timestamps */
Index: x11/libinput/files/patch-shims_sys_epoll.h
===================================================================
--- x11/libinput/files/patch-shims_sys_epoll.h
+++ x11/libinput/files/patch-shims_sys_epoll.h
@@ -0,0 +1,113 @@
+--- shims/sys/epoll.h.orig 2017-02-04 10:53:33 UTC
++++ shims/sys/epoll.h
+@@ -0,0 +1,110 @@
++#include <sys/types.h>
++#include <sys/event.h>
++#include <sys/stat.h>
++#include <errno.h>
++#include <string.h>
++
++#define EPOLL_CLOEXEC 0
++#define EPOLLIN 1 /* Only EPOLLIN is supported */
++#define EPOLL_CTL_ADD 1
++#define EPOLL_CTL_DEL 2
++
++/*
++ * Exact copy of struct kevent from sys/event.h with
++ * some fields renamed for epoll compatibility.
++ */
++typedef union epoll_data {
++ typeof(((struct kevent *)0)->udata) ptr;
++} epoll_data_t;
++
++struct epoll_event {
++ typeof(((struct kevent *)0)->ident) ident;
++ typeof(((struct kevent *)0)->filter) filter;
++ typeof(((struct kevent *)0)->flags) flags;
++ typeof(((struct kevent *)0)->fflags) events;
++ typeof(((struct kevent *)0)->data) unused;
++ epoll_data_t data;
++};
++
++/* timerfd_create() shim returns result of open("/dev/zero", ...) */
++static int
++fd_is_timerfd(int fd)
++{
++ struct stat st;
++ static dev_t devzero_dev;
++ static ino_t devzero_ino;
++
++ if (devzero_dev == 0 && devzero_ino == 0) {
++ memset(&st, 0, sizeof(struct stat));
++ if (stat("/dev/zero", &st) == -1)
++ return (0);
++ devzero_dev = st.st_dev;
++ devzero_ino = st.st_ino;
++ }
++
++ memset(&st, 0, sizeof(struct stat));
++ if (fstat(fd, &st) == -1)
++ return (0);
++
++ return (st.st_dev == devzero_dev && st.st_ino == devzero_ino);
++}
++
++static inline int
++epoll_create1(__unused int flags)
++{
++ return (kqueue());
++}
++
++static inline int
++epoll_ctl(int efd, int op, int fd, struct epoll_event *event)
++{
++ struct kevent ev;
++
++ memset(&ev, 0, sizeof(struct kevent));
++ switch (op) {
++ case EPOLL_CTL_ADD:
++ /* timer events are set inside timerfd_settime() shim */
++ if (fd_is_timerfd(fd))
++ return (0);
++ ev.filter = EVFILT_READ;
++ ev.flags = EV_ADD;
++ ev.udata = event->data.ptr;
++ break;
++ case EPOLL_CTL_DEL:
++ ev.filter = fd_is_timerfd(fd) ? EVFILT_TIMER : EVFILT_READ;
++ ev.flags = EV_DELETE;
++ break;
++ default:
++ return (-1);
++ }
++ ev.ident = fd;
++
++ /*
++ * kevent() returns ENOENT on deletion of already fired timer but
++ * libinput does not check return code currently so no need to
++ * handle this case at least now.
++ */
++ return (kevent(efd, &ev, 1, NULL, 0, NULL));
++}
++
++static inline int
++epoll_wait(int efd, struct epoll_event *events, int maxevents,
++ int timeout)
++{
++ struct timespec ts, *tsp;
++
++ if (timeout < -1) {
++ errno = EINVAL;
++ return (-1);
++ }
++ if (timeout != -1) {
++ /* Convert from milliseconds to timespec. */
++ ts.tv_sec = timeout / 1000;
++ ts.tv_nsec = (timeout % 1000) * 1000000;
++ tsp = &ts;
++ } else {
++ tsp = NULL;
++ }
++
++ return (kevent(efd, NULL, 0, (struct kevent *)events, maxevents, tsp));
++}
Index: x11/libinput/files/patch-shims_sys_timerfd.h
===================================================================
--- x11/libinput/files/patch-shims_sys_timerfd.h
+++ x11/libinput/files/patch-shims_sys_timerfd.h
@@ -0,0 +1,91 @@
+--- shims/sys/timerfd.h.orig 2017-02-04 10:53:33 UTC
++++ shims/sys/timerfd.h
+@@ -0,0 +1,88 @@
++#include <sys/param.h>
++#include <sys/event.h>
++#include <errno.h>
++#include <fcntl.h>
++#include <stdio.h>
++#include <time.h>
++
++#define TFD_CLOEXEC O_CLOEXEC
++#define TFD_NONBLOCK O_NONBLOCK
++#define TFD_TIMER_ABSTIME (1 << 0)
++
++#define timespecclear(tvp) ((tvp)->tv_sec = (tvp)->tv_nsec = 0)
++#define timespecisset(tvp) ((tvp)->tv_sec || (tvp)->tv_nsec)
++#define timespeccmp(tvp, uvp, cmp) \
++ (((tvp)->tv_sec == (uvp)->tv_sec) ? \
++ ((tvp)->tv_nsec cmp (uvp)->tv_nsec) : \
++ ((tvp)->tv_sec cmp (uvp)->tv_sec))
++#define timespecsub(vvp, uvp) \
++ do { \
++ (vvp)->tv_sec -= (uvp)->tv_sec; \
++ (vvp)->tv_nsec -= (uvp)->tv_nsec; \
++ if ((vvp)->tv_nsec < 0) { \
++ (vvp)->tv_sec--; \
++ (vvp)->tv_nsec += 1000000000; \
++ } \
++ } while (0)
++
++/* Minimal kqueue timer period */
++#define EVTIMER_MIN_DATA 0
++
++#ifdef NOTE_USECONDS
++#define EVTIMER_FFLAGS NOTE_USECONDS
++#define tstokq(tvp) ((tvp)->tv_sec*1000000 + ((tvp)->tv_nsec+500)/1000)
++#else
++#define EVTIMER_FFLAGS 0
++#define tstokq(tvp) ((tvp)->tv_sec*1000 + ((tvp)->tv_nsec+500000)/1000000)
++#endif
++
++static inline int
++timerfd_create(clockid_t clock_id, int flags)
++{
++ /* Only CLOCK_MONOTONIC is supported */
++ if (clock_id != CLOCK_MONOTONIC) {
++ printf("timerfd_create: unsupported clock_id\n");
++ errno = EINVAL;
++ return (-1);
++ }
++ /*
++ * Supply read() & close() calls to timerfd with valid file descriptor.
++ * Fill it with zeroes as libinput discards data read from timerfd.
++ */
++ return (open("/dev/zero", O_RDONLY | flags));
++}
++
++/*
++ * timerfd_settime() requires properly initialized variable libinput
++ * of type `struct libinput *` in caller context.
++ */
++#define timerfd_settime(tfd, flags, new_value, old_value) ({ \
++ struct kevent ev_[3]; \
++ struct timespec expire_, now_; \
++ typeof(((struct kevent *)0)->data) data_ = EVTIMER_MIN_DATA; \
++ int nchanges_ = 2; \
++ int ret_; \
++ /* Sanity checks for supported parameters */ \
++ if ((old_value) != NULL) \
++ log_error(libinput, "Returning of timer is not supported\n"); \
++ if (timespecisset(&(new_value)->it_interval)) \
++ log_error(libinput, "Periodic timers are not supported\n"); \
++ /* Drop pending EVFILT_TIMER events if any */ \
++ EV_SET(&ev_[0], (tfd), EVFILT_TIMER, EV_ADD, 0, 0, 0); \
++ EV_SET(&ev_[1], (tfd), EVFILT_TIMER, EV_DELETE, 0, 0, 0); \
++ if (timespecisset(&(new_value)->it_value)) { \
++ timespecclear(&now_); \
++ if ((flags) & TFD_TIMER_ABSTIME) \
++ clock_gettime(CLOCK_MONOTONIC, &now_); \
++ expire_ = (new_value)->it_value; \
++ if (timespeccmp(&expire_, &now_, >)) { \
++ timespecsub(&expire_, &now_); \
++ data_ = MAX(tstokq(&expire_), EVTIMER_MIN_DATA);\
++ } \
++ EV_SET(&ev_[2], (tfd), EVFILT_TIMER, EV_ADD | EV_ONESHOT, \
++ EVTIMER_FFLAGS, data_, libinput->timer.source); \
++ nchanges_++; \
++ } \
++ ret_ = kevent(libinput->epoll_fd, ev_, nchanges_, NULL, 0, NULL); \
++ ret_; \
++})
Index: x11/libinput/files/patch-src_Makefile.am
===================================================================
--- x11/libinput/files/patch-src_Makefile.am
+++ x11/libinput/files/patch-src_Makefile.am
@@ -1,13 +1,5 @@
--- src/Makefile.am.orig 2017-02-11 05:10:33 UTC
+++ src/Makefile.am
-@@ -38,6 +38,7 @@ libinput_la_LIBADD = $(MTDEV_LIBS) \
- $(LIBUDEV_LIBS) \
- $(LIBEVDEV_LIBS) \
- $(LIBWACOM_LIBS) \
-+ -lepoll-shim \
- libinput-util.la
-
- libinput_la_CFLAGS = -I$(top_srcdir)/include \
@@ -61,8 +62,8 @@ libfilter_la_SOURCES = \
filter.c \
filter.h \
Index: x11/libinput/files/patch-src_evdev.c
===================================================================
--- x11/libinput/files/patch-src_evdev.c
+++ x11/libinput/files/patch-src_evdev.c
@@ -1,11 +1,18 @@
--- src/evdev.c.orig 2017-01-19 21:36:55 UTC
+++ src/evdev.c
-@@ -25,6 +25,8 @@
+@@ -1893,6 +1893,15 @@ evdev_device_dispatch(void *data)
- #include "config.h"
-
-+#include <sys/stat.h>
-+
- #include <errno.h>
- #include <stdbool.h>
- #include <stdlib.h>
+ if (rc != -EAGAIN && rc != -EINTR) {
+ libinput_remove_source(libinput, device->source);
++ /*
++ * Dirty hack to allow cuse-based evdev backends to release
++ * character device file when device has been detached
++ * but still have it descriptor opened.
++ * Issuing evdev_device_suspend() here leads to SIGSEGV
++ */
++ int dummy_fd = open("/dev/null", O_RDONLY | O_CLOEXEC);
++ dup2(dummy_fd, device->fd);
++ close(dummy_fd);
+ device->source = NULL;
+ }
+ }
Index: x11/libinput/files/patch-src_libinput-util.h
===================================================================
--- x11/libinput/files/patch-src_libinput-util.h
+++ x11/libinput/files/patch-src_libinput-util.h
@@ -0,0 +1,24 @@
+--- src/libinput-util.h.orig 2017-01-13 00:45:17 UTC
++++ src/libinput-util.h
+@@ -38,6 +38,10 @@
+ #include <string.h>
+ #include <time.h>
+ #include <unistd.h>
++#ifdef __FreeBSD__
++#include <stdlib.h>
++#include <xlocale.h>
++#endif
+
+ #include "libinput.h"
+
+@@ -119,6 +123,10 @@ bool list_empty(const struct list *list)
+
+ #define LIBINPUT_EXPORT __attribute__ ((visibility("default")))
+
++#ifdef __FreeBSD__
++#define program_invocation_short_name getprogname()
++#endif
++
+ static inline void *
+ zalloc(size_t size)
+ {
Index: x11/libinput/files/patch-src_libinput-util.c
===================================================================
--- x11/libinput/files/patch-src_libinput-util.c
+++ x11/libinput/files/patch-src_libinput-util.c
@@ -1,12 +0,0 @@
---- src/libinput-util.c.orig 2017-01-17 04:53:51 UTC
-+++ src/libinput-util.c
-@@ -36,6 +36,9 @@
- #include <stdbool.h>
- #include <stdio.h>
- #include <stdlib.h>
-+#ifdef __FreeBSD__
-+#include <xlocale.h>
-+#endif
-
- #include "libinput-util.h"
- #include "libinput-private.h"
Index: x11/libinput/files/patch-src_libinput.pc.in
===================================================================
--- x11/libinput/files/patch-src_libinput.pc.in
+++ x11/libinput/files/patch-src_libinput.pc.in
@@ -0,0 +1,9 @@
+--- src/libinput.pc.in.orig 2015-01-19 05:00:52 UTC
++++ src/libinput.pc.in
+@@ -10,5 +10,5 @@ Description: Input device library
+ Version: @LIBINPUT_VERSION@
+ Cflags: -I${includedir}
+ Libs: -L${libdir} -linput
+-Libs.private: -lm -lrt
++Libs.private: @LIBS@
+ Requires.private: libudev
Index: x11/libinput/files/patch-src_path-seat.c
===================================================================
--- x11/libinput/files/patch-src_path-seat.c
+++ x11/libinput/files/patch-src_path-seat.c
@@ -1,15 +0,0 @@
---- src/path-seat.c.orig 2017-01-19 05:27:32 UTC
-+++ src/path-seat.c
-@@ -23,10 +23,11 @@
-
- #include "config.h"
-
-+#include <sys/stat.h>
-+
- #include <errno.h>
- #include <fcntl.h>
- #include <string.h>
--#include <sys/stat.h>
- #include <libudev.h>
-
- #include "path-seat.h"
Index: x11/libinput/pkg-plist
===================================================================
--- x11/libinput/pkg-plist
+++ x11/libinput/pkg-plist
@@ -1,14 +1,10 @@
bin/libinput-debug-events
+%%EVENT_GUI%%bin/libinput-event-gui
bin/libinput-list-devices
include/libinput.h
lib/libinput.so
lib/libinput.so.10
lib/libinput.so.10.11.2
-lib/udev/hwdb.d/90-libinput-model-quirks.hwdb
-lib/udev/libinput-device-group
-lib/udev/libinput-model-quirks
-lib/udev/rules.d/80-libinput-device-groups.rules
-lib/udev/rules.d/90-libinput-model-quirks.rules
libdata/pkgconfig/libinput.pc
man/man1/libinput-debug-events.1.gz
man/man1/libinput-list-devices.1.gz
Index: x11/libwacom/Makefile
===================================================================
--- x11/libwacom/Makefile
+++ x11/libwacom/Makefile
@@ -4,7 +4,7 @@
PORTNAME= libwacom
PORTVERSION= 0.23
CATEGORIES= x11
-MASTER_SITES= https://sourceforge.net/projects/linuxwacom/files/libwacom/
+MASTER_SITES= SF/linuxwacom/${PORTNAME}
MAINTAINER= x11@FreeBSD.org
COMMENT= Adds tablet support to libinput
@@ -12,13 +12,19 @@
LICENSE= MIT
LICENSE_FILE= ${WRKSRC}/COPYING
+BUILD_DEPENDS= ${LOCALBASE}/include/linux/input.h:devel/libevdev-headers
LIB_DEPENDS= libgudev-1.0.so:devel/libgudev
-USES= gettext-runtime gmake libtool localbase pkgconfig \
- pathfix tar:bzip2
+USES= gettext-runtime libtool localbase pkgconfig pathfix tar:bzip2
USE_GNOME= glib20
GNU_CONFIGURE= yes
USE_LDCONFIG= yes
INSTALL_TARGET= install-strip
+CONFIGURE_ENV= ac_cv_prog_HAVE_DOXYGEN=""
+
+post-install:
+ ${MKDIR} ${STAGEDIR}${DATADIR}
+ ${INSTALL_DATA} ${WRKSRC}/data/*.tablet ${STAGEDIR}${DATADIR}
+ ${INSTALL_DATA} ${WRKSRC}/data/libwacom.stylus ${STAGEDIR}${DATADIR}
.include <bsd.port.mk>
Index: x11/libwacom/pkg-plist
===================================================================
--- x11/libwacom/pkg-plist
+++ x11/libwacom/pkg-plist
@@ -5,3 +5,120 @@
lib/libwacom.so.2
lib/libwacom.so.2.5.1
libdata/pkgconfig/libwacom.pc
+%%DATADIR%%/bamboo-0fg-s-p.tablet
+%%DATADIR%%/bamboo-16fg-m-pt.tablet
+%%DATADIR%%/bamboo-16fg-s-p.tablet
+%%DATADIR%%/bamboo-16fg-s-pt.tablet
+%%DATADIR%%/bamboo-16fg-s-t.tablet
+%%DATADIR%%/bamboo-2fg-fun-m-pt.tablet
+%%DATADIR%%/bamboo-2fg-fun-s-pt.tablet
+%%DATADIR%%/bamboo-2fg-m-p.tablet
+%%DATADIR%%/bamboo-2fg-s-p.tablet
+%%DATADIR%%/bamboo-2fg-s-pt.tablet
+%%DATADIR%%/bamboo-2fg-s-t.tablet
+%%DATADIR%%/bamboo-4fg-fun-m.tablet
+%%DATADIR%%/bamboo-4fg-fun-s.tablet
+%%DATADIR%%/bamboo-4fg-s-pt.tablet
+%%DATADIR%%/bamboo-4fg-s-t.tablet
+%%DATADIR%%/bamboo-4fg-se-m-pt.tablet
+%%DATADIR%%/bamboo-4fg-se-s-pt.tablet
+%%DATADIR%%/bamboo-one.tablet
+%%DATADIR%%/cintiq-12wx.tablet
+%%DATADIR%%/cintiq-13hd.tablet
+%%DATADIR%%/cintiq-13hdt.tablet
+%%DATADIR%%/cintiq-20wsx.tablet
+%%DATADIR%%/cintiq-21ux.tablet
+%%DATADIR%%/cintiq-21ux2.tablet
+%%DATADIR%%/cintiq-22hd.tablet
+%%DATADIR%%/cintiq-22hdt.tablet
+%%DATADIR%%/cintiq-24hd-touch.tablet
+%%DATADIR%%/cintiq-24hd.tablet
+%%DATADIR%%/cintiq-27hd.tablet
+%%DATADIR%%/cintiq-27hdt.tablet
+%%DATADIR%%/cintiq-companion-2.tablet
+%%DATADIR%%/cintiq-companion-hybrid.tablet
+%%DATADIR%%/cintiq-companion.tablet
+%%DATADIR%%/dtf-720.tablet
+%%DATADIR%%/dth-2242.tablet
+%%DATADIR%%/dti-520.tablet
+%%DATADIR%%/dtk-1651.tablet
+%%DATADIR%%/dtk-2241.tablet
+%%DATADIR%%/dtu-1031.tablet
+%%DATADIR%%/dtu-1031x.tablet
+%%DATADIR%%/dtu-1141.tablet
+%%DATADIR%%/dtu-1631.tablet
+%%DATADIR%%/dtu-1931.tablet
+%%DATADIR%%/dtu-2231.tablet
+%%DATADIR%%/ek-remote.tablet
+%%DATADIR%%/generic.tablet
+%%DATADIR%%/graphire-wireless-8x6.tablet
+%%DATADIR%%/graphire3-4x5.tablet
+%%DATADIR%%/graphire3-6x8.tablet
+%%DATADIR%%/graphire4-4x5.tablet
+%%DATADIR%%/huion-h610-pro.tablet
+%%DATADIR%%/intuos-12x12.tablet
+%%DATADIR%%/intuos-12x18.tablet
+%%DATADIR%%/intuos-4x5.tablet
+%%DATADIR%%/intuos-6x8.tablet
+%%DATADIR%%/intuos-9x12.tablet
+%%DATADIR%%/intuos-m-p.tablet
+%%DATADIR%%/intuos-m-p2.tablet
+%%DATADIR%%/intuos-m-pt.tablet
+%%DATADIR%%/intuos-m-pt2.tablet
+%%DATADIR%%/intuos-pro-l.tablet
+%%DATADIR%%/intuos-pro-m.tablet
+%%DATADIR%%/intuos-pro-s.tablet
+%%DATADIR%%/intuos-s-p.tablet
+%%DATADIR%%/intuos-s-p2.tablet
+%%DATADIR%%/intuos-s-pt.tablet
+%%DATADIR%%/intuos-s-pt2.tablet
+%%DATADIR%%/intuos2-12x12.tablet
+%%DATADIR%%/intuos2-12x18.tablet
+%%DATADIR%%/intuos2-4x5.tablet
+%%DATADIR%%/intuos2-6x8.tablet
+%%DATADIR%%/intuos2-9x12.tablet
+%%DATADIR%%/intuos3-12x12.tablet
+%%DATADIR%%/intuos3-12x19.tablet
+%%DATADIR%%/intuos3-4x5.tablet
+%%DATADIR%%/intuos3-4x6.tablet
+%%DATADIR%%/intuos3-6x11.tablet
+%%DATADIR%%/intuos3-6x8.tablet
+%%DATADIR%%/intuos3-9x12.tablet
+%%DATADIR%%/intuos4-12x19.tablet
+%%DATADIR%%/intuos4-4x6.tablet
+%%DATADIR%%/intuos4-6x9-wl.tablet
+%%DATADIR%%/intuos4-6x9.tablet
+%%DATADIR%%/intuos4-8x13.tablet
+%%DATADIR%%/intuos5-m.tablet
+%%DATADIR%%/intuos5-s.tablet
+%%DATADIR%%/intuos5-touch-l.tablet
+%%DATADIR%%/intuos5-touch-m.tablet
+%%DATADIR%%/intuos5-touch-s.tablet
+%%DATADIR%%/isdv4-100.tablet
+%%DATADIR%%/isdv4-101.tablet
+%%DATADIR%%/isdv4-10d.tablet
+%%DATADIR%%/isdv4-10f.tablet
+%%DATADIR%%/isdv4-114.tablet
+%%DATADIR%%/isdv4-116.tablet
+%%DATADIR%%/isdv4-12c.tablet
+%%DATADIR%%/isdv4-4004.tablet
+%%DATADIR%%/isdv4-4800.tablet
+%%DATADIR%%/isdv4-5000.tablet
+%%DATADIR%%/isdv4-5002.tablet
+%%DATADIR%%/isdv4-5040.tablet
+%%DATADIR%%/isdv4-504a.tablet
+%%DATADIR%%/isdv4-90.tablet
+%%DATADIR%%/isdv4-93.tablet
+%%DATADIR%%/isdv4-e3.tablet
+%%DATADIR%%/isdv4-e5.tablet
+%%DATADIR%%/isdv4-e6.tablet
+%%DATADIR%%/isdv4-ec.tablet
+%%DATADIR%%/isdv4-ed.tablet
+%%DATADIR%%/isdv4-ef.tablet
+%%DATADIR%%/libwacom.stylus
+%%DATADIR%%/mobilestudio-pro-13.tablet
+%%DATADIR%%/mobilestudio-pro-16.tablet
+%%DATADIR%%/n-trig-pen.tablet
+%%DATADIR%%/one-by-wacom-m-p.tablet
+%%DATADIR%%/one-by-wacom-s-p.tablet
+%%DATADIR%%/serial-wacf004.tablet
Index: x11/xorg-minimal/Makefile
===================================================================
--- x11/xorg-minimal/Makefile
+++ x11/xorg-minimal/Makefile
@@ -17,6 +17,7 @@
RUN_DEPENDS+= ${LOCALBASE}/bin/Xorg:x11-servers/xorg-server \
${LOCALBASE}/lib/xorg/modules/input/mouse_drv.so:x11-drivers/xf86-input-mouse \
${LOCALBASE}/lib/xorg/modules/input/kbd_drv.so:x11-drivers/xf86-input-keyboard \
+ ${LOCALBASE}/lib/xorg/modules/input/evdev_drv.so:x11-drivers/xf86-input-evdev \
${LOCALBASE}/bin/xinit:x11/xinit \
${LOCALBASE}/bin/xauth:x11/xauth
.if ${VIDEO_DRIVER} == "nvidia"

File Metadata

Mime Type
text/plain
Expires
Sun, Feb 8, 7:47 PM (10 h, 6 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
28491113
Default Alt Text
D7588.id25394.diff (75 KB)

Event Timeline