summaryrefslogtreecommitdiffstats
path: root/x11-drivers
diff options
context:
space:
mode:
authormiwi <miwi@058c260c-8361-11dd-a0ac-aa2bafec7d09>2010-02-15 07:00:54 +0800
committermiwi <miwi@058c260c-8361-11dd-a0ac-aa2bafec7d09>2010-02-15 07:00:54 +0800
commit244839495c275e9457be660ef28ee3f284c72ca5 (patch)
tree2612015604732ff0067cc8ba92cadbb6fcba458b /x11-drivers
parent9f2ae103b3488ed9519ef7d49be69f75798e074e (diff)
downloadxorg-devel-ports-244839495c275e9457be660ef28ee3f284c72ca5.tar
xorg-devel-ports-244839495c275e9457be660ef28ee3f284c72ca5.tar.gz
xorg-devel-ports-244839495c275e9457be660ef28ee3f284c72ca5.tar.bz2
xorg-devel-ports-244839495c275e9457be660ef28ee3f284c72ca5.tar.lz
xorg-devel-ports-244839495c275e9457be660ef28ee3f284c72ca5.tar.xz
xorg-devel-ports-244839495c275e9457be660ef28ee3f284c72ca5.tar.zst
xorg-devel-ports-244839495c275e9457be660ef28ee3f284c72ca5.zip
- Add first input drivers
git-svn-id: https://trillian.chruetertee.ch/svn/ports/branches/xorg-dev@76 058c260c-8361-11dd-a0ac-aa2bafec7d09
Diffstat (limited to 'x11-drivers')
-rw-r--r--x11-drivers/xf86-input-acecad/Makefile18
-rw-r--r--x11-drivers/xf86-input-acecad/distinfo3
-rw-r--r--x11-drivers/xf86-input-acecad/pkg-descr4
-rw-r--r--x11-drivers/xf86-input-acecad/pkg-plist5
-rw-r--r--x11-drivers/xf86-input-joystick/Makefile23
-rw-r--r--x11-drivers/xf86-input-joystick/distinfo3
-rw-r--r--x11-drivers/xf86-input-joystick/pkg-descr4
-rw-r--r--x11-drivers/xf86-input-joystick/pkg-plist6
-rw-r--r--x11-drivers/xf86-input-keyboard/MD50
-rw-r--r--x11-drivers/xf86-input-keyboard/Makefile19
-rw-r--r--x11-drivers/xf86-input-keyboard/SHA2560
-rw-r--r--x11-drivers/xf86-input-keyboard/distinfo3
-rw-r--r--x11-drivers/xf86-input-keyboard/files/patch-at_scancode.c31
-rw-r--r--x11-drivers/xf86-input-keyboard/pkg-descr4
-rw-r--r--x11-drivers/xf86-input-keyboard/pkg-plist5
-rw-r--r--x11-drivers/xf86-input-mouse/Makefile18
-rw-r--r--x11-drivers/xf86-input-mouse/distinfo3
-rw-r--r--x11-drivers/xf86-input-mouse/files/patch-src-bsd_mouse.c250
-rw-r--r--x11-drivers/xf86-input-mouse/pkg-descr4
-rw-r--r--x11-drivers/xf86-input-mouse/pkg-plist5
-rw-r--r--x11-drivers/xf86-input-synaptics/Makefile30
-rw-r--r--x11-drivers/xf86-input-synaptics/distinfo3
-rw-r--r--x11-drivers/xf86-input-synaptics/files/patch-configure11
-rw-r--r--x11-drivers/xf86-input-synaptics/pkg-descr4
-rw-r--r--x11-drivers/xf86-input-synaptics/pkg-plist16
-rw-r--r--x11-drivers/xf86-input-vmmouse/Makefile24
-rw-r--r--x11-drivers/xf86-input-vmmouse/distinfo3
-rw-r--r--x11-drivers/xf86-input-vmmouse/pkg-descr1
-rw-r--r--x11-drivers/xf86-input-vmmouse/pkg-plist8
-rw-r--r--x11-drivers/xf86-input-void/Makefile18
-rw-r--r--x11-drivers/xf86-input-void/distinfo3
-rw-r--r--x11-drivers/xf86-input-void/pkg-descr4
-rw-r--r--x11-drivers/xf86-input-void/pkg-plist5
33 files changed, 538 insertions, 0 deletions
diff --git a/x11-drivers/xf86-input-acecad/Makefile b/x11-drivers/xf86-input-acecad/Makefile
new file mode 100644
index 0000000..e96dded
--- /dev/null
+++ b/x11-drivers/xf86-input-acecad/Makefile
@@ -0,0 +1,18 @@
+# New ports collection makefile for: xf86-input-acecad
+# Date Created: 17 Feb 2006
+# Whom: Florent Thoumie <flz@FreeBSD.org>
+#
+# $FreeBSD: ports/x11-drivers/xf86-input-acecad/Makefile,v 1.6 2009/05/07 19:42:31 rnoland Exp $
+#
+
+PORTNAME= xf86-input-acecad
+PORTVERSION= 1.4.0
+CATEGORIES= x11-drivers
+
+MAINTAINER= x11@FreeBSD.org
+COMMENT= X.Org acecad input driver
+
+XORG_CAT= driver
+MAN4= acecad.4x
+
+.include <bsd.port.mk>
diff --git a/x11-drivers/xf86-input-acecad/distinfo b/x11-drivers/xf86-input-acecad/distinfo
new file mode 100644
index 0000000..c4f044b
--- /dev/null
+++ b/x11-drivers/xf86-input-acecad/distinfo
@@ -0,0 +1,3 @@
+MD5 (xorg/driver/xf86-input-acecad-1.4.0.tar.bz2) = 51247dc0d73185e35bec326283bc49a5
+SHA256 (xorg/driver/xf86-input-acecad-1.4.0.tar.bz2) = 48341d8b6b0060228134b36543986c949ea828d6ce6d0484d29b3dde9ddbd556
+SIZE (xorg/driver/xf86-input-acecad-1.4.0.tar.bz2) = 255888
diff --git a/x11-drivers/xf86-input-acecad/pkg-descr b/x11-drivers/xf86-input-acecad/pkg-descr
new file mode 100644
index 0000000..d20ae83
--- /dev/null
+++ b/x11-drivers/xf86-input-acecad/pkg-descr
@@ -0,0 +1,4 @@
+This package contains the X.Org xf86-input-acecad driver.
+
+- Florent Thoumie
+flz@FreeBSD.org
diff --git a/x11-drivers/xf86-input-acecad/pkg-plist b/x11-drivers/xf86-input-acecad/pkg-plist
new file mode 100644
index 0000000..bece9a4
--- /dev/null
+++ b/x11-drivers/xf86-input-acecad/pkg-plist
@@ -0,0 +1,5 @@
+lib/xorg/modules/input/acecad_drv.la
+lib/xorg/modules/input/acecad_drv.so
+@dirrmtry lib/xorg/modules/input
+@dirrmtry lib/xorg/modules
+@dirrmtry lib/xorg
diff --git a/x11-drivers/xf86-input-joystick/Makefile b/x11-drivers/xf86-input-joystick/Makefile
new file mode 100644
index 0000000..4a63d20
--- /dev/null
+++ b/x11-drivers/xf86-input-joystick/Makefile
@@ -0,0 +1,23 @@
+# New ports collection makefile for: xf86-input-joystick
+# Date Created: 17 Feb 2006
+# Whom: Florent Thoumie <flz@FreeBSD.org>
+#
+# $FreeBSD: ports/x11-drivers/xf86-input-joystick/Makefile,v 1.7 2009/05/07 20:46:58 rnoland Exp $
+#
+
+PORTNAME= xf86-input-joystick
+PORTVERSION= 1.5.0
+CATEGORIES= x11-drivers
+
+MAINTAINER= x11@FreeBSD.org
+COMMENT= X.Org joystick input driver
+
+XORG_CAT= driver
+
+MAN4= joystick.4x
+
+post-patch:
+ @${REINPLACE_CMD} -e 's|[(]libdir[)]/pkgconfig|(prefix)/libdata/pkgconfig|g' \
+ ${WRKSRC}/Makefile.in
+
+.include <bsd.port.mk>
diff --git a/x11-drivers/xf86-input-joystick/distinfo b/x11-drivers/xf86-input-joystick/distinfo
new file mode 100644
index 0000000..9be3820
--- /dev/null
+++ b/x11-drivers/xf86-input-joystick/distinfo
@@ -0,0 +1,3 @@
+MD5 (xorg/driver/xf86-input-joystick-1.5.0.tar.bz2) = 79b20f86d1b2e625ae65e35c3457027f
+SHA256 (xorg/driver/xf86-input-joystick-1.5.0.tar.bz2) = 718118c5d769529f604c1ff099fe637173442cf01fc40bdef7d45f4baea282a9
+SIZE (xorg/driver/xf86-input-joystick-1.5.0.tar.bz2) = 283763
diff --git a/x11-drivers/xf86-input-joystick/pkg-descr b/x11-drivers/xf86-input-joystick/pkg-descr
new file mode 100644
index 0000000..14f2aaa
--- /dev/null
+++ b/x11-drivers/xf86-input-joystick/pkg-descr
@@ -0,0 +1,4 @@
+This package contains the X.Org xf86-input-joystick driver.
+
+- Florent Thoumie
+flz@FreeBSD.org
diff --git a/x11-drivers/xf86-input-joystick/pkg-plist b/x11-drivers/xf86-input-joystick/pkg-plist
new file mode 100644
index 0000000..45b9a0f
--- /dev/null
+++ b/x11-drivers/xf86-input-joystick/pkg-plist
@@ -0,0 +1,6 @@
+lib/xorg/modules/input/joystick_drv.la
+lib/xorg/modules/input/joystick_drv.so
+libdata/pkgconfig/xorg-joystick.pc
+@dirrmtry lib/xorg/modules/input
+@dirrmtry lib/xorg/modules
+@dirrmtry lib/xorg
diff --git a/x11-drivers/xf86-input-keyboard/MD5 b/x11-drivers/xf86-input-keyboard/MD5
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/x11-drivers/xf86-input-keyboard/MD5
diff --git a/x11-drivers/xf86-input-keyboard/Makefile b/x11-drivers/xf86-input-keyboard/Makefile
new file mode 100644
index 0000000..56d8ea1
--- /dev/null
+++ b/x11-drivers/xf86-input-keyboard/Makefile
@@ -0,0 +1,19 @@
+# New ports collection makefile for: xf86-input-keyboard
+# Date Created: 17 Feb 2006
+# Whom: Florent Thoumie <flz@FreeBSD.org>
+#
+# $FreeBSD: ports/x11-drivers/xf86-input-keyboard/Makefile,v 1.7 2009/05/07 19:42:33 rnoland Exp $
+#
+
+PORTNAME= xf86-input-keyboard
+PORTVERSION= 1.4.0
+CATEGORIES= x11-drivers
+
+MAINTAINER= x11@FreeBSD.org
+COMMENT= X.Org keyboard input driver
+
+XORG_CAT= driver
+USE_XORG= kbproto
+MAN4= kbd.4x
+
+.include <bsd.port.mk>
diff --git a/x11-drivers/xf86-input-keyboard/SHA256 b/x11-drivers/xf86-input-keyboard/SHA256
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/x11-drivers/xf86-input-keyboard/SHA256
diff --git a/x11-drivers/xf86-input-keyboard/distinfo b/x11-drivers/xf86-input-keyboard/distinfo
new file mode 100644
index 0000000..bc43911
--- /dev/null
+++ b/x11-drivers/xf86-input-keyboard/distinfo
@@ -0,0 +1,3 @@
+MD5 (xorg/driver/xf86-input-keyboard-1.4.0.tar.bz2) = fd17158ffeacecc8cc670604460cb98b
+SHA256 (xorg/driver/xf86-input-keyboard-1.4.0.tar.bz2) = 842d36cfca68ddab4f2c562c73bfd43ba76de2d490d60034f0c5dd524aa6d6a5
+SIZE (xorg/driver/xf86-input-keyboard-1.4.0.tar.bz2) = 287234
diff --git a/x11-drivers/xf86-input-keyboard/files/patch-at_scancode.c b/x11-drivers/xf86-input-keyboard/files/patch-at_scancode.c
new file mode 100644
index 0000000..4a24423
--- /dev/null
+++ b/x11-drivers/xf86-input-keyboard/files/patch-at_scancode.c
@@ -0,0 +1,31 @@
+--- src/at_scancode.c.orig Sun Jul 3 09:01:35 2005
++++ src/at_scancode.c Sat Oct 7 21:27:29 2006
+@@ -84,6 +84,10 @@
+ case KEY_Prefix0:
+ pKbd->scanPrefix = 0;
+ switch (*scanCode) {
++ case 0x1e: *scanCode = KEY_AudioRaise;break;
++ case 0x1f: *scanCode = KEY_AudioLower;break;
++ case 0x20: *scanCode = KEY_Power; break;
++ case 0x25: *scanCode = KEY_Mute; break;
+ case KEY_KP_7: *scanCode = KEY_Home; break; /* curs home */
+ case KEY_KP_8: *scanCode = KEY_Up; break; /* curs up */
+ case KEY_KP_9: *scanCode = KEY_PgUp; break; /* curs pgup */
+@@ -103,6 +107,17 @@
+ case 0x5b: *scanCode = KEY_LMeta; break;
+ case 0x5c: *scanCode = KEY_RMeta; break;
+ case 0x5d: *scanCode = KEY_Menu; break;
++ case 0x5e: *scanCode = KEY_L1; break; /* stop */
++ case 0x5f: *scanCode = KEY_L2; break; /* again */
++ case 0x60: *scanCode = KEY_L3; break; /* props */
++ case 0x61: *scanCode = KEY_L4; break; /* undo */
++ case 0x62: *scanCode = KEY_L5; break; /* front */
++ case 0x63: *scanCode = KEY_L6; break; /* copy */
++ case 0x64: *scanCode = KEY_L7; break; /* open */
++ case 0x65: *scanCode = KEY_L8; break; /* paste */
++ case 0x66: *scanCode = KEY_L9; break; /* find */
++ case 0x67: *scanCode = KEY_L10; break; /* cut */
++ case 0x68: *scanCode = KEY_Help; break;
+ case KEY_F3: *scanCode = KEY_F13; break;
+ case KEY_F4: *scanCode = KEY_F14; break;
+ case KEY_F5: *scanCode = KEY_F15; break;
diff --git a/x11-drivers/xf86-input-keyboard/pkg-descr b/x11-drivers/xf86-input-keyboard/pkg-descr
new file mode 100644
index 0000000..032961e
--- /dev/null
+++ b/x11-drivers/xf86-input-keyboard/pkg-descr
@@ -0,0 +1,4 @@
+This package contains the X.Org xf86-input-keyboard driver.
+
+- Florent Thoumie
+flz@FreeBSD.org
diff --git a/x11-drivers/xf86-input-keyboard/pkg-plist b/x11-drivers/xf86-input-keyboard/pkg-plist
new file mode 100644
index 0000000..7e9f47e
--- /dev/null
+++ b/x11-drivers/xf86-input-keyboard/pkg-plist
@@ -0,0 +1,5 @@
+lib/xorg/modules/input/kbd_drv.la
+lib/xorg/modules/input/kbd_drv.so
+@dirrmtry lib/xorg/modules/input
+@dirrmtry lib/xorg/modules
+@dirrmtry lib/xorg
diff --git a/x11-drivers/xf86-input-mouse/Makefile b/x11-drivers/xf86-input-mouse/Makefile
new file mode 100644
index 0000000..474048e
--- /dev/null
+++ b/x11-drivers/xf86-input-mouse/Makefile
@@ -0,0 +1,18 @@
+# New ports collection makefile for: xf86-input-mouse
+# Date Created: 17 Feb 2006
+# Whom: Florent Thoumie <flz@FreeBSD.org>
+#
+# $FreeBSD: ports/x11-drivers/xf86-input-mouse/Makefile,v 1.12 2009/05/07 19:42:33 rnoland Exp $
+#
+
+PORTNAME= xf86-input-mouse
+PORTVERSION= 1.5.0
+CATEGORIES= x11-drivers
+
+MAINTAINER= x11@FreeBSD.org
+COMMENT= X.Org mouse input driver
+
+XORG_CAT= driver
+MAN4= mousedrv.4x
+
+.include <bsd.port.mk>
diff --git a/x11-drivers/xf86-input-mouse/distinfo b/x11-drivers/xf86-input-mouse/distinfo
new file mode 100644
index 0000000..017bdcb
--- /dev/null
+++ b/x11-drivers/xf86-input-mouse/distinfo
@@ -0,0 +1,3 @@
+MD5 (xorg/driver/xf86-input-mouse-1.5.0.tar.bz2) = c58629fddf0782dad5c02da6aeb35521
+SHA256 (xorg/driver/xf86-input-mouse-1.5.0.tar.bz2) = f303e20872ab2fb20e07a7f734d17723346d2b4b8687ea2086f7a7468d1ab397
+SIZE (xorg/driver/xf86-input-mouse-1.5.0.tar.bz2) = 308189
diff --git a/x11-drivers/xf86-input-mouse/files/patch-src-bsd_mouse.c b/x11-drivers/xf86-input-mouse/files/patch-src-bsd_mouse.c
new file mode 100644
index 0000000..b1da04c
--- /dev/null
+++ b/x11-drivers/xf86-input-mouse/files/patch-src-bsd_mouse.c
@@ -0,0 +1,250 @@
+--- src/bsd_mouse.c.orig 2008-11-26 23:11:36.000000000 -0500
++++ src/bsd_mouse.c 2009-04-07 17:10:17.000000000 -0400
+@@ -1,4 +1,3 @@
+-
+ /*
+ * Copyright (c) 1999-2003 by The XFree86 Project, Inc.
+ *
+@@ -71,15 +70,20 @@
+ static const char *FindDevice(InputInfoPtr, const char *, int);
+
+ #if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__)
++#if !defined(XPS2_SUPPORT) && (__FreeBSD_kernel_version >= 700106)
++#define XPS2_SUPPORT
++#endif
+ /* These are for FreeBSD and DragonFly */
+ #define DEFAULT_MOUSE_DEV "/dev/mouse"
+ #define DEFAULT_SYSMOUSE_DEV "/dev/sysmouse"
+ #define DEFAULT_PS2_DEV "/dev/psm0"
++#define DEFAULT_USB_DEV "/dev/ums0"
+
+ static const char *mouseDevs[] = {
+ DEFAULT_MOUSE_DEV,
+ DEFAULT_SYSMOUSE_DEV,
+ DEFAULT_PS2_DEV,
++ DEFAULT_USB_DEV,
+ NULL
+ };
+ #elif (defined(__OpenBSD__) || defined(__NetBSD__)) && defined(WSCONS_SUPPORT)
+@@ -100,7 +104,11 @@
+ #if defined(__NetBSD__)
+ return MSE_SERIAL | MSE_BUS | MSE_PS2 | MSE_AUTO;
+ #elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__)
+- return MSE_SERIAL | MSE_BUS | MSE_PS2 | MSE_AUTO | MSE_MISC;
++ return MSE_SERIAL | MSE_BUS | MSE_PS2 |
++#ifdef XPS2_SUPPORT
++ MSE_XPS2 |
++#endif
++ MSE_AUTO | MSE_MISC;
+ #else
+ return MSE_SERIAL | MSE_BUS | MSE_PS2 | MSE_XPS2 | MSE_AUTO;
+ #endif
+@@ -179,10 +187,31 @@
+ { MOUSE_PROTO_THINK, "ThinkingMouse" },
+ { MOUSE_PROTO_SYSMOUSE, "SysMouse" }
+ };
+-
++
++#ifdef XPS2_SUPPORT
++static struct {
++ int dmodel;
++ char *name;
++} ps2proto[] = {
++ { MOUSE_MODEL_NETSCROLL, "NetScrollPS/2" },
++ { MOUSE_MODEL_NET, "NetMousePS/2" },
++ { MOUSE_MODEL_GLIDEPOINT, "GlidePointPS/2" },
++ { MOUSE_MODEL_THINK, "ThinkingMousePS/2" },
++ { MOUSE_MODEL_INTELLI, "IMPS/2" },
++ { MOUSE_MODEL_MOUSEMANPLUS, "MouseManPlusPS/2" },
++ { MOUSE_MODEL_EXPLORER, "ExplorerPS/2" },
++ { MOUSE_MODEL_4D, "IMPS/2" },
++ { MOUSE_MODEL_4DPLUS, "IMPS/2" },
++};
++#endif
++
+ static const char *
+ SetupAuto(InputInfoPtr pInfo, int *protoPara)
+ {
++#ifdef XPS2_SUPPORT
++ char *dev;
++#endif
++ const char *proto;
+ int i;
+ mousehw_t hw;
+ mousemode_t mode;
+@@ -190,10 +219,16 @@
+ if (pInfo->fd == -1)
+ return NULL;
+
++#ifdef XPS2_SUPPORT
+ /* set the driver operation level, if applicable */
++ dev = xf86FindOptionValue(pInfo->options, "Device");
++ if (dev != NULL && !strncmp(dev, DEFAULT_PS2_DEV, 8))
++ i = 2;
++ else
++#endif
+ i = 1;
+ ioctl(pInfo->fd, MOUSE_SETLEVEL, &i);
+-
++
+ /* interrogate the driver and get some intelligence on the device. */
+ hw.iftype = MOUSE_IF_UNKNOWN;
+ hw.model = MOUSE_MODEL_GENERIC;
+@@ -209,9 +244,18 @@
+ protoPara[0] = mode.syncmask[0];
+ protoPara[1] = mode.syncmask[1];
+ }
++ proto = devproto[i].name;
++#ifdef XPS2_SUPPORT
++ if (mode.protocol == MOUSE_PROTO_PS2)
++ for (i = 0; i < sizeof(ps2proto)/sizeof(ps2proto[0]); ++i)
++ if (hw.model == ps2proto[i].dmodel) {
++ proto = ps2proto[i].name;
++ break;
++ }
++#endif
+ xf86MsgVerb(X_INFO, 3, "%s: SetupAuto: protocol is %s\n",
+- pInfo->name, devproto[i].name);
+- return devproto[i].name;
++ pInfo->name, proto);
++ return proto;
+ }
+ }
+ }
+@@ -234,41 +278,41 @@
+ (protocol && xf86NameCmp(protocol, "SysMouse") == 0)) {
+ /*
+ * As the FreeBSD sysmouse driver defaults to protocol level 0
+- * everytime it is opened we enforce protocol level 1 again at
++ * everytime it is closed we enforce protocol level 1 again at
+ * this point.
+ */
+ mode.level = 1;
+ } else
+- mode.level = -1;
+-#else
+- mode.level = -1;
+ #endif
++ mode.level = -1;
+ ioctl(pInfo->fd, MOUSE_SETMODE, &mode);
+ }
+ #endif
+
+ #if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__)
+-
+-#define MOUSED_PID_FILE "/var/run/moused.pid"
+-
+ /*
+ * Try to check if moused is running. DEFAULT_SYSMOUSE_DEV is useless without
+- * it. There doesn't seem to be a better way of checking.
++ * it. Also, try to check if the device is used by moused. If it is opened
++ * by moused, we do not want to use it directly. There doesn't seem to be
++ * a better way of checking.
+ */
+ static Bool
+-MousedRunning(void)
++MousedRunning(const char *dev)
+ {
++ char cmd[128];
+ FILE *f = NULL;
+- unsigned int pid;
++ unsigned int i;
+
+- if ((f = fopen(MOUSED_PID_FILE, "r")) != NULL) {
+- if (fscanf(f, "%u", &pid) == 1 && pid > 0) {
+- if (kill(pid, 0) == 0) {
+- fclose(f);
+- return TRUE;
+- }
++ if (dev)
++ sprintf(cmd, "sh -c 'fstat %s | grep -c moused' 2>/dev/null", dev);
++ else
++ sprintf(cmd, "sh -c 'pgrep -nx moused' 2>/dev/null");
++ if ((f = popen(cmd, "r")) != NULL) {
++ if (fscanf(f, "%u", &i) == 1 && i > 0) {
++ pclose(f);
++ return TRUE;
+ }
+- fclose(f);
++ pclose(f);
+ }
+ return FALSE;
+ }
+@@ -276,17 +320,17 @@
+ static const char *
+ FindDevice(InputInfoPtr pInfo, const char *protocol, int flags)
+ {
+- int fd = -1;
++ int ret = -1;
+ const char **pdev, *dev = NULL;
+ Bool devMouse = FALSE;
+ struct stat devMouseStat;
+ struct stat sb;
+
+ for (pdev = mouseDevs; *pdev; pdev++) {
+- SYSCALL (fd = open(*pdev, O_RDWR | O_NONBLOCK));
+- if (fd == -1) {
++ SYSCALL (ret = stat(*pdev, &sb));
++ if (ret == -1) {
+ #ifdef DEBUG
+- ErrorF("Cannot open %s (%s)\n", *pdev, strerror(errno));
++ ErrorF("Cannot stat %s (%s)\n", *pdev, strerror(errno));
+ #endif
+ } else {
+ /*
+@@ -295,28 +339,32 @@
+ * the test for whether /dev/sysmouse is usable can be made.
+ */
+ if (!strcmp(*pdev, DEFAULT_MOUSE_DEV)) {
+- if (fstat(fd, &devMouseStat) == 0)
+- devMouse = TRUE;
+- close(fd);
++ memcpy(&devMouseStat, &sb, sizeof(devMouseStat));
++ devMouse = TRUE;
+ continue;
+ } else if (!strcmp(*pdev, DEFAULT_SYSMOUSE_DEV)) {
+ /* Check if /dev/mouse is the same as /dev/sysmouse. */
+- if (devMouse && fstat(fd, &sb) == 0 &&
+- devMouseStat.st_dev == sb.st_dev &&
++ if (devMouse && devMouseStat.st_dev == sb.st_dev &&
+ devMouseStat.st_ino == sb.st_ino) {
+ /* If the same, use /dev/sysmouse. */
+ devMouse = FALSE;
+ }
+- close(fd);
+- if (MousedRunning())
++ if (MousedRunning(NULL))
+ break;
+- else {
+-#ifdef DEBUG
+- ErrorF("moused isn't running\n");
+-#endif
+- }
+ } else {
+- close(fd);
++ /* Check if /dev/mouse is the same as this device. */
++ if (devMouse && devMouseStat.st_dev == sb.st_dev &&
++ devMouseStat.st_ino == sb.st_ino) {
++ /* If the same, use this device. */
++ devMouse = FALSE;
++ }
++ if (MousedRunning(*pdev))
++ continue;
++ /* ums(4) does not support anything but SysMouse protocol. */
++ if (!strncmp(*pdev, DEFAULT_USB_DEV, 8) && protocol &&
++ xf86NameCmp(protocol, "auto") != 0 &&
++ xf86NameCmp(protocol, "sysmouse") != 0)
++ continue;
+ break;
+ }
+ }
+@@ -782,7 +830,9 @@
+ p->CheckProtocol = CheckProtocol;
+ #if (defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__)) && defined(MOUSE_PROTO_SYSMOUSE)
+ p->SetupAuto = SetupAuto;
++#ifndef XPS2_SUPPORT
+ p->SetPS2Res = SetSysMouseRes;
++#endif
+ p->SetBMRes = SetSysMouseRes;
+ p->SetMiscRes = SetSysMouseRes;
+ #endif
diff --git a/x11-drivers/xf86-input-mouse/pkg-descr b/x11-drivers/xf86-input-mouse/pkg-descr
new file mode 100644
index 0000000..866b4d8
--- /dev/null
+++ b/x11-drivers/xf86-input-mouse/pkg-descr
@@ -0,0 +1,4 @@
+This package contains the X.Org xf86-input-mouse driver.
+
+- Florent Thoumie
+flz@FreeBSD.org
diff --git a/x11-drivers/xf86-input-mouse/pkg-plist b/x11-drivers/xf86-input-mouse/pkg-plist
new file mode 100644
index 0000000..dd465f1
--- /dev/null
+++ b/x11-drivers/xf86-input-mouse/pkg-plist
@@ -0,0 +1,5 @@
+lib/xorg/modules/input/mouse_drv.la
+lib/xorg/modules/input/mouse_drv.so
+@dirrmtry lib/xorg/modules/input
+@dirrmtry lib/xorg/modules
+@dirrmtry lib/xorg
diff --git a/x11-drivers/xf86-input-synaptics/Makefile b/x11-drivers/xf86-input-synaptics/Makefile
new file mode 100644
index 0000000..336966d
--- /dev/null
+++ b/x11-drivers/xf86-input-synaptics/Makefile
@@ -0,0 +1,30 @@
+# New ports collection makefile for: xf86-input-synaptics
+# Date Created: 25 Sep 2008
+# Whom: Florent Thoumie <flz@FreeBSD.org>
+#
+# $FreeBSD: ports/x11-drivers/xf86-input-synaptics/Makefile,v 1.6 2009/05/28 22:20:48 rnoland Exp $
+#
+
+PORTNAME= xf86-input-synaptics
+PORTVERSION= 1.2.1
+CATEGORIES= x11-drivers
+
+MAINTAINER= x11@FreeBSD.org
+COMMENT= X.Org synaptics input driver
+
+CONFLICTS= synaptics-[0-9]*
+
+USE_GNOME= gnomehack
+USE_XORG= x11
+XORG_CAT= driver
+
+MAN1= syndaemon.1 \
+ synclient.1
+MAN4= synaptics.4x
+
+post-install:
+ ${MKDIR} ${PREFIX}/share/hal/fdi/policy/10osvendor
+ ${INSTALL_DATA} ${WRKSRC}/fdi/11-x11-synaptics.fdi \
+ ${PREFIX}/share/hal/fdi/policy/10osvendor/
+
+.include <bsd.port.mk>
diff --git a/x11-drivers/xf86-input-synaptics/distinfo b/x11-drivers/xf86-input-synaptics/distinfo
new file mode 100644
index 0000000..c437e96
--- /dev/null
+++ b/x11-drivers/xf86-input-synaptics/distinfo
@@ -0,0 +1,3 @@
+MD5 (xorg/driver/xf86-input-synaptics-1.2.1.tar.bz2) = 29a6f9da5123149e4abc8ff83880ed5c
+SHA256 (xorg/driver/xf86-input-synaptics-1.2.1.tar.bz2) = a63b48c5c8eb09416b941dea591a948e111d1b2e14d4620f25377cf47cf877e6
+SIZE (xorg/driver/xf86-input-synaptics-1.2.1.tar.bz2) = 295524
diff --git a/x11-drivers/xf86-input-synaptics/files/patch-configure b/x11-drivers/xf86-input-synaptics/files/patch-configure
new file mode 100644
index 0000000..aa413d6
--- /dev/null
+++ b/x11-drivers/xf86-input-synaptics/files/patch-configure
@@ -0,0 +1,11 @@
+--- configure.orig 2009-04-25 14:02:33.000000000 -0500
++++ configure 2009-04-25 14:02:34.000000000 -0500
+@@ -21128,7 +21128,7 @@
+ $as_echo "yes" >&6; }
+ :
+ fi
+-sdkdir=$(pkg-config --variable=sdkdir xorg-server)
++sdkdir="${prefix}/include/xorg"
+
+
+ CFLAGS="$CFLAGS $XORG_CFLAGS "' -I$(top_srcdir)/src'
diff --git a/x11-drivers/xf86-input-synaptics/pkg-descr b/x11-drivers/xf86-input-synaptics/pkg-descr
new file mode 100644
index 0000000..2272145
--- /dev/null
+++ b/x11-drivers/xf86-input-synaptics/pkg-descr
@@ -0,0 +1,4 @@
+This package contains the X.Org xf86-input-synaptics driver.
+
+- Florent Thoumie
+flz@FreeBSD.org
diff --git a/x11-drivers/xf86-input-synaptics/pkg-plist b/x11-drivers/xf86-input-synaptics/pkg-plist
new file mode 100644
index 0000000..7fa2267
--- /dev/null
+++ b/x11-drivers/xf86-input-synaptics/pkg-plist
@@ -0,0 +1,16 @@
+bin/synclient
+bin/syndaemon
+include/xorg/synaptics-properties.h
+include/xorg/synaptics.h
+lib/xorg/modules/input/synaptics_drv.la
+lib/xorg/modules/input/synaptics_drv.so
+libdata/pkgconfig/xorg-synaptics.pc
+share/hal/fdi/policy/10osvendor/11-x11-synaptics.fdi
+@dirrmtry lib/xorg/modules/input
+@dirrmtry lib/xorg/modules
+@dirrmtry lib/xorg
+@dirrmtry include/xorg
+@dirrmtry share/hal/fdi/policy/10osvendor
+@dirrmtry share/hal/fdi/policy
+@dirrmtry share/hal/fdi
+@dirrmtry share/hal
diff --git a/x11-drivers/xf86-input-vmmouse/Makefile b/x11-drivers/xf86-input-vmmouse/Makefile
new file mode 100644
index 0000000..4779b20
--- /dev/null
+++ b/x11-drivers/xf86-input-vmmouse/Makefile
@@ -0,0 +1,24 @@
+# New ports collection makefile for: xf86-input-vmmouse
+# Date Created: 17 Feb 2006
+# Whom: NIIMI Satoshi <sa2c@sa2c.net>
+#
+# $FreeBSD: ports/x11-drivers/xf86-input-vmmouse/Makefile,v 1.12 2009/05/07 19:42:35 rnoland Exp $
+#
+
+PORTNAME= xf86-input-vmmouse
+PORTVERSION= 12.6.6
+CATEGORIES= x11-drivers
+
+MAINTAINER= x11@FreeBSD.org
+COMMENT= X.Org vmmouse input driver
+
+XORG_CAT= driver
+CONFIGURE_ARGS= --with-hal-callouts-dir=${PREFIX}/libexec/hal/scripts
+
+MAN1= vmmouse_detect.1
+MAN4= vmmouse.4x
+
+ONLY_FOR_ARCHS= i386 amd64
+ONLY_FOR_ARCHS_REASON= The vmmouse protocol is only supported on x86-compatible architectures.
+
+.include <bsd.port.mk>
diff --git a/x11-drivers/xf86-input-vmmouse/distinfo b/x11-drivers/xf86-input-vmmouse/distinfo
new file mode 100644
index 0000000..e39e900
--- /dev/null
+++ b/x11-drivers/xf86-input-vmmouse/distinfo
@@ -0,0 +1,3 @@
+MD5 (xorg/driver/xf86-input-vmmouse-12.6.6.tar.bz2) = 1c57338928a8897b7ca0b5524fcb1223
+SHA256 (xorg/driver/xf86-input-vmmouse-12.6.6.tar.bz2) = 0cb2896b7a284efd6337c019c599fd4d5a6de74a58c6e6c31c31ed399efa8171
+SIZE (xorg/driver/xf86-input-vmmouse-12.6.6.tar.bz2) = 272965
diff --git a/x11-drivers/xf86-input-vmmouse/pkg-descr b/x11-drivers/xf86-input-vmmouse/pkg-descr
new file mode 100644
index 0000000..061263d
--- /dev/null
+++ b/x11-drivers/xf86-input-vmmouse/pkg-descr
@@ -0,0 +1 @@
+This package contains the X.Org xf86-input-vmmouse driver.
diff --git a/x11-drivers/xf86-input-vmmouse/pkg-plist b/x11-drivers/xf86-input-vmmouse/pkg-plist
new file mode 100644
index 0000000..d5ba6a3
--- /dev/null
+++ b/x11-drivers/xf86-input-vmmouse/pkg-plist
@@ -0,0 +1,8 @@
+bin/vmmouse_detect
+libexec/hal/scripts/hal-probe-vmmouse
+lib/xorg/modules/input/vmmouse_drv.la
+lib/xorg/modules/input/vmmouse_drv.so
+share/hal/fdi/policy/20thirdparty/11-x11-vmmouse.fdi
+@dirrmtry lib/xorg/modules/input
+@dirrmtry lib/xorg/modules
+@dirrmtry lib/xorg
diff --git a/x11-drivers/xf86-input-void/Makefile b/x11-drivers/xf86-input-void/Makefile
new file mode 100644
index 0000000..551fc24
--- /dev/null
+++ b/x11-drivers/xf86-input-void/Makefile
@@ -0,0 +1,18 @@
+# New ports collection makefile for: xf86-input-void
+# Date Created: 17 Feb 2006
+# Whom: Florent Thoumie <flz@FreeBSD.org>
+#
+# $FreeBSD: ports/x11-drivers/xf86-input-void/Makefile,v 1.6 2009/05/07 19:42:35 rnoland Exp $
+#
+
+PORTNAME= xf86-input-void
+PORTVERSION= 1.3.0
+CATEGORIES= x11-drivers
+
+MAINTAINER= x11@FreeBSD.org
+COMMENT= X.Org void input driver
+
+XORG_CAT= driver
+MAN4= void.4x
+
+.include <bsd.port.mk>
diff --git a/x11-drivers/xf86-input-void/distinfo b/x11-drivers/xf86-input-void/distinfo
new file mode 100644
index 0000000..3e3b4f9
--- /dev/null
+++ b/x11-drivers/xf86-input-void/distinfo
@@ -0,0 +1,3 @@
+MD5 (xorg/driver/xf86-input-void-1.3.0.tar.bz2) = 53bdac9ca56418f4675810ed8a78b3e8
+SHA256 (xorg/driver/xf86-input-void-1.3.0.tar.bz2) = e2165ddf637703e21b3c45d83d56485c39b082b9440053d3885557c4d52b130f
+SIZE (xorg/driver/xf86-input-void-1.3.0.tar.bz2) = 247917
diff --git a/x11-drivers/xf86-input-void/pkg-descr b/x11-drivers/xf86-input-void/pkg-descr
new file mode 100644
index 0000000..abb1876
--- /dev/null
+++ b/x11-drivers/xf86-input-void/pkg-descr
@@ -0,0 +1,4 @@
+This package contains the X.Org xf86-input-void driver.
+
+- Florent Thoumie
+flz@FreeBSD.org
diff --git a/x11-drivers/xf86-input-void/pkg-plist b/x11-drivers/xf86-input-void/pkg-plist
new file mode 100644
index 0000000..554c368
--- /dev/null
+++ b/x11-drivers/xf86-input-void/pkg-plist
@@ -0,0 +1,5 @@
+lib/xorg/modules/input/void_drv.la
+lib/xorg/modules/input/void_drv.so
+@dirrmtry lib/xorg/modules/input
+@dirrmtry lib/xorg/modules
+@dirrmtry lib/xorg