Date: Wed, 16 Sep 2015 10:28:44 +0000 (UTC) From: Jan Beich <jbeich@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r397050 - in head/x11-drivers: . xf86-input-evdev xf86-input-evdev/files Message-ID: <201509161028.t8GASi7M027161@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: jbeich Date: Wed Sep 16 10:28:43 2015 New Revision: 397050 URL: https://svnweb.freebsd.org/changeset/ports/397050 Log: x11-drivers/xf86-input-evdev: add new port PR: 196978 Submitted by: hselasky This package contains the X.Org xf86-input-evdev driver. It supports all input devices that webcamd knows about, including tablets, touchscreens, joysticks and HIDs. Added: head/x11-drivers/xf86-input-evdev/ head/x11-drivers/xf86-input-evdev/Makefile (contents, props changed) head/x11-drivers/xf86-input-evdev/distinfo (contents, props changed) head/x11-drivers/xf86-input-evdev/files/ head/x11-drivers/xf86-input-evdev/files/patch-src_evdev.c (contents, props changed) head/x11-drivers/xf86-input-evdev/files/patch-src_evdev.h (contents, props changed) head/x11-drivers/xf86-input-evdev/pkg-descr (contents, props changed) head/x11-drivers/xf86-input-evdev/pkg-plist (contents, props changed) Modified: head/x11-drivers/Makefile (contents, props changed) Modified: head/x11-drivers/Makefile ============================================================================== --- head/x11-drivers/Makefile Wed Sep 16 10:28:14 2015 (r397049) +++ head/x11-drivers/Makefile Wed Sep 16 10:28:43 2015 (r397050) @@ -7,6 +7,7 @@ SUBDIR += xf86-input-acecad SUBDIR += xf86-input-egalax SUBDIR += xf86-input-elographics + SUBDIR += xf86-input-evdev SUBDIR += xf86-input-fpit SUBDIR += xf86-input-hyperpen SUBDIR += xf86-input-joystick Added: head/x11-drivers/xf86-input-evdev/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/x11-drivers/xf86-input-evdev/Makefile Wed Sep 16 10:28:43 2015 (r397050) @@ -0,0 +1,33 @@ +# $FreeBSD$ + +PORTNAME= xf86-input-evdev +PORTVERSION= 2.9.2 +CATEGORIES= x11-drivers + +MAINTAINER= x11@FreeBSD.org +COMMENT= X.Org event device input driver + +LICENSE= MIT # various styles +LICENSE_FILE= ${WRKSRC}/COPYING + +BUILD_DEPENDS= v4l_compat>=1.0.20110603:${PORTSDIR}/multimedia/v4l_compat +LIB_DEPENDS= libevdev.so:${PORTSDIR}/devel/libevdev +RUN_DEPENDS= webcamd>=3.1.0.1:${PORTSDIR}/multimedia/webcamd + +XORG_CAT= driver +USES= pathfix +CONFIGURE_ENV= UDEV_CFLAGS=" " UDEV_LIBS=" " +INSTALL_TARGET= install-strip + +OPTIONS_DEFINE= MULTITOUCH + +MULTITOUCH_DESC= XInput 2.2 multitouch support +MULTITOUCH_LIB_DEPENDS= libmtdev.so:${PORTSDIR}/devel/libmtdev + +post-patch-MULTITOUCH-off: +# XXX Convert to CONFIGURE_ENV + @${REINPLACE_CMD} -i '.mtdev.bak' \ + -e '/PKG_CONFIG/s/mtdev/nonexistent/' \ + ${WRKSRC}/configure + +.include <bsd.port.mk> Added: head/x11-drivers/xf86-input-evdev/distinfo ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/x11-drivers/xf86-input-evdev/distinfo Wed Sep 16 10:28:43 2015 (r397050) @@ -0,0 +1,2 @@ +SHA256 (xorg/driver/xf86-input-evdev-2.9.2.tar.bz2) = 792329b531afc6928ccda94e4b51a5520d4ddf8ef9a00890a5d0d31898acefec +SIZE (xorg/driver/xf86-input-evdev-2.9.2.tar.bz2) = 387095 Added: head/x11-drivers/xf86-input-evdev/files/patch-src_evdev.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/x11-drivers/xf86-input-evdev/files/patch-src_evdev.c Wed Sep 16 10:28:43 2015 (r397050) @@ -0,0 +1,66 @@ +--- src/evdev.c.orig 2015-03-27 01:35:50 UTC ++++ src/evdev.c +@@ -37,9 +37,13 @@ + #include <X11/keysym.h> + #include <X11/extensions/XI.h> + ++#ifdef __linux__ + #include <linux/version.h> ++#endif + #include <sys/stat.h> ++#ifdef HAVE_LIBUDEV + #include <libudev.h> ++#endif + #include <unistd.h> + #include <errno.h> + #include <fcntl.h> +@@ -222,6 +226,7 @@ EvdevIsDuplicate(InputInfoPtr pInfo) + static BOOL + EvdevDeviceIsVirtual(const char* devicenode) + { ++#ifdef HAVE_LIBUDEV + struct udev *udev = NULL; + struct udev_device *device = NULL; + struct stat st; +@@ -252,6 +257,9 @@ out: + udev_device_unref(device); + udev_unref(udev); + return rc; ++#else ++ return FALSE; ++#endif + } + + #ifndef HAVE_SMOOTH_SCROLLING +@@ -1086,11 +1094,13 @@ EvdevReadInput(InputInfoPtr pInfo) + do { + rc = libevdev_next_event(pEvdev->dev, LIBEVDEV_READ_FLAG_NORMAL, &ev); + if (rc < 0) { +- if (rc == -ENODEV) /* May happen after resume */ ++ if (rc != -EAGAIN && rc != -EINTR && rc != -EWOULDBLOCK) { ++ /* May happen after resume or at device detach */ + xf86RemoveEnabledDevice(pInfo); +- else if (rc != -EAGAIN) ++ EvdevCloseDevice(pInfo); + LogMessageVerbSigSafe(X_ERROR, 0, "%s: Read error: %s\n", pInfo->name, + strerror(-rc)); ++ } + break; + } else if (rc == LIBEVDEV_READ_STATUS_SUCCESS) { + #ifdef MULTITOUCH +@@ -1470,10 +1480,15 @@ EvdevAddAbsValuatorClass(DeviceIntPtr de + continue; + + abs = libevdev_get_abs_info(pEvdev->dev, axis); ++#ifdef __linux__ + #if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 30) + /* Kernel provides units/mm, X wants units/m */ + resolution = abs->resolution * 1000; + #endif ++#else ++ /* Kernel provides units/mm, X wants units/m */ ++ resolution = abs->resolution * 1000; ++#endif + + xf86InitValuatorAxisStruct(device, axnum, + atoms[axnum], Added: head/x11-drivers/xf86-input-evdev/files/patch-src_evdev.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/x11-drivers/xf86-input-evdev/files/patch-src_evdev.h Wed Sep 16 10:28:43 2015 (r397050) @@ -0,0 +1,19 @@ +--- src/evdev.h.orig 2015-03-27 01:35:50 UTC ++++ src/evdev.h +@@ -36,7 +36,15 @@ + #define EVDEV_H + + #include <linux/input.h> +-#include <linux/types.h> ++#include <sys/types.h> ++ ++/* XXX Copied from <xf86str.h> for linux */ ++/* Tolerate prior #include <linux/input.h> */ ++#undef BUS_NONE ++#undef BUS_PCI ++#undef BUS_SBUS ++#undef BUS_PLATFORM ++#undef BUS_last + + #include <xorg-server.h> + #include <xf86Xinput.h> Added: head/x11-drivers/xf86-input-evdev/pkg-descr ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/x11-drivers/xf86-input-evdev/pkg-descr Wed Sep 16 10:28:43 2015 (r397050) @@ -0,0 +1,5 @@ +This package contains the X.Org xf86-input-evdev driver. It supports +all input devices that webcamd knows about, including tablets, +touchscreens, joysticks and HIDs. + +WWW: http://www.x.org Added: head/x11-drivers/xf86-input-evdev/pkg-plist ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/x11-drivers/xf86-input-evdev/pkg-plist Wed Sep 16 10:28:43 2015 (r397050) @@ -0,0 +1,4 @@ +include/xorg/evdev-properties.h +lib/xorg/modules/input/evdev_drv.so +libdata/pkgconfig/xorg-evdev.pc +man/man4/evdev.4x.gz
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201509161028.t8GASi7M027161>