diff options
author | wiz <wiz@pkgsrc.org> | 2016-11-16 22:53:22 +0000 |
---|---|---|
committer | wiz <wiz@pkgsrc.org> | 2016-11-16 22:53:22 +0000 |
commit | a58591a4b00d4d0a16bb838fa839b3dc2584415b (patch) | |
tree | a310f4393b3a5307d7677e5290bf9151e1bbadd9 /x11 | |
parent | bcb2ed8098081d1825e5dd7f26304e4dbed8bb73 (diff) | |
download | pkgsrc-a58591a4b00d4d0a16bb838fa839b3dc2584415b.tar.gz |
Fix build with xorg-server-1.19.
Diffstat (limited to 'x11')
-rw-r--r-- | x11/xf86-input-joystick/distinfo | 4 | ||||
-rw-r--r-- | x11/xf86-input-joystick/patches/patch-src_jstk.c | 126 | ||||
-rw-r--r-- | x11/xf86-input-joystick/patches/patch-src_jstk.c.orig | 0 | ||||
-rw-r--r-- | x11/xf86-input-joystick/patches/patch-src_jstk.h | 32 | ||||
-rw-r--r-- | x11/xf86-input-joystick/patches/patch-src_jstk.h.orig | 0 | ||||
-rw-r--r-- | x11/xf86-input-keyboard/distinfo | 3 | ||||
-rw-r--r-- | x11/xf86-input-keyboard/patches/patch-src_kbd.c | 279 |
7 files changed, 442 insertions, 2 deletions
diff --git a/x11/xf86-input-joystick/distinfo b/x11/xf86-input-joystick/distinfo index e107c88b24f..e73249a78b8 100644 --- a/x11/xf86-input-joystick/distinfo +++ b/x11/xf86-input-joystick/distinfo @@ -1,6 +1,8 @@ -$NetBSD: distinfo,v 1.2 2015/11/04 03:29:00 agc Exp $ +$NetBSD: distinfo,v 1.3 2016/11/16 22:57:33 wiz Exp $ SHA1 (xf86-input-joystick-1.6.2.tar.bz2) = 61658b8d829fdaed6064c7c26232c3884d359187 RMD160 (xf86-input-joystick-1.6.2.tar.bz2) = c2821f284ba33488032d0dc9fe3300c9dad95d84 SHA512 (xf86-input-joystick-1.6.2.tar.bz2) = 2c3e9d9fefa8010198a895fea1caa0475c8005480b5db14fc7e547ae9ac4da2dbfa10e8ecbdcf7a6bf31c7590f6414685a11964ef00f6ca99b88e81b404f5ef8 Size (xf86-input-joystick-1.6.2.tar.bz2) = 327539 bytes +SHA1 (patch-src_jstk.c) = d49c87500aa95765d92e352f93cb8d8894c30d8c +SHA1 (patch-src_jstk.h) = 2bd6f7d3ce10b4969a6e61eca5d98ea69f0a6703 diff --git a/x11/xf86-input-joystick/patches/patch-src_jstk.c b/x11/xf86-input-joystick/patches/patch-src_jstk.c new file mode 100644 index 00000000000..6430bd20898 --- /dev/null +++ b/x11/xf86-input-joystick/patches/patch-src_jstk.c @@ -0,0 +1,126 @@ +$NetBSD: patch-src_jstk.c,v 1.1 2016/11/16 22:57:33 wiz Exp $ + +Fix build with xorg-server-1.19, from upstream git +60d0e9c451b3f259d524b0ddcc5c1f21a4f82293 + +--- src/jstk.c.orig 2012-10-03 17:17:26.000000000 +0000 ++++ src/jstk.c +@@ -34,6 +34,7 @@ + #include <xf86Xinput.h> + #include <exevents.h> /* Needed for InitValuator/Proximity stuff */ + #include <xf86Opt.h> ++#include <xf86_OSproc.h> + + #include <math.h> + #include <xf86Module.h> +@@ -79,6 +80,9 @@ jstkOpenDevice(JoystickDevPtr priv, BOOL + int fd; + fd = -1; + ++ if (priv->joystick_device->flags & XI86_SERVER_FD) ++ priv->fd = priv->joystick_device->fd; ++ + if (probe == FALSE && priv->open_proc) + return priv->open_proc(priv, probe); + +@@ -98,6 +102,24 @@ jstkOpenDevice(JoystickDevPtr priv, BOOL + return fd; + } + ++/* ++ *************************************************************************** ++ * ++ * jstkCloseDevice -- ++ * ++ * Called to close the device specified in priv, this is a helper for ++ * backend proc_close functions ++ * ++ *************************************************************************** ++ */ ++void jstkCloseDevice(JoystickDevPtr priv) ++{ ++ if ((priv->fd >= 0)) { ++ if (!(priv->joystick_device->flags & XI86_SERVER_FD)) ++ xf86CloseSerial(priv->fd); ++ priv->fd = -1; ++ } ++} + + /* + *************************************************************************** +@@ -125,7 +147,7 @@ jstkReadProc(InputInfoPtr pInfo) + xf86Msg(X_WARNING, "JOYSTICK: Read failed. Deactivating device.\n"); + + if (pInfo->fd >= 0) +- RemoveEnabledDevice(pInfo->fd); ++ xf86RemoveEnabledDevice(pInfo); + return; + } + +@@ -392,7 +414,7 @@ jstkDeviceControlProc(DeviceIntPtr + if (jstkOpenDevice(priv, FALSE) != -1) { + pJstk->public.on = TRUE; + pInfo->fd = priv->fd; +- AddEnabledDevice(pInfo->fd); ++ xf86AddEnabledDevice(pInfo); + } else return !Success; + break; + +@@ -415,13 +437,19 @@ jstkDeviceControlProc(DeviceIntPtr + } + + if (pInfo->fd >= 0) +- RemoveEnabledDevice(pInfo->fd); +- pInfo->fd = -1; ++ xf86RemoveEnabledDevice(pInfo); ++ if (!(pInfo->flags & XI86_SERVER_FD)) ++ pInfo->fd = -1; + if (priv->close_proc) + priv->close_proc(priv); + pJstk->public.on = FALSE; + break; + ++#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) * 100 + GET_ABI_MINOR(ABI_XINPUT_VERSION) >= 1901 ++ case DEVICE_ABORT: ++ break; ++#endif ++ + default: + ErrorF("unsupported mode=%d\n", what); + return BadValue; +@@ -462,7 +490,8 @@ jstkCorePreInit(InputDriverPtr drv, Inpu + pInfo->read_input = jstkReadProc; + pInfo->control_proc = NULL; + pInfo->switch_mode = NULL; +- pInfo->fd = -1; ++ if (!(pInfo->flags & XI86_SERVER_FD)) ++ pInfo->fd = -1; + pInfo->dev = NULL; + pInfo->type_name = XI_JOYSTICK; + +@@ -483,6 +512,7 @@ jstkCorePreInit(InputDriverPtr drv, Inpu + priv->mouse_enabled = TRUE; + priv->keys_enabled = TRUE; + priv->amplify = 1.0f; ++ priv->joystick_device = pInfo; + priv->keyboard_device = keyboard_device; + priv->num_axes = MAXAXES; + priv->num_buttons = MAXBUTTONS; +@@ -659,7 +689,11 @@ _X_EXPORT InputDriverRec JOYSTICK = { + NULL, + jstkCorePreInit, + jstkCoreUnInit, +- NULL ++ NULL, ++ NULL, ++#ifdef XI86_DRV_CAP_SERVER_FD ++ XI86_DRV_CAP_SERVER_FD ++#endif + }; + + /* +@@ -738,4 +772,3 @@ _X_EXPORT XF86ModuleData joystickModuleD + }; + + /* vim: set filetype=c.doxygen ts=4 et: */ +- diff --git a/x11/xf86-input-joystick/patches/patch-src_jstk.c.orig b/x11/xf86-input-joystick/patches/patch-src_jstk.c.orig new file mode 100644 index 00000000000..e69de29bb2d --- /dev/null +++ b/x11/xf86-input-joystick/patches/patch-src_jstk.c.orig diff --git a/x11/xf86-input-joystick/patches/patch-src_jstk.h b/x11/xf86-input-joystick/patches/patch-src_jstk.h new file mode 100644 index 00000000000..50eedfb1f04 --- /dev/null +++ b/x11/xf86-input-joystick/patches/patch-src_jstk.h @@ -0,0 +1,32 @@ +$NetBSD: patch-src_jstk.h,v 1.1 2016/11/16 22:57:33 wiz Exp $ + +Fix build with xorg-server-1.19, from upstream git +60d0e9c451b3f259d524b0ddcc5c1f21a4f82293 + +--- src/jstk.h.orig 2012-10-06 14:00:57.000000000 +0000 ++++ src/jstk.h +@@ -55,6 +55,9 @@ + #define XI_JOYSTICK "JOYSTICK" + #endif + ++#ifndef XI86_SERVER_FD ++#define XI86_SERVER_FD 0x20 ++#endif + + typedef enum _JOYSTICKEVENT { + EVENT_NONE=0, +@@ -106,6 +109,7 @@ typedef struct _JoystickDevRec { + jstkReadDataProc read_proc; /* Callback for reading data from the backend */ + void *devicedata; /* Extra platform device dependend data */ + char *device; /* Name of the device */ ++ InputInfoPtr joystick_device; /* Back pointer to the joystick device */ + InputInfoPtr keyboard_device; /* Slave device for keyboard events */ + + OsTimerPtr timer; /* Timer for axis movement */ +@@ -123,4 +127,6 @@ typedef struct _JoystickDevRec { + BUTTON button[MAXBUTTONS]; /* Configuration per button */ + } JoystickDevRec; + ++void jstkCloseDevice(JoystickDevPtr priv); ++ + #endif diff --git a/x11/xf86-input-joystick/patches/patch-src_jstk.h.orig b/x11/xf86-input-joystick/patches/patch-src_jstk.h.orig new file mode 100644 index 00000000000..e69de29bb2d --- /dev/null +++ b/x11/xf86-input-joystick/patches/patch-src_jstk.h.orig diff --git a/x11/xf86-input-keyboard/distinfo b/x11/xf86-input-keyboard/distinfo index b6856638a6d..2962e21579e 100644 --- a/x11/xf86-input-keyboard/distinfo +++ b/x11/xf86-input-keyboard/distinfo @@ -1,7 +1,8 @@ -$NetBSD: distinfo,v 1.12 2015/11/04 03:29:01 agc Exp $ +$NetBSD: distinfo,v 1.13 2016/11/16 22:53:22 wiz Exp $ SHA1 (xf86-input-keyboard-1.8.1.tar.bz2) = c23cbba8b665c09cbc12ada36bc3cbf4ac4eff9f RMD160 (xf86-input-keyboard-1.8.1.tar.bz2) = a88e5d2e48c4672fc8ab6979e103f2f021af0b33 SHA512 (xf86-input-keyboard-1.8.1.tar.bz2) = 51c6ed6c7daa660a519f1c96d3100e3a0cabf6245a05cd5b8797e9c4b237508802a7087e7e0327cdda1a3b681f83845ecc625fb739d7e992020026f385af8d5d Size (xf86-input-keyboard-1.8.1.tar.bz2) = 319232 bytes +SHA1 (patch-src_kbd.c) = 96069a646855384aa6ed696fb9cefe8c460261e4 SHA1 (patch-src_sun__kbd.c) = d988239bc09a21cd634134a48d39e3026cda960d diff --git a/x11/xf86-input-keyboard/patches/patch-src_kbd.c b/x11/xf86-input-keyboard/patches/patch-src_kbd.c new file mode 100644 index 00000000000..f05156d7ef0 --- /dev/null +++ b/x11/xf86-input-keyboard/patches/patch-src_kbd.c @@ -0,0 +1,279 @@ +$NetBSD: patch-src_kbd.c,v 1.1 2016/11/16 22:53:22 wiz Exp $ + +157e0631b12d0aae4a5f38b81bee615a7eaf553f from upstream git. + +--- src/kbd.c.orig 2013-10-28 00:44:15.000000000 +0000 ++++ src/kbd.c +@@ -45,6 +45,10 @@ + #include "xkbstr.h" + #include "xkbsrv.h" + ++#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 23 ++#define HAVE_THREADED_INPUT 1 ++#endif ++ + #define CAPSFLAG 1 + #define NUMFLAG 2 + #define SCROLLFLAG 4 +@@ -53,11 +57,7 @@ + /* Used to know when the first DEVICE_ON after a DEVICE_INIT is called */ + #define INITFLAG (1U << 31) + +-#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) < 12 +-static InputInfoPtr KbdPreInit(InputDriverPtr drv, IDevPtr dev, int flags); +-#else + static int KbdPreInit(InputDriverPtr drv, InputInfoPtr pInfo, int flags); +-#endif + static int KbdProc(DeviceIntPtr device, int what); + static void KbdCtrl(DeviceIntPtr device, KeybdCtrl *ctrl); + static void KbdBell(int percent, DeviceIntPtr dev, pointer ctrl, int unused); +@@ -66,24 +66,6 @@ static void PostKbdEvent(InputInfoPtr pI + static void InitKBD(InputInfoPtr pInfo, Bool init); + static void UpdateLeds(InputInfoPtr pInfo); + +-_X_EXPORT InputDriverRec KBD = { +- 1, +- "kbd", +- NULL, +- KbdPreInit, +- NULL, +- NULL +-}; +- +-_X_EXPORT InputDriverRec KEYBOARD = { +- 1, +- "keyboard", +- NULL, +- KbdPreInit, +- NULL, +- NULL +-}; +- + static const char *kbdDefaults[] = { + #ifdef __NetBSD__ + #ifdef DEFAULT_TO_WSKBD +@@ -106,43 +88,52 @@ static char *xkb_layout; + static char *xkb_variant; + static char *xkb_options; + +-#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) < 12 +-static int +-NewKbdPreInit(InputDriverPtr drv, InputInfoPtr pInfo, int flags); +- +-static InputInfoPtr +-KbdPreInit(InputDriverPtr drv, IDevPtr dev, int flags) +-{ +- InputInfoPtr pInfo; ++_X_EXPORT InputDriverRec KBD = { ++ 1, ++ "kbd", ++ NULL, ++ KbdPreInit, ++ NULL, ++ NULL ++}; + +- if (!(pInfo = xf86AllocateInput(drv, 0))) +- return NULL; ++_X_EXPORT InputDriverRec KEYBOARD = { ++ 1, ++ "keyboard", ++ NULL, ++ KbdPreInit, ++ NULL, ++ NULL ++}; + +- pInfo->name = dev->identifier; +- pInfo->flags = XI86_KEYBOARD_CAPABLE; +- pInfo->conversion_proc = NULL; +- pInfo->reverse_conversion_proc = NULL; +- pInfo->private_flags = 0; +- pInfo->always_core_feedback = NULL; +- pInfo->conf_idev = dev; +- pInfo->close_proc = NULL; +- +- if (NewKbdPreInit(drv, pInfo, flags) == Success) +- { +- pInfo->flags |= XI86_CONFIGURED; +- return pInfo; +- } ++static XF86ModuleVersionInfo xf86KbdVersionRec = { ++ "kbd", ++ MODULEVENDORSTRING, ++ MODINFOSTRING1, ++ MODINFOSTRING2, ++ XORG_VERSION_CURRENT, ++ PACKAGE_VERSION_MAJOR, PACKAGE_VERSION_MINOR, PACKAGE_VERSION_PATCHLEVEL, ++ ABI_CLASS_XINPUT, ++ ABI_XINPUT_VERSION, ++ MOD_CLASS_XINPUT, ++ {0, 0, 0, 0} ++}; + +- xf86DeleteInput(pInfo, 0); +- return NULL; ++static pointer ++xf86KbdPlug(pointer module, pointer options, int *errmaj, int *errmin) ++{ ++ xf86AddInputDriver(&KBD, module, 0); ++ return module; + } + +-static int +-NewKbdPreInit(InputDriverPtr drv, InputInfoPtr pInfo, int flags) +-#else ++_X_EXPORT XF86ModuleData kbdModuleData = { ++ &xf86KbdVersionRec, ++ xf86KbdPlug, ++ NULL ++}; ++ + static int + KbdPreInit(InputDriverPtr drv, InputInfoPtr pInfo, int flags) +-#endif + { + KbdDevPtr pKbd; + char *s; +@@ -163,11 +154,7 @@ KbdPreInit(InputDriverPtr drv, InputInfo + pInfo->dev = NULL; + + defaults = kbdDefaults; +- xf86CollectInputOptions(pInfo, defaults +-#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) < 12 +- , NULL +-#endif +- ); ++ xf86CollectInputOptions(pInfo, defaults); + xf86ProcessCommonOptions(pInfo, pInfo->options); + + if (!(pKbd = calloc(sizeof(KbdDevRec), 1))) { +@@ -309,6 +296,7 @@ KbdProc(DeviceIntPtr device, int what) + + InputInfoPtr pInfo = device->public.devicePrivate; + KbdDevPtr pKbd = (KbdDevPtr) pInfo->private; ++ XkbRMLVOSet rmlvo; + KeySymsRec keySyms; + CARD8 modMap[MAP_LENGTH]; + int ret; +@@ -322,23 +310,19 @@ KbdProc(DeviceIntPtr device, int what) + pKbd->KbdGetMapping(pInfo, &keySyms, modMap); + + device->public.on = FALSE; +-#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 5 +- { +- XkbRMLVOSet rmlvo; +- rmlvo.rules = xkb_rules; +- rmlvo.model = xkb_model; +- rmlvo.layout = xkb_layout; +- rmlvo.variant = xkb_variant; +- rmlvo.options = xkb_options; ++ rmlvo.rules = xkb_rules; ++ rmlvo.model = xkb_model; ++ rmlvo.layout = xkb_layout; ++ rmlvo.variant = xkb_variant; ++ rmlvo.options = xkb_options; + +- if (!InitKeyboardDeviceStruct(device, &rmlvo, KbdBell, KbdCtrl)) +- { +- xf86Msg(X_ERROR, "%s: Keyboard initialization failed. This " +- "could be a missing or incorrect setup of " +- "xkeyboard-config.\n", device->name); ++ if (!InitKeyboardDeviceStruct(device, &rmlvo, KbdBell, KbdCtrl)) ++ { ++ xf86Msg(X_ERROR, "%s: Keyboard initialization failed. This " ++ "could be a missing or incorrect setup of " ++ "xkeyboard-config.\n", device->name); + +- return BadValue; +- } ++ return BadValue; + } + # ifdef XI_PROP_DEVICE_NODE + { +@@ -355,17 +339,6 @@ KbdProc(DeviceIntPtr device, int what) + } + } + # endif /* XI_PROP_DEVICE_NODE */ +-#else +- { +- XkbComponentNamesRec xkbnames; +- memset(&xkbnames, 0, sizeof(xkbnames)); +- XkbSetRulesDflts(xkb_rules, xkb_model, xkb_layout, +- xkb_variant, xkb_options); +- XkbInitKeyboardDeviceStruct(device, &xkbnames, &keySyms, +- modMap, KbdBell, +- (KbdCtrlProcPtr)KbdCtrl); +- } +-#endif /* XINPUT ABI 5*/ + InitKBD(pInfo, TRUE); + break; + case DEVICE_ON: +@@ -383,7 +356,11 @@ KbdProc(DeviceIntPtr device, int what) + */ + if (pInfo->fd >= 0) { + xf86FlushInput(pInfo->fd); ++#if HAVE_THREADED_INPUT ++ xf86AddEnabledDevice(pInfo); ++#else + AddEnabledDevice(pInfo->fd); ++#endif + } + + device->public.on = TRUE; +@@ -396,8 +373,13 @@ KbdProc(DeviceIntPtr device, int what) + /* + * Restore original keyboard directness and translation. + */ +- if (pInfo->fd != -1) ++ if (pInfo->fd != -1) { ++#if HAVE_THREADED_INPUT ++ xf86RemoveEnabledDevice(pInfo); ++#else + RemoveEnabledDevice(pInfo->fd); ++#endif ++ } + pKbd->KbdOff(pInfo, what); + device->public.on = FALSE; + break; +@@ -451,40 +433,3 @@ PostKbdEvent(InputInfoPtr pInfo, unsigne + + xf86PostKeyboardEvent(device, scanCode + MIN_KEYCODE, down); + } +- +-static void +-xf86KbdUnplug(pointer p) +-{ +-} +- +-static pointer +-xf86KbdPlug(pointer module, +- pointer options, +- int *errmaj, +- int *errmin) +-{ +- xf86AddInputDriver(&KBD, module, 0); +- +- return module; +-} +- +-static XF86ModuleVersionInfo xf86KbdVersionRec = +-{ +- "kbd", +- MODULEVENDORSTRING, +- MODINFOSTRING1, +- MODINFOSTRING2, +- XORG_VERSION_CURRENT, +- PACKAGE_VERSION_MAJOR, PACKAGE_VERSION_MINOR, PACKAGE_VERSION_PATCHLEVEL, +- ABI_CLASS_XINPUT, +- ABI_XINPUT_VERSION, +- MOD_CLASS_XINPUT, +- {0, 0, 0, 0} /* signature, to be patched into the file by */ +- /* a tool */ +-}; +- +-_X_EXPORT XF86ModuleData kbdModuleData = { +- &xf86KbdVersionRec, +- xf86KbdPlug, +- xf86KbdUnplug +-}; |