diff options
author | jbeich <jbeich@FreeBSD.org> | 2015-09-16 18:28:43 +0800 |
---|---|---|
committer | jbeich <jbeich@FreeBSD.org> | 2015-09-16 18:28:43 +0800 |
commit | 171a2a8e5a594b820feb6919aa124215b44e9e8d (patch) | |
tree | 430da115e128c77f0d1d02442491ffc682b77099 /x11-drivers | |
parent | 62209de0cda8ab3cb9406750c61fd1c59700cc7d (diff) | |
download | freebsd-ports-gnome-171a2a8e5a594b820feb6919aa124215b44e9e8d.tar.gz freebsd-ports-gnome-171a2a8e5a594b820feb6919aa124215b44e9e8d.tar.zst freebsd-ports-gnome-171a2a8e5a594b820feb6919aa124215b44e9e8d.zip |
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.
Diffstat (limited to 'x11-drivers')
-rw-r--r-- | x11-drivers/Makefile | 1 | ||||
-rw-r--r-- | x11-drivers/xf86-input-evdev/Makefile | 33 | ||||
-rw-r--r-- | x11-drivers/xf86-input-evdev/distinfo | 2 | ||||
-rw-r--r-- | x11-drivers/xf86-input-evdev/files/patch-src_evdev.c | 66 | ||||
-rw-r--r-- | x11-drivers/xf86-input-evdev/files/patch-src_evdev.h | 19 | ||||
-rw-r--r-- | x11-drivers/xf86-input-evdev/pkg-descr | 5 | ||||
-rw-r--r-- | x11-drivers/xf86-input-evdev/pkg-plist | 4 |
7 files changed, 130 insertions, 0 deletions
diff --git a/x11-drivers/Makefile b/x11-drivers/Makefile index 05deb8690bff..201473476dab 100644 --- a/x11-drivers/Makefile +++ b/x11-drivers/Makefile @@ -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 diff --git a/x11-drivers/xf86-input-evdev/Makefile b/x11-drivers/xf86-input-evdev/Makefile new file mode 100644 index 000000000000..44e7f0fab2b7 --- /dev/null +++ b/x11-drivers/xf86-input-evdev/Makefile @@ -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> diff --git a/x11-drivers/xf86-input-evdev/distinfo b/x11-drivers/xf86-input-evdev/distinfo new file mode 100644 index 000000000000..ffc30461e505 --- /dev/null +++ b/x11-drivers/xf86-input-evdev/distinfo @@ -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 diff --git a/x11-drivers/xf86-input-evdev/files/patch-src_evdev.c b/x11-drivers/xf86-input-evdev/files/patch-src_evdev.c new file mode 100644 index 000000000000..7c1ae96fe48a --- /dev/null +++ b/x11-drivers/xf86-input-evdev/files/patch-src_evdev.c @@ -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], diff --git a/x11-drivers/xf86-input-evdev/files/patch-src_evdev.h b/x11-drivers/xf86-input-evdev/files/patch-src_evdev.h new file mode 100644 index 000000000000..2b27b9a2b48d --- /dev/null +++ b/x11-drivers/xf86-input-evdev/files/patch-src_evdev.h @@ -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> diff --git a/x11-drivers/xf86-input-evdev/pkg-descr b/x11-drivers/xf86-input-evdev/pkg-descr new file mode 100644 index 000000000000..1a91422aef07 --- /dev/null +++ b/x11-drivers/xf86-input-evdev/pkg-descr @@ -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 diff --git a/x11-drivers/xf86-input-evdev/pkg-plist b/x11-drivers/xf86-input-evdev/pkg-plist new file mode 100644 index 000000000000..d1ee13f203a2 --- /dev/null +++ b/x11-drivers/xf86-input-evdev/pkg-plist @@ -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 |