FreeBSD Bugzilla – Attachment 143520 Details for
Bug 175876
[new port] add x11-drivers/xf86-input-wacom to replace x11-drivers/input-wacom
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
shar
xf86-input-wacom.shar (text/plain), 10.79 KB, created by
Jan Beich
on 2014-06-08 09:53:36 UTC
(
hide
)
Description:
shar
Filename:
MIME Type:
Creator:
Jan Beich
Created:
2014-06-08 09:53:36 UTC
Size:
10.79 KB
patch
obsolete
>#!/bin/sh ># This is a shell archive >echo x x11-drivers/xf86-input-wacom >mkdir -p x11-drivers/xf86-input-wacom > /dev/null 2>&1 >echo x x11-drivers/xf86-input-wacom/pkg-plist >sed 's/^X//' > x11-drivers/xf86-input-wacom/pkg-plist << 'SHAR_END' >Xbin/isdv4-serial-debugger >Xbin/isdv4-serial-inputattach >Xbin/xsetwacom >X@comment not marked @sample due to conflict with HAL >Xetc/X11/xorg.conf.d/wacom.conf.sample >Xinclude/xorg/Xwacom.h >Xinclude/xorg/isdv4.h >Xinclude/xorg/wacom-properties.h >Xinclude/xorg/wacom-util.h >Xlib/xorg/modules/input/wacom_drv.so >Xlibdata/pkgconfig/xorg-wacom.pc >Xman/man1/xsetwacom.1.gz >Xman/man4/wacom.4x.gz >X@dirrmtry lib/xorg/modules/input >X@dirrmtry lib/xorg/modules >X@dirrmtry lib/xorg >X@dirrmtry include/xorg >X@dirrmtry etc/X11/xorg.conf.d >X@dirrmtry etc/X11 >SHAR_END >echo x x11-drivers/xf86-input-wacom/pkg-descr >sed 's/^X//' > x11-drivers/xf86-input-wacom/pkg-descr << 'SHAR_END' >XAn X.Org driver for Wacom tablets. It communicates with a character >Xdevice provided by linux kernel driver in webcamd. >X >XWWW: http://linuxwacom.sourceforge.net/ >SHAR_END >echo x x11-drivers/xf86-input-wacom/files >mkdir -p x11-drivers/xf86-input-wacom/files > /dev/null 2>&1 >echo x x11-drivers/xf86-input-wacom/distinfo >sed 's/^X//' > x11-drivers/xf86-input-wacom/distinfo << 'SHAR_END' >XSHA256 (xorg/driver/xf86-input-wacom-0.24.99.1.tar.bz2) = 4b68b1570bd6ce085010980fa1842825e5d676cd2962ec6ad2d7d5bc52149983 >XSIZE (xorg/driver/xf86-input-wacom-0.24.99.1.tar.bz2) = 586002 >SHAR_END >echo x x11-drivers/xf86-input-wacom/Makefile >sed 's/^X//' > x11-drivers/xf86-input-wacom/Makefile << 'SHAR_END' >X# $FreeBSD$ >X >XPORTNAME= xf86-input-wacom >XPORTVERSION= 0.24.99.1 >XCATEGORIES= x11-drivers >XMASTER_SITES= SF/linuxwacom/${PORTNAME} >X >XMAINTAINER= jbeich@vfemail.net >XCOMMENT= X.Org Wacom tablet driver >X >XBUILD_DEPENDS= v4l_compat>=1.0.20110603:${PORTSDIR}/multimedia/v4l_compat >XRUN_DEPENDS= webcamd>0:${PORTSDIR}/multimedia/webcamd >X >XCONFLICTS= input-wacom-[0-9]* >X >XUSES= tar:bzip2 pathfix libtool >XUSE_XORG= xrandr xinerama >XXORG_CAT= driver >XSUB_FILES= pkg-message >XCONFIGURE_ARGS= --without-systemd-unit-dir \ >X --without-udev-rules-dir \ >X --without-doxygen >X >Xpost-patch: >X @${REINPLACE_CMD} -e 's/as_fn_error.*udev/${TRUE} &/' \ >X -e 's/dir=.*xorg-server/& \ >X --define-variable prefix="$$prefix"/' \ >X ${WRKSRC}/configure >X >X# XXX adjust MatchProduct to whatever Xorg/devd reports >X @${REINPLACE_CMD} -e '/^SUBDIRS/s/ conf//' \ >X ${WRKSRC}/Makefile.in >X >Xpost-install: >X ${MKDIR} ${STAGEDIR}${PREFIX}/etc/X11/xorg.conf.d >X ${INSTALL_DATA} ${FILESDIR}/wacom.conf.sample \ >X ${STAGEDIR}${PREFIX}/etc/X11/xorg.conf.d >X @${CAT} ${PKGMESSAGE} >X >X.include <bsd.port.mk> >SHAR_END >echo x x11-drivers/xf86-input-wacom/files/patch-src-wcmISDV4.c >sed 's/^X//' > x11-drivers/xf86-input-wacom/files/patch-src-wcmISDV4.c << 'SHAR_END' >X--- src/wcmISDV4.c~ >X+++ src/wcmISDV4.c >X@@ -24,11 +24,16 @@ >X #include "xf86Wacom.h" >X #include <xf86_OSproc.h> >X #include "wcmFilter.h" >X-#include <linux/serial.h> >X #include "isdv4.h" >X #include <unistd.h> >X #include <fcntl.h> >X+ >X+#ifdef __linux__ >X+#include <linux/serial.h> >X #include <libudev.h> >X+#else >X+#include <termios.h> >X+#endif >X >X #define RESET_RELATIVE(ds) do { (ds).relwheel = 0; } while (0) >X >X@@ -192,10 +197,15 @@ static int wcmSerialValidate(InputInfoPt >X >X static Bool isdv4Detect(InputInfoPtr pInfo) >X { >X- struct serial_struct ser; >X int rc; >X >X+#ifdef __linux__ >X+ struct serial_struct ser; >X rc = ioctl(pInfo->fd, TIOCGSERIAL, &ser); >X+#else >X+ struct termios termAttr; >X+ rc = tcgetattr(pInfo->fd, &termAttr); >X+#endif >X if (rc == -1) >X return FALSE; >X >X@@ -959,6 +969,7 @@ static Bool get_keys_vendor_tablet_id(ch >X return TRUE; >X } >X >X+#ifdef __linux__ >X /** >X * Return the content of id file from sysfs: /sys/.../device/id >X * >X@@ -1004,6 +1015,7 @@ out: >X >X return ret; >X } >X+#endif >X >X /** >X * Query the device's fd for the key bits and the tablet ID. Returns the ID >X@@ -1018,11 +1030,16 @@ out: >X */ >X static int isdv4ProbeKeys(InputInfoPtr pInfo) >X { >X- struct serial_struct tmp; >X WacomDevicePtr priv = (WacomDevicePtr)pInfo->private; >X WacomCommonPtr common = priv->common; >X >X+#ifdef __linux__ >X+ struct serial_struct tmp; >X if (ioctl(pInfo->fd, TIOCGSERIAL, &tmp) < 0) >X+#else >X+ struct termios tmp; >X+ if (tcgetattr(pInfo->fd, &tmp) < 0) >X+#endif >X return 0; >X >X common->tablet_id = 0x90; >X@@ -1037,9 +1054,11 @@ static int isdv4ProbeKeys(InputInfoPtr p >X common->wcmProtocolLevel = WCM_PROTOCOL_GENERIC; >X >X if (!get_keys_vendor_tablet_id(pInfo->name, common)) { >X+#ifdef __linux__ >X char buf[15] = {0}; >X if (get_sysfs_id(pInfo, buf, sizeof(buf))) >X get_keys_vendor_tablet_id(buf, common); >X+#endif >X } >X >X return common->tablet_id; >SHAR_END >echo x x11-drivers/xf86-input-wacom/files/patch-src-wcmConfig.c >sed 's/^X//' > x11-drivers/xf86-input-wacom/files/patch-src-wcmConfig.c << 'SHAR_END' >X--- src/wcmConfig.c~ >X+++ src/wcmConfig.c >X@@ -307,7 +307,7 @@ out: >X */ >X static void wcmSplitName(char* devicename, char *basename, char *subdevice, char *tool, size_t len) >X { >X- char *name = strdupa(devicename); >X+ char *name = strdup(devicename); >X char *a, *b; >X >X *basename = *subdevice = *tool = '\0'; >X@@ -325,6 +325,7 @@ static void wcmSplitName(char* devicenam >X strncat(tool, a+1, len-1); >X } >X strncat(basename, name, len-1); >X+ free(name); >X } >X >X /** >SHAR_END >echo x x11-drivers/xf86-input-wacom/files/patch-tools-tools-shared.c >sed 's/^X//' > x11-drivers/xf86-input-wacom/files/patch-tools-tools-shared.c << 'SHAR_END' >X--- tools/tools-shared.c~ >X+++ tools/tools-shared.c >X@@ -23,7 +23,9 @@ >X >X #include <errno.h> >X #include <fcntl.h> >X+#ifdef __linux__ >X #include <linux/serial.h> >X+#endif >X #include <getopt.h> >X #include <poll.h> >X #include <stdio.h> >X@@ -51,7 +53,6 @@ void version(void) >X int open_device(const char *path) >X { >X int fd; >X- struct serial_struct ser; >X >X TRACE("Opening device '%s'.\n", path); >X fd = open(path, O_RDWR | O_NOCTTY); >X@@ -59,7 +60,13 @@ int open_device(const char *path) >X if (fd < 1) >X perror("Failed to open device file"); >X >X+#ifdef __linux__ >X+ struct serial_struct ser; >X if (ioctl(fd, TIOCGSERIAL, &ser) == -1) >X+#else >X+ struct termios termAttr; >X+ if (tcgetattr(fd, &termAttr) == -1) >X+#endif >X { >X perror("Not a serial device?"); >X close(fd); >SHAR_END >echo x x11-drivers/xf86-input-wacom/files/patch-tools-isdv4-serial-inputattach.c >sed 's/^X//' > x11-drivers/xf86-input-wacom/files/patch-tools-isdv4-serial-inputattach.c << 'SHAR_END' >X--- tools/isdv4-serial-inputattach.c~ >X+++ tools/isdv4-serial-inputattach.c >X@@ -23,8 +23,10 @@ >X #include "config.h" >X #endif >X >X+#ifdef __linux__ >X #include <linux/serio.h> >X #include <libudev.h> >X+#endif >X >X #include <getopt.h> >X #include <stdio.h> >X@@ -49,7 +52,11 @@ static void usage(void) >X "--verbose - verbose output\n" >X "--version - version info\n" >X "--baudrate <19200|38400> - set baudrate\n", >X+#ifdef __GLIBC__ >X program_invocation_short_name >X+#else >X+ getprogname() >X+#endif >X ); >X } >X >X@@ -64,6 +71,7 @@ static int set_line_discipline(int fd, i >X return rc; >X } >X >X+#ifdef __linux >X static int bind_kernel_driver(int fd) >X { >X unsigned long devt; >X@@ -77,9 +85,11 @@ static int bind_kernel_driver(int fd) >X >X return 0; >X } >X+#endif >X >X int get_baud_rate(int fd) >X { >X+#ifdef __linux__ >X struct stat st; >X int baudrate = 19200; >X int id; >X@@ -112,6 +122,9 @@ int get_baud_rate(int fd) >X udev_unref(udev); >X >X return baudrate; >X+#else >X+ return 19200; >X+#endif >X } >X >X void sighandler(int signum) >X@@ -194,6 +207,7 @@ int main(int argc, char **argv) >X return 1; >X } >X >X+#ifdef __linux__ >X /* some of the 19200 tablets can't set the line discipline */ >X set_line_discipline(fd, N_MOUSE); >X >X@@ -201,6 +215,7 @@ int main(int argc, char **argv) >X fprintf(stderr, "Failed to bind the kernel driver.\n"); >X goto out; >X } >X+#endif >X >X signal(SIGINT, sighandler); >X signal(SIGHUP, sighandler); >SHAR_END >echo x x11-drivers/xf86-input-wacom/files/pkg-message.in >sed 's/^X//' > x11-drivers/xf86-input-wacom/files/pkg-message.in << 'SHAR_END' >XTo configure the driver with HAL just reattach the tablet for Xserver >Xto pick it up. Otherwise, use/edit the sample configuration file: >X >X $ cd %%PREFIX%%/etc/X11/xorg.conf.d/ >X $ cp wacom.conf.sample wacom.conf >X >XOn xorg-server-1.7 and earlier you may need to also merge wacom.conf >Xinto xorg.conf and add the following lines to ServerLayout section >X >X InputDevice "wacom stylus" >X InputDevice "wacom eraser" >X InputDevice "wacom touch" >X InputDevice "wacom pad" >SHAR_END >echo x x11-drivers/xf86-input-wacom/files/wacom.conf.sample >sed 's/^X//' > x11-drivers/xf86-input-wacom/files/wacom.conf.sample << 'SHAR_END' >X# A static configuration example for Bamboo P&T for use without HAL. >X >XSection "InputDevice" >X Identifier "wacom stylus" >X Driver "wacom" >X Option "Type" "stylus" >X Option "Device" "/dev/input/event0" >X Option "AutoServerLayout" "true" >XEndSection >X >XSection "InputDevice" >X Identifier "wacom eraser" >X Driver "wacom" >X Option "Type" "eraser" >X Option "Device" "/dev/input/event0" >X Option "AutoServerLayout" "true" >XEndSection >X >XSection "InputDevice" >X Identifier "wacom touch" >X Driver "wacom" >X Option "Type" "touch" >X Option "Device" "/dev/input/event1" >X Option "AutoServerLayout" "true" >XEndSection >X >XSection "InputDevice" >X Identifier "wacom pad" >X Driver "wacom" >X Option "Type" "pad" >X Option "Device" "/dev/input/event1" >X Option "AutoServerLayout" "true" >XEndSection >SHAR_END >echo x x11-drivers/xf86-input-wacom/files/patch-tools-isdv4-serial-debugger.c >sed 's/^X//' > x11-drivers/xf86-input-wacom/files/patch-tools-isdv4-serial-debugger.c << 'SHAR_END' >X--- tools/isdv4-serial-debugger.c~ >X+++ tools/isdv4-serial-debugger.c >X@@ -25,7 +25,6 @@ >X >X #include <errno.h> >X #include <fcntl.h> >X-#include <linux/serial.h> >X #include <getopt.h> >X #include <poll.h> >X #include <stdio.h> >SHAR_END >echo x x11-drivers/xf86-input-wacom/files/patch-src-xf86WacomDefs.h >sed 's/^X//' > x11-drivers/xf86-input-wacom/files/patch-src-xf86WacomDefs.h << 'SHAR_END' >X--- src/xf86WacomDefs.h~ >X+++ src/xf86WacomDefs.h >X@@ -24,7 +24,9 @@ >X * General Defines >X ****************************************************************************/ >X #include <wacom-util.h> >X+#ifdef __linux__ >X #include <asm/types.h> >X+#endif >X #include <linux/input.h> >X #define MAX_USB_EVENTS 32 >X >SHAR_END >echo x x11-drivers/xf86-input-wacom/files/patch-src-wcmUSB.c >sed 's/^X//' > x11-drivers/xf86-input-wacom/files/patch-src-wcmUSB.c << 'SHAR_END' >X--- src/wcmUSB.c~ >X+++ src/wcmUSB.c >X@@ -23,10 +23,17 @@ >X >X #include "xf86Wacom.h" >X >X+#ifdef __linux__ >X #include <asm/types.h> >X+#endif >X #include <linux/input.h> >X #include <sys/utsname.h> >X+#ifdef __linux__ >X #include <linux/version.h> >X+#else >X+#define LINUX_VERSION_CODE 1 >X+#define KERNEL_VERSION(a,b,c) 0 >X+#endif >X >X #define MAX_USB_EVENTS 32 >X >SHAR_END >exit
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 175876
:
131727
| 143520