diff options
author | bapt <bapt@FreeBSD.org> | 2017-01-24 06:27:49 +0800 |
---|---|---|
committer | bapt <bapt@FreeBSD.org> | 2017-01-24 06:27:49 +0800 |
commit | 5258ac2975b74bffca4f09619f57ea39d297086e (patch) | |
tree | 56a1c4800e108f10a8fb56f51b20b2ecbcda8201 /x11-drivers | |
parent | fe6ec0f481a1230faf1a834a1454b38f73e20974 (diff) | |
download | freebsd-ports-gnome-5258ac2975b74bffca4f09619f57ea39d297086e.tar.gz freebsd-ports-gnome-5258ac2975b74bffca4f09619f57ea39d297086e.tar.zst freebsd-ports-gnome-5258ac2975b74bffca4f09619f57ea39d297086e.zip |
Import few patches from upstream to allow building with newer xorg
Note that those drivers are barely maintained and might disappear in the futur
PR: 216272
Submitted by: matthew@reztek.cz
Diffstat (limited to 'x11-drivers')
10 files changed, 294 insertions, 1 deletions
diff --git a/x11-drivers/xf86-input-fpit/Makefile b/x11-drivers/xf86-input-fpit/Makefile index 323693362b4c..daf3dee9afca 100644 --- a/x11-drivers/xf86-input-fpit/Makefile +++ b/x11-drivers/xf86-input-fpit/Makefile @@ -2,7 +2,7 @@ PORTNAME= xf86-input-fpit PORTVERSION= 1.4.0 -PORTREVISION= 6 +PORTREVISION= 7 CATEGORIES= x11-drivers MAINTAINER= x11@FreeBSD.org diff --git a/x11-drivers/xf86-input-fpit/files/patch-git_01_38fde65 b/x11-drivers/xf86-input-fpit/files/patch-git_01_38fde65 new file mode 100644 index 000000000000..c7fd79feb32a --- /dev/null +++ b/x11-drivers/xf86-input-fpit/files/patch-git_01_38fde65 @@ -0,0 +1,59 @@ +From 38fde65f6c919350b2bf5d2b61b6e9f783ab2cf7 Mon Sep 17 00:00:00 2001 +From: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri, 8 Jul 2011 14:12:53 +1000 +Subject: Fix type name and name + +Don't overwrite user-specified device name and set the right type_name. +If you're capable of setting the option DeviceName, you might as well set +the Identifier line. + +Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +diff --git a/man/fpit.man b/man/fpit.man +index 097ff33..8bf31f0 100644 +--- man/fpit.man ++++ man/fpit.man +@@ -82,10 +82,6 @@ Manipulate the invert and swap options to match screen + rotations. (Will behave strangely if combined with invert or swap options.) + New users should consider the \fI"TrackRandR"\fP option instead. + .TP 4 +-.B Option \fI"DeviceName"\fP \fI"name"\fP +-.B Option \fI"DeviceName"\fP \fI"name"\fP +-sets the name of the X device. +-.TP 4 + .B Option \fI"AlwaysCore"\fP \fI"on"\fP + enables the sharing of the core pointer. When this feature is enabled, the + device will take control of the core pointer (and thus will emit core events) +diff --git a/src/xf86Fpit.c b/src/xf86Fpit.c +index fa4ace7..e7e4e1a 100644 +--- src/xf86Fpit.c ++++ src/xf86Fpit.c +@@ -527,7 +527,6 @@ static int xf86FpitAllocate(InputDriverPtr drv, InputInfoPtr pInfo) + priv->fpitOldProximity = 0; + priv->fpitIndex = 0; + priv->fpitPassive = 0; +- pInfo->name = XI_TOUCHSCREEN; + pInfo->flags = 0 /* XI86_NO_OPEN_ON_INIT */ ; + pInfo->device_control = xf86FpitControl; + pInfo->read_input = xf86FpitReadInput; +@@ -536,7 +535,7 @@ static int xf86FpitAllocate(InputDriverPtr drv, InputInfoPtr pInfo) + pInfo->fd = -1; + pInfo->dev = NULL; + pInfo->private = priv; +- pInfo->type_name = "Fujitsu Stylistic"; ++ pInfo->type_name = XI_TOUCHSCREEN; + return Success; + } + +@@ -577,8 +576,6 @@ static int xf86FpitInit(InputDriverPtr drv, InputInfoPtr pInfo, int flags) + return BadValue; + } + priv->fpitDev = strdup(str); +- pInfo->name = xf86SetStrOption(pInfo->options, "DeviceName", XI_TOUCHSCREEN); +- xf86Msg(X_CONFIG, "FPIT device name: %s\n", pInfo->name); + priv->screen_no = xf86SetIntOption(pInfo->options, "ScreenNo", 0); + xf86Msg(X_CONFIG, "Fpit associated screen: %d\n", priv->screen_no); + priv->fpitMaxX = xf86SetIntOption(pInfo->options, "MaximumXPosition", FPIT_MAX_X); +-- +cgit v0.10.2 + diff --git a/x11-drivers/xf86-input-fpit/files/patch-git_02_508d879 b/x11-drivers/xf86-input-fpit/files/patch-git_02_508d879 new file mode 100644 index 000000000000..3670cde34aaf --- /dev/null +++ b/x11-drivers/xf86-input-fpit/files/patch-git_02_508d879 @@ -0,0 +1,25 @@ +From 508d8793e5998fcac42a9dfd6f02235c3d82ab11 Mon Sep 17 00:00:00 2001 +From: Terry Lambert <tlambert@chromium.org> +Date: Fri, 15 Jul 2011 17:23:21 -0700 +Subject: Return proper default for unknown values in pInfo->device_control. + +Signed-off-by: Terry Lambert <tlambert@chromium.org> +Reviewed-by: Stephane Marchesin <marcheu@chromium.org> +Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +diff --git a/src/xf86Fpit.c b/src/xf86Fpit.c +index e7e4e1a..78b44a2 100644 +--- src/xf86Fpit.c ++++ src/xf86Fpit.c +@@ -495,7 +495,7 @@ static Bool xf86FpitControl(DeviceIntPtr dev, int mode) + return Success; + default: + ErrorF("unsupported mode=%d\n", mode); +- return !Success; ++ return BadValue; + } + } + +-- +cgit v0.10.2 + diff --git a/x11-drivers/xf86-input-fpit/files/patch-git_03_4b47b4a b/x11-drivers/xf86-input-fpit/files/patch-git_03_4b47b4a new file mode 100644 index 000000000000..f34f159d18bb --- /dev/null +++ b/x11-drivers/xf86-input-fpit/files/patch-git_03_4b47b4a @@ -0,0 +1,29 @@ +From 4b47b4a9cdce3bd0368aacb8164aa02e05670a88 Mon Sep 17 00:00:00 2001 +From: Peter Hutterer <peter.hutterer@who-t.net> +Date: Tue, 19 Jul 2011 11:42:12 +1000 +Subject: Don't free anything on PreInit failure, let UnInit take care of it + +Avoid double free's by the server when it calls UnInit. + +Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +diff --git a/src/xf86Fpit.c b/src/xf86Fpit.c +index 78b44a2..2da34aa 100644 +--- src/xf86Fpit.c ++++ src/xf86Fpit.c +@@ -567,12 +567,6 @@ static int xf86FpitInit(InputDriverPtr drv, InputInfoPtr pInfo, int flags) + str = xf86FindOptionValue(pInfo->options, "Device"); + if (!str) { + xf86Msg(X_ERROR, "%s: No Device specified in FPIT module config.\n", pInfo->name); +- if (priv) { +- if (priv->fpitDev) { +- free(priv->fpitDev); +- } +- free(priv); +- } + return BadValue; + } + priv->fpitDev = strdup(str); +-- +cgit v0.10.2 + diff --git a/x11-drivers/xf86-input-fpit/files/patch-git_04_dc40c58 b/x11-drivers/xf86-input-fpit/files/patch-git_04_dc40c58 new file mode 100644 index 000000000000..5859069c327a --- /dev/null +++ b/x11-drivers/xf86-input-fpit/files/patch-git_04_dc40c58 @@ -0,0 +1,29 @@ +From dc40c58c70b785c102a27652569c3de30fc44a9b Mon Sep 17 00:00:00 2001 +From: Peter Hutterer <peter.hutterer@who-t.net> +Date: Tue, 19 Jul 2011 11:44:35 +1000 +Subject: Test opening the device in PreInit, fail if necessary + +Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +diff --git a/src/xf86Fpit.c b/src/xf86Fpit.c +index 2da34aa..8c9c830 100644 +--- src/xf86Fpit.c ++++ src/xf86Fpit.c +@@ -568,6 +568,14 @@ static int xf86FpitInit(InputDriverPtr drv, InputInfoPtr pInfo, int flags) + if (!str) { + xf86Msg(X_ERROR, "%s: No Device specified in FPIT module config.\n", pInfo->name); + return BadValue; ++ } else { ++ pInfo->fd = xf86OpenSerial(pInfo->options); ++ if (pInfo->fd < 0) { ++ xf86Msg(X_ERROR, "%s: Unable to open Fpit touchscreen device '%s'", pInfo->name, str); ++ return BadValue; ++ } ++ xf86CloseSerial(pInfo->fd); ++ pInfo->fd = -1; + } + priv->fpitDev = strdup(str); + priv->screen_no = xf86SetIntOption(pInfo->options, "ScreenNo", 0); +-- +cgit v0.10.2 + diff --git a/x11-drivers/xf86-input-fpit/files/patch-git_05_7a1245d b/x11-drivers/xf86-input-fpit/files/patch-git_05_7a1245d new file mode 100644 index 000000000000..01d209c0a890 --- /dev/null +++ b/x11-drivers/xf86-input-fpit/files/patch-git_05_7a1245d @@ -0,0 +1,23 @@ +From 7a1245defa41517786e9752ea4e588c4f88f7047 Mon Sep 17 00:00:00 2001 +From: Peter Hutterer <peter.hutterer@who-t.net> +Date: Tue, 19 Jul 2011 11:45:00 +1000 +Subject: Use xf86SetStrOption to print Option Device to the log + +Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +diff --git a/src/xf86Fpit.c b/src/xf86Fpit.c +index 8c9c830..9ab3bb0 100644 +--- src/xf86Fpit.c ++++ src/xf86Fpit.c +@@ -564,7 +564,7 @@ static int xf86FpitInit(InputDriverPtr drv, InputInfoPtr pInfo, int flags) + return rc; + + priv = pInfo->private; +- str = xf86FindOptionValue(pInfo->options, "Device"); ++ str = xf86SetStrOption(pInfo->options, "Device", NULL); + if (!str) { + xf86Msg(X_ERROR, "%s: No Device specified in FPIT module config.\n", pInfo->name); + return BadValue; +-- +cgit v0.10.2 + diff --git a/x11-drivers/xf86-input-fpit/files/patch-git_06_270607a b/x11-drivers/xf86-input-fpit/files/patch-git_06_270607a new file mode 100644 index 000000000000..2e18d3c704e0 --- /dev/null +++ b/x11-drivers/xf86-input-fpit/files/patch-git_06_270607a @@ -0,0 +1,22 @@ +From 270607ae055a21bdac44f905a791260c5b34089b Mon Sep 17 00:00:00 2001 +From: Peter Hutterer <peter.hutterer@who-t.net> +Date: Tue, 19 Jul 2011 12:32:50 +1000 +Subject: Don't call DEVICE_OFF in UnInit, the server does it for us + +Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +diff --git a/src/xf86Fpit.c b/src/xf86Fpit.c +index 9ab3bb0..eb85a2e 100644 +--- src/xf86Fpit.c ++++ src/xf86Fpit.c +@@ -542,7 +542,6 @@ static int xf86FpitAllocate(InputDriverPtr drv, InputInfoPtr pInfo) + static void xf86FpitUninit(InputDriverPtr drv, InputInfoPtr pInfo, int flags) + { + FpitPrivatePtr priv = (FpitPrivatePtr) pInfo->private; +- xf86FpitControl(pInfo->dev, DEVICE_OFF); + free(priv->fpitDev); + free(priv); + pInfo->private = NULL; +-- +cgit v0.10.2 + diff --git a/x11-drivers/xf86-input-fpit/files/patch-git_07_5772c7f b/x11-drivers/xf86-input-fpit/files/patch-git_07_5772c7f new file mode 100644 index 000000000000..7317be843c7c --- /dev/null +++ b/x11-drivers/xf86-input-fpit/files/patch-git_07_5772c7f @@ -0,0 +1,26 @@ +From 5772c7f58f24e259349ad048de096802184c7aa1 Mon Sep 17 00:00:00 2001 +From: Peter Hutterer <peter.hutterer@who-t.net> +Date: Tue, 19 Jul 2011 15:52:11 +1000 +Subject: Check for priv before dereferencing it. + +We can hit this path when the priv alloc fails. + +Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +diff --git a/src/xf86Fpit.c b/src/xf86Fpit.c +index eb85a2e..3c70b4a 100644 +--- src/xf86Fpit.c ++++ src/xf86Fpit.c +@@ -542,7 +542,8 @@ static int xf86FpitAllocate(InputDriverPtr drv, InputInfoPtr pInfo) + static void xf86FpitUninit(InputDriverPtr drv, InputInfoPtr pInfo, int flags) + { + FpitPrivatePtr priv = (FpitPrivatePtr) pInfo->private; +- free(priv->fpitDev); ++ if (priv) ++ free(priv->fpitDev); + free(priv); + pInfo->private = NULL; + xf86DeleteInput(pInfo, 0); +-- +cgit v0.10.2 + diff --git a/x11-drivers/xf86-input-fpit/files/patch-git_09_00742d9 b/x11-drivers/xf86-input-fpit/files/patch-git_09_00742d9 new file mode 100644 index 000000000000..4174214e5710 --- /dev/null +++ b/x11-drivers/xf86-input-fpit/files/patch-git_09_00742d9 @@ -0,0 +1,28 @@ +From 00742d9a9bcd06800b2548007ea304c331875666 Mon Sep 17 00:00:00 2001 +From: Peter Hutterer <peter.hutterer@who-t.net> +Date: Mon, 20 Aug 2012 10:00:57 +1000 +Subject: Don't force pInfo->flags to 0 (#40870) + +The server uses the flags to decide if a device comes up as attached or +floating slave. Overwriting the flag after the server has processed the +CorePointer/AlwaysCore/Floating/etc options results in the device always +coming up as floating slave. This again makes the device appear +unresponsive. + +Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +diff --git a/src/xf86Fpit.c b/src/xf86Fpit.c +index 3c70b4a..8852d4d 100644 +--- src/xf86Fpit.c ++++ src/xf86Fpit.c +@@ -527,7 +527,6 @@ static int xf86FpitAllocate(InputDriverPtr drv, InputInfoPtr pInfo) + priv->fpitOldProximity = 0; + priv->fpitIndex = 0; + priv->fpitPassive = 0; +- pInfo->flags = 0 /* XI86_NO_OPEN_ON_INIT */ ; + pInfo->device_control = xf86FpitControl; + pInfo->read_input = xf86FpitReadInput; + pInfo->control_proc = NULL; +-- +cgit v0.10.2 + diff --git a/x11-drivers/xf86-input-fpit/files/patch-src_xf86Fpit.c b/x11-drivers/xf86-input-fpit/files/patch-src_xf86Fpit.c new file mode 100644 index 000000000000..fb94b6dc5439 --- /dev/null +++ b/x11-drivers/xf86-input-fpit/files/patch-src_xf86Fpit.c @@ -0,0 +1,52 @@ +# Finish converting RemoveEnabledDevice to xf86RemoveEnabledDevice +# Finish converting use of Error to ErrorF +# Remove obsolete xf86InputSetScreen +# Correct type of default_options +# +--- src/xf86Fpit.c.orig 2011-06-13 23:24:05 UTC ++++ src/xf86Fpit.c +@@ -251,7 +251,7 @@ static void xf86FpitReadInput(InputInfoP + /* Read data into buffer */ + len = xf86ReadSerial(pInfo->fd, priv->fpitData+priv->fpitIndex, BUFFER_SIZE-priv->fpitIndex); + if (len <= 0) { +- Error("error reading FPIT device"); ++ ErrorF("error reading FPIT device\n"); + priv->fpitIndex = 0; + return; + } +@@ -324,7 +324,7 @@ static void xf86FpitReadInput(InputInfoP + device = pInfo->dev; + + xf86FpitConvert(pInfo, 0, 2, x, y, 0, 0, 0, 0, &conv_x, &conv_y); +- xf86XInputSetScreen(pInfo, priv->screen_no, conv_x, conv_y); ++ //xf86XInputSetScreen(pInfo, priv->screen_no, conv_x, conv_y); + + /* coordinates are ready we can send events */ + +@@ -459,7 +459,7 @@ static Bool xf86FpitControl(DeviceIntPtr + if (pInfo->fd < 0) { + pInfo->fd = xf86OpenSerial(pInfo->options); + if (pInfo->fd < 0) { +- Error("Unable to open Fpit touchscreen device"); ++ ErrorF("Unable to open Fpit touchscreen device\n"); + return !Success; + } + +@@ -488,7 +488,7 @@ static Bool xf86FpitControl(DeviceIntPtr + case DEVICE_CLOSE: + dev->public.on = FALSE; + if (pInfo->fd >= 0) { +- RemoveEnabledDevice(pInfo->fd); ++ xf86RemoveEnabledDevice(pInfo); + } + xf86CloseSerial(pInfo->fd); + pInfo->fd = -1; +@@ -550,7 +550,7 @@ static void xf86FpitUninit(InputDriverPt + xf86DeleteInput(pInfo, 0); + } + +-static char *default_options[] = { ++static const char *default_options[] = { + "BaudRate", "19200", "StopBits", "0", "DataBits", "8", "Parity", "None", "Vmin", "10", "Vtime", "1", "FlowControl", "None", NULL + }; + |