aboutsummaryrefslogtreecommitdiff
path: root/x11-drivers/xf86-input-mouse
diff options
context:
space:
mode:
authorFlorent Thoumie <flz@FreeBSD.org>2009-01-23 16:28:36 +0000
committerFlorent Thoumie <flz@FreeBSD.org>2009-01-23 16:28:36 +0000
commit340b57f8beb786be8990652b17d2e45f182346e6 (patch)
treec3e6d8718763fb6c4df9ddb40d2544e7ceccaccd /x11-drivers/xf86-input-mouse
parent66a81c62b92aa3373e54dc3b68238b43561f244f (diff)
downloadports-340b57f8beb786be8990652b17d2e45f182346e6.tar.gz
ports-340b57f8beb786be8990652b17d2e45f182346e6.zip
- Update X.org ports to 7.4+ (few ports are more recent than the katamari).
- Bump PORTREVISION for all ports depending on libglut since the shlib version number went from 4 to 3. - Bump PORTREVISION for all ports depending on libXaw as libXaw.so.8 isn't installed anymore. - Couple of ports fixes (mostly missing xorg components added to USE_XORG).
Notes
Notes: svn path=/head/; revision=226727
Diffstat (limited to 'x11-drivers/xf86-input-mouse')
-rw-r--r--x11-drivers/xf86-input-mouse/Makefile3
-rw-r--r--x11-drivers/xf86-input-mouse/distinfo6
-rw-r--r--x11-drivers/xf86-input-mouse/files/patch-dont-flush-buttons-6a03e8bd38
-rw-r--r--x11-drivers/xf86-input-mouse/files/patch-src-bsd_mouse.c200
4 files changed, 204 insertions, 43 deletions
diff --git a/x11-drivers/xf86-input-mouse/Makefile b/x11-drivers/xf86-input-mouse/Makefile
index e271d315f120..b3cd5b4e4463 100644
--- a/x11-drivers/xf86-input-mouse/Makefile
+++ b/x11-drivers/xf86-input-mouse/Makefile
@@ -6,8 +6,7 @@
#
PORTNAME= xf86-input-mouse
-PORTVERSION= 1.2.3
-PORTREVISION= 2
+PORTVERSION= 1.4.0
CATEGORIES= x11-drivers
MAINTAINER= x11@FreeBSD.org
diff --git a/x11-drivers/xf86-input-mouse/distinfo b/x11-drivers/xf86-input-mouse/distinfo
index f34123fe51b5..9864f5a0bfcf 100644
--- a/x11-drivers/xf86-input-mouse/distinfo
+++ b/x11-drivers/xf86-input-mouse/distinfo
@@ -1,3 +1,3 @@
-MD5 (xorg/driver/xf86-input-mouse-1.2.3.tar.bz2) = 47da1fa52584933d045528109f094eff
-SHA256 (xorg/driver/xf86-input-mouse-1.2.3.tar.bz2) = a07cb2169f43018c90b7889781c0db30cda0da03811edccb8c4db533166357ab
-SIZE (xorg/driver/xf86-input-mouse-1.2.3.tar.bz2) = 272961
+MD5 (xorg/driver/xf86-input-mouse-1.4.0.tar.bz2) = e7dc0759c14a9bfd373917a49e5f7c7d
+SHA256 (xorg/driver/xf86-input-mouse-1.4.0.tar.bz2) = e6e1dbd64d41c826619a5881c5aeed46095bfdcb87c3e27d65292fc12a5bb7c7
+SIZE (xorg/driver/xf86-input-mouse-1.4.0.tar.bz2) = 292626
diff --git a/x11-drivers/xf86-input-mouse/files/patch-dont-flush-buttons-6a03e8bd b/x11-drivers/xf86-input-mouse/files/patch-dont-flush-buttons-6a03e8bd
deleted file mode 100644
index d1a21ed5f306..000000000000
--- a/x11-drivers/xf86-input-mouse/files/patch-dont-flush-buttons-6a03e8bd
+++ /dev/null
@@ -1,38 +0,0 @@
-From 6a03e8bd9699a33dabcdd2bbcf51a001ddfd5534 Mon Sep 17 00:00:00 2001
-From: Peter Hutterer <peter@cs.unisa.edu.au>
-Date: Fri, 16 Nov 2007 06:15:45 +0000
-Subject: Bug #13144: Don't flush buttons, release events can cause paste events.
-
----
-diff --git src/mouse.c src/mouse.c
-index ff52d2b..bd98a80 100644
---- src/mouse.c
-+++ src/mouse.c
-@@ -1853,26 +1853,17 @@ MouseConvert(InputInfoPtr pInfo, int first, int num, int v0, int v1, int v2,
-
- /**********************************************************************
- *
-- * FlushButtons -- send button up events for sanity.
-+ * FlushButtons -- reset button states.
- *
- **********************************************************************/
-
- static void
- FlushButtons(MouseDevPtr pMse)
- {
--
-- /* If no button down is pending xf86PostButtonEvent()
-- * will discard them. So we are on the safe side. */
--
- int i, blocked;
-
- pMse->lastButtons = 0;
- pMse->lastMappedButtons = 0;
--
-- blocked = xf86BlockSIGIO ();
-- for (i = 1; i <= 5; i++)
-- xf86PostButtonEvent(pMse->device,0,i,0,0,0);
-- xf86UnblockSIGIO (blocked);
- }
-
- /**********************************************************************
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 000000000000..b3258c653ad4
--- /dev/null
+++ b/x11-drivers/xf86-input-mouse/files/patch-src-bsd_mouse.c
@@ -0,0 +1,200 @@
+--- src/bsd_mouse.c.orig 2008-12-13 18:24:06.000000000 -0500
++++ src/bsd_mouse.c 2008-12-14 22:50:40.000000000 -0500
+@@ -1,4 +1,3 @@
+-
+ /*
+ * Copyright (c) 1999-2003 by The XFree86 Project, Inc.
+ *
+@@ -75,11 +74,15 @@
+ #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,
++#ifndef CONFIG_HAL
+ DEFAULT_PS2_DEV,
++ DEFAULT_USB_DEV,
++#endif
+ NULL
+ };
+ #elif (defined(__OpenBSD__) || defined(__NetBSD__)) && defined(WSCONS_SUPPORT)
+@@ -100,7 +103,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 +186,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 +218,20 @@
+ if (pInfo->fd == -1)
+ return NULL;
+
++#ifdef XPS2_SUPPORT
+ /* set the driver operation level, if applicable */
++ if ((dev = xf86FindOptionValue(pInfo->options, "Device"))) {
++ if (!strncmp(dev, DEFAULT_PS2_DEV, 8))
++ i = 2;
++ else
++ i = 1;
++ ioctl(pInfo->fd, MOUSE_SETLEVEL, &i);
++ }
++#else
+ i = 1;
+ ioctl(pInfo->fd, MOUSE_SETLEVEL, &i);
+-
++#endif
++
+ /* interrogate the driver and get some intelligence on the device. */
+ hw.iftype = MOUSE_IF_UNKNOWN;
+ hw.model = MOUSE_MODEL_GENERIC;
+@@ -209,9 +247,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 +281,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;
+ }
+@@ -308,15 +355,12 @@
+ devMouse = FALSE;
+ }
+ close(fd);
+- if (MousedRunning())
++ if (MousedRunning(NULL))
+ break;
+- else {
+-#ifdef DEBUG
+- ErrorF("moused isn't running\n");
+-#endif
+- }
+ } else {
+ close(fd);
++ if (MousedRunning(*pdev))
++ continue;
+ break;
+ }
+ }
+@@ -782,7 +826,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