[Midnightbsd-cvs] mports [23997] trunk/x11-drivers/xf86-input-wacom: add xf86-input-wacom

laffer1 at midnightbsd.org laffer1 at midnightbsd.org
Tue Aug 28 09:00:35 EDT 2018


Revision: 23997
          http://svnweb.midnightbsd.org/mports/?rev=23997
Author:   laffer1
Date:     2018-08-28 09:00:35 -0400 (Tue, 28 Aug 2018)
Log Message:
-----------
add xf86-input-wacom

Added Paths:
-----------
    trunk/x11-drivers/xf86-input-wacom/
    trunk/x11-drivers/xf86-input-wacom/Makefile
    trunk/x11-drivers/xf86-input-wacom/distinfo
    trunk/x11-drivers/xf86-input-wacom/files/
    trunk/x11-drivers/xf86-input-wacom/files/patch-src-wcmConfig.c
    trunk/x11-drivers/xf86-input-wacom/files/patch-src-wcmISDV4.c
    trunk/x11-drivers/xf86-input-wacom/files/patch-src-wcmUSB.c
    trunk/x11-drivers/xf86-input-wacom/files/patch-src-wcmValidateDevice.c
    trunk/x11-drivers/xf86-input-wacom/files/patch-src-xf86Wacom.c
    trunk/x11-drivers/xf86-input-wacom/files/patch-src-xf86WacomDefs.h
    trunk/x11-drivers/xf86-input-wacom/files/patch-test-fake-symbols.c
    trunk/x11-drivers/xf86-input-wacom/files/patch-test-fake-symbols.h
    trunk/x11-drivers/xf86-input-wacom/files/patch-test-wacom-tests.c
    trunk/x11-drivers/xf86-input-wacom/files/patch-tools-isdv4-serial-debugger.c
    trunk/x11-drivers/xf86-input-wacom/files/patch-tools-isdv4-serial-inputattach.c
    trunk/x11-drivers/xf86-input-wacom/files/patch-tools-tools-shared.c
    trunk/x11-drivers/xf86-input-wacom/files/pkg-message.in
    trunk/x11-drivers/xf86-input-wacom/files/wacom.conf.sample
    trunk/x11-drivers/xf86-input-wacom/files/wacom.in
    trunk/x11-drivers/xf86-input-wacom/pkg-descr
    trunk/x11-drivers/xf86-input-wacom/pkg-plist

Added: trunk/x11-drivers/xf86-input-wacom/Makefile
===================================================================
--- trunk/x11-drivers/xf86-input-wacom/Makefile	                        (rev 0)
+++ trunk/x11-drivers/xf86-input-wacom/Makefile	2018-08-28 13:00:35 UTC (rev 23997)
@@ -0,0 +1,45 @@
+# $MidnightBSD$
+
+PORTNAME=	xf86-input-wacom
+PORTVERSION=	0.36.1
+CATEGORIES=	x11-drivers
+MASTER_SITES=	https://github.com/linuxwacom/${PORTNAME}/releases/download/${DISTNAME}/
+
+MAINTAINER=	ports at MidnightBSD>org
+COMMENT=	X.Org Wacom tablet driver
+
+LICENSE=	gpl2
+
+BUILD_DEPENDS=	v4l_compat>=1.0.20110603:multimedia/v4l_compat
+RUN_DEPENDS=	webcamd>=3.1.0.1:multimedia/webcamd
+
+USES=		gmake pathfix
+USE_XORG=	x11 xext xinerama xrandr
+XORG_CAT=	driver
+LDFLAGS+=	-Wl,--as-needed # Xext
+USE_RC_SUBR=	wacom
+SUB_FILES=	pkg-message
+CONFIGURE_ENV=	UDEV_CFLAGS=" " UDEV_LIBS=" "
+CONFIGURE_ARGS=	--without-systemd-unit-dir \
+		--without-udev-rules-dir \
+		--without-doxygen
+
+OPTIONS_DEFINE=	DEBUG TEST
+
+DEBUG_CONFIGURE_ENABLE=debug
+
+TEST_CONFIGURE_ENABLE=unit-tests
+TEST_ALL_TARGET=check
+
+post-patch:
+	@${REINPLACE_CMD} \
+		-e 's/dir=.*xorg-server/& \
+			--define-variable prefix="$$prefix"/' \
+		${WRKSRC}/configure
+
+post-install:
+	${MKDIR} ${STAGEDIR}${PREFIX}/etc/X11/xorg.conf.d
+	${INSTALL_DATA} ${FILESDIR}/wacom.conf.sample \
+		${STAGEDIR}${PREFIX}/etc/X11/xorg.conf.d
+
+.include <bsd.port.mk>


Property changes on: trunk/x11-drivers/xf86-input-wacom/Makefile
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+MidnightBSD=%H
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/x11-drivers/xf86-input-wacom/distinfo
===================================================================
--- trunk/x11-drivers/xf86-input-wacom/distinfo	                        (rev 0)
+++ trunk/x11-drivers/xf86-input-wacom/distinfo	2018-08-28 13:00:35 UTC (rev 23997)
@@ -0,0 +1,3 @@
+TIMESTAMP = 1521493407
+SHA256 (xorg/driver/xf86-input-wacom-0.36.1.tar.bz2) = 3206b92a4ed1fece07438a85405c748b9ed62cf0f0c3df845a2ce695d5463e09
+SIZE (xorg/driver/xf86-input-wacom-0.36.1.tar.bz2) = 612808


Property changes on: trunk/x11-drivers/xf86-input-wacom/distinfo
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/x11-drivers/xf86-input-wacom/files/patch-src-wcmConfig.c
===================================================================
--- trunk/x11-drivers/xf86-input-wacom/files/patch-src-wcmConfig.c	                        (rev 0)
+++ trunk/x11-drivers/xf86-input-wacom/files/patch-src-wcmConfig.c	2018-08-28 13:00:35 UTC (rev 23997)
@@ -0,0 +1,19 @@
+--- src/wcmConfig.c~
++++ src/wcmConfig.c
+@@ -307,7 +307,7 @@ out:
+  */
+ static void wcmSplitName(char* devicename, char *basename, char *subdevice, char *tool, size_t len)
+ {
+-	char *name = strdupa(devicename);
++	char *name = strdup(devicename);
+ 	char *a, *b;
+ 
+ 	*basename = *subdevice = *tool = '\0';
+@@ -325,6 +325,7 @@ static void wcmSplitName(char* devicenam
+ 		strncat(tool, a+1, len-1);
+ 	}
+ 	strncat(basename, name, len-1);
++	free(name);
+ }
+ 
+ /**


Property changes on: trunk/x11-drivers/xf86-input-wacom/files/patch-src-wcmConfig.c
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/x11-drivers/xf86-input-wacom/files/patch-src-wcmISDV4.c
===================================================================
--- trunk/x11-drivers/xf86-input-wacom/files/patch-src-wcmISDV4.c	                        (rev 0)
+++ trunk/x11-drivers/xf86-input-wacom/files/patch-src-wcmISDV4.c	2018-08-28 13:00:35 UTC (rev 23997)
@@ -0,0 +1,87 @@
+--- src/wcmISDV4.c~
++++ src/wcmISDV4.c
+@@ -24,14 +24,19 @@
+ #include "xf86Wacom.h"
+ #include <xf86_OSproc.h>
+ #include "wcmFilter.h"
+-#include <linux/serial.h>
+ #include "isdv4.h"
+ #include <unistd.h>
+ #include <fcntl.h>
+-#include <libudev.h>
+ #include <sys/types.h>
+ #include <sys/stat.h>
+ 
++#ifdef __linux__
++#include <linux/serial.h>
++#include <libudev.h>
++#else
++#include <termios.h>
++#endif
++
+ #define RESET_RELATIVE(ds) do { (ds).relwheel = 0; } while (0)
+ 
+ /* resolution in points/m */
+@@ -192,10 +197,15 @@ static int wcmSerialValidate(InputInfoPt
+ 
+ static Bool isdv4Detect(InputInfoPtr pInfo)
+ {
+-	struct serial_struct ser;
+ 	int rc;
+ 
++#ifdef __linux__
++	struct serial_struct ser;
+ 	rc = ioctl(pInfo->fd, TIOCGSERIAL, &ser);
++#else
++	struct termios termAttr;
++	rc = tcgetattr(pInfo->fd, &termAttr);
++#endif
+ 	if (rc == -1)
+ 		return FALSE;
+ 
+@@ -959,6 +969,7 @@ static Bool get_keys_vendor_tablet_id(ch
+ 	return TRUE;
+ }
+ 
++#ifdef __linux__
+ /**
+  * Return the content of id file from sysfs:  /sys/.../device/id
+  *
+@@ -1004,6 +1015,7 @@ out:
+ 
+ 	return ret;
+ }
++#endif
+ 
+ /**
+  * Query the device's fd for the key bits and the tablet ID. Returns the ID
+@@ -1018,11 +1030,16 @@ out:
+  */
+ static int isdv4ProbeKeys(InputInfoPtr pInfo)
+ {
+-	struct serial_struct tmp;
+ 	WacomDevicePtr  priv = (WacomDevicePtr)pInfo->private;
+ 	WacomCommonPtr  common = priv->common;
+ 
++#ifdef __linux__
++	struct serial_struct tmp;
+ 	if (ioctl(pInfo->fd, TIOCGSERIAL, &tmp) < 0)
++#else
++	struct termios tmp;
++	if (tcgetattr(pInfo->fd, &tmp) < 0)
++#endif
+ 		return 0;
+ 
+ 	common->tablet_id = 0x90;
+@@ -1037,9 +1054,11 @@ static int isdv4ProbeKeys(InputInfoPtr p
+ 	common->wcmProtocolLevel = WCM_PROTOCOL_GENERIC;
+ 
+ 	if (!get_keys_vendor_tablet_id(pInfo->name, common)) {
++#ifdef __linux__
+ 		char buf[15] = {0};
+ 		if (get_sysfs_id(pInfo, buf, sizeof(buf)))
+ 			get_keys_vendor_tablet_id(buf, common);
++#endif
+ 	}
+ 
+ 	return common->tablet_id;


Property changes on: trunk/x11-drivers/xf86-input-wacom/files/patch-src-wcmISDV4.c
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/x11-drivers/xf86-input-wacom/files/patch-src-wcmUSB.c
===================================================================
--- trunk/x11-drivers/xf86-input-wacom/files/patch-src-wcmUSB.c	                        (rev 0)
+++ trunk/x11-drivers/xf86-input-wacom/files/patch-src-wcmUSB.c	2018-08-28 13:00:35 UTC (rev 23997)
@@ -0,0 +1,32 @@
+--- src/wcmUSB.c~
++++ src/wcmUSB.c
+@@ -23,10 +23,17 @@
+ 
+ #include "xf86Wacom.h"
+ 
++#ifdef __linux__
+ #include <asm/types.h>
++#endif
+ #include <linux/input.h>
+ #include <sys/utsname.h>
++#ifdef __linux__
+ #include <linux/version.h>
++#else
++#define LINUX_VERSION_CODE 1
++#define KERNEL_VERSION(a,b,c) 0
++#endif
+ 
+ #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"		},


Property changes on: trunk/x11-drivers/xf86-input-wacom/files/patch-src-wcmUSB.c
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/x11-drivers/xf86-input-wacom/files/patch-src-wcmValidateDevice.c
===================================================================
--- trunk/x11-drivers/xf86-input-wacom/files/patch-src-wcmValidateDevice.c	                        (rev 0)
+++ trunk/x11-drivers/xf86-input-wacom/files/patch-src-wcmValidateDevice.c	2018-08-28 13:00:35 UTC (rev 23997)
@@ -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


Property changes on: trunk/x11-drivers/xf86-input-wacom/files/patch-src-wcmValidateDevice.c
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/x11-drivers/xf86-input-wacom/files/patch-src-xf86Wacom.c
===================================================================
--- trunk/x11-drivers/xf86-input-wacom/files/patch-src-xf86Wacom.c	                        (rev 0)
+++ trunk/x11-drivers/xf86-input-wacom/files/patch-src-xf86Wacom.c	2018-08-28 13:00:35 UTC (rev 23997)
@@ -0,0 +1,20 @@
+--- src/xf86Wacom.c.orig	2017-02-24 04:04:55 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)


Property changes on: trunk/x11-drivers/xf86-input-wacom/files/patch-src-xf86Wacom.c
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/x11-drivers/xf86-input-wacom/files/patch-src-xf86WacomDefs.h
===================================================================
--- trunk/x11-drivers/xf86-input-wacom/files/patch-src-xf86WacomDefs.h	                        (rev 0)
+++ trunk/x11-drivers/xf86-input-wacom/files/patch-src-xf86WacomDefs.h	2018-08-28 13:00:35 UTC (rev 23997)
@@ -0,0 +1,12 @@
+--- src/xf86WacomDefs.h~
++++ src/xf86WacomDefs.h
+@@ -24,7 +24,9 @@
+  * General Defines
+  ****************************************************************************/
+ #include <wacom-util.h>
++#ifdef __linux__
+ #include <asm/types.h>
++#endif
+ #include <linux/input.h>
+ #define MAX_USB_EVENTS 32
+ 


Property changes on: trunk/x11-drivers/xf86-input-wacom/files/patch-src-xf86WacomDefs.h
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/x11-drivers/xf86-input-wacom/files/patch-test-fake-symbols.c
===================================================================
--- trunk/x11-drivers/xf86-input-wacom/files/patch-test-fake-symbols.c	                        (rev 0)
+++ trunk/x11-drivers/xf86-input-wacom/files/patch-test-fake-symbols.c	2018-08-28 13:00:35 UTC (rev 23997)
@@ -0,0 +1,74 @@
+--- test/fake-symbols.c~
++++ test/fake-symbols.c
+@@ -92,7 +92,11 @@ xf86NameCmp(const char *s1, const char *
+ }
+ 
+ _X_EXPORT char *
++#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) > 18
+ xf86CheckStrOption(OPTTYPE optlist, const char *name, CONST char *deflt)
++#else
++xf86CheckStrOption(OPTTYPE optlist, const char *name, char *deflt)
++#endif
+ {
+     return NULL;
+ }
+@@ -231,7 +235,7 @@ InitValuatorAxisStruct(DeviceIntPtr dev,
+ {
+     return TRUE;
+ }
+-#else
++#elif GET_ABI_MAJOR(ABI_XINPUT_VERSION) > 12
+ _X_EXPORT void
+ InitValuatorAxisStruct(DeviceIntPtr dev, int axnum, Atom label,
+                        int minval, int maxval, int resolution,
+@@ -239,6 +243,14 @@ InitValuatorAxisStruct(DeviceIntPtr dev,
+ {
+     return;
+ }
++#else
++_X_EXPORT void
++InitValuatorAxisStruct(DeviceIntPtr dev, int axnum, Atom label,
++                       int minval, int maxval, int resolution,
++                       int min_res, int max_res)
++{
++    return;
++}
+ #endif
+ 
+ _X_EXPORT void
+@@ -279,7 +291,7 @@ InitPtrFeedbackClassDeviceStruct(DeviceI
+ _X_EXPORT int
+ XIChangeDeviceProperty (DeviceIntPtr dev, Atom property, Atom type,
+                         int format, int mode, unsigned long len,
+-#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) > 16
++#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 16
+                         const void *
+ #elif GET_ABI_MAJOR(ABI_XINPUT_VERSION) > 12
+                         const pointer
+@@ -506,6 +518,7 @@ xf86UnblockSIGIO (int wasset)
+ 
+ /* This is not the same as the X server one, but it'll do for the tests */
+ #if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 14
++#define InputOption InputOption_custom
+ typedef struct _InputOption {
+     struct _InputOption *next;
+     char *key;
+@@ -537,6 +550,7 @@ input_option_free_list(InputOption **opt
+ 		*opts = tmp;
+ 	}
+ }
++#undef InputOption
+ #endif
+ 
+ #if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 16
+@@ -558,9 +572,9 @@ _X_EXPORT void xf86PostTouchEvent(Device
+     uint32_t flags, const ValuatorMask *mask) {
+ 	return;
+ }
++#endif
+ 
+ _X_EXPORT void
+ xf86PrintChipsets(const char *drvname, const char *drvmsg, SymTabPtr chips)
+ {
+ }
+-#endif


Property changes on: trunk/x11-drivers/xf86-input-wacom/files/patch-test-fake-symbols.c
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/x11-drivers/xf86-input-wacom/files/patch-test-fake-symbols.h
===================================================================
--- trunk/x11-drivers/xf86-input-wacom/files/patch-test-fake-symbols.h	                        (rev 0)
+++ trunk/x11-drivers/xf86-input-wacom/files/patch-test-fake-symbols.h	2018-08-28 13:00:35 UTC (rev 23997)
@@ -0,0 +1,10 @@
+--- test/fake-symbols.h~
++++ test/fake-symbols.h
+@@ -2,7 +2,6 @@
+ #include <dix.h>
+ #include <os.h>
+ #include <exevents.h>
+-#include <Xprintf.h>
+ #include <xf86.h>
+ #include <xf86Xinput.h>
+ #include <xf86_OSproc.h>


Property changes on: trunk/x11-drivers/xf86-input-wacom/files/patch-test-fake-symbols.h
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/x11-drivers/xf86-input-wacom/files/patch-test-wacom-tests.c
===================================================================
--- trunk/x11-drivers/xf86-input-wacom/files/patch-test-wacom-tests.c	                        (rev 0)
+++ trunk/x11-drivers/xf86-input-wacom/files/patch-test-wacom-tests.c	2018-08-28 13:00:35 UTC (rev 23997)
@@ -0,0 +1,19 @@
+--- test/wacom-tests.c~
++++ test/wacom-tests.c
+@@ -184,7 +184,7 @@ test_normalize_pressure(void)
+ 
+ 	priv.common = &common;
+ 	priv.pInfo = &pInfo;
+-	pInfo.name = strdupa("Wacom test device");
++	pInfo.name = strdup("Wacom test device");
+ 	common.wcmPressureRecalibration = 1;
+ 
+ 	priv.minPressure = 0;
+@@ -229,6 +229,7 @@ test_normalize_pressure(void)
+ 		/* we count up, so assume normalised pressure goes up too */
+ 		assert(prev_pressure == pressure);
+ 	}
++	free(pInfo.name);
+ }
+ 
+ /**


Property changes on: trunk/x11-drivers/xf86-input-wacom/files/patch-test-wacom-tests.c
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/x11-drivers/xf86-input-wacom/files/patch-tools-isdv4-serial-debugger.c
===================================================================
--- trunk/x11-drivers/xf86-input-wacom/files/patch-tools-isdv4-serial-debugger.c	                        (rev 0)
+++ trunk/x11-drivers/xf86-input-wacom/files/patch-tools-isdv4-serial-debugger.c	2018-08-28 13:00:35 UTC (rev 23997)
@@ -0,0 +1,10 @@
+--- tools/isdv4-serial-debugger.c~
++++ tools/isdv4-serial-debugger.c
+@@ -25,7 +25,6 @@
+ 
+ #include <errno.h>
+ #include <fcntl.h>
+-#include <linux/serial.h>
+ #include <getopt.h>
+ #include <poll.h>
+ #include <stdio.h>


Property changes on: trunk/x11-drivers/xf86-input-wacom/files/patch-tools-isdv4-serial-debugger.c
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/x11-drivers/xf86-input-wacom/files/patch-tools-isdv4-serial-inputattach.c
===================================================================
--- trunk/x11-drivers/xf86-input-wacom/files/patch-tools-isdv4-serial-inputattach.c	                        (rev 0)
+++ trunk/x11-drivers/xf86-input-wacom/files/patch-tools-isdv4-serial-inputattach.c	2018-08-28 13:00:35 UTC (rev 23997)
@@ -0,0 +1,71 @@
+--- tools/isdv4-serial-inputattach.c~
++++ tools/isdv4-serial-inputattach.c
+@@ -23,8 +23,10 @@
+ #include "config.h"
+ #endif
+ 
++#ifdef __linux__
+ #include <linux/serio.h>
+ #include <libudev.h>
++#endif
+ 
+ #include <getopt.h>
+ #include <stdio.h>
+@@ -49,7 +52,11 @@ static void usage(void)
+ 		"--verbose             - verbose output\n"
+ 		"--version             - version info\n"
+ 		"--baudrate <19200|38400>  - set baudrate\n",
++#ifdef __GLIBC__
+ 		program_invocation_short_name
++#else
++		getprogname()
++#endif
+ 	      );
+ }
+ 
+@@ -64,6 +71,7 @@ static int set_line_discipline(int fd, i
+ 	return rc;
+ }
+ 
++#ifdef __linux
+ static int bind_kernel_driver(int fd)
+ {
+ 	unsigned long devt;
+@@ -77,9 +84,11 @@ static int bind_kernel_driver(int fd)
+ 
+ 	return 0;
+ }
++#endif
+ 
+ static unsigned int get_baud_rate(int fd)
+ {
++#ifdef __linux__
+ 	struct stat st;
+ 	unsigned int baudrate = 19200;
+ 	int id;
+@@ -112,6 +122,9 @@ int get_baud_rate(int fd)
+ 	udev_unref(udev);
+ 
+ 	return baudrate;
++#else
++	return 19200;
++#endif
+ }
+ 
+ void sighandler(int signum)
+@@ -194,6 +207,7 @@ int main(int argc, char **argv)
+ 		return 1;
+ 	}
+ 
++#ifdef __linux__
+ 	/* some of the 19200 tablets can't set the line discipline */
+ 	set_line_discipline(fd, N_MOUSE);
+ 
+@@ -201,6 +215,7 @@ int main(int argc, char **argv)
+ 		fprintf(stderr, "Failed to bind the kernel driver.\n");
+ 		goto out;
+ 	}
++#endif
+ 
+ 	signal(SIGINT, sighandler);
+ 	signal(SIGHUP, sighandler);


Property changes on: trunk/x11-drivers/xf86-input-wacom/files/patch-tools-isdv4-serial-inputattach.c
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/x11-drivers/xf86-input-wacom/files/patch-tools-tools-shared.c
===================================================================
--- trunk/x11-drivers/xf86-input-wacom/files/patch-tools-tools-shared.c	                        (rev 0)
+++ trunk/x11-drivers/xf86-input-wacom/files/patch-tools-tools-shared.c	2018-08-28 13:00:35 UTC (rev 23997)
@@ -0,0 +1,34 @@
+--- tools/tools-shared.c~
++++ tools/tools-shared.c
+@@ -23,7 +23,9 @@
+ 
+ #include <errno.h>
+ #include <fcntl.h>
++#ifdef __linux__
+ #include <linux/serial.h>
++#endif
+ #include <getopt.h>
+ #include <poll.h>
+ #include <stdio.h>
+@@ -51,7 +53,6 @@ void version(void)
+ int open_device(const char *path)
+ {
+ 	int fd;
+-	struct serial_struct ser;
+ 
+ 	TRACE("Opening device '%s'.\n", path);
+ 	fd = open(path, O_RDWR | O_NOCTTY);
+@@ -59,7 +60,13 @@ int open_device(const char *path)
+ 	if (fd < 1)
+ 		perror("Failed to open device file");
+ 
++#ifdef __linux__
++	struct serial_struct ser;
+ 	if (ioctl(fd, TIOCGSERIAL, &ser) == -1)
++#else
++	struct termios termAttr;
++	if (tcgetattr(fd, &termAttr) == -1)
++#endif
+ 	{
+ 		perror("Not a serial device?");
+ 		close(fd);


Property changes on: trunk/x11-drivers/xf86-input-wacom/files/patch-tools-tools-shared.c
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/x11-drivers/xf86-input-wacom/files/pkg-message.in
===================================================================
--- trunk/x11-drivers/xf86-input-wacom/files/pkg-message.in	                        (rev 0)
+++ trunk/x11-drivers/xf86-input-wacom/files/pkg-message.in	2018-08-28 13:00:35 UTC (rev 23997)
@@ -0,0 +1,9 @@
+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
+
+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.


Property changes on: trunk/x11-drivers/xf86-input-wacom/files/pkg-message.in
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/x11-drivers/xf86-input-wacom/files/wacom.conf.sample
===================================================================
--- trunk/x11-drivers/xf86-input-wacom/files/wacom.conf.sample	                        (rev 0)
+++ trunk/x11-drivers/xf86-input-wacom/files/wacom.conf.sample	2018-08-28 13:00:35 UTC (rev 23997)
@@ -0,0 +1,33 @@
+# Manual configuration example for Bamboo Pen & Touch for use without devd or HAL.
+
+Section "InputDevice"
+	Identifier	"wacom stylus"
+	Driver		"wacom"
+	Option		"Type"			"stylus"
+	Option		"Device"		"/dev/input/event0"
+	Option          "AutoServerLayout"	"true"
+EndSection
+
+Section "InputDevice"
+	Identifier	"wacom eraser"
+	Driver		"wacom"
+	Option		"Type"			"eraser"
+	Option		"Device"		"/dev/input/event0"
+	Option          "AutoServerLayout"	"true"
+EndSection
+
+Section "InputDevice"
+	Identifier	"wacom touch"
+	Driver		"wacom"
+	Option		"Type"			"touch"
+	Option		"Device"		"/dev/input/event1"
+	Option          "AutoServerLayout"	"true"
+EndSection
+
+Section "InputDevice"
+	Identifier	"wacom pad"
+	Driver		"wacom"
+	Option		"Type"			"pad"
+	Option		"Device"		"/dev/input/event1"
+	Option          "AutoServerLayout"	"true"
+EndSection


Property changes on: trunk/x11-drivers/xf86-input-wacom/files/wacom.conf.sample
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/x11-drivers/xf86-input-wacom/files/wacom.in
===================================================================
--- trunk/x11-drivers/xf86-input-wacom/files/wacom.in	                        (rev 0)
+++ trunk/x11-drivers/xf86-input-wacom/files/wacom.in	2018-08-28 13:00:35 UTC (rev 23997)
@@ -0,0 +1,46 @@
+#!/bin/sh
+#
+# $FreeBSD: head/x11-drivers/xf86-input-wacom/files/wacom.in 409737 2016-02-28 12:16:13Z jbeich $
+#
+# PROVIDE: wacom
+# REQUIRE: mountcritlocal
+# BEFORE:  devd
+# KEYWORD: nojail
+#
+# Add the following lines to /etc/rc.conf to enable this service:
+#
+# wacom_enable (bool):	Set it to YES to add Wacom USB quirks on startup.
+#			Default: NO
+
+. /etc/rc.subr
+
+name="wacom"
+rcvar="wacom_enable"
+
+load_rc_config "$name"
+
+: ${wacom_enable:="NO"}
+
+start_precmd="wacom_prepare"
+start_cmd="wacom_start"
+stop_cmd="wacom_stop"
+
+wacom_prepare()
+{
+	kldload -n usb_quirk
+}
+
+wacom_start()
+{
+	# Prevent moused(8) from picking up bogus /dev/umsN
+	usbconfig add_dev_quirk_vplh 0x056a 0 0 0xffff UQ_MATCH_VENDOR_ONLY
+	usbconfig add_dev_quirk_vplh 0x056a 0 0 0xffff UQ_UMS_IGNORE
+}
+
+wacom_stop()
+{
+	usbconfig remove_dev_quirk_vplh 0x056a 0 0 0xffff UQ_MATCH_VENDOR_ONLY
+	usbconfig remove_dev_quirk_vplh 0x056a 0 0 0xffff UQ_UMS_IGNORE
+}
+
+run_rc_command "$1"


Property changes on: trunk/x11-drivers/xf86-input-wacom/files/wacom.in
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/x11-drivers/xf86-input-wacom/pkg-descr
===================================================================
--- trunk/x11-drivers/xf86-input-wacom/pkg-descr	                        (rev 0)
+++ trunk/x11-drivers/xf86-input-wacom/pkg-descr	2018-08-28 13:00:35 UTC (rev 23997)
@@ -0,0 +1,4 @@
+An X.Org driver for Wacom tablets. It communicates with a character
+device provided by Linux kernel driver in webcamd.
+
+WWW: https://linuxwacom.github.io/


Property changes on: trunk/x11-drivers/xf86-input-wacom/pkg-descr
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/x11-drivers/xf86-input-wacom/pkg-plist
===================================================================
--- trunk/x11-drivers/xf86-input-wacom/pkg-plist	                        (rev 0)
+++ trunk/x11-drivers/xf86-input-wacom/pkg-plist	2018-08-28 13:00:35 UTC (rev 23997)
@@ -0,0 +1,14 @@
+bin/isdv4-serial-debugger
+bin/isdv4-serial-inputattach
+bin/xsetwacom
+ at comment Not marked @sample due to conflict with devd and HAL
+etc/X11/xorg.conf.d/wacom.conf.sample
+include/xorg/Xwacom.h
+include/xorg/isdv4.h
+include/xorg/wacom-properties.h
+include/xorg/wacom-util.h
+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/70-wacom.conf


Property changes on: trunk/x11-drivers/xf86-input-wacom/pkg-plist
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property


More information about the Midnightbsd-cvs mailing list