From owner-svn-ports-all@freebsd.org Wed Sep 16 10:28:46 2015 Return-Path: Delivered-To: svn-ports-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4263C9CEDC7; Wed, 16 Sep 2015 10:28:46 +0000 (UTC) (envelope-from jbeich@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 324D11AE6; Wed, 16 Sep 2015 10:28:46 +0000 (UTC) (envelope-from jbeich@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8GASk6i027168; Wed, 16 Sep 2015 10:28:46 GMT (envelope-from jbeich@FreeBSD.org) Received: (from jbeich@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8GASi7M027161; Wed, 16 Sep 2015 10:28:44 GMT (envelope-from jbeich@FreeBSD.org) Message-Id: <201509161028.t8GASi7M027161@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jbeich set sender to jbeich@FreeBSD.org using -f From: Jan Beich Date: Wed, 16 Sep 2015 10:28:44 +0000 (UTC) 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 X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Sep 2015 10:28:46 -0000 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 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 + #include + ++#ifdef __linux__ + #include ++#endif + #include ++#ifdef HAVE_LIBUDEV + #include ++#endif + #include + #include + #include +@@ -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 +-#include ++#include ++ ++/* XXX Copied from for linux */ ++/* Tolerate prior #include */ ++#undef BUS_NONE ++#undef BUS_PCI ++#undef BUS_SBUS ++#undef BUS_PLATFORM ++#undef BUS_last + + #include + #include 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