From owner-svn-ports-all@freebsd.org Mon Jan 23 22:16:58 2017 Return-Path: Delivered-To: svn-ports-all@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 96E45CBE360; Mon, 23 Jan 2017 22:16:58 +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 57162BF6; Mon, 23 Jan 2017 22:16:58 +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 v0NMGvFg052476; Mon, 23 Jan 2017 22:16:57 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0NMGvpK052473; Mon, 23 Jan 2017 22:16:57 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201701232216.v0NMGvpK052473@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:16:57 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r432295 - in head/x11-drivers/xf86-input-elographics: . 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Jan 2017 22:16:58 -0000 Author: bapt Date: Mon Jan 23 22:16:57 2017 New Revision: 432295 URL: https://svnweb.freebsd.org/changeset/ports/432295 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: 216271 Submitted by: matthew@reztek.cz Added: head/x11-drivers/xf86-input-elographics/files/ head/x11-drivers/xf86-input-elographics/files/patch-git_01_0d3ec2e (contents, props changed) head/x11-drivers/xf86-input-elographics/files/patch-git_02_c666c78 (contents, props changed) Modified: head/x11-drivers/xf86-input-elographics/Makefile Modified: head/x11-drivers/xf86-input-elographics/Makefile ============================================================================== --- head/x11-drivers/xf86-input-elographics/Makefile Mon Jan 23 22:05:31 2017 (r432294) +++ head/x11-drivers/xf86-input-elographics/Makefile Mon Jan 23 22:16:57 2017 (r432295) @@ -2,7 +2,7 @@ PORTNAME= xf86-input-elographics PORTVERSION= 1.4.1 -PORTREVISION= 4 +PORTREVISION= 5 CATEGORIES= x11-drivers MAINTAINER= x11@FreeBSD.org Added: head/x11-drivers/xf86-input-elographics/files/patch-git_01_0d3ec2e ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/x11-drivers/xf86-input-elographics/files/patch-git_01_0d3ec2e Mon Jan 23 22:16:57 2017 (r432295) @@ -0,0 +1,80 @@ +From 0d3ec2e97c99431cdbaea8e958a75ff2e748da41 Mon Sep 17 00:00:00 2001 +From: Jaska Kivela +Date: Wed, 16 Jan 2013 11:51:04 +0200 +Subject: Added axis inversion functionality. + +The module would previously log a message if min > max, but not do anything +about it. Keep the original min/max around, swap on-the-fly. + +Signed-off-by: Jaska Kivela +Reviewed-by: Peter Hutterer +Signed-off-by: Peter Hutterer + +diff --git a/src/xf86Elo.c b/src/xf86Elo.c +index cb1699e..c37cf9a 100644 +--- src/xf86Elo.c ++++ src/xf86Elo.c +@@ -360,6 +360,22 @@ xf86EloReadInput(InputInfoPtr pInfo) + cur_y = WORD_ASSEMBLY(priv->packet_buf[5], priv->packet_buf[6]); + state = priv->packet_buf[2] & 0x07; + ++ DBG(5, ErrorF("ELO got: x(%d), y(%d), %s\n", ++ cur_x, cur_y, ++ (state == ELO_PRESS) ? "Press" : ++ ((state == ELO_RELEASE) ? "Release" : "Stream"))); ++ ++ if (priv->min_y > priv->max_y) { ++ /* inverted y axis */ ++ cur_y = priv->max_y - cur_y + priv->min_y; ++ } ++ ++ if (priv->min_x > priv->max_x) { ++ /* inverted x axis */ ++ cur_x = priv->max_x - cur_x + priv->min_x; ++ } ++ ++ + /* + * Send events. + * +@@ -676,6 +692,7 @@ xf86EloControl(DeviceIntPtr dev, + unsigned char reply[ELO_PACKET_SIZE]; + Atom btn_label; + Atom axis_labels[2] = { 0, 0 }; ++ int x0, x1, y0, y1; + + switch(mode) { + +@@ -719,17 +736,27 @@ xf86EloControl(DeviceIntPtr dev, + return !Success; + } + else { ++ ++ /* Correct the coordinates for possibly inverted axis. ++ Leave priv->variables untouched so we can check for ++ inversion on incoming events. ++ */ ++ y0 = min(priv->min_y, priv->max_y); ++ y1 = max(priv->min_y, priv->max_y); ++ x0 = min(priv->min_x, priv->max_x); ++ x1 = max(priv->min_x, priv->max_x); ++ + /* I will map coordinates myself */ + InitValuatorAxisStruct(dev, 0, + axis_labels[0], +- priv->min_x, priv->max_x, ++ x0, x1, + 9500, + 0 /* min_res */, + 9500 /* max_res */, + Absolute); + InitValuatorAxisStruct(dev, 1, + axis_labels[1], +- priv->min_y, priv->max_y, ++ y0, y1, + 10500, + 0 /* min_res */, + 10500 /* max_res */, +-- +cgit v0.10.2 + Added: head/x11-drivers/xf86-input-elographics/files/patch-git_02_c666c78 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/x11-drivers/xf86-input-elographics/files/patch-git_02_c666c78 Mon Jan 23 22:16:57 2017 (r432295) @@ -0,0 +1,28 @@ +From c666c78c764d0b97fa25bd9f0796a83b77761f7d Mon Sep 17 00:00:00 2001 +From: Peter Hutterer +Date: Wed, 30 Jan 2013 11:47:03 +1000 +Subject: Handle DEVICE_ABORT on input ABI 19.1 + +Don't do anything, but don't print a warning either. + +Signed-off-by: Peter Hutterer + +diff --git a/src/xf86Elo.c b/src/xf86Elo.c +index c37cf9a..ef2186f 100644 +--- src/xf86Elo.c ++++ src/xf86Elo.c +@@ -875,6 +875,11 @@ xf86EloControl(DeviceIntPtr dev, + DBG(2, ErrorF("Done\n")); + return Success; + ++#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) * 100 + GET_ABI_MINOR(ABI_XINPUT_VERSION) >= 1901 ++ case DEVICE_ABORT: ++ return Success; ++#endif ++ + default: + ErrorF("unsupported mode=%d\n", mode); + return BadValue; +-- +cgit v0.10.2 +