From owner-svn-ports-head@freebsd.org Mon Jan 23 22:40:18 2017 Return-Path: Delivered-To: svn-ports-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4D8D2CBEC64; Mon, 23 Jan 2017 22:40:18 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 282731276; Mon, 23 Jan 2017 22:40:18 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0NMeHme061929; Mon, 23 Jan 2017 22:40:17 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0NMeGvB061925; Mon, 23 Jan 2017 22:40:16 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201701232240.v0NMeGvB061925@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Mon, 23 Jan 2017 22:40:16 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r432300 - in head/x11-drivers/xf86-input-penmount: . files X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Jan 2017 22:40:18 -0000 Author: bapt Date: Mon Jan 23 22:40:16 2017 New Revision: 432300 URL: https://svnweb.freebsd.org/changeset/ports/432300 Log: 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 Added: head/x11-drivers/xf86-input-penmount/files/ head/x11-drivers/xf86-input-penmount/files/patch-git_01_f5aede2 (contents, props changed) head/x11-drivers/xf86-input-penmount/files/patch-git_02_ff389f9 (contents, props changed) head/x11-drivers/xf86-input-penmount/files/patch-src_xf86PM.c (contents, props changed) Modified: head/x11-drivers/xf86-input-penmount/Makefile Modified: head/x11-drivers/xf86-input-penmount/Makefile ============================================================================== --- head/x11-drivers/xf86-input-penmount/Makefile Mon Jan 23 22:36:57 2017 (r432299) +++ head/x11-drivers/xf86-input-penmount/Makefile Mon Jan 23 22:40:16 2017 (r432300) @@ -2,7 +2,7 @@ PORTNAME= xf86-input-penmount PORTVERSION= 1.5.0 -PORTREVISION= 4 +PORTREVISION= 5 CATEGORIES= x11-drivers MAINTAINER= x11@FreeBSD.org Added: head/x11-drivers/xf86-input-penmount/files/patch-git_01_f5aede2 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/x11-drivers/xf86-input-penmount/files/patch-git_01_f5aede2 Mon Jan 23 22:40:16 2017 (r432300) @@ -0,0 +1,28 @@ +From f5aede2ed48f1cc7266e792b02f509f7b207e2d6 Mon Sep 17 00:00:00 2001 +From: Peter Hutterer +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 + +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 + Added: head/x11-drivers/xf86-input-penmount/files/patch-git_02_ff389f9 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/x11-drivers/xf86-input-penmount/files/patch-git_02_ff389f9 Mon Jan 23 22:40:16 2017 (r432300) @@ -0,0 +1,82 @@ +From ff389f91a2efec5184b56b8c717091d067f8fc46 Mon Sep 17 00:00:00 2001 +From: Peter Hutterer +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 + +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 + Added: head/x11-drivers/xf86-input-penmount/files/patch-src_xf86PM.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/x11-drivers/xf86-input-penmount/files/patch-src_xf86PM.c Mon Jan 23 22:40:16 2017 (r432300) @@ -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)) + {