aboutsummaryrefslogtreecommitdiff
path: root/x11-drivers
diff options
context:
space:
mode:
authorJan Beich <jbeich@FreeBSD.org>2016-02-07 16:26:36 +0000
committerJan Beich <jbeich@FreeBSD.org>2016-02-07 16:26:36 +0000
commit36a5de4d65dce32054bc8ae36616471b0dc73181 (patch)
treedf2d145d4a4e09e5f44d1863b225acf1dffeb0b0 /x11-drivers
parentb5970b0154ba5266986c821b0011450e696cf17a (diff)
downloadports-36a5de4d65dce32054bc8ae36616471b0dc73181.tar.gz
ports-36a5de4d65dce32054bc8ae36616471b0dc73181.zip
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
Notes
Notes: svn path=/head/; revision=408423
Diffstat (limited to 'x11-drivers')
-rw-r--r--x11-drivers/xf86-input-wacom/Makefile5
-rw-r--r--x11-drivers/xf86-input-wacom/files/patch-src-wcmUSB.c12
-rw-r--r--x11-drivers/xf86-input-wacom/files/patch-src-wcmValidateDevice.c55
-rw-r--r--x11-drivers/xf86-input-wacom/files/patch-src-xf86Wacom.c20
-rw-r--r--x11-drivers/xf86-input-wacom/files/pkg-message.in12
-rw-r--r--x11-drivers/xf86-input-wacom/files/wacom.conf.sample2
-rw-r--r--x11-drivers/xf86-input-wacom/pkg-plist1
7 files changed, 92 insertions, 15 deletions
diff --git a/x11-drivers/xf86-input-wacom/Makefile b/x11-drivers/xf86-input-wacom/Makefile
index 68d97df7cc32..a8d62d8159a8 100644
--- a/x11-drivers/xf86-input-wacom/Makefile
+++ b/x11-drivers/xf86-input-wacom/Makefile
@@ -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 \
diff --git a/x11-drivers/xf86-input-wacom/files/patch-src-wcmUSB.c b/x11-drivers/xf86-input-wacom/files/patch-src-wcmUSB.c
index 562764977260..cc0ec54e2877 100644
--- a/x11-drivers/xf86-input-wacom/files/patch-src-wcmUSB.c
+++ b/x11-drivers/xf86-input-wacom/files/patch-src-wcmUSB.c
@@ -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" },
diff --git a/x11-drivers/xf86-input-wacom/files/patch-src-wcmValidateDevice.c b/x11-drivers/xf86-input-wacom/files/patch-src-wcmValidateDevice.c
new file mode 100644
index 000000000000..71a40cffabae
--- /dev/null
+++ b/x11-drivers/xf86-input-wacom/files/patch-src-wcmValidateDevice.c
@@ -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
diff --git a/x11-drivers/xf86-input-wacom/files/patch-src-xf86Wacom.c b/x11-drivers/xf86-input-wacom/files/patch-src-xf86Wacom.c
new file mode 100644
index 000000000000..77db151e5ed9
--- /dev/null
+++ b/x11-drivers/xf86-input-wacom/files/patch-src-xf86Wacom.c
@@ -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)
diff --git a/x11-drivers/xf86-input-wacom/files/pkg-message.in b/x11-drivers/xf86-input-wacom/files/pkg-message.in
index c0505094ffa8..c5fd4113706c 100644
--- a/x11-drivers/xf86-input-wacom/files/pkg-message.in
+++ b/x11-drivers/xf86-input-wacom/files/pkg-message.in
@@ -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.
diff --git a/x11-drivers/xf86-input-wacom/files/wacom.conf.sample b/x11-drivers/xf86-input-wacom/files/wacom.conf.sample
index fa247118d492..36f2512d3868 100644
--- a/x11-drivers/xf86-input-wacom/files/wacom.conf.sample
+++ b/x11-drivers/xf86-input-wacom/files/wacom.conf.sample
@@ -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"
diff --git a/x11-drivers/xf86-input-wacom/pkg-plist b/x11-drivers/xf86-input-wacom/pkg-plist
index d906dcc5e464..ea9796789b08 100644
--- a/x11-drivers/xf86-input-wacom/pkg-plist
+++ b/x11-drivers/xf86-input-wacom/pkg-plist
@@ -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