aboutsummaryrefslogtreecommitdiffstats
path: root/x11-drivers
diff options
context:
space:
mode:
authorbapt <bapt@FreeBSD.org>2017-01-24 06:32:10 +0800
committerbapt <bapt@FreeBSD.org>2017-01-24 06:32:10 +0800
commit62992c14b7183528c92d9a071b428570175c3ddd (patch)
tree35793cfa6afba74370dc2461c09219060af2f276 /x11-drivers
parent5258ac2975b74bffca4f09619f57ea39d297086e (diff)
downloadfreebsd-ports-gnome-62992c14b7183528c92d9a071b428570175c3ddd.tar.gz
freebsd-ports-gnome-62992c14b7183528c92d9a071b428570175c3ddd.tar.zst
freebsd-ports-gnome-62992c14b7183528c92d9a071b428570175c3ddd.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: 216273 Submitted by: matthew@reztek.cz
Diffstat (limited to 'x11-drivers')
-rw-r--r--x11-drivers/xf86-input-hyperpen/Makefile2
-rw-r--r--x11-drivers/xf86-input-hyperpen/files/patch-git_01_161f41427
-rw-r--r--x11-drivers/xf86-input-hyperpen/files/patch-git_02_b2ef09f33
-rw-r--r--x11-drivers/xf86-input-hyperpen/files/patch-git_03_02a74cf25
-rw-r--r--x11-drivers/xf86-input-hyperpen/files/patch-git_04_6d660b029
-rw-r--r--x11-drivers/xf86-input-hyperpen/files/patch-git_06_2c0371921
-rw-r--r--x11-drivers/xf86-input-hyperpen/files/patch-src_xf86HyperPen.c85
7 files changed, 221 insertions, 1 deletions
diff --git a/x11-drivers/xf86-input-hyperpen/Makefile b/x11-drivers/xf86-input-hyperpen/Makefile
index 4d06099724e9..364445422485 100644
--- a/x11-drivers/xf86-input-hyperpen/Makefile
+++ b/x11-drivers/xf86-input-hyperpen/Makefile
@@ -2,7 +2,7 @@
PORTNAME= xf86-input-hyperpen
PORTVERSION= 1.4.1
-PORTREVISION= 4
+PORTREVISION= 5
CATEGORIES= x11-drivers
MAINTAINER= x11@FreeBSD.org
diff --git a/x11-drivers/xf86-input-hyperpen/files/patch-git_01_161f414 b/x11-drivers/xf86-input-hyperpen/files/patch-git_01_161f414
new file mode 100644
index 000000000000..318353d239c5
--- /dev/null
+++ b/x11-drivers/xf86-input-hyperpen/files/patch-git_01_161f414
@@ -0,0 +1,27 @@
+From 161f41449bef339ce5bd1a3e87f6beac584c2074 Mon Sep 17 00:00:00 2001
+From: Terry Lambert <tlambert@chromium.org>
+Date: Fri, 15 Jul 2011 17:23:21 -0700
+Subject: xf86-input-hyperpen: 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/xf86HyperPen.c b/src/xf86HyperPen.c
+index 45ddfca..b0e5ac9 100644
+--- src/xf86HyperPen.c
++++ src/xf86HyperPen.c
+@@ -729,8 +729,7 @@ xf86HypProc(DeviceIntPtr pHyp, int what)
+
+ default:
+ ErrorF("unsupported mode=%d\n", what);
+- return !Success;
+- break;
++ return BadValue;
+ }
+ DBG(2, ErrorF("END xf86HypProc Success what=%d dev=%p priv=%p\n",
+ what, (void *)pHyp, (void *)priv));
+--
+cgit v0.10.2
+
diff --git a/x11-drivers/xf86-input-hyperpen/files/patch-git_02_b2ef09f b/x11-drivers/xf86-input-hyperpen/files/patch-git_02_b2ef09f
new file mode 100644
index 000000000000..70ac05c21a4f
--- /dev/null
+++ b/x11-drivers/xf86-input-hyperpen/files/patch-git_02_b2ef09f
@@ -0,0 +1,33 @@
+From b2ef09f6c4034dec03898df7f8024fc58794b055 Mon Sep 17 00:00:00 2001
+From: Peter Hutterer <peter.hutterer@who-t.net>
+Date: Tue, 19 Jul 2011 12:40:19 +1000
+Subject: Don't free anything in PreInit, let UnInit take care of it.
+
+The server calls UnInit, avoid double free's by letting the server free
+everything.
+
+Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+
+diff --git a/src/xf86HyperPen.c b/src/xf86HyperPen.c
+index b0e5ac9..52a6e4f 100644
+--- src/xf86HyperPen.c
++++ src/xf86HyperPen.c
+@@ -973,14 +973,9 @@ xf86HypInit(InputDriverPtr drv,
+ }
+ }
+
+- return rc;
+-
+ SetupProc_fail:
+- if (priv)
+- free(priv);
+- if (pInfo)
+- free(pInfo);
+ return rc;
++
+ }
+
+ _X_EXPORT InputDriverRec HYPERPEN = {
+--
+cgit v0.10.2
+
diff --git a/x11-drivers/xf86-input-hyperpen/files/patch-git_03_02a74cf b/x11-drivers/xf86-input-hyperpen/files/patch-git_03_02a74cf
new file mode 100644
index 000000000000..c66f8870b7a6
--- /dev/null
+++ b/x11-drivers/xf86-input-hyperpen/files/patch-git_03_02a74cf
@@ -0,0 +1,25 @@
+From 02a74cfd0ba5ac0190307a63189ac643644b7574 Mon Sep 17 00:00:00 2001
+From: Peter Hutterer <peter.hutterer@who-t.net>
+Date: Tue, 19 Jul 2011 12:41:24 +1000
+Subject: Use xf86SetStrOption for Option Device
+
+Let the device be printed in the logs
+
+Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+
+diff --git a/src/xf86HyperPen.c b/src/xf86HyperPen.c
+index 52a6e4f..320add5 100644
+--- src/xf86HyperPen.c
++++ src/xf86HyperPen.c
+@@ -827,7 +827,7 @@ xf86HypInit(InputDriverPtr drv,
+ }
+
+ /* Serial Device is mandatory */
+- priv->hypDevice = xf86FindOptionValue(pInfo->options, "Device");
++ priv->hypDevice = xf86SetStrOption(pInfo->options, "Device", NULL);
+
+ if (!priv->hypDevice) {
+ xf86Msg (X_ERROR, "%s: No Device specified.\n", pInfo->name);
+--
+cgit v0.10.2
+
diff --git a/x11-drivers/xf86-input-hyperpen/files/patch-git_04_6d660b0 b/x11-drivers/xf86-input-hyperpen/files/patch-git_04_6d660b0
new file mode 100644
index 000000000000..76281f174a44
--- /dev/null
+++ b/x11-drivers/xf86-input-hyperpen/files/patch-git_04_6d660b0
@@ -0,0 +1,29 @@
+From 6d660b0439973d2ee0c550e3413d75bd57763243 Mon Sep 17 00:00:00 2001
+From: Peter Hutterer <peter.hutterer@who-t.net>
+Date: Tue, 19 Jul 2011 12:42:43 +1000
+Subject: Test device in PreInit, fail if it cannot be opened.
+
+Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+
+diff --git a/src/xf86HyperPen.c b/src/xf86HyperPen.c
+index 320add5..8b9011e 100644
+--- src/xf86HyperPen.c
++++ src/xf86HyperPen.c
+@@ -833,6 +833,14 @@ xf86HypInit(InputDriverPtr drv,
+ xf86Msg (X_ERROR, "%s: No Device specified.\n", pInfo->name);
+ rc = BadMatch;
+ goto SetupProc_fail;
++ } else {
++ pInfo->fd = xf86OpenSerial(pInfo->options);
++ if (pInfo->fd == -1) {
++ xf86Msg (X_ERROR, "%s: cannot open device '%s'\n", pInfo->name, priv->hypDevice);
++ return BadValue;
++ }
++ xf86CloseSerial(pInfo->fd);
++ pInfo->fd = -1;
+ }
+
+ pInfo->private = priv;
+--
+cgit v0.10.2
+
diff --git a/x11-drivers/xf86-input-hyperpen/files/patch-git_06_2c03719 b/x11-drivers/xf86-input-hyperpen/files/patch-git_06_2c03719
new file mode 100644
index 000000000000..a6fbb6a20723
--- /dev/null
+++ b/x11-drivers/xf86-input-hyperpen/files/patch-git_06_2c03719
@@ -0,0 +1,21 @@
+From 2c037196bcc50cb299bc768124404b38cb67c087 Mon Sep 17 00:00:00 2001
+From: Matthieu Herrb <matthieu.herrb@laas.fr>
+Date: Sun, 20 May 2012 10:59:09 +0200
+Subject: src/Makefile.am: set AM_CFLAGS correctly.
+
+
+diff --git a/src/Makefile.am b/src/Makefile.am
+index dbb7ae0..e7fae3f 100644
+--- src/Makefile.am
++++ src/Makefile.am
+@@ -24,6 +24,7 @@
+ # -avoid-version prevents gratuitous .0.0.0 version numbers on the end
+ # _ladir passes a dummy rpath to libtool so the thing will actually link
+ # TODO: -nostdlib/-Bstatic/-lgcc platform magic, not installing the .a, etc.
++AM_CFLAGS = $(XORG_CFLAGS)
+ @DRIVER_NAME@_drv_la_LTLIBRARIES = @DRIVER_NAME@_drv.la
+ @DRIVER_NAME@_drv_la_LDFLAGS = -module -avoid-version
+ @DRIVER_NAME@_drv_ladir = @inputdir@
+--
+cgit v0.10.2
+
diff --git a/x11-drivers/xf86-input-hyperpen/files/patch-src_xf86HyperPen.c b/x11-drivers/xf86-input-hyperpen/files/patch-src_xf86HyperPen.c
new file mode 100644
index 000000000000..912ee4dcdc20
--- /dev/null
+++ b/x11-drivers/xf86-input-hyperpen/files/patch-src_xf86HyperPen.c
@@ -0,0 +1,85 @@
+# Finish converting use of Error to ErrorF
+# Correct a couple strings that should be const
+#
+--- src/xf86HyperPen.c.orig 2011-07-05 01:34:17 UTC
++++ src/xf86HyperPen.c
+@@ -66,7 +66,7 @@
+ * read a full packet before returning
+ */
+
+-static char *default_options[] = {
++static const char *default_options[] = {
+ "BaudRate", "9600",
+ "DataBits", "8",
+ "StopBits", "1",
+@@ -212,7 +212,7 @@ xf86HypReadInput(InputInfoPtr pInfo)
+ SYSCALL(len = read(pInfo->fd, buffer, sizeof(buffer)));
+
+ if (len <= 0) {
+- Error("error reading HyperPen device");
++ ErrorF("error reading HyperPen device\n");
+ return;
+ }
+
+@@ -372,14 +372,14 @@ xf86HypWriteAndRead(int fd, char *data,
+
+ SYSCALL(err = write(fd, data, strlen(data)));
+ if (err == -1) {
+- Error("HyperPen write");
++ ErrorF("HyperPen write\n");
+ return NULL;
+ }
+
+ while (numread < len) {
+ err = xf86WaitForInput(fd, 100000);
+ if (err == -1) {
+- Error("HyperPen select");
++ ErrorF("HyperPen select\n");
+ return NULL;
+ }
+ if (!err) {
+@@ -389,7 +389,7 @@ xf86HypWriteAndRead(int fd, char *data,
+
+ SYSCALL(err = read(fd, buffer + numread++, 1));
+ if (err == -1) {
+- Error("HyperPen read");
++ ErrorF("HyperPen read\n");
+ return NULL;
+ }
+ if (!err) {
+@@ -431,7 +431,7 @@ xf86HypOpen(InputInfoPtr pInfo)
+
+ pInfo->fd = xf86OpenSerial(pInfo->options);
+ if (pInfo->fd == -1) {
+- Error(priv->hypDevice);
++ ErrorF("failed to open %s\n", priv->hypDevice);
+ return !Success;
+ }
+ DBG(2, ErrorF("%s opened as fd %d\n", priv->hypDevice, pInfo->fd));
+@@ -449,7 +449,7 @@ xf86HypOpen(InputInfoPtr pInfo)
+ /* Put it in prompt mode so it doesn't say anything before we're ready */
+ SYSCALL(err = write(pInfo->fd, SS_PROMPT_MODE, strlen(SS_PROMPT_MODE)));
+ if (err == -1) {
+- Error("HyperPen write");
++ ErrorF("HyperPen write\n");
+ return !Success;
+ }
+ /* Clear any pending input */
+@@ -578,7 +578,7 @@ xf86HypOpen(InputInfoPtr pInfo)
+ SYSCALL(err = write(pInfo->fd, buffer, idx));
+
+ if (err == -1) {
+- Error("HyperPen write");
++ ErrorF("HyperPen write\n");
+ return !Success;
+ }
+
+@@ -819,7 +819,7 @@ xf86HypInit(InputDriverPtr drv,
+ int flags)
+ {
+ HyperPenDevicePtr priv = malloc(sizeof(HyperPenDeviceRec));
+- char *s;
++ const char *s;
+ int rc = Success;
+
+ if (!priv) {