xf86-input-mouse-dfbsd: Update wip/xf86-input-mouse-dfbsd to 1.9.3

This commit is contained in:
David Shao 2019-02-23 20:46:52 -08:00
parent c0bf6ea461
commit 8b6e718678
9 changed files with 400 additions and 1912 deletions

View File

@ -1,7 +1,6 @@
# $NetBSD: Makefile,v 1.27 2016/11/17 08:06:52 wiz Exp $
# $NetBSD: Makefile,v 1.30 2018/06/19 07:12:45 wiz Exp $
DISTNAME= xf86-input-mouse-1.9.2
PKGREVISION= 1
DISTNAME= xf86-input-mouse-1.9.3
CATEGORIES= x11
MASTER_SITES= ${MASTER_SITE_XORG:=driver/}
EXTRACT_SUFX= .tar.bz2
@ -9,14 +8,24 @@ EXTRACT_SUFX= .tar.bz2
MAINTAINER= joerg@NetBSD.org
HOMEPAGE= http://xorg.freedesktop.org/
COMMENT= Modular Xorg mouse driver
LICENSE= mit
USE_LIBTOOL= YES
GNU_CONFIGURE= YES
USE_TOOLS+= pkg-config
CONFIGURE_ENV.SunOS+= DRIVER_MAN_SUFFIX=4
CFLAGS.DragonFly+= -Wno-array-bounds
.include "options.mk"
.include "../../mk/bsd.prefs.mk"
.if ${OPSYS} == "FreeBSD" || ${OPSYS} == "DragonFly"
SUBST_CLASSES+= freebsdusb
SUBST_STAGE.freebsdusb= post-extract
SUBST_MESSAGE.freebsdusb= Patching src/Makefile.in for DragonFly or FreeBSD compatible USB
SUBST_FILES.freebsdusb+= src/Makefile.in
SUBST_SED.freebsdusb+= -e 's|-module -avoid-version|-module -avoid-version -lusbhid|'
.endif
.include "../../x11/xorgproto/buildlink3.mk"
.include "../../x11/modular-xorg-server/buildlink3.mk"

View File

@ -1,5 +0,0 @@
Copy port to x11/xf86-input-mouse, do not install from wip.
Implements patches from FreeBSD ports / DragonFly dports
discussed in pkg/50068
(x11/xf86-input-mouse dports patches for DragonFly and FreeBSD)

View File

@ -1,11 +1,11 @@
$NetBSD: distinfo,v 1.19 2016/11/17 08:06:52 wiz Exp $
$NetBSD: distinfo,v 1.21 2018/06/19 07:12:45 wiz Exp $
SHA1 (xf86-input-mouse-1.9.2.tar.bz2) = d3a0839ad5a33665bb261a4fba33e3a6271817dc
RMD160 (xf86-input-mouse-1.9.2.tar.bz2) = c7d68c0de19787ceda4e4307b113b6d74e0cb62d
SHA512 (xf86-input-mouse-1.9.2.tar.bz2) = 30fdc4f699d434e2fb4a9f8d2f4f980538d646a6e4d2d572737fc5498c0bce0fb1ba080173ea0aa3480f574dde3f58d5a7ac837afdb29640ccb092b3f18ff209
Size (xf86-input-mouse-1.9.2.tar.bz2) = 377685 bytes
SHA1 (patch-src_bsd__mouse.c) = fe3ab90a099583a881cddbd1f7da0e689de2253a
SHA1 (patch-src_mouse.c) = a9ecfd46516fbab2dc4d8e395748a0b6312a24c7
SHA1 (patch-src_mouse.h) = 2c663b40f8c845ed0f03998edf6d5ddaf4876b71
SHA1 (patch-src_mousePriv.h) = 20400aecdff2255b0bbf1e42a3d813054814acda
SHA1 (xf86-input-mouse-1.9.3.tar.bz2) = b3982998808ba43117fc066c4ecc94ce67c5818e
RMD160 (xf86-input-mouse-1.9.3.tar.bz2) = f73da46dfc7d389531d52e0495db2c2bc4990027
SHA512 (xf86-input-mouse-1.9.3.tar.bz2) = d99f5b4b1ef1aa4cbf1a92549e412f54f121bc804e4d6643248ad7ea18081b38b958bd289dc8476ebc0f6ef5f7424c2f2a8abcfaa30cae5378829549af6b148f
Size (xf86-input-mouse-1.9.3.tar.bz2) = 382013 bytes
SHA1 (patch-src_bsd__mouse.c) = f0718cbe4889f957034e4195a2f138de40b18110
SHA1 (patch-src_mouse.c) = 04d063d2ea364727309de23d144a3cc4289887b1
SHA1 (patch-src_mouse.h) = 365fc23f82de0223872be21563af2244585bd537
SHA1 (patch-src_mousePriv.h) = 6c4ca5f997514e77a937fa8c739a495a6a5e0a43
SHA1 (patch-src_sun__mouse.c) = e23157bc9bdb5840ac008648d1c9a894e7a900cc

View File

@ -1,45 +0,0 @@
PKG_OPTIONS_VAR= PKG_OPTIONS.xf86-input-mouse
# dflyu4b is for DragonFly BSD newer USB stack, ported from newer FreeBSD
# #include <bus/u4b/usb.h>
# dflyusb is for DragonFly BSD older USB stack, OS version < 300703
# #include <bus/usb/usb.h>
# fbsdusb is for FreeBSD USB stack
# #include <dev/usb/usb.h>
PKG_SUPPORTED_OPTIONS= dflyu4b dflyusb fbsdusb
PKG_SUGGESTED_OPTIONS=
.include "../../mk/bsd.options.mk"
.if ${OPSYS} == "DragonFly"
. if !empty(OS_VERSION:M[0-2].*) || !empty(OS_VERSION:M3.0*)
PKG_SUGGESTED_OPTIONS+= dflyusb
. else
# Assume Dragonfly 3.1 - 3.6 users built U4B stack
# 3.8 and after U4B is the default
PKG_SUGGESTED_OPTIONS+= dflyu4b
. endif
.endif
.if ${OPSYS} == "FreeBSD"
PKG_SUGGESTED_OPTIONS+= fbsdusb
.endif
.if !empty(PKG_OPTIONS:Mdflyu4b) || !empty(PKG_OPTIONS:Mdflyusb) || !empty(PKG_OPTIONS:Mfbsdusb)
CPPFLAGS+= -DFREEBSD_USB
.endif
.if !empty(PKG_OPTIONS:Mdflyu4b)
CPPFLAGS+= -DDRAGONFLY_U4B
.endif
.if !empty(PKG_OPTIONS:Mdflyusb)
CPPFLAGS+= -DDRAGONFLY_USB
.endif
.if !empty(PKG_OPTIONS:Mdflyu4b) || !empty(PKG_OPTIONS:Mdflyusb) || !empty(PKG_OPTIONS:Mfbsdusb)
SUBST_CLASSES+= freebsdusb
SUBST_STAGE.freebsdusb= post-extract
SUBST_MESSAGE.freebsdusb= Patching src/Makefile.in for DragonFly or FreeBSD compatible USB
SUBST_FILES.freebsdusb+= src/Makefile.in
SUBST_SED.freebsdusb+= -e 's|-module -avoid-version|-module -avoid-version -lusbhid|'
.endif

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,42 +1,27 @@
$NetBSD$
Patches from FreeBSD ports / DragonFly dports with include guards.
Support for different versions of system libusb headers.
Patches from FreeBSD ports / DragonFly dports x11-drivers/xf86-input-mouse 1.9.2.
--- src/mouse.c.orig 2016-09-06 03:53:31.000000000 +0000
--- src/mouse.c.orig 2018-06-19 04:36:21.000000000 +0000
+++ src/mouse.c
@@ -43,6 +43,13 @@
* and to help limited dexterity persons
*/
+/* PKGSRC note: To support newer versions of DragonFly and FreeBSD,
+ * this file is patched using DragonFly dports
+ * x11-drivers/xf86-input-mouse/files/patch-src_mouse.c
+ * as of master commit 4f04bfe0ea83 ... Tue Jul 14 22:56:44 2015 -0700
+ * The patch's code is enclosed in include defined(FREEBSD_USB) while the
+ * original code is enclosed in include !defined(FREEBSD_USB).
+ */
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
@@ -304,13 +311,45 @@ MouseCommonOptions(InputInfoPtr pInfo)
@@ -304,13 +304,45 @@ MouseCommonOptions(InputInfoPtr pInfo)
pMse = pInfo->private;
+#if !defined(FREEBSD_USB)
pMse->buttons = xf86SetIntOption(pInfo->options, "Buttons", 0);
+#else
+#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__)
+ i = xf86SetIntOption(pInfo->options, "Buttons", 0);
+ if (i != 0)
+ pMse->buttons = i;
+#endif
+#else
pMse->buttons = xf86SetIntOption(pInfo->options, "Buttons", 0);
+#endif /* defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__) */
if (!pMse->buttons) {
pMse->buttons = MSE_DFLTBUTTONS;
buttons_from = X_DEFAULT;
}
origButtons = pMse->buttons;
+#if defined(FREEBSD_USB)
+#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__)
+ s = xf86SetStrOption(pInfo->options, "ButtonMapping", NULL);
+ if (s) {
+ int b, n = 0;
@ -60,168 +45,177 @@ Support for different versions of system libusb headers.
+ if (f > pMse->buttons)
+ pMse->buttons = f;
+ }
+#endif
+#endif /* defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__) */
+
pMse->emulate3Buttons = xf86SetBoolOption(pInfo->options,
"Emulate3Buttons", FALSE);
if (!xf86FindOptionValue(pInfo->options,"Emulate3Buttons")) {
@@ -322,6 +361,10 @@ MouseCommonOptions(InputInfoPtr pInfo)
@@ -322,6 +354,10 @@ MouseCommonOptions(InputInfoPtr pInfo)
"Emulate3Timeout", 50);
if (pMse->emulate3Buttons || pMse->emulate3ButtonsSoft) {
MessageType from = X_CONFIG;
+#if defined(FREEBSD_USB)
+ if (pMse->buttons < 3)
+#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__)
+ if (pMse->buttons < 3)
+ pMse->buttons = 3;
+#endif
+#endif /* defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__) */
if (pMse->emulate3ButtonsSoft)
from = X_DEFAULT;
xf86Msg(from, "%s: Emulate3Buttons, Emulate3Timeout: %d\n",
@@ -329,6 +372,10 @@ MouseCommonOptions(InputInfoPtr pInfo)
@@ -329,6 +365,10 @@ MouseCommonOptions(InputInfoPtr pInfo)
}
pMse->chordMiddle = xf86SetBoolOption(pInfo->options, "ChordMiddle", FALSE);
+#if defined(FREEBSD_USB)
+#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__)
+ if (pMse->chordMiddle && pMse->buttons < 3)
+ pMse->buttons = 3;
+#endif
+ pMse->buttons = 3;
+#endif /* defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__) */
pMse->flipXY = xf86SetBoolOption(pInfo->options, "FlipXY", FALSE);
if (xf86SetBoolOption(pInfo->options, "InvX", FALSE)) {
pMse->invX = -1;
@@ -339,7 +386,9 @@ MouseCommonOptions(InputInfoPtr pInfo)
@@ -339,7 +379,9 @@ MouseCommonOptions(InputInfoPtr pInfo)
} else
pMse->invY = 1;
pMse->angleOffset = xf86SetIntOption(pInfo->options, "AngleOffset", 0);
-
+#if defined(FREEBSD_USB)
+#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__)
+ pMse->sensitivity = xf86SetRealOption(pInfo->options, "Sensitivity", 1.0);
+#endif
+#endif /* defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__) */
if (pMse->pDragLock)
free(pMse->pDragLock);
@@ -449,14 +498,25 @@ MouseCommonOptions(InputInfoPtr pInfo)
@@ -449,14 +491,25 @@ MouseCommonOptions(InputInfoPtr pInfo)
free(s);
}
+#if !defined(FREEBSD_USB)
s = xf86SetStrOption(pInfo->options, "ZAxisMapping", "4 5");
+#else
+#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__)
+ s = xf86SetStrOption(pInfo->options, "ZAxisMapping",
+ pMse->hasZ ? ( pMse->hasW ? "4 5 6 7" : "4 5" ) : "off");
+#endif
+#else
s = xf86SetStrOption(pInfo->options, "ZAxisMapping", "4 5");
+#endif /* defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__) */
if (s) {
int b1 = 0, b2 = 0, b3 = 0, b4 = 0;
char *msg = NULL;
pMse->negativeZ = pMse->positiveZ = MSE_NOAXISMAP;
pMse->negativeW = pMse->positiveW = MSE_NOAXISMAP;
+#if !defined(FREEBSD_USB)
if (!xf86NameCmp(s, "x")) {
+#else
+#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__)
+ if (!xf86NameCmp(s, "off")) {
+ msg = xstrdup("off");
+ } else if (!xf86NameCmp(s, "x")) {
+#endif
+ } else if (!xf86NameCmp(s, "x")) {
+#else
if (!xf86NameCmp(s, "x")) {
+#endif /* defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__) */
pMse->negativeZ = pMse->positiveZ = MSE_MAPTOX;
msg = xstrdup("X axis");
} else if (!xf86NameCmp(s, "y")) {
@@ -605,6 +665,7 @@ MouseCommonOptions(InputInfoPtr pInfo)
@@ -605,6 +658,7 @@ MouseCommonOptions(InputInfoPtr pInfo)
pInfo->name, wheelButton, pMse->wheelInertia,
pMse->wheelButtonTimeout);
}
+#if !defined(FREEBSD_USB)
+#if !defined(__FreeBSD__) && !defined(__FreeBSD_kernel__) && !defined(__DragonFly__)
s = xf86SetStrOption(pInfo->options, "ButtonMapping", NULL);
if (s) {
int b, n = 0;
@@ -628,6 +689,7 @@ MouseCommonOptions(InputInfoPtr pInfo)
@@ -628,6 +682,7 @@ MouseCommonOptions(InputInfoPtr pInfo)
if (f > pMse->buttons)
pMse->buttons = f;
}
+#endif
+#endif /* !defined(__FreeBSD__) && !defined(__FreeBSD_kernel__) && !defined(__DragonFly__) */
if (origButtons != pMse->buttons)
buttons_from = X_CONFIG;
xf86Msg(buttons_from, "%s: Buttons: %d\n", pInfo->name, pMse->buttons);
@@ -709,7 +771,9 @@ MouseHWOptions(InputInfoPtr pInfo)
@@ -709,7 +764,9 @@ MouseHWOptions(InputInfoPtr pInfo)
}
pMse->sampleRate = xf86SetIntOption(pInfo->options, "SampleRate", 0);
pMse->resolution = xf86SetIntOption(pInfo->options, "Resolution", 0);
+#if !defined(FREEBSD_USB)
+#if !defined(__FreeBSD__) && !defined(__FreeBSD_kernel__) && !defined(__DragonFly__)
mPriv->sensitivity = xf86SetRealOption(pInfo->options, "Sensitivity", 1.0);
+#endif
+#endif /* !defined(__FreeBSD__) && !defined(__FreeBSD_kernel__) && !defined(__DragonFly__) */
}
static void
@@ -998,6 +1062,11 @@ MousePreInit(InputDriverPtr drv, InputIn
@@ -996,6 +1053,10 @@ MousePreInit(InputDriverPtr drv, InputIn
/* Default Mapping: 1 2 3 8 9 10 11 ... */
for (i = 0; i < MSE_MAXBUTTONS; i++)
pMse->buttonMap[i] = 1 << (i > 2 && i < MSE_MAXBUTTONS-4 ? i+4 : i);
+#if defined(FREEBSD_USB)
+#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__)
+ pMse->hasZ = 1;
+ pMse->hasW = 0;
+#endif
+
+#endif /* defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__) */
protocol = MousePickProtocol(pInfo, device, protocol, &protocolID);
if (!device)
@@ -2288,6 +2357,11 @@ MouseDoPostEvent(InputInfoPtr pInfo, int
@@ -2197,7 +2258,11 @@ MouseDoPostEvent(InputInfoPtr pInfo, int
if (pMse->emulateWheel) {
/* Emulate wheel button handling */
+#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__)
+ if (pMse->wheelButton == 0)
+#else
if(pMse->wheelButton == 0)
+#endif /* defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__) */
wheelButtonMask = 0;
else
wheelButtonMask = 1 << (pMse->wheelButton - 1);
@@ -2287,6 +2352,11 @@ MouseDoPostEvent(InputInfoPtr pInfo, int
}
}
}
+#if defined (FREEBSD_USB)
+#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__)
+ } else {
+ pMse->wheelXDistance = 0;
+ pMse->wheelYDistance = 0;
+#endif
+#endif /* defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__) */
}
/* Absorb the mouse movement while the wheel button is pressed. */
@@ -2305,7 +2379,11 @@ MouseDoPostEvent(InputInfoPtr pInfo, int
@@ -2304,7 +2374,11 @@ MouseDoPostEvent(InputInfoPtr pInfo, int
if (pMse->emulate3ButtonsSoft && pMse->emulate3Pending && (dx || dy))
buttonTimer(pInfo);
+#if !defined(FREEBSD_USB)
if (dx || dy)
+#else
+#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__)
+ if ((dx || dy) && !pMse->disableXY)
+#endif
+#else
if (dx || dy)
+#endif /* defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__) */
xf86PostMotionEvent(pInfo->dev, 0, 0, 2, dx, dy);
if (change) {
@@ -2418,12 +2496,16 @@ MousePostEvent(InputInfoPtr pInfo, int t
@@ -2417,12 +2491,16 @@ MousePostEvent(InputInfoPtr pInfo, int t
int dx, int dy, int dz, int dw)
{
MouseDevPtr pMse;
+#if !defined(FREEBSD_USB)
+#if !defined(__FreeBSD__) && !defined(__FreeBSD_kernel__) && !defined(__DragonFly__)
mousePrivPtr mousepriv;
+#endif
+#endif /* !defined(__FreeBSD__) && !defined(__FreeBSD_kernel__) && !defined(__DragonFly__) */
int zbutton = 0, wbutton = 0, zbuttoncount = 0, wbuttoncount = 0;
int i, b, buttons = 0;
pMse = pInfo->private;
+#if !defined(FREEBSD_USB)
+#if !defined(__FreeBSD__) && !defined(__FreeBSD_kernel__) && !defined(__DragonFly__)
mousepriv = (mousePrivPtr)pMse->mousePriv;
+#endif
+#endif /* !defined(__FreeBSD__) && !defined(__FreeBSD_kernel__) && !defined(__DragonFly__) */
if (pMse->protocolID == PROT_MMHIT)
b = reverseBits(hitachMap, truebuttons);
@@ -2516,12 +2598,21 @@ MousePostEvent(InputInfoPtr pInfo, int t
@@ -2515,11 +2593,19 @@ MousePostEvent(InputInfoPtr pInfo, int t
/* Accumulate the scaled dx, dy in the private variables
fracdx,fracdy and return the integer number part */
+#if !defined(FREEBSD_USB)
if (mousepriv) {
mousepriv->fracdx += mousepriv->sensitivity*dx;
mousepriv->fracdy += mousepriv->sensitivity*dy;
mousepriv->fracdx -= ( dx=(int)(mousepriv->fracdx) );
mousepriv->fracdy -= ( dy=(int)(mousepriv->fracdy) );
}
+#else
+#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__)
+ if (pMse->sensitivity != 0) {
+ pMse->fracdx += pMse->sensitivity*dx;
+ pMse->fracdy += pMse->sensitivity*dy;
+ pMse->fracdx -= ( dx=(int)(pMse->fracdx) );
+ pMse->fracdy -= ( dy=(int)(pMse->fracdy) );
+ }
+#endif
+#else
if (mousepriv) {
mousepriv->fracdx += mousepriv->sensitivity*dx;
mousepriv->fracdy += mousepriv->sensitivity*dy;
mousepriv->fracdx -= ( dx=(int)(mousepriv->fracdx) );
mousepriv->fracdy -= ( dy=(int)(mousepriv->fracdy) );
+#endif /* defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__) */
}
/* If mouse wheel movement has to be mapped on a button, we need to
* loop for button press and release events. */

View File

@ -1,51 +1,35 @@
$NetBSD$
Patches from FreeBSD ports / DragonFly dports with include guards.
Support for different versions of system libusb headers.
Patches from FreeBSD ports / DragonFly dports x11-drivers/xf86-input-mouse 1.9.2.
--- src/mouse.h.orig 2012-10-08 01:40:07.000000000 +0000
+++ src/mouse.h
@@ -27,6 +27,14 @@
/* Public interface to OS-specific mouse support. */
+/* PKGSRC note: To support newer versions of DragonFly and FreeBSD,
+ * this file is patched using DragonFly dports
+ * x11-drivers/xf86-input-mouse/files/patch-src_mouse.h
+ * as of master commit 4f04bfe0ea83 ... Tue Jul 14 22:56:44 2015 -0700
+ * The patch's code is enclosed in include defined(FREEBSD_USB) while the
+ * original code is enclosed in include !defined(FREEBSD_USB).
+ */
+
#ifndef _XF86OSMOUSE_H_
#define _XF86OSMOUSE_H_
@@ -220,10 +228,17 @@ typedef struct _MouseDevRec {
@@ -220,10 +220,17 @@ typedef struct _MouseDevRec {
Bool emulate3ButtonsSoft;
int emulate3Timeout;/* Timeout for 3 button emulation */
Bool chordMiddle;
+#if defined(FREEBSD_USB)
+ Bool disableXY;
+#endif
+#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__)
+ Bool disableXY;
+#endif /* defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__) */
Bool flipXY;
int invX;
int invY;
int resolution;
+#if defined(FREEBSD_USB)
+ Bool hasW;
+ Bool hasZ;
+#endif
+#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__)
+ Bool hasW;
+ Bool hasZ;
+#endif /* defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__) */
int negativeZ; /* button mask */
int positiveZ; /* button mask */
int negativeW; /* button mask */
@@ -262,6 +277,10 @@ typedef struct _MouseDevRec {
@@ -262,6 +269,10 @@ typedef struct _MouseDevRec {
int doubleClickOldSourceState;
int lastMappedButtons;
int buttonMap[MSE_MAXBUTTONS];
+#if defined(FREEBSD_USB)
+ float fracdx, fracdy;
+ float sensitivity;
+#endif
+#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__)
+ float fracdx,fracdy;
+ float sensitivity;
+#endif /* defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__) */
} MouseDevRec, *MouseDevPtr;
#endif /* _XF86OSMOUSE_H_ */

View File

@ -1,33 +1,17 @@
$NetBSD$
Patches from FreeBSD ports / DragonFly dports with include guards.
Support for different versions of system libusb headers.
Patches from FreeBSD ports / DragonFly dports x11-drivers/xf86-input-mouse 1.9.2.
--- src/mousePriv.h.orig 2012-05-28 00:01:45.000000000 +0000
+++ src/mousePriv.h
@@ -2,6 +2,14 @@
* Copyright (c) 1997-1999 by The XFree86 Project, Inc.
*/
+/* PKGSRC note: To support newer versions of DragonFly and FreeBSD,
+ * this file is patched using DragonFly dports
+ * x11-drivers/xf86-input-mouse/files/patch-src_mousePriv.h
+ * as of master commit 4f04bfe0ea83 ... Tue Jul 14 22:56:44 2015 -0700
+ * The patch's code is enclosed in include defined(FREEBSD_USB) while the
+ * original code is enclosed in include !defined(FREEBSD_USB).
+ */
+
#ifndef _X_MOUSEPRIV_H
#define _X_MOUSEPRIV_H
@@ -63,8 +71,10 @@ typedef struct {
@@ -63,8 +63,10 @@ typedef struct {
int acc;
CARD32 pnpLast;
Bool disablePnPauto;
+#if !defined(FREEBSD_USB)
+#if !defined(__FreeBSD__) && !defined(__FreeBSD_kernel__) && !defined(__DragonFly__)
float fracdx,fracdy;
float sensitivity;
+#endif
+#endif /* !defined(__FreeBSD__) && !defined(__FreeBSD_kernel__) && !defined(__DragonFly__) */
} mousePrivRec, *mousePrivPtr;
/* mouse proto flags */