--- files/patch-src-Makefile.in (revision 324375) +++ files/patch-src-Makefile.in (working copy) @@ -1,40 +0,0 @@ ---- src/Makefile.in.orig -+++ src/Makefile.in -@@ -97,7 +97,7 @@ am__base_list = \ - am__installdirs = "$(DESTDIR)$(@DRIVER_NAME@_drv_ladir)" - LTLIBRARIES = $(@DRIVER_NAME@_drv_la_LTLIBRARIES) - @DRIVER_NAME@_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_@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@./$(DEPDIR)/wcmCommon.Plo@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wcmConfig.Plo@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wcmFilter.Plo@am__quote@ --@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wcmISDV4.Plo@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wcmTouchFilter.Plo@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wcmUSB.Plo@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wcmValidateDevice.Plo@am__quote@ -@@ -467,12 +465,7 @@ wcmConfig.lo: $(top_srcdir)/src/wcmConfi - @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ - @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(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 --@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 --@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/wcmISDV4.Tpo $(DEPDIR)/wcmISDV4.Plo --@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(top_srcdir)/src/wcmISDV4.c' object='wcmISDV4.lo' libtool=yes @AMDEPBACKSLASH@ - @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ --@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(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 --- files/patch-src-wcmConfig.c (revision 324375) +++ files/patch-src-wcmConfig.c (working copy) @@ -1,16 +0,0 @@ ---- src/wcmConfig.c.orig -+++ 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); --- files/patch-src-wcmISDV4.c (revision 0) +++ files/patch-src-wcmISDV4.c (working copy) @@ -0,0 +1,123 @@ +--- src/wcmISDV4.c.orig 2013-08-07 16:41:16.844274271 -0700 ++++ src/wcmISDV4.c 2013-08-07 19:38:52.321272814 -0700 +@@ -24,11 +24,10 @@ + #include "xf86Wacom.h" + #include + #include "wcmFilter.h" +-#include + #include "isdv4.h" ++#include + #include + #include +-#include + + #define RESET_RELATIVE(ds) do { (ds).relwheel = 0; } while (0) + +@@ -192,11 +191,11 @@ + + static Bool isdv4Detect(InputInfoPtr pInfo) + { +- struct serial_struct ser; ++ struct termios termAttr; + int rc; + +- rc = ioctl(pInfo->fd, TIOCGSERIAL, &ser); +- if (rc == -1) ++ rc = tcgetattr( pInfo->fd, &termAttr ); ++ if( rc != 0 ) + return FALSE; + + return TRUE; +@@ -935,67 +934,6 @@ + }; + + /** +- * Query the model number from the sysfs /sys/.../device/id file and return +- * the matching model and the ID for the model we found. +- * +- * @param pInfo Used for debugging purposes only. +- * @param fd File descriptor to the serial device. +- * @param[out] id On success, returns the numeric ID for this device +- * according to the model-specific matching pattern. +- * +- * @return The model description for the matching device or NULL if no +- * matching one could be found. +- */ +-static ISDV4ModelDesc* +-model_from_sysfs(const InputInfoPtr pInfo, int fd, int *id) +-{ +- WacomDevicePtr priv = pInfo->private; +- ISDV4ModelDesc* model = NULL; +- struct udev *udev = NULL; +- struct udev_device *device = NULL; +- struct stat st; +- char *sysfs_path = NULL; +- FILE *file = NULL; +- +- fstat(fd, &st); +- +- udev = udev_new(); +- device = udev_device_new_from_devnum(udev, 'c', st.st_rdev); +- +- if (!device) +- goto out; +- +- if (asprintf(&sysfs_path, "%s/device/id", +- udev_device_get_syspath(device)) == -1) +- goto out; +- +- DBG(8, priv, "sysfs path: %s\n", sysfs_path); +- +- file = fopen(sysfs_path, "r"); +- if (!file) +- goto out; +- +- model = isdv4_models; +- +- while(model->pattern && fscanf(file, model->pattern, id) <= 0) +- model++; +- +- if (!model->pattern) +- model = NULL; +- +- DBG(8, priv, "sysfs check found %s:%d\n", +- (model) ? model->pattern : "", *id); +- +-out: +- udev_device_unref(device); +- udev_unref(udev); +- if (file) +- fclose(file); +- free(sysfs_path); +- return model; +-} +- +-/** + * Query the device's fd for the key bits and the tablet ID. Returns the ID + * on success. If the model vendor is unknown, we assume a penabled device + * (0x90). If the model vendor is known but the model itself is unknown, the +@@ -1010,22 +948,18 @@ + { + int id = 0; + int tablet_id = 0x90; +- struct serial_struct tmp; ++ struct termios tmp; + WacomDevicePtr priv = (WacomDevicePtr)pInfo->private; + WacomCommonPtr common = priv->common; + ISDV4ModelDesc *model = isdv4_models; + +- if (ioctl(pInfo->fd, TIOCGSERIAL, &tmp) < 0) ++ if( tcgetattr( pInfo->fd, &tmp ) != 0 ) + return 0; + + /* check device name for ID first */ + while (model->pattern && sscanf(pInfo->name, model->pattern, &id) < 1) + model++; + +- /* grab id from sysfs/.../device/id */ +- if (!model->pattern) +- model = model_from_sysfs(pInfo, pInfo->fd, &id); +- + memset(common->wcmKeys, 0, sizeof(common->wcmKeys)); + + /* default to penabled */ --- files/patch-tools-Makefile.in (revision 324375) +++ files/patch-tools-Makefile.in (working copy) @@ -1,11 +0,0 @@ ---- tools/Makefile.in.orig -+++ tools/Makefile.in -@@ -54,6 +54,6 @@ PRE_UNINSTALL = : - POST_UNINSTALL = : - build_triplet = @build@ - host_triplet = @host@ --bin_PROGRAMS = xsetwacom$(EXEEXT) isdv4-serial-debugger$(EXEEXT) -+bin_PROGRAMS = xsetwacom$(EXEEXT) - @UNITTESTS_TRUE@check_PROGRAMS = xsetwacom-test$(EXEEXT) - subdir = tools - DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in --- files/patch-tools-isdv4-serial-debugger.c (revision 0) +++ files/patch-tools-isdv4-serial-debugger.c (working copy) @@ -0,0 +1,33 @@ +--- tools/isdv4-serial-debugger.c.orig 2013-08-07 16:41:16.826271564 -0700 ++++ tools/isdv4-serial-debugger.c 2013-08-07 20:39:14.513272146 -0700 +@@ -25,7 +25,6 @@ + + #include + #include +-#include + #include + #include + #include +@@ -71,7 +70,6 @@ + static int open_device(char *path) + { + int fd, rc; +- struct serial_struct ser; + struct termios t; + + TRACE("Opening device '%s'.\n", path); +@@ -80,14 +78,6 @@ + if (fd < 1) + perror("Failed to open device file."); + +- if (ioctl(fd, TIOCGSERIAL, &ser) == -1) +- { +- fprintf(stderr, "Not a serial device?"); +- close(fd); +- fd = -1; +- goto out; +- } +- + rc = tcgetattr(fd, &t); + if (rc == -1) + { --- pkg-plist (revision 324375) +++ pkg-plist (working copy) @@ -1,5 +1,6 @@ bin/xsetwacom %%XINPUTMODDIR%%/wacom_drv.so +%%XINPUTMODDIR%%/isdv4-serial-debugger @dirrmtry %%XINPUTMODDIR%% @cwd %%KMODDIR%% %%UWACOMKLD%%