Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 7 Feb 2016 16:26:36 +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: r408423 - in head/x11-drivers/xf86-input-wacom: . files
Message-ID:  <201602071626.u17GQawP028097@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jbeich
Date: Sun Feb  7 16:26:36 2016
New Revision: 408423
URL: https://svnweb.freebsd.org/changeset/ports/408423

Log:
  x11-drivers/xf86-input-wacom: new device and hotplug support
  
  - Add device IDs for the following tablets:
      Intuos Draw small
      Intuos Art/Photo/Comic small
      Intuos Draw medium
      Intuos Art medium
  - Add and enable devd(8) hotplug support
  - Work around devd failing to remove stale device files opened by Xserver
  - Drop Xserver 1.7 tip from pkg-message after r374982
  
  PR:		206086
  Submitted by:	rozhuk.im@gmail.com

Added:
  head/x11-drivers/xf86-input-wacom/files/patch-src-wcmValidateDevice.c   (contents, props changed)
  head/x11-drivers/xf86-input-wacom/files/patch-src-xf86Wacom.c   (contents, props changed)
Modified:
  head/x11-drivers/xf86-input-wacom/Makefile   (contents, props changed)
  head/x11-drivers/xf86-input-wacom/files/patch-src-wcmUSB.c   (contents, props changed)
  head/x11-drivers/xf86-input-wacom/files/pkg-message.in   (contents, props changed)
  head/x11-drivers/xf86-input-wacom/files/wacom.conf.sample   (contents, props changed)
  head/x11-drivers/xf86-input-wacom/pkg-plist   (contents, props changed)

Modified: head/x11-drivers/xf86-input-wacom/Makefile
==============================================================================
--- head/x11-drivers/xf86-input-wacom/Makefile	Sun Feb  7 16:26:01 2016	(r408422)
+++ head/x11-drivers/xf86-input-wacom/Makefile	Sun Feb  7 16:26:36 2016	(r408423)
@@ -2,6 +2,7 @@
 
 PORTNAME=	xf86-input-wacom
 PORTVERSION=	0.32.0
+PORTREVISION=	1
 CATEGORIES=	x11-drivers
 MASTER_SITES=	SF/linuxwacom/${PORTNAME}
 
@@ -37,10 +38,6 @@ post-patch:
 			--define-variable prefix="$$prefix"/' \
 		${WRKSRC}/configure
 
-# XXX adjust MatchProduct to whatever Xorg/devd reports
-	@${REINPLACE_CMD} -e '/^SUBDIRS/s/ conf//' \
-		${WRKSRC}/Makefile.in
-
 post-install:
 	${MKDIR} ${STAGEDIR}${PREFIX}/etc/X11/xorg.conf.d
 	${INSTALL_DATA} ${FILESDIR}/wacom.conf.sample \

Modified: head/x11-drivers/xf86-input-wacom/files/patch-src-wcmUSB.c
==============================================================================
--- head/x11-drivers/xf86-input-wacom/files/patch-src-wcmUSB.c	Sun Feb  7 16:26:01 2016	(r408422)
+++ head/x11-drivers/xf86-input-wacom/files/patch-src-wcmUSB.c	Sun Feb  7 16:26:36 2016	(r408423)
@@ -18,3 +18,15 @@
  
  #define MAX_USB_EVENTS 32
  
+@@ -276,6 +283,11 @@ static struct WacomModelDesc
+ 	{ WACOM_VENDOR_ID, 0x315,200000, 200000, &usbIntuosPro,  "Intuos Pro M"		},
+ 	{ WACOM_VENDOR_ID, 0x317,200000, 200000, &usbIntuosPro,  "Intuos Pro L"		},
+ 
++	{ WACOM_VENDOR_ID, 0x33B,200000, 200000, &usbIntuos5,    "Intuos Draw small"	},
++	{ WACOM_VENDOR_ID, 0x33C,200000, 200000, &usbIntuos5,    "Intuos Art/Photo/Comic small"},
++	{ WACOM_VENDOR_ID, 0x33D,200000, 200000, &usbIntuos5,    "Intuos Draw medium"	},
++	{ WACOM_VENDOR_ID, 0x33E,200000, 200000, &usbIntuos5,    "Intuos Art medium"	},
++
+ 	{ WACOM_VENDOR_ID, 0x3F, 200000, 200000, &usbCintiqV5,   "Cintiq 21UX"		},
+ 	{ WACOM_VENDOR_ID, 0xC5, 200000, 200000, &usbCintiqV5,   "Cintiq 20WSX"		},
+ 	{ WACOM_VENDOR_ID, 0xC6, 200000, 200000, &usbCintiqV5,   "Cintiq 12WX"		},

Added: head/x11-drivers/xf86-input-wacom/files/patch-src-wcmValidateDevice.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/x11-drivers/xf86-input-wacom/files/patch-src-wcmValidateDevice.c	Sun Feb  7 16:26:36 2016	(r408423)
@@ -0,0 +1,55 @@
+--- src/wcmValidateDevice.c.orig	2015-10-23 17:26:33 UTC
++++ src/wcmValidateDevice.c
+@@ -34,6 +34,7 @@ static Bool wcmCheckSource(InputInfoPtr 
+ {
+ 	int match = 0;
+ 	InputInfoPtr pDevices = xf86FirstLocalDevice();
++	char* fsource = xf86CheckStrOption(pInfo->options, "_source", "");
+ 
+ 	for (; !match && pDevices != NULL; pDevices = pDevices->next)
+ 	{
+@@ -51,7 +52,6 @@ static Bool wcmCheckSource(InputInfoPtr 
+ 		if (pInfo != pDevices)
+ 		{
+ 			WacomCommonPtr pCommon = ((WacomDevicePtr)pDevices->private)->common;
+-			char* fsource = xf86CheckStrOption(pInfo->options, "_source", "");
+ 			char* psource = xf86CheckStrOption(pDevices->options, "_source", "");
+ 
+ 			if (pCommon->min_maj &&
+@@ -62,10 +62,11 @@ static Bool wcmCheckSource(InputInfoPtr 
+ 				if (strcmp(fsource, psource))
+ 					match = 1;
+ 			}
+-			free(fsource);
+ 			free(psource);
+ 		}
+ 	}
++	free(fsource);
++
+ 	if (match)
+ 		xf86Msg(X_WARNING, "%s: device file already in use by %s. "
+ 			"Ignoring.\n", pInfo->name, pDevices->name);
+@@ -205,6 +206,10 @@ int wcmDeviceTypeKeys(InputInfoPtr pInfo
+ 		case 0x314: /* Intuos Pro S */
+ 		case 0x315: /* Intuos Pro M */
+ 		case 0x317: /* Intuos Pro L */
++		case 0x33B: /* Intuos Draw small */
++		case 0x33C: /* Intuos Art/Photo/Comic small */
++		case 0x33D: /* Intuos Draw medium */
++		case 0x33E: /* Intuos Art medium */
+ 		case 0x26:  /* I5 */
+ 		case 0x27:  /* I5 */
+ 		case 0x28:  /* I5 */
+@@ -623,8 +628,10 @@ int wcmNeedAutoHotplug(InputInfoPtr pInf
+ 
+ 	if (!source) /* xorg.conf device, don't auto-pick type */
+ 		goto out;
+-
+-	if (source && strcmp(source, "server/hal") && strcmp(source, "server/udev"))
++	if (strcmp(source, "server/hal") &&
++	    strcmp(source, "server/udev") &&
++	    strcmp(source, "server/devd") &&
++	    strcmp(source, "server/wscons"))
+ 		goto out;
+ 
+ 	/* no type specified, so we need to pick the first one applicable

Added: head/x11-drivers/xf86-input-wacom/files/patch-src-xf86Wacom.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/x11-drivers/xf86-input-wacom/files/patch-src-xf86Wacom.c	Sun Feb  7 16:26:36 2016	(r408423)
@@ -0,0 +1,20 @@
+--- src/xf86Wacom.c.orig	2015-10-23 17:26:33 UTC
++++ src/xf86Wacom.c
+@@ -667,6 +667,17 @@ void wcmReadPacket(InputInfoPtr pInfo)
+ 
+ 	if (len <= 0)
+ 	{
++		/* BSD specific code. */
++		/* Hotplug code does not send remove dev notify because
++		 * opened cuse dev cant be removed. */
++		if (priv->isParent && errno == EINVAL) {
++			WacomDevicePtr other;
++			for (other = common->wcmDevices; other; other = other->next) {
++				xf86Msg(X_INFO, "%s: removing automatically added device.\n",
++					other->pInfo->name);
++				DeleteInputDeviceRequest(other->pInfo->dev);
++			}
++		} else
+ 		/* for all other errors, hope that the hotplugging code will
+ 		 * remove the device */
+ 		if (errno != EAGAIN && errno != EINTR)

Modified: head/x11-drivers/xf86-input-wacom/files/pkg-message.in
==============================================================================
--- head/x11-drivers/xf86-input-wacom/files/pkg-message.in	Sun Feb  7 16:26:01 2016	(r408422)
+++ head/x11-drivers/xf86-input-wacom/files/pkg-message.in	Sun Feb  7 16:26:36 2016	(r408423)
@@ -1,17 +1,9 @@
-To configure the driver with HAL just reattach the tablet for Xserver
-to pick it up. Otherwise, use/edit the sample configuration file:
+wacom(4x) is configured automatically via devd or HAL. However, if you
+prefer to do so manually copy and edit the sample:
 
   $ cd %%PREFIX%%/etc/X11/xorg.conf.d/
   $ cp wacom.conf.sample wacom.conf
 
-On xorg-server-1.7 and earlier you may need to also merge wacom.conf
-into xorg.conf and add the following lines to ServerLayout section
-
-	InputDevice	"wacom stylus"
-	InputDevice	"wacom eraser"
-	InputDevice	"wacom touch"
-	InputDevice	"wacom pad"
-
 moused(8) may interfere with tablet input by attaching to fake /dev/ums*.
 To prevent that add a usb_quirk(4) then detach and attach the tablet.
 %%PREFIX%%/etc/rc.d/wacom is an example how preserve quirks across reboot.

Modified: head/x11-drivers/xf86-input-wacom/files/wacom.conf.sample
==============================================================================
--- head/x11-drivers/xf86-input-wacom/files/wacom.conf.sample	Sun Feb  7 16:26:01 2016	(r408422)
+++ head/x11-drivers/xf86-input-wacom/files/wacom.conf.sample	Sun Feb  7 16:26:36 2016	(r408423)
@@ -1,4 +1,4 @@
-# A static configuration example for Bamboo P&T for use without HAL.
+# Manual configuration example for Bamboo Pen & Touch for use without devd or HAL.
 
 Section "InputDevice"
 	Identifier	"wacom stylus"

Modified: head/x11-drivers/xf86-input-wacom/pkg-plist
==============================================================================
--- head/x11-drivers/xf86-input-wacom/pkg-plist	Sun Feb  7 16:26:01 2016	(r408422)
+++ head/x11-drivers/xf86-input-wacom/pkg-plist	Sun Feb  7 16:26:36 2016	(r408423)
@@ -11,3 +11,4 @@ lib/xorg/modules/input/wacom_drv.so
 libdata/pkgconfig/xorg-wacom.pc
 man/man1/xsetwacom.1.gz
 man/man4/wacom.4x.gz
+share/X11/xorg.conf.d/50-wacom.conf



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201602071626.u17GQawP028097>