diff options
author | bapt <bapt@FreeBSD.org> | 2017-01-24 06:36:57 +0800 |
---|---|---|
committer | bapt <bapt@FreeBSD.org> | 2017-01-24 06:36:57 +0800 |
commit | 32e3cddb413eafdedb463d593592f12acd1fac88 (patch) | |
tree | 1dcf0ce937fcbe0ac5c2ae35e0d4b6191766bba1 /x11-drivers | |
parent | 62992c14b7183528c92d9a071b428570175c3ddd (diff) | |
download | freebsd-ports-gnome-32e3cddb413eafdedb463d593592f12acd1fac88.tar.gz freebsd-ports-gnome-32e3cddb413eafdedb463d593592f12acd1fac88.tar.zst freebsd-ports-gnome-32e3cddb413eafdedb463d593592f12acd1fac88.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: 216274
Submitted by: matthew@reztek.cz
Diffstat (limited to 'x11-drivers')
7 files changed, 213 insertions, 1 deletions
diff --git a/x11-drivers/xf86-input-mutouch/Makefile b/x11-drivers/xf86-input-mutouch/Makefile index 3944364c58d9..89d2cb143c6c 100644 --- a/x11-drivers/xf86-input-mutouch/Makefile +++ b/x11-drivers/xf86-input-mutouch/Makefile @@ -2,7 +2,7 @@ PORTNAME= xf86-input-mutouch PORTVERSION= 1.3.0 -PORTREVISION= 4 +PORTREVISION= 5 CATEGORIES= x11-drivers MAINTAINER= x11@FreeBSD.org diff --git a/x11-drivers/xf86-input-mutouch/files/patch-git_01_066b889 b/x11-drivers/xf86-input-mutouch/files/patch-git_01_066b889 new file mode 100644 index 000000000000..fa1c72972cf9 --- /dev/null +++ b/x11-drivers/xf86-input-mutouch/files/patch-git_01_066b889 @@ -0,0 +1,29 @@ +From 066b889695316c2bf45c95ad80f793d72ec0db75 Mon Sep 17 00:00:00 2001 +From: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri, 8 Jul 2011 15:01:26 +1000 +Subject: Remove option DeviceName. + +If you can set Option DeviceName, you should also be able to set Identifier +instead. + +Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +diff --git a/src/xf86MuTouch.c b/src/xf86MuTouch.c +index 290fa11..a3fec4b 100644 +--- src/xf86MuTouch.c ++++ src/xf86MuTouch.c +@@ -1135,11 +1135,6 @@ xf86MuTInit(InputDriverPtr drv, + /* Process the common options. */ + xf86ProcessCommonOptions(pInfo, pInfo->options); + +- str = xf86FindOptionValue(pInfo->options, "DeviceName"); +- if (str) { +- pInfo->name = strdup(str); +- } +- xf86Msg(X_CONFIG, "MuTouch X device name: %s\n", pInfo->name); + priv->screen_no = xf86SetIntOption(pInfo->options, "ScreenNo", 0); + xf86Msg(X_CONFIG, "MuTouch associated screen: %d\n", priv->screen_no); + priv->max_x = xf86SetIntOption(pInfo->options, "MaxX", 3000); +-- +cgit v0.10.2 + diff --git a/x11-drivers/xf86-input-mutouch/files/patch-git_02_7b06397 b/x11-drivers/xf86-input-mutouch/files/patch-git_02_7b06397 new file mode 100644 index 000000000000..b5f9fe297ae5 --- /dev/null +++ b/x11-drivers/xf86-input-mutouch/files/patch-git_02_7b06397 @@ -0,0 +1,25 @@ +From 7b063972e8ebbb244c8d92d8df194c5df9f015bc Mon Sep 17 00:00:00 2001 +From: Terry Lambert <tlambert@chromium.org> +Date: Fri, 15 Jul 2011 17:23:23 -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/xf86MuTouch.c b/src/xf86MuTouch.c +index a3fec4b..3b9b6b8 100644 +--- src/xf86MuTouch.c ++++ src/xf86MuTouch.c +@@ -944,7 +944,7 @@ xf86MuTControl(DeviceIntPtr dev, + + default: + ErrorF("unsupported mode=%d\n", mode); +- return !Success; ++ return BadValue; + } + } + +-- +cgit v0.10.2 + diff --git a/x11-drivers/xf86-input-mutouch/files/patch-git_03_7bf5e0d b/x11-drivers/xf86-input-mutouch/files/patch-git_03_7bf5e0d new file mode 100644 index 000000000000..904c4db87065 --- /dev/null +++ b/x11-drivers/xf86-input-mutouch/files/patch-git_03_7bf5e0d @@ -0,0 +1,36 @@ +From 7bf5e0d8c1863079330196dbe0efb230d74eeb70 Mon Sep 17 00:00:00 2001 +From: Peter Hutterer <peter.hutterer@who-t.net> +Date: Tue, 19 Jul 2011 12:57:00 +1000 +Subject: =?UTF-8?q?Use=20xf86SetStrOption=20for=20Type=20and=20Device=20?= + =?UTF-8?q?=E2=86=92=20prints=20to=20the=20log?= +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +diff --git a/src/xf86MuTouch.c b/src/xf86MuTouch.c +index 3b9b6b8..b35d1da 100644 +--- src/xf86MuTouch.c ++++ src/xf86MuTouch.c +@@ -1074,7 +1074,7 @@ xf86MuTInit(InputDriverPtr drv, + int portrait=0; + int rc = Success; + +- str = xf86FindOptionValue(pInfo->options, "Type"); ++ str = xf86SetStrOption(pInfo->options, "Type", NULL); + if (str && (xf86NameCmp(str, "finger") == 0)) { + rc = xf86MuTAllocateFinger(drv, pInfo); + } +@@ -1091,7 +1091,7 @@ xf86MuTInit(InputDriverPtr drv, + } + priv = pInfo->private; + +- str = xf86FindOptionValue(pInfo->options, "Device"); ++ str = xf86SetStrOption(pInfo->options, "Device", NULL); + if (!str) { + xf86Msg(X_ERROR, "%s: No Device specified in MuTouch module config.\n", + pInfo->name); +-- +cgit v0.10.2 + diff --git a/x11-drivers/xf86-input-mutouch/files/patch-git_04_ea858f9 b/x11-drivers/xf86-input-mutouch/files/patch-git_04_ea858f9 new file mode 100644 index 000000000000..69b31a921c32 --- /dev/null +++ b/x11-drivers/xf86-input-mutouch/files/patch-git_04_ea858f9 @@ -0,0 +1,32 @@ +From ea858f9e49c06b2728dc91c62616533a01ff484c Mon Sep 17 00:00:00 2001 +From: Peter Hutterer <peter.hutterer@who-t.net> +Date: Tue, 19 Jul 2011 12:57:32 +1000 +Subject: Don't free on PreInit failure, the server calls UnInit for us later + +DuSigned-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +diff --git a/src/xf86MuTouch.c b/src/xf86MuTouch.c +index b35d1da..1d56efd 100644 +--- src/xf86MuTouch.c ++++ src/xf86MuTouch.c +@@ -1214,16 +1214,9 @@ xf86MuTInit(InputDriverPtr drv, + priv->swap_axes = (priv->swap_axes==0) ? 1 : 0; + } + +- return Success; ++ rc = Success; + + init_err: +- if (priv) { +- if (priv->input_dev) { +- free(priv->input_dev); +- } +- free(priv); +- pInfo->private = NULL; +- } + return rc; + } + +-- +cgit v0.10.2 + diff --git a/x11-drivers/xf86-input-mutouch/files/patch-git_05_7bd05fe b/x11-drivers/xf86-input-mutouch/files/patch-git_05_7bd05fe new file mode 100644 index 000000000000..4ebb14da84bc --- /dev/null +++ b/x11-drivers/xf86-input-mutouch/files/patch-git_05_7bd05fe @@ -0,0 +1,30 @@ +From 7bd05fe5ed04be7abcccac2ce42d939f585ed41d Mon Sep 17 00:00:00 2001 +From: Peter Hutterer <peter.hutterer@who-t.net> +Date: Tue, 19 Jul 2011 12:59:31 +1000 +Subject: Test-open device in PreInit, fail if it doesn't work. + +Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +diff --git a/src/xf86MuTouch.c b/src/xf86MuTouch.c +index 1d56efd..fd0b930 100644 +--- src/xf86MuTouch.c ++++ src/xf86MuTouch.c +@@ -1097,6 +1097,15 @@ xf86MuTInit(InputDriverPtr drv, + pInfo->name); + rc = BadValue; + goto init_err; ++ } else { ++ pInfo->fd = xf86OpenSerial(pInfo->options); ++ if (pInfo->fd < 0) { ++ xf86Msg(X_ERROR, "%s: Unable to open MuTouch touchscreen device '%s'\n", pInfo->name, str); ++ rc = BadValue; ++ goto init_err; ++ } ++ close(pInfo->fd); ++ pInfo->fd = -1; + } + priv->input_dev = strdup(str); + +-- +cgit v0.10.2 + diff --git a/x11-drivers/xf86-input-mutouch/files/patch-src_xf86MuTouch.c b/x11-drivers/xf86-input-mutouch/files/patch-src_xf86MuTouch.c new file mode 100644 index 000000000000..0b9d11c4a247 --- /dev/null +++ b/x11-drivers/xf86-input-mutouch/files/patch-src_xf86MuTouch.c @@ -0,0 +1,60 @@ +# Finish converting AddEnabledDevice to xf86AddEnabledDevice +# Finish converting use of Error to ErrorF +# Correct a couple strings that should be const +# +--- src/xf86MuTouch.c.orig 2011-06-28 01:31:38 UTC ++++ src/xf86MuTouch.c +@@ -267,7 +267,7 @@ xf86MuTReadInput(InputInfoPtr pInfo) + (char *) (priv->rec_buf + priv->num_old_bytes), + MuT_BUFFER_SIZE - priv->num_old_bytes)); + if (num_bytes < 0) { +- Error("System error while reading from MuTouch touchscreen."); ++ ErrorF("System error while reading from MuTouch touchscreen.\n"); + return; + } + +@@ -483,7 +483,7 @@ xf86MuTGetReply(unsigned char *buffer, + * Okay, give up. + */ + if (num_bytes < 0) { +- Error("System error while reading from MuTouch touchscreen."); ++ ErrorF("System error while reading from MuTouch touchscreen.\n"); + return !Success; + } + DBG(4, ErrorF("Read %d bytes of reply\n", num_bytes)); +@@ -789,7 +789,7 @@ xf86MuTControl(DeviceIntPtr dev, + DBG(2, ErrorF("MuTouch touchscreen opening : %s\n", priv->input_dev)); + pInfo->fd = xf86OpenSerial(pInfo->options); + if (pInfo->fd < 0) { +- Error("Unable to open MuTouch touchscreen device"); ++ ErrorF("Unable to open MuTouch touchscreen device\n"); + return !Success; + } + memset(req, 0, MuT_PACKET_SIZE); +@@ -845,7 +845,7 @@ xf86MuTControl(DeviceIntPtr dev, + goto not_success; + } + /* goto not_success;*/ +- AddEnabledDevice(pInfo->fd); ++ xf86AddEnabledDevice(pInfo); + } + + /* +@@ -1052,7 +1052,7 @@ xf86MuTUninit(InputDriverPtr drv, + xf86DeleteInput(pInfo, 0); + } + +-static char *default_options[] = { ++static const char *default_options[] = { + "BaudRate", "9600", + "StopBits", "1", + "DataBits", "8", +@@ -1070,7 +1070,7 @@ xf86MuTInit(InputDriverPtr drv, + { + InputInfoPtr current; + MuTPrivatePtr priv=NULL; +- char *str; ++ const char *str; + int portrait=0; + int rc = Success; + |