aboutsummaryrefslogtreecommitdiff
path: root/x11-drivers
diff options
context:
space:
mode:
authorBaptiste Daroussin <bapt@FreeBSD.org>2017-01-23 22:40:16 +0000
committerBaptiste Daroussin <bapt@FreeBSD.org>2017-01-23 22:40:16 +0000
commit04bc4776c2b41a8a487cb8a55a63b0c085f8e7f7 (patch)
tree701f25c9a5d37fa9744d3a0b0cb93095ffb2937a /x11-drivers
parentb1444a2b4cb65d8406ee2a5531725fe823a3aeec (diff)
downloadports-04bc4776c2b41a8a487cb8a55a63b0c085f8e7f7.tar.gz
ports-04bc4776c2b41a8a487cb8a55a63b0c085f8e7f7.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: 216275 Submitted by: matthew@reztek.cz
Notes
Notes: svn path=/head/; revision=432300
Diffstat (limited to 'x11-drivers')
-rw-r--r--x11-drivers/xf86-input-penmount/Makefile2
-rw-r--r--x11-drivers/xf86-input-penmount/files/patch-git_01_f5aede228
-rw-r--r--x11-drivers/xf86-input-penmount/files/patch-git_02_ff389f982
-rw-r--r--x11-drivers/xf86-input-penmount/files/patch-src_xf86PM.c69
4 files changed, 180 insertions, 1 deletions
diff --git a/x11-drivers/xf86-input-penmount/Makefile b/x11-drivers/xf86-input-penmount/Makefile
index 7fbdb9df0a2f..b3bc675bba1c 100644
--- a/x11-drivers/xf86-input-penmount/Makefile
+++ b/x11-drivers/xf86-input-penmount/Makefile
@@ -2,7 +2,7 @@
PORTNAME= xf86-input-penmount
PORTVERSION= 1.5.0
-PORTREVISION= 4
+PORTREVISION= 5
CATEGORIES= x11-drivers
MAINTAINER= x11@FreeBSD.org
diff --git a/x11-drivers/xf86-input-penmount/files/patch-git_01_f5aede2 b/x11-drivers/xf86-input-penmount/files/patch-git_01_f5aede2
new file mode 100644
index 000000000000..c7d9cac5ed5f
--- /dev/null
+++ b/x11-drivers/xf86-input-penmount/files/patch-git_01_f5aede2
@@ -0,0 +1,28 @@
+From f5aede2ed48f1cc7266e792b02f509f7b207e2d6 Mon Sep 17 00:00:00 2001
+From: Peter Hutterer <peter.hutterer@who-t.net>
+Date: Fri, 8 Jul 2011 14:26:16 +1000
+Subject: Don't override the device name.
+
+The device name comes from the xorg.conf (or the config backend). If you're
+capable of setting the device name in the config, you can set it in the
+Identifier line as well.
+
+Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+
+diff --git a/src/xf86PM.c b/src/xf86PM.c
+index edcf6f8..97e2134 100644
+--- src/xf86PM.c
++++ src/xf86PM.c
+@@ -492,9 +492,6 @@ PenMountPreInit(InputDriverPtr drv, InputInfoPtr pInfo, int flags)
+ goto SetupProc_fail;
+ }
+
+- /* this results in an xstrdup that must be freed later */
+- pInfo->name = xf86SetStrOption( pInfo->options, "DeviceName", "PenMount");
+-
+ return Success;
+
+ SetupProc_fail:
+--
+cgit v0.10.2
+
diff --git a/x11-drivers/xf86-input-penmount/files/patch-git_02_ff389f9 b/x11-drivers/xf86-input-penmount/files/patch-git_02_ff389f9
new file mode 100644
index 000000000000..f4bf5b22be4f
--- /dev/null
+++ b/x11-drivers/xf86-input-penmount/files/patch-git_02_ff389f9
@@ -0,0 +1,82 @@
+From ff389f91a2efec5184b56b8c717091d067f8fc46 Mon Sep 17 00:00:00 2001
+From: Peter Hutterer <peter.hutterer@who-t.net>
+Date: Tue, 19 Jul 2011 13:07:41 +1000
+Subject: Don't free anything in PreInit, let the server call UnInit instead
+
+Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+
+diff --git a/src/xf86PM.c b/src/xf86PM.c
+index 97e2134..ef73164 100644
+--- src/xf86PM.c
++++ src/xf86PM.c
+@@ -79,7 +79,7 @@ _X_EXPORT InputDriverRec PENMOUNT = {
+ "penmount",
+ NULL,
+ PenMountPreInit,
+- /*PenMountUnInit*/NULL,
++ PenMountUnInit,
+ NULL,
+ default_options
+ };
+@@ -275,6 +275,7 @@ ProcessDeviceClose(PenMountPrivatePtr priv, DeviceIntPtr dev, InputInfoPtr pInfo
+ priv->buffer = NULL;
+ }
+ xf86CloseSerial(pInfo->fd);
++ pInfo->fd = -1;
+ }
+ dev->public.on = FALSE;
+ return (Success);
+@@ -454,6 +455,8 @@ PenMountPreInit(InputDriverPtr drv, InputInfoPtr pInfo, int flags)
+ goto SetupProc_fail;
+ }
+ xf86CloseSerial(pInfo->fd);
++ pInfo->fd = -1;
++
+ /*
+ * Process the options for your device like this
+ */
+@@ -495,16 +498,21 @@ PenMountPreInit(InputDriverPtr drv, InputInfoPtr pInfo, int flags)
+ return Success;
+
+ SetupProc_fail:
+- if ((pInfo) && (pInfo->fd))
+- xf86CloseSerial (pInfo->fd);
+- if ((pInfo) && (pInfo->name))
+- free (pInfo->name);
++ return BadValue;
++}
++
++static void
++PenMountUnInit(InputDriverPtr drv, InputInfoPtr pInfo, int flags)
++{
++ PenMountPrivatePtr priv = (PenMountPrivatePtr) (pInfo->private);
+
+- if ((priv) && (priv->buffer))
+- XisbFree (priv->buffer);
+ if (priv)
++ {
++ if (priv->buffer)
++ XisbFree (priv->buffer);
+ free (priv);
+- return BadValue;
++ pInfo->private = NULL;
++ }
+ }
+
+ static Bool
+diff --git a/src/xf86PM.h b/src/xf86PM.h
+index 5183f91..88da048 100644
+--- src/xf86PM.h
++++ src/xf86PM.h
+@@ -93,6 +93,8 @@ static Bool PenMountSendPacket (PenMountPrivatePtr priv, unsigned char *buf, int
+
+ static int
+ PenMountPreInit(InputDriverPtr drv, InputInfoPtr pInfo, int flags);
++static void
++PenMountUnInit(InputDriverPtr drv, InputInfoPtr pInfo, int flags);
+
+ static void
+ PenMountPtrCtrl(DeviceIntPtr device, PtrCtrl *ctrl);
+--
+cgit v0.10.2
+
diff --git a/x11-drivers/xf86-input-penmount/files/patch-src_xf86PM.c b/x11-drivers/xf86-input-penmount/files/patch-src_xf86PM.c
new file mode 100644
index 000000000000..a3c419ddd5a5
--- /dev/null
+++ b/x11-drivers/xf86-input-penmount/files/patch-src_xf86PM.c
@@ -0,0 +1,69 @@
+# Finish converting AddEnabledDefice to xf86AddEnabledDevice
+# Correct a couple strings that should be const
+# Remove use of obsolete xf86XInputSetScreen
+#
+--- src/xf86PM.c.orig 2011-06-28 00:37:48 UTC
++++ src/xf86PM.c
+@@ -61,7 +61,7 @@
+ * Be sure to set vmin appropriately for your device's protocol. You want to
+ * read a full packet before returning
+ */
+-static char *default_options[] =
++static const char *default_options[] =
+ {
+ /* "Device", "/dev/ttyS1",*/
+ "BaudRate", "19200",
+@@ -258,7 +258,7 @@ DMC9000_ProcessDeviceOn(PenMountPrivateP
+ priv->lex_mode = PenMount_byte0;
+
+ xf86FlushInput(pInfo->fd);
+- AddEnabledDevice (pInfo->fd);
++ xf86AddEnabledDevice (pInfo);
+ dev->public.on = TRUE;
+ return (Success);
+ }
+@@ -268,7 +268,7 @@ ProcessDeviceClose(PenMountPrivatePtr pr
+ {
+ if (pInfo->fd != -1)
+ {
+- RemoveEnabledDevice (pInfo->fd);
++ xf86RemoveEnabledDevice (pInfo);
+ if (priv->buffer)
+ {
+ XisbFree(priv->buffer);
+@@ -418,7 +418,7 @@ static int
+ PenMountPreInit(InputDriverPtr drv, InputInfoPtr pInfo, int flags)
+ {
+ PenMountPrivatePtr priv = calloc (1, sizeof (PenMountPrivateRec));
+- char *s;
++ const char *s;
+
+ if (!priv)
+ return BadAlloc;
+@@ -603,7 +603,7 @@ DeviceControl (DeviceIntPtr dev, int mod
+ priv->lex_mode = PenMount_byte0;
+
+ xf86FlushInput(pInfo->fd);
+- AddEnabledDevice (pInfo->fd);
++ xf86AddEnabledDevice (pInfo);
+ dev->public.on = TRUE;
+ return (Success);
+
+@@ -696,7 +696,7 @@ ReadInput (InputInfoPtr pInfo)
+ priv->max_y);
+ }
+
+- xf86XInputSetScreen (pInfo, priv->screen_num, x, y);
++ //xf86XInputSetScreen (pInfo, priv->screen_num, x, y);
+
+ if ((priv->proximity == FALSE) && (priv->packet[0] & 0x01))
+ {
+@@ -796,7 +796,7 @@ DMC9000_ReadInput (InputInfoPtr pInfo)
+ }
+
+
+- xf86XInputSetScreen (pInfo, priv->screen_num, x, y);
++ //xf86XInputSetScreen (pInfo, priv->screen_num, x, y);
+
+ if ((priv->proximity == FALSE) && (priv->packet[0] & 0x01))
+ {