kde-misc/wacomtablet: EAPI-7 bump, HOMEPAGE, DESCRIPTION
authorAndreas Sturmlechner <asturm@gentoo.org>
Mon, 15 Jul 2019 19:24:51 +0000 (21:24 +0200)
committerAndreas Sturmlechner <asturm@gentoo.org>
Mon, 15 Jul 2019 20:51:56 +0000 (22:51 +0200)
Package-Manager: Portage-2.3.69, Repoman-2.3.16
Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
kde-misc/wacomtablet/files/wacomtablet-3.1.1-correct-width-height-values.patch [new file with mode: 0644]
kde-misc/wacomtablet/wacomtablet-3.1.1-r1.ebuild [new file with mode: 0644]

diff --git a/kde-misc/wacomtablet/files/wacomtablet-3.1.1-correct-width-height-values.patch b/kde-misc/wacomtablet/files/wacomtablet-3.1.1-correct-width-height-values.patch
new file mode 100644 (file)
index 0000000..8055397
--- /dev/null
@@ -0,0 +1,52 @@
+From fd099f89c5ded7e20c3a852d5539e9a0b269e11d Mon Sep 17 00:00:00 2001
+From: Jason Gerecke <jason.gerecke@wacom.com>
+Date: Thu, 13 Jun 2019 23:49:12 +0300
+Subject: Correct width/height values from X11Wacom::getMaximumTabletArea
+
+Summary:
+The "Wacom Tablet Area" property contains four values that define the
+top-left and bottom-right tablet coordinates of the tablet's input
+area. The driver will scale input coordinates according to the input
+area such that the border of the input area matches up with the border
+of the desktop or mapped monitor.
+
+Crucially, these coordinates are *NOT* necessarily equal to (0,0) and
+(SENSOR_MAX_X, SENSOR_MAX_Y) after a reset. In particular, many display
+tablet have sensors that are slightly larger than the display itself
+and so have their reset areas equal to something like (400, 400) and
+(SENSOR_MAX_X - 400, SENSOR_MAX_Y - 400) so that the pen is correctly
+mapped.
+
+This commit updates X11Wacom::getMaximumTabletArea to properly set the
+width and height properties by calculating the difference between the
+min and max values of X and Y. This is particularly important to ensure
+that the calibration routines work correctly.
+
+Ref: https://bugs.kde.org/show_bug.cgi?id=407712
+
+Reviewers: valeriymalov
+
+Reviewed By: valeriymalov
+
+Differential Revision: https://phabricator.kde.org/D21775
+---
+ src/common/x11wacom.cpp | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/common/x11wacom.cpp b/src/common/x11wacom.cpp
+index e269480..a4d95c8 100644
+--- a/src/common/x11wacom.cpp
++++ b/src/common/x11wacom.cpp
+@@ -70,8 +70,8 @@ const TabletArea X11Wacom::getMaximumTabletArea(const QString& deviceName)
+     if (x11Device.getLongProperty(areaProperty, maximumArea, 4) && maximumArea.size() == 4) {
+         maximumAreaRect.setX(maximumArea.at(0));
+         maximumAreaRect.setY(maximumArea.at(1));
+-        maximumAreaRect.setWidth(maximumArea.at(2));
+-        maximumAreaRect.setHeight(maximumArea.at(3));
++        maximumAreaRect.setWidth(maximumArea.at(2) - maximumArea.at(0));
++        maximumAreaRect.setHeight(maximumArea.at(3) - maximumArea.at(1));
+     }
+     // reset the area back to the previous value
+-- 
+cgit v1.1
diff --git a/kde-misc/wacomtablet/wacomtablet-3.1.1-r1.ebuild b/kde-misc/wacomtablet/wacomtablet-3.1.1-r1.ebuild
new file mode 100644 (file)
index 0000000..87b034a
--- /dev/null
@@ -0,0 +1,59 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+KDE_HANDBOOK="forceoptional"
+VIRTUALX_REQUIRED="test"
+inherit kde5
+
+DESCRIPTION="System settings module for Wacom tablets"
+HOMEPAGE="https://userbase.kde.org/Wacomtablet https://store.kde.org/p/1127862"
+SRC_URI="mirror://kde/stable/${PN}/${PV}/${P}.tar.xz"
+
+LICENSE="GPL-2"
+KEYWORDS="amd64 x86"
+IUSE=""
+
+BDEPEND="sys-devel/gettext"
+RDEPEND="
+       $(add_frameworks_dep kconfig)
+       $(add_frameworks_dep kconfigwidgets)
+       $(add_frameworks_dep kcoreaddons)
+       $(add_frameworks_dep kdbusaddons)
+       $(add_frameworks_dep kglobalaccel)
+       $(add_frameworks_dep ki18n)
+       $(add_frameworks_dep knotifications)
+       $(add_frameworks_dep kwidgetsaddons)
+       $(add_frameworks_dep kwindowsystem)
+       $(add_frameworks_dep kxmlgui)
+       $(add_frameworks_dep plasma)
+       $(add_qt_dep qtdbus)
+       $(add_qt_dep qtdeclarative)
+       $(add_qt_dep qtgui)
+       $(add_qt_dep qtwidgets)
+       $(add_qt_dep qtx11extras)
+       >=dev-libs/libwacom-0.30
+       >=x11-drivers/xf86-input-wacom-0.20.0
+       x11-libs/libXi
+       x11-libs/libxcb
+"
+DEPEND="${RDEPEND}
+       x11-base/xorg-proto
+       x11-libs/libX11
+"
+
+PATCHES=(
+       "${FILESDIR}/${P}-xlib-optional.patch" # bug 681674
+       "${FILESDIR}/${P}-gcc9.patch" # bug 686822
+       "${FILESDIR}/${P}-correct-width-height-values.patch" # KDE-Bug 407712
+)
+
+src_test() {
+       # test needs DBus, bug 675548
+       local myctestargs=(
+               -E "(Test.KDED.DBusTabletService)"
+       )
+
+       kde5_src_test
+}