ports/165464: input-wacom is broken [patch]

Peter Kosyh gl00my at mail.ru
Sat Feb 25 09:10:15 UTC 2012


>Number:         165464
>Category:       ports
>Synopsis:       input-wacom is broken [patch]
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sat Feb 25 09:10:13 UTC 2012
>Closed-Date:
>Last-Modified:
>Originator:     Peter Kosyh
>Release:        9.0
>Organization:
>Environment:
FreeBSD royal-bsd 9.0-RELEASE FreeBSD 9.0-RELEASE #0: Thu Feb 23 09:38:20 MSK 2012     root at royal-bsd:/usr/obj/usr/src/sys/HACKED  amd64

>Description:
x11-drivers/input-wacom is broken
>How-To-Repeat:
Try make install in /usr/ports/x11-drivers/input-wacom
>Fix:
Here is solution, that works for me
http://people.freebsd.org/~nox/tmp/inputwacom.patch

After patching port i got graphire wacom working.
Here is description, that helped me: http://lists.freebsd.org/pipermail/freebsd-usb/2011-October/010681.html

Patch attached with submission follows:

Index: Makefile
===================================================================
RCS file: /home/pcvs/ports/x11-drivers/input-wacom/Makefile,v
retrieving revision 1.18
diff -u -p -r1.18 Makefile
--- Makefile	28 Feb 2011 04:43:28 -0000	1.18
+++ Makefile	10 Oct 2011 20:56:40 -0000
@@ -10,24 +10,25 @@ PORTVERSION=	${KLD_VERSION}.${WACOM_VERS
 PORTREVISION=	6
 CATEGORIES=	x11-drivers kld
 MASTER_SITES=	http://www.chillt.de/bsdwacom/:bsdwacom \
-		SF/linuxwacom/linuxwacom/${WACOM_VERSION}:linuxwacom
+		SF/linuxwacom/xf86-input-wacom/:linuxwacom
 DISTFILES=	${BSDWACOM}.tbz:bsdwacom \
 		${LINUXWACOM}.tar.bz2:linuxwacom
-EXTRACT_ONLY=	${BSDWACOM}.tbz
 
 MAINTAINER=	kamikaze at bsdforen.de
 COMMENT=	X.Org Wacom tablet driver and kernel module
 
+BUILD_DEPENDS=	v4l_compat>=1.0.20110603:${PORTSDIR}/multimedia/v4l_compat
+
 MAN4=		wacom.4x
-MANCOMPRESSED=	yes
+MAN1=		xsetwacom.1
+#MANCOMPRESSED=	yes
 
 USE_GMAKE=	yes
 USE_RC_SUBR=	wacom
 
-BROKEN=		does not patch
-
 KMODDIR?=	/boot/modules
 XINPUTMODDIR=	lib/xorg/modules/input
+MAN1DIR=	man/man1
 MAN4DIR=	man/man4
 WRKSRC=		${WRKDIR}
 
@@ -39,12 +40,15 @@ SUB_FILES+=	pkg-message-${PORTTYPE}
 PKGMESSAGE=	${WRKDIR}/pkg-message-${PORTTYPE}
 
 XORG_CAT=	driver
-USE_XORG=	xi
+USE_XORG=	xi xrandr
 
-LINUXWACOM=	linuxwacom-${WACOM_VERSION}
+LINUXWACOM=	xf86-input-wacom-${WACOM_VERSION}
 BSDWACOM=	bsdwacom-${KLD_VERSION}
-WACOM_VERSION=	0.8.2-2
+WACOM_VERSION=	0.11.1
 KLD_VERSION=	40
+CONFIGURE_WRKSRC=	${WRKDIR}/${LINUXWACOM}
+USE_AUTOTOOLS=	autoconf
+MAKE_ARGS+=	UDEV_CFLAGS=""
 
 .include <bsd.port.pre.mk>
 
@@ -67,17 +71,12 @@ PLIST_SUB+=	UWACOMKLD="@noinst UWACOMKLD
 PORTTYPE=	serial
 .endif
 
-do-configure:
-	@cd ${WRKDIR}/linuxwacom \
-		&& ${LN} -s ${DISTDIR}/${DIST_SUBDIR}/${LINUXWACOM}.tar.bz2 \
-		&& ${SETENV} ${MAKE_ENV} ./run_configure
-
 do-build:
 .if defined(WITH_UWACOMKLD)
 	@cd ${WRKDIR}/uwacom \
 		&& ${SETENV} ${MAKE_ENV} ${MAKE} ${MAKE_ARGS}
 .endif
-	@cd ${WRKDIR}/linuxwacom/${LINUXWACOM} \
+	@cd ${WRKDIR}/${LINUXWACOM} \
 		&& ${SETENV} ${MAKE_ENV} ${GMAKE} ${MAKE_ARGS}
 
 do-install:
@@ -86,12 +85,14 @@ do-install:
 	@${INSTALL_KLD} ${WRKDIR}/uwacom/uwacom.ko ${KMODDIR}/
 .endif
 	@${MKDIR} ${PREFIX}/${XINPUTMODDIR} ${PREFIX}/${MAN4DIR}
-	@cd ${WRKDIR}/linuxwacom/${LINUXWACOM}/src/util/ \
+	@cd ${WRKDIR}/${LINUXWACOM}/tools/ \
 		&& ${SETENV} ${MAKE_ENV} ${GMAKE} install
-	@${INSTALL} ${WRKDIR}/linuxwacom/${LINUXWACOM}/src/xdrv/wacom_drv.so \
+	@${INSTALL} ${WRKDIR}/${LINUXWACOM}/src/.libs/wacom_drv.so \
 		${PREFIX}/${XINPUTMODDIR}/
-	@${INSTALL_MAN} ${WRKDIR}/linuxwacom/${LINUXWACOM}/src/wacom.4x.gz \
+	@${INSTALL_MAN} ${WRKDIR}/${LINUXWACOM}/man/wacom.4x \
 		${PREFIX}/${MAN4DIR}/
+	@${INSTALL_MAN} ${WRKDIR}/${LINUXWACOM}/man/xsetwacom.1 \
+		${PREFIX}/${MAN1DIR}/
 
 plist: clean configure
 	@${ECHO} "===>  Rebuilding PLIST."
Index: distinfo
===================================================================
RCS file: /home/pcvs/ports/x11-drivers/input-wacom/distinfo,v
retrieving revision 1.3
diff -u -p -r1.3 distinfo
--- distinfo	19 Mar 2011 12:38:37 -0000	1.3
+++ distinfo	29 Sep 2011 16:02:20 -0000
@@ -1,4 +1,4 @@
 SHA256 (xorg/driver/bsdwacom-40.tbz) = 42c37d321768ff29fef10eb088a87a83c94753a1b4ae5f92fd453781039a5df9
 SIZE (xorg/driver/bsdwacom-40.tbz) = 19305
-SHA256 (xorg/driver/linuxwacom-0.8.2-2.tar.bz2) = 1d3b8dc397510309b14239291781135af0c4fab99907d8e0b8aad95465390733
-SIZE (xorg/driver/linuxwacom-0.8.2-2.tar.bz2) = 1098067
+SHA256 (xorg/driver/xf86-input-wacom-0.11.1.tar.bz2) = 9d32f94610f8faae3214227a8e8f050cd3b469b3fe9d60ef9272a884dcccb6ca
+SIZE (xorg/driver/xf86-input-wacom-0.11.1.tar.bz2) = 505180
Index: pkg-plist
===================================================================
RCS file: /home/pcvs/ports/x11-drivers/input-wacom/pkg-plist,v
retrieving revision 1.2
diff -u -p -r1.2 pkg-plist
--- pkg-plist	21 Nov 2008 02:12:05 -0000	1.2
+++ pkg-plist	10 Oct 2011 21:02:23 -0000
@@ -1,12 +1,4 @@
-lib/libwacomcfg.so.0
-lib/libwacomcfg.so
-lib/libwacomcfg.la
-lib/libwacomcfg.a
-bin/wacdump
-bin/xidump
 bin/xsetwacom
-include/wacomcfg/wacomcfg.h
- at dirrm include/wacomcfg
 %%XINPUTMODDIR%%/wacom_drv.so
 @dirrmtry %%XINPUTMODDIR%%
 @cwd %%KMODDIR%%
Index: files/patch-linuxwacom-run_configure
===================================================================
RCS file: /home/pcvs/ports/x11-drivers/input-wacom/files/patch-linuxwacom-run_configure,v
retrieving revision 1.5
diff -u -p -r1.5 patch-linuxwacom-run_configure
--- files/patch-linuxwacom-run_configure	25 Feb 2011 16:52:29 -0000	1.5
+++ files/patch-linuxwacom-run_configure	29 Sep 2011 17:39:32 -0000
@@ -1,17 +0,0 @@
---- linuxwacom/run_configure.orig	2009-01-21 11:26:52.000000000 +0100
-+++ linuxwacom/run_configure	2009-01-21 11:27:00.000000000 +0100
-@@ -1,7 +1,7 @@
- #!/bin/sh
- # $Id: run_configure 40 2008-12-26 01:08:35Z undo $
- 
--LINUXWACOM=0.8.2
-+LINUXWACOM=0.8.2-2
- 
- rm -rf linuxwacom-${LINUXWACOM}
- tar xf linuxwacom-${LINUXWACOM}.tar.bz2
-@@ -14,5 +14,5 @@
- cp files/types.h linuxwacom-${LINUXWACOM}/src/xdrv/asm
- cp files/input.h linuxwacom-${LINUXWACOM}/src/xdrv/linux
- cd linuxwacom-${LINUXWACOM}
--./configure --with-linux=yes --with-tcl=/usr/local/include/tcl8.4 --with-tk=/usr/local/include/tk8.4 --prefix=${PREFIX} --enable-dlloader CFLAGS="-I/usr/local/include"
-+./configure --with-linux=yes --with-tcl=/usr/local/include/tcl8.4 --with-tk=/usr/local/include/tk8.4 --prefix=${PREFIX} --enable-dlloader CFLAGS="-I/usr/local/include -DWCM_XORG_XSERVER_1_6=true"
Index: files/patch-xorg-server-1.7
===================================================================
RCS file: /home/pcvs/ports/x11-drivers/input-wacom/files/patch-xorg-server-1.7,v
retrieving revision 1.1
diff -u -p -r1.1 patch-xorg-server-1.7
--- files/patch-xorg-server-1.7	10 Jul 2010 10:07:57 -0000	1.1
+++ files/patch-xorg-server-1.7	29 Sep 2011 17:39:36 -0000
@@ -1,387 +0,0 @@
---- linuxwacom-0.8.2-2/src/xdrv/wcmCommon.c.orig	2009-01-19 21:58:37.000000000 +0300
-+++ linuxwacom-0.8.2-2/src/xdrv/wcmCommon.c	2010-05-11 17:25:41.265742759 +0400
-@@ -19,6 +19,8 @@
- 
- #include "xf86Wacom.h"
- #include "../include/Xwacom.h"
-+#include <xkbsrv.h>
-+#include <xf86_OSproc.h>
- 
- /*
- #if XF86_VERSION_MAJOR < 4
-@@ -277,7 +279,7 @@
- 				bsent = 0;
- 
- 				/* send all pressed buttons down */
--				for (button=2; button<=MAX_BUTTONS; button++)
-+				for (button=2; button<=WCM_MAX_BUTTONS; button++)
- 				{
- 					mask = 1 << (button-1);
- 					if ( buttons & mask ) 
-@@ -302,7 +304,7 @@
- 			else
- 			{
- 				bsent = 0;
--				for (button=2; button<=MAX_BUTTONS; button++)
-+				for (button=2; button<=WCM_MAX_BUTTONS; button++)
- 				{
- 					mask = 1 << (button-1);
- 					if ((mask & priv->oldButtons) != (mask & buttons))
-@@ -333,7 +335,7 @@
- 			priv->flags &= ~TPCBUTTONS_FLAG;
- 
- 			/* send all pressed buttons up */
--			for (button=2; button<=MAX_BUTTONS; button++)
-+			for (button=2; button<=WCM_MAX_BUTTONS; button++)
- 			{
- 				mask = 1 << (button-1);
- 				if ((mask & priv->oldButtons) != (mask & buttons) || (mask & buttons) )
-@@ -356,7 +358,7 @@
- 	}
- 	else  /* normal buttons */
- 	{
--		for (button=1; button<=MAX_BUTTONS; button++)
-+		for (button=1; button<=WCM_MAX_BUTTONS; button++)
- 		{
- 			mask = 1 << (button-1);
- 			if ((mask & priv->oldButtons) != (mask & buttons))
-@@ -405,7 +407,11 @@
- 	int i, j, alt_keysym = 0;
- 
- 	/* Now that we have the keycode look for key index */
-+#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7
-+	KeySymsRec *ksr = XkbGetCoreMap(keydev);
-+#else
- 	KeySymsRec *ksr = &keydev->key->curKeySyms;
-+#endif
- 
- 	for (i = ksr->minKeyCode; i <= ksr->maxKeyCode; i++)
- 		if (ksr->map [(i - ksr->minKeyCode) * ksr->mapWidth] == keysym)
-@@ -443,11 +449,17 @@
- 				xf86PostKeyboardEvent (keydev, j, 0);
- 		}
- 		else
--			xf86Msg (X_WARNING, "Couldn't find key with code %08x on keyboard device %s\n",
--					keysym, keydev->name);
-+			xf86Msg (X_WARNING, "%s: Couldn't find key with code %08x on keyboard device %s\n",
-+					keydev->name, keysym, keydev->name);
-+#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7
-+		xfree(ksr);
-+#endif
- 		return;
- 	}
- 	xf86PostKeyboardEvent (keydev, i, state);
-+#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7
-+	xfree(ksr);
-+#endif
- }
- 
- static int wcm_modifier [ ] =
---- linuxwacom-0.8.2-2/src/xdrv/wcmConfig.c.orig	2009-01-19 21:58:37.000000000 +0300
-+++ linuxwacom-0.8.2-2/src/xdrv/wcmConfig.c	2010-05-11 17:27:43.775135419 +0400
-@@ -136,15 +136,15 @@
- 	priv->nPressCtrl [3] = 100;  /* pressure curve y1 */
- 
- 	/* Default button and expresskey values */
--	for (i=0; i<MAX_BUTTONS; i++)
-+	for (i=0; i<WCM_MAX_BUTTONS; i++)
- 		priv->button[i] = IsPad (priv) ?
--			(AC_BUTTON | (MAX_MOUSE_BUTTONS/2 + i + 1)) : (AC_BUTTON | (i + 1));
-+			(AC_BUTTON | (WCM_MAX_MOUSE_BUTTONS/2 + i + 1)) : (AC_BUTTON | (i + 1));
- 
--	for (i=0; i<MAX_BUTTONS; i++)
-+	for (i=0; i<WCM_MAX_BUTTONS; i++)
- 		for (j=0; j<256; j++)
- 			priv->keys[i][j] = 0;
- 
--	priv->nbuttons = MAX_BUTTONS;		/* Default number of buttons */
-+	priv->nbuttons = WCM_MAX_BUTTONS;		/* Default number of buttons */
- 	priv->relup = 5;			/* Default relative wheel up event */
- 	priv->reldn = 4;			/* Default relative wheel down event */
- 	
-@@ -859,7 +859,7 @@
- 	}
- 
- 
--	for (i=0; i<MAX_BUTTONS; i++)
-+	for (i=0; i<WCM_MAX_BUTTONS; i++)
- 	{
- 		sprintf(b, "Button%d", i+1);
- 		s = xf86SetStrOption(local->options, b, NULL);
---- linuxwacom-0.8.2-2/src/xdrv/wcmUSB.c.orig	2009-01-19 21:58:37.000000000 +0300
-+++ linuxwacom-0.8.2-2/src/xdrv/wcmUSB.c	2010-05-11 17:30:02.434108111 +0400
-@@ -1064,7 +1064,7 @@
- 				for (nkeys = 0; nkeys < common->npadkeys; nkeys++)
- 					if (event->code == common->padkey_code [nkeys])
- 					{
--						MOD_BUTTONS ((MAX_MOUSE_BUTTONS/2+nkeys), event->value);
-+						MOD_BUTTONS ((WCM_MAX_MOUSE_BUTTONS/2+nkeys), event->value);
- 						break;
- 					}
- 			}
---- linuxwacom-0.8.2-2/src/xdrv/xf86Wacom.c.orig	2009-01-19 21:58:37.000000000 +0300
-+++ linuxwacom-0.8.2-2/src/xdrv/xf86Wacom.c	2010-05-11 17:28:07.865752615 +0400
-@@ -84,6 +84,14 @@
- #include "xf86Wacom.h"
- #include "wcmFilter.h"
- 
-+#include <xf86_OSproc.h>
-+#include <exevents.h>
-+#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7
-+#include <xserver-properties.h>
-+#include <X11/extensions/XKB.h>
-+#include <xkbsrv.h>
-+#endif
-+
- static int xf86WcmDevOpen(DeviceIntPtr pWcm);
- static void xf86WcmDevReadInput(LocalDevicePtr local);
- static void xf86WcmDevControlProc(DeviceIntPtr device, PtrCtrl* ctrl);
-@@ -290,7 +298,11 @@
- 		resolution = (int)((double)resolution * priv->factorX + 0.5);
- #endif
- 
--		InitValuatorAxisStruct(local->dev, 0, topx, tabletSize, 
-+		InitValuatorAxisStruct(local->dev, 0,
-+#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7
-+			XIGetKnownProperty(AXIS_LABEL_PROP_ABS_X),
-+#endif
-+			topx, tabletSize, 
- 			resolution, 0, resolution); 
- 	}
- 	else /* y ax */
-@@ -317,7 +329,11 @@
- 		resolution = (int)((double)resolution * priv->factorY + 0.5);
- #endif
- 
--		InitValuatorAxisStruct(local->dev, 1, topy, tabletSize, 
-+		InitValuatorAxisStruct(local->dev, 1,
-+#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7
-+			XIGetKnownProperty(AXIS_LABEL_PROP_ABS_Y),
-+#endif
-+			topy, tabletSize, 
- 			resolution, 0, resolution); 
- 	}
- }
-@@ -523,9 +539,13 @@
- {
- 	WacomDevicePtr priv = (WacomDevicePtr)local->private;
- 	WacomCommonPtr common = priv->common;
--	CARD8 butmap[MAX_BUTTONS+1];
-+	CARD8 butmap[WCM_MAX_BUTTONS+1];
- 	int nbaxes, nbbuttons, nbkeys;
- 	int loop;
-+#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7
-+	Atom btn_labels[WCM_MAX_BUTTONS] = {0};
-+	Atom axis_labels[MAX_VALUATORS] = {0};
-+#endif
- 
- 	/* Detect tablet configuration, if possible */
- 	if (priv->common->wcmModel->DetectConfig)
-@@ -552,7 +572,11 @@
- 	for(loop=1; loop<=nbbuttons; loop++)
- 		butmap[loop] = loop;
- 
--	if (InitButtonClassDeviceStruct(local->dev, nbbuttons, butmap) == FALSE)
-+	if (InitButtonClassDeviceStruct(local->dev, nbbuttons,
-+#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7
-+					btn_labels,
-+#endif
-+					butmap) == FALSE)
- 	{
- 		ErrorF("unable to allocate Button class device\n");
- 		return FALSE;
-@@ -581,15 +605,13 @@
- 		nbaxes = priv->naxes = 6;
- 
- 	if (InitValuatorClassDeviceStruct(local->dev, nbaxes,
--#if WCM_XINPUTABI_MAJOR == 0
--					  xf86GetMotionEvents,
--					  local->history_size,
--#else
-+#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7
-+					  axis_labels,
-+#endif
- #if GET_ABI_MAJOR(ABI_XINPUT_VERSION) < 3
- 					  GetMotionHistory,
- #endif
- 					  GetMotionHistorySize(),
--#endif
- 					  ((priv->flags & ABSOLUTE_FLAG) ?
- 					  Absolute : Relative) | 
- 					  OutOfProximity ) == FALSE)
-@@ -602,7 +624,7 @@
- 	/* only initial KeyClass and LedFeedbackClass once */
- 	if (!priv->wcmInitKeyClassCount)
- 	{
--#ifdef WCM_KEY_SENDING_SUPPORT
-+#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) < 5
- 		if (nbkeys)
- 		{
- 			KeySymsRec wacom_keysyms;
-@@ -641,19 +663,37 @@
- 			}
- 		}
- 
--#ifndef WCM_XFREE86
- 		if(InitKbdFeedbackClassDeviceStruct(local->dev, xf86WcmBellCallback,
- 				xf86WcmKbdCtrlCallback) == FALSE) {
- 			ErrorF("unable to init kbd feedback device struct\n");
- 			return FALSE;
- 		}
-+#elif GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7
-+		if (InitKeyboardDeviceStruct(local->dev, NULL, NULL, xf86WcmKbdCtrlCallback)) {
-+#define SYMS_PER_KEY 2
-+			KeySymsRec syms;
-+			CARD8 modmap[MAP_LENGTH];
-+			int num_keys = XkbMaxLegalKeyCode - XkbMinLegalKeyCode + 1;
- 
-+			syms.map = keymap;
-+			syms.mapWidth = SYMS_PER_KEY;
-+			syms.minKeyCode = XkbMinLegalKeyCode;
-+			syms.maxKeyCode = XkbMaxLegalKeyCode;
-+
-+			memset(modmap, 0, sizeof(modmap));
-+			modmap[XkbMinLegalKeyCode + 2] = ShiftMask;
-+			XkbApplyMappingChange(local->dev, &syms, syms.minKeyCode, num_keys, NULL, // modmap,
-+					serverClient);
-+		} else
-+		{
-+			xf86Msg(X_ERROR, "%s: unable to init kbd device struct\n ", local->name);
-+			return FALSE;
-+		}
-+#endif
- 		if(InitLedFeedbackClassDeviceStruct (local->dev, xf86WcmKbdLedCallback) == FALSE) {
- 			ErrorF("unable to init led feedback device struct\n");
- 			return FALSE;
- 		}
--#endif /* WCM_XFREE86 */
--#endif /* WCM_KEY_SENDING_SUPPORT */
- 	}
- 
- #if WCM_XINPUTABI_MAJOR == 0
-@@ -672,42 +712,81 @@
- 	xf86WcmRotateScreen(local, common->wcmRotate);
- 
- 	/* pressure */
--	InitValuatorAxisStruct(local->dev, 2, 0, 
--		common->wcmMaxZ, 1, 1, 1);
-+	InitValuatorAxisStruct(local->dev, 2,
-+#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7
-+		XIGetKnownProperty(AXIS_LABEL_PROP_ABS_PRESSURE),
-+#endif
-+		0, common->wcmMaxZ, 1, 1, 1);
- 
- 	if (IsCursor(priv))
- 	{
- 		/* z-rot and throttle */
--		InitValuatorAxisStruct(local->dev, 3, -900, 899, 1, 1, 1);
--		InitValuatorAxisStruct(local->dev, 4, -1023, 1023, 1, 1, 1);
-+		InitValuatorAxisStruct(local->dev, 3,
-+#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7
-+			XIGetKnownProperty(AXIS_LABEL_PROP_ABS_RZ),
-+#endif
-+			-900, 899, 1, 1, 1);
-+		InitValuatorAxisStruct(local->dev, 4,
-+#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7
-+			XIGetKnownProperty(AXIS_LABEL_PROP_ABS_THROTTLE),
-+#endif
-+			-1023, 1023, 1, 1, 1);
- 	}
- 	else if (IsPad(priv))
- 	{
- 		/* strip-x and strip-y */
- 		if (priv->naxes)
- 		{
--			InitValuatorAxisStruct(local->dev, 3, 0, common->wcmMaxStripX, 1, 1, 1);
--			InitValuatorAxisStruct(local->dev, 4, 0, common->wcmMaxStripY, 1, 1, 1);
-+			InitValuatorAxisStruct(local->dev, 3,
-+#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7
-+				0, /* XXX what is this axis?*/
-+#endif
-+				0, common->wcmMaxStripX, 1, 1, 1);
-+			InitValuatorAxisStruct(local->dev, 4,
-+#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7
-+				0, /* XXX what is this axis?*/
-+#endif
-+				0, common->wcmMaxStripY, 1, 1, 1);
- 		}
- 	}
- 	else
- 	{
- 		/* tilt-x and tilt-y */
--		InitValuatorAxisStruct(local->dev, 3, -64, 63, 1, 1, 1);
--		InitValuatorAxisStruct(local->dev, 4, -64, 63, 1, 1, 1);
-+		InitValuatorAxisStruct(local->dev, 3,
-+#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7
-+			XIGetKnownProperty(AXIS_LABEL_PROP_ABS_TILT_X),
-+#endif
-+			-64, 63, 1, 1, 1);
-+		InitValuatorAxisStruct(local->dev, 4,
-+#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7
-+			XIGetKnownProperty(AXIS_LABEL_PROP_ABS_TILT_Y),
-+#endif
-+			-64, 63, 1, 1, 1);
- 	}
- 
- 	if ((strstr(common->wcmModel->name, "Intuos3") || 
- 		strstr(common->wcmModel->name, "CintiqV5")) 
- 			&& IsStylus(priv))
- 		/* Art Marker Pen rotation */
--		InitValuatorAxisStruct(local->dev, 5, -900, 899, 1, 1, 1);
-+		InitValuatorAxisStruct(local->dev, 5,
-+#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7
-+			0, /* XXX what is this axis?*/
-+#endif
-+			-900, 899, 1, 1, 1);
- 	else if (strstr(common->wcmModel->name, "Bamboo") && IsPad(priv))
--		InitValuatorAxisStruct(local->dev, 5, 0, 71, 1, 1, 1);
-+		InitValuatorAxisStruct(local->dev, 5,
-+#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7
-+			0, /* XXX what is this axis?*/
-+#endif
-+			0, 71, 1, 1, 1);
- 	else
- 	{
- 		/* absolute wheel */
--		InitValuatorAxisStruct(local->dev, 5, 0, 1023, 1, 1, 1);
-+		InitValuatorAxisStruct(local->dev, 5,
-+#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7
-+			XIGetKnownProperty(AXIS_LABEL_PROP_ABS_WHEEL),
-+#endif
-+			0, 1023, 1, 1, 1);
- 	}
- 
- 	if (IsTouch(priv))
---- linuxwacom-0.8.2-2/src/xdrv/xf86WacomDefs.h.orig	2009-01-19 21:58:37.000000000 +0300
-+++ linuxwacom-0.8.2-2/src/xdrv/xf86WacomDefs.h	2010-05-11 17:28:56.624883674 +0400
-@@ -125,8 +125,8 @@
- #define IsPad(priv)    (DEVICE_ID((priv)->flags) == PAD_ID)
- 
- #define FILTER_PRESSURE_RES	2048	/* maximum points in pressure curve */
--#define MAX_BUTTONS		32	/* maximum number of tablet buttons */
--#define MAX_MOUSE_BUTTONS	16	/* maximum number of buttons-on-pointer
-+#define WCM_MAX_BUTTONS		32	/* maximum number of tablet buttons */
-+#define WCM_MAX_MOUSE_BUTTONS	16	/* maximum number of buttons-on-pointer
-                                          * (which are treated as mouse buttons,
-                                          * not as keys like tablet menu buttons). 
- 					 * For backword compability support, 
-@@ -161,8 +161,8 @@
- 	int screenBottomY[32];	/* bottom cordinate of the associated screen */
- 	int maxWidth;		/* max active screen width */
- 	int maxHeight;		/* max active screen height */
--	int button[MAX_BUTTONS];/* buttons assignments */
--	unsigned keys[MAX_BUTTONS][256]; /* keystrokes assigned to buttons */
-+	int button[WCM_MAX_BUTTONS];/* buttons assignments */
-+	unsigned keys[WCM_MAX_BUTTONS][256]; /* keystrokes assigned to buttons */
- 	int relup;
- 	unsigned rupk[256];     /* keystrokes assigned to relative wheel up event (default is button 4) */
- 	int reldn;
-@@ -386,7 +386,7 @@
- 
- 	int nbuttons;                /* total number of buttons */
- 	int npadkeys;                /* number of pad keys in the above array */
--	int padkey_code[MAX_BUTTONS];/* hardware codes for buttons */
-+	int padkey_code[WCM_MAX_BUTTONS];/* hardware codes for buttons */
- 
- 	WacomDevicePtr wcmDevices;   /* list of devices sharing same port */
- 	int wcmPktLength;            /* length of a packet */
Index: files/patch-configure.ac
@@ -0,0 +1,11 @@
+--- xf86-input-wacom-0.11.1/configure.ac.orig
++++ xf86-input-wacom-0.11.1/configure.ac
+@@ -56,7 +56,7 @@ PKG_CHECK_MODULES(XORG, [xorg-server >= 
+ PKG_CHECK_MODULES(X11, x11 xi xrandr)
+ 
+ # Obtain compiler/linker options for libudev used by ISDV4 code
+-PKG_CHECK_MODULES(UDEV, libudev)
++#PKG_CHECK_MODULES(UDEV, libudev)
+ 
+ # X Server SDK location is required to install wacom header files
+ # This location is also relayed in the xorg-wacom.pc file
Index: files/patch-src-Makefile.in
@@ -0,0 +1,41 @@
+--- xf86-input-wacom-0.11.1/src/Makefile.in.orig
++++ xf86-input-wacom-0.11.1/src/Makefile.in
+@@ -97,7 +97,7 @@ am__base_list = \
+ am__installdirs = "$(DESTDIR)$(@DRIVER_NAME at _drv_ladir)"
+ LTLIBRARIES = $(@DRIVER_NAME at _drv_la_LTLIBRARIES)
+ @DRIVER_NAME at _drv_la_LIBADD =
+-am__objects_1 = xf86Wacom.lo wcmCommon.lo wcmConfig.lo wcmISDV4.lo \
++am__objects_1 = xf86Wacom.lo wcmCommon.lo wcmConfig.lo \
+ 	wcmFilter.lo wcmUSB.lo wcmXCommand.lo wcmValidateDevice.lo \
+ 	wcmTouchFilter.lo
+ am_ at DRIVER_NAME@_drv_la_OBJECTS = $(am__objects_1)
+@@ -291,7 +291,6 @@ DRIVER_SOURCES = \
+ 	$(top_srcdir)/src/xf86Wacom.h \
+ 	$(top_srcdir)/src/wcmCommon.c \
+ 	$(top_srcdir)/src/wcmConfig.c \
+-	$(top_srcdir)/src/wcmISDV4.c \
+ 	$(top_srcdir)/src/wcmFilter.c \
+ 	$(top_srcdir)/src/wcmFilter.h \
+ 	$(top_srcdir)/src/xf86WacomDefs.h \
+@@ -383,7 +382,6 @@ distclean-compile:
+ @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/wcmCommon.Plo at am__quote@
+ @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/wcmConfig.Plo at am__quote@
+ @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/wcmFilter.Plo at am__quote@
+- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/wcmISDV4.Plo at am__quote@
+ @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/wcmTouchFilter.Plo at am__quote@
+ @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/wcmUSB.Plo at am__quote@
+ @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/wcmValidateDevice.Plo at am__quote@
+@@ -438,13 +436,8 @@ wcmConfig.lo: $(top_srcdir)/src/wcmConfi
+ @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ @am__fastdepCC_FALSE@	$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o wcmConfig.lo `test -f '$(top_srcdir)/src/wcmConfig.c' || echo '$(srcdir)/'`$(top_srcdir)/src/wcmConfig.c
+ 
+-wcmISDV4.lo: $(top_srcdir)/src/wcmISDV4.c
+- at am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT wcmISDV4.lo -MD -MP -MF $(DEPDIR)/wcmISDV4.Tpo -c -o wcmISDV4.lo `test -f '$(top_srcdir)/src/wcmISDV4.c' || echo '$(srcdir)/'`$(top_srcdir)/src/wcmISDV4.c
+- at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/wcmISDV4.Tpo $(DEPDIR)/wcmISDV4.Plo
+ @am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
+- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$(top_srcdir)/src/wcmISDV4.c' object='wcmISDV4.lo' libtool=yes @AMDEPBACKSLASH@
+ @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+- at am__fastdepCC_FALSE@	$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o wcmISDV4.lo `test -f '$(top_srcdir)/src/wcmISDV4.c' || echo '$(srcdir)/'`$(top_srcdir)/src/wcmISDV4.c
+ 
+ wcmFilter.lo: $(top_srcdir)/src/wcmFilter.c
+ @am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT wcmFilter.lo -MD -MP -MF $(DEPDIR)/wcmFilter.Tpo -c -o wcmFilter.lo `test -f '$(top_srcdir)/src/wcmFilter.c' || echo '$(srcdir)/'`$(top_srcdir)/src/wcmFilter.c
Index: files/patch-src-wcmConfig.c
@@ -0,0 +1,16 @@
+--- xf86-input-wacom-0.11.1/src/wcmConfig.c.orig
++++ xf86-input-wacom-0.11.1/src/wcmConfig.c
+@@ -373,9 +373,12 @@ wcmDetectDeviceClass(const InputInfoPtr 
+ 		return TRUE;
+ 
+ 	/* Bluetooth is also considered as USB */
++#if 0
+ 	if (gWacomISDV4Device.Detect(pInfo))
+ 		common->wcmDevCls = &gWacomISDV4Device;
+-	else if (gWacomUSBDevice.Detect(pInfo))
++	else
++#endif
++	if (gWacomUSBDevice.Detect(pInfo))
+ 		common->wcmDevCls = &gWacomUSBDevice;
+ 	else
+ 		xf86Msg(X_ERROR, "%s: cannot identify device class.\n", pInfo->name);
Index: files/patch-src-wcmUSB.c
@@ -0,0 +1,20 @@
+--- xf86-input-wacom-0.11.1/src/wcmUSB.c.orig
++++ xf86-input-wacom-0.11.1/src/wcmUSB.c
+@@ -23,10 +23,17 @@
+ 
+ #include "xf86Wacom.h"
+ 
++#ifndef __FreeBSD__
+ #include <asm/types.h>
++#endif
+ #include <linux/input.h>
+ #include <sys/utsname.h>
++#ifndef __FreeBSD__
+ #include <linux/version.h>
++#else
++#define LINUX_VERSION_CODE 1
++#define KERNEL_VERSION(a,b,c) 0
++#endif
+ 
+ #define MAX_USB_EVENTS 32
+ 
Index: files/patch-src-xf86WacomDefs.h
@@ -0,0 +1,12 @@
+--- xf86-input-wacom-0.11.1/src/xf86WacomDefs.h.orig
++++ xf86-input-wacom-0.11.1/src/xf86WacomDefs.h
+@@ -23,7 +23,9 @@
+ /*****************************************************************************
+  * General Defines
+  ****************************************************************************/
++#ifndef __FreeBSD__
+ #include <asm/types.h>
++#endif
+ #include <linux/input.h>
+ #define MAX_USB_EVENTS 32
+ 
Index: files/patch-tools-Makefile.in
@@ -0,0 +1,11 @@
+--- xf86-input-wacom-0.11.1/tools/Makefile.in.orig
++++ xf86-input-wacom-0.11.1/tools/Makefile.in
+@@ -54,7 +54,7 @@ PRE_UNINSTALL = :
+ POST_UNINSTALL = :
+ build_triplet = @build@
+ host_triplet = @host@
+-bin_PROGRAMS = xsetwacom$(EXEEXT) isdv4-serial-debugger$(EXEEXT)
++bin_PROGRAMS = xsetwacom$(EXEEXT) 
+ @UNITTESTS_TRUE at check_PROGRAMS = xsetwacom-test$(EXEEXT)
+ subdir = tools
+ DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in


>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list