xinput-calibrator: remove bash dependency

Refresh add-geometry-input-when-calibrating.patch to remove
bashism from it.

(From OE-Core rev: c0b8e1ff40af05b29780164c860c68da35e7fc32)

Signed-off-by: Maxin B. John <maxin.john@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Maxin B. John 2016-08-09 17:36:18 +03:00 committed by Richard Purdie
parent 99d109cdbc
commit a6b26f8a6c
2 changed files with 17 additions and 16 deletions

View File

@ -1,33 +1,34 @@
Upstream-Status: Inappropriate [no longer maintained]
From 93abf28d602da637376b78de8c88b7ab5cf13b4f Mon Sep 17 00:00:00 2001
From: Jonathan David <jonathan.david@ni.com>
Date: Mon, 30 Nov 2015 12:12:20 -0600
From 1cb83759632bb218559c4d0d65ff79f868c03dc5 Mon Sep 17 00:00:00 2001
From: "Maxin B. John" <maxin.john@intel.com>
Date: Tue, 9 Aug 2016 17:03:31 +0300
Subject: [PATCH] add geometry input when calibrating
Send monitor geometry to xinput_calibrator when running the script
Update:
Remove bashism
Upstream-Status: Inappropriate [no longer maintained]
Signed-off-by: Jonathan David <jonathan.david@ni.com>
Signed-off-by: Maxin B. John <maxin.john@intel.com>
---
scripts/xinput_calibrator_pointercal.sh | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
scripts/xinput_calibrator_pointercal.sh | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/scripts/xinput_calibrator_pointercal.sh b/scripts/xinput_calibrator_pointercal.sh
index 0ada7da..6a3aded 100755
index fccb197..fea7c2f 100755
--- a/scripts/xinput_calibrator_pointercal.sh
+++ b/scripts/xinput_calibrator_pointercal.sh
@@ -37,7 +37,10 @@ done
[ "$USER" != "root" ] && CALFILE=$USER_CALFILE
@@ -24,7 +24,8 @@ if [ -e $CALFILE ] ; then
fi
fi
-CALDATA=`$BINARY --output-type xinput -v | tee $LOGFILE | grep ' xinput set' | sed 's/^ //g; s/$/;/g'`
+read RESOLUTION <<< $(xrandr | awk -F '[[:space:]+]' '/ connected/ \
+ { if ($3 != "primary") print $3; if ($3 == "primary") print $4 }')
+
+RESOLUTION=$(xrandr | awk -F '[[:space:]+]' '/ connected/ { if ($3 != "primary") print $3; if ($3 == "primary") print $4 }')
+CALDATA=`$BINARY --geometry $RESOLUTION --output-type xinput -v | tee $LOGFILE | grep ' xinput set' | sed 's/^ //g; s/$/;/g'`
if [ ! -z "$CALDATA" ] ; then
echo $CALDATA > $CALFILE
echo "Calibration data stored in $CALFILE (log in $LOGFILE)"
--
1.9.1
2.4.0

View File

@ -34,5 +34,5 @@ do_install_append() {
}
FILES_${PN} += "${sysconfdir}/xdg/autostart"
RDEPENDS_${PN} = "xinput formfactor xrandr bash"
RDEPENDS_${PN} = "xinput formfactor xrandr"
RRECOMMENDS_${PN} = "pointercal-xinput"