summaryrefslogtreecommitdiffstats
path: root/poky/meta/recipes-graphics/xinput-calibrator
diff options
context:
space:
mode:
authorDave Cobbley <david.j.cobbley@linux.intel.com>2018-08-14 10:05:37 -0700
committerBrad Bishop <bradleyb@fuzziesquirrel.com>2018-08-22 21:26:31 -0400
commiteb8dc40360f0cfef56fb6947cc817a547d6d9bc6 (patch)
treede291a73dc37168da6370e2cf16c347d1eba9df8 /poky/meta/recipes-graphics/xinput-calibrator
parent9c3cf826d853102535ead04cebc2d6023eff3032 (diff)
downloadtalos-openbmc-eb8dc40360f0cfef56fb6947cc817a547d6d9bc6.tar.gz
talos-openbmc-eb8dc40360f0cfef56fb6947cc817a547d6d9bc6.zip
[Subtree] Removing import-layers directory
As part of the move to subtrees, need to bring all the import layers content to the top level. Change-Id: I4a163d10898cbc6e11c27f776f60e1a470049d8f Signed-off-by: Dave Cobbley <david.j.cobbley@linux.intel.com> Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
Diffstat (limited to 'poky/meta/recipes-graphics/xinput-calibrator')
-rw-r--r--poky/meta/recipes-graphics/xinput-calibrator/pointercal-xinput/pointercal.xinput1
-rw-r--r--poky/meta/recipes-graphics/xinput-calibrator/pointercal-xinput/qemuall/pointercal.xinput2
-rw-r--r--poky/meta/recipes-graphics/xinput-calibrator/pointercal-xinput_0.0.bb20
-rw-r--r--poky/meta/recipes-graphics/xinput-calibrator/xinput-calibrator/30xinput_calibrate.sh7
-rw-r--r--poky/meta/recipes-graphics/xinput-calibrator/xinput-calibrator/Allow-xinput_calibrator_pointercal.sh-to-be-run-as-n.patch66
-rw-r--r--poky/meta/recipes-graphics/xinput-calibrator/xinput-calibrator_git.bb37
6 files changed, 133 insertions, 0 deletions
diff --git a/poky/meta/recipes-graphics/xinput-calibrator/pointercal-xinput/pointercal.xinput b/poky/meta/recipes-graphics/xinput-calibrator/pointercal-xinput/pointercal.xinput
new file mode 100644
index 000000000..9633fc5f3
--- /dev/null
+++ b/poky/meta/recipes-graphics/xinput-calibrator/pointercal-xinput/pointercal.xinput
@@ -0,0 +1 @@
+# replace with valid machine specific pointercal.xinput
diff --git a/poky/meta/recipes-graphics/xinput-calibrator/pointercal-xinput/qemuall/pointercal.xinput b/poky/meta/recipes-graphics/xinput-calibrator/pointercal-xinput/qemuall/pointercal.xinput
new file mode 100644
index 000000000..a816d6d10
--- /dev/null
+++ b/poky/meta/recipes-graphics/xinput-calibrator/pointercal-xinput/qemuall/pointercal.xinput
@@ -0,0 +1,2 @@
+# Dummy pointercal.xinput file to prevent xinput_calibrator
+# from running on qemu startup
diff --git a/poky/meta/recipes-graphics/xinput-calibrator/pointercal-xinput_0.0.bb b/poky/meta/recipes-graphics/xinput-calibrator/pointercal-xinput_0.0.bb
new file mode 100644
index 000000000..65348c376
--- /dev/null
+++ b/poky/meta/recipes-graphics/xinput-calibrator/pointercal-xinput_0.0.bb
@@ -0,0 +1,20 @@
+SUMMARY = "Touchscreen calibration data from xinput-calibrator"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
+
+PR = "r7"
+
+SRC_URI = "file://pointercal.xinput"
+S = "${WORKDIR}"
+
+do_install() {
+ # Only install file if it has a contents
+ if [ -s ${S}/pointercal.xinput ] &&\
+ [ ! -n "$(head -n1 ${S}/pointercal.xinput|grep "replace.*pointercal\.xinput")" ]; then
+ install -d ${D}${sysconfdir}/
+ install -m 0644 ${S}/pointercal.xinput ${D}${sysconfdir}/
+ fi
+}
+
+PACKAGE_ARCH = "${MACHINE_ARCH}"
+CONFFILES_${PN} = "${sysconfdir}/pointercal.xinput"
diff --git a/poky/meta/recipes-graphics/xinput-calibrator/xinput-calibrator/30xinput_calibrate.sh b/poky/meta/recipes-graphics/xinput-calibrator/xinput-calibrator/30xinput_calibrate.sh
new file mode 100644
index 000000000..529072678
--- /dev/null
+++ b/poky/meta/recipes-graphics/xinput-calibrator/xinput-calibrator/30xinput_calibrate.sh
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+. /etc/formfactor/config
+
+if [ "$HAVE_TOUCHSCREEN" = "1" ]; then
+ /usr/bin/xinput_calibrator_once.sh
+fi
diff --git a/poky/meta/recipes-graphics/xinput-calibrator/xinput-calibrator/Allow-xinput_calibrator_pointercal.sh-to-be-run-as-n.patch b/poky/meta/recipes-graphics/xinput-calibrator/xinput-calibrator/Allow-xinput_calibrator_pointercal.sh-to-be-run-as-n.patch
new file mode 100644
index 000000000..86982924a
--- /dev/null
+++ b/poky/meta/recipes-graphics/xinput-calibrator/xinput-calibrator/Allow-xinput_calibrator_pointercal.sh-to-be-run-as-n.patch
@@ -0,0 +1,66 @@
+Upstream-Status: Pending
+
+From 14734a93bd3fc323325459e24b04795422e395e6 Mon Sep 17 00:00:00 2001
+From: Laurentiu Palcu <laurentiu.palcu@intel.com>
+Date: Mon, 1 Jul 2013 15:38:02 +0300
+Subject: [PATCH] Allow xinput_calibrator_pointercal.sh to be run as normal
+ user
+
+Allow normal user to create their own pointercal.xinput files that
+override the system pointercal file in /etc.
+
+Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
+---
+ scripts/xinput_calibrator_pointercal.sh | 33 +++++++++++++++++++++----------
+ 1 file changed, 23 insertions(+), 10 deletions(-)
+
+diff --git a/scripts/xinput_calibrator_pointercal.sh b/scripts/xinput_calibrator_pointercal.sh
+index fccb197..0ada7da 100755
+--- a/scripts/xinput_calibrator_pointercal.sh
++++ b/scripts/xinput_calibrator_pointercal.sh
+@@ -11,19 +11,32 @@
+ PATH="/usr/bin:$PATH"
+
+ BINARY="xinput_calibrator"
+-CALFILE="/etc/pointercal.xinput"
+-LOGFILE="/var/log/xinput_calibrator.pointercal.log"
++SYS_CALFILE="/etc/pointercal.xinput"
++USER_CALFILE="$HOME/.pointercal/pointercal.xinput"
+
+-if [ -e $CALFILE ] ; then
+- if grep replace $CALFILE ; then
+- echo "Empty calibration file found, removing it"
+- rm $CALFILE
+- else
+- echo "Using calibration data stored in $CALFILE"
+- . $CALFILE && exit 0
+- fi
++if [ "$USER" = "root" ]; then
++ LOGFILE="/var/log/xinput_calibrator.pointercal.log"
++ CALFILES="$SYS_CALFILE"
++else
++ LOGFILE="$HOME/.pointercal/xinput_calibrator.pointercal.log"
++ CALFILES="$USER_CALFILE $SYS_CALFILE"
++ mkdir -p "$HOME/.pointercal"
+ fi
+
++for CALFILE in $CALFILES; do
++ if [ -e $CALFILE ]; then
++ if grep replace $CALFILE ; then
++ echo "Empty calibration file found, removing it"
++ rm $CALFILE 2>/dev/null || true
++ else
++ echo "Using calibration data stored in $CALFILE"
++ . $CALFILE && exit 0
++ fi
++ fi
++done
++
++[ "$USER" != "root" ] && CALFILE=$USER_CALFILE
++
+ CALDATA=`$BINARY --output-type xinput -v | tee $LOGFILE | grep ' xinput set' | sed 's/^ //g; s/$/;/g'`
+ if [ ! -z "$CALDATA" ] ; then
+ echo $CALDATA > $CALFILE
+--
+1.7.9.5
+
diff --git a/poky/meta/recipes-graphics/xinput-calibrator/xinput-calibrator_git.bb b/poky/meta/recipes-graphics/xinput-calibrator/xinput-calibrator_git.bb
new file mode 100644
index 000000000..68e62ea6d
--- /dev/null
+++ b/poky/meta/recipes-graphics/xinput-calibrator/xinput-calibrator_git.bb
@@ -0,0 +1,37 @@
+SUMMARY = "Touchscreen calibration program for X11"
+HOMEPAGE = "http://www.freedesktop.org/wiki/Software/xinput_calibrator"
+LICENSE = "MIT-X"
+LIC_FILES_CHKSUM = "file://src/calibrator.cpp;endline=22;md5=1bcba08f67cdb56f34021557898e4b5a"
+DEPENDS = "virtual/libx11 libxi libxrandr"
+
+PV = "0.7.5+git${SRCPV}"
+PR = "r6"
+
+inherit autotools pkgconfig distro_features_check
+# depends on virtual/libx11
+REQUIRED_DISTRO_FEATURES = "x11"
+
+SRCREV = "03dadf55109bd43d3380f040debe9f82f66f2f35"
+SRC_URI = "git://github.com/tias/xinput_calibrator.git \
+ file://30xinput_calibrate.sh \
+ file://Allow-xinput_calibrator_pointercal.sh-to-be-run-as-n.patch"
+
+S = "${WORKDIR}/git"
+
+# force native X11 ui as we don't have gtk+ in DEPENDS
+EXTRA_OECONF += "--with-gui=x11"
+
+do_install_append() {
+ install -d ${D}${bindir}
+ install -m 0755 ${S}/scripts/xinput_calibrator_pointercal.sh ${D}${bindir}/xinput_calibrator_once.sh
+
+ install -d ${D}${sysconfdir}/X11/Xsession.d/
+ install -m 0755 ${WORKDIR}/30xinput_calibrate.sh ${D}${sysconfdir}/X11/Xsession.d/
+
+ install -d ${D}${sysconfdir}/xdg/autostart
+ sed -e 's,^Exec=.*,Exec=${bindir}/xinput_calibrator_once.sh,' ${S}/scripts/xinput_calibrator.desktop > ${D}${sysconfdir}/xdg/autostart/xinput_calibrator.desktop
+}
+
+FILES_${PN} += "${sysconfdir}/xdg/autostart"
+RDEPENDS_${PN} = "xinput formfactor"
+RRECOMMENDS_${PN} = "pointercal-xinput"
OpenPOWER on IntegriCloud