All of lore.kernel.org
 help / color / mirror / Atom feed
From: Martin Jansa <martin.jansa@gmail.com>
To: openembedded-devel@lists.openembedded.org
Cc: Mario Domenech Goulart <mario@ossystems.com.br>
Subject: Re: [PATCH] xinput-calibrator: add --boot-mode comand line option to wrapper script
Date: Mon, 4 Feb 2013 13:02:12 +0100	[thread overview]
Message-ID: <20130204120212.GA3271@jama> (raw)
In-Reply-To: <1359982426-9836-1-git-send-email-mario@ossystems.com.br>

[-- Attachment #1: Type: text/plain, Size: 4679 bytes --]

On Mon, Feb 04, 2013 at 10:53:46AM -0200, Mario Domenech Goulart wrote:
> xinput_calibrator_once.sh has been renamed to
> run-xinput-calibrator.sh, which now also handles the --boot-mode
> command line option.
> 
> When in boot mode (i.e., when --boot-mode is provided on the command
> line), the script exits if calibration data is found in the
> calibration data file.  When not in boot mode (i.e., no command line
> option), the script runs xinput-calibrator and creates/overwrites the
> calibration data file.
> 
> This change allows other applications to use a common wrapper
> (run-xinput-calibrator.sh) for xinput-calibrator.

Did you send this upstream?

Can you provide Upstream-Status?

Cheers,
 
> Signed-off-by: Mario Domenech Goulart <mario@ossystems.com.br>
> ---
>  .../xinput-calibrator/boot-mode.patch              |   35 ++++++++++++++++++++
>  .../xinput-calibrator/xinput-calibrator_git.bb     |    9 +++--
>  2 files changed, 40 insertions(+), 4 deletions(-)
>  create mode 100644 meta-oe/recipes-graphics/xinput-calibrator/xinput-calibrator/boot-mode.patch
> 
> diff --git a/meta-oe/recipes-graphics/xinput-calibrator/xinput-calibrator/boot-mode.patch b/meta-oe/recipes-graphics/xinput-calibrator/xinput-calibrator/boot-mode.patch
> new file mode 100644
> index 0000000..8af9fc4
> --- /dev/null
> +++ b/meta-oe/recipes-graphics/xinput-calibrator/xinput-calibrator/boot-mode.patch
> @@ -0,0 +1,35 @@
> +diff --git a/scripts/xinput_calibrator_pointercal.sh b/scripts/xinput_calibrator_pointercal.sh
> +index fccb197..253455b 100755
> +--- a/scripts/xinput_calibrator_pointercal.sh
> ++++ b/scripts/xinput_calibrator_pointercal.sh
> +@@ -7,6 +7,7 @@
> + # original script: Martin Jansa <Martin.Jansa@gmail.com>, 2010-01-31
> + # updated by Tias Guns <tias@ulyssis.org>, 2010-02-15
> + # updated by Koen Kooi <koen@dominion.thruhere.net>, 2012-02-28
> ++# updated by Mario Domenech Goulart <mario@ossystems.com.br>, 2013-02-01
> + 
> + PATH="/usr/bin:$PATH"
> + 
> +@@ -14,13 +15,21 @@ BINARY="xinput_calibrator"
> + CALFILE="/etc/pointercal.xinput"
> + LOGFILE="/var/log/xinput_calibrator.pointercal.log"
> + 
> ++# In boot mode, this script exits if calibration data is found in
> ++# $CALFILE.  If not in boot-mode, it runs the calibrator and
> ++# creates/overwrites $CALFILE (in other words: it always recalibrate).
> ++if [ "$1" = "--boot-mode" ]; then
> ++    BOOT_MODE=1
> ++fi
> ++
> + 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
> ++    . $CALFILE
> ++    [ -z "$BOOT_MODE" ] || exit 0
> +   fi
> + fi
> + 
> diff --git a/meta-oe/recipes-graphics/xinput-calibrator/xinput-calibrator_git.bb b/meta-oe/recipes-graphics/xinput-calibrator/xinput-calibrator_git.bb
> index 97f9343..21fd382 100644
> --- a/meta-oe/recipes-graphics/xinput-calibrator/xinput-calibrator_git.bb
> +++ b/meta-oe/recipes-graphics/xinput-calibrator/xinput-calibrator_git.bb
> @@ -5,12 +5,13 @@ LIC_FILES_CHKSUM = "file://src/calibrator.cpp;endline=22;md5=1bcba08f67cdb56f340
>  DEPENDS = "virtual/libx11 libxi"
>  
>  PV = "0.7.5+git${SRCPV}"
> -PR = "r1"
> +PR = "r2"
>  
>  inherit autotools
>  
>  SRCREV = "c01c5af807cb4b0157b882ab07a893df9a810111"
> -SRC_URI = "git://github.com/tias/xinput_calibrator.git;protocol=git"
> +SRC_URI = "git://github.com/tias/xinput_calibrator.git;protocol=git \
> +           file://boot-mode.patch"
>  
>  S = "${WORKDIR}/git"
>  
> @@ -19,10 +20,10 @@ EXTRA_OECONF += "--with-gui=x11"
>  
>  do_install_append() {
>          install -d ${D}${bindir}
> -        install -m 0755 scripts/xinput_calibrator_pointercal.sh ${D}${bindir}/xinput_calibrator_once.sh
> +        install -m 0755 scripts/xinput_calibrator_pointercal.sh ${D}${bindir}/run-xinput-calibrator.sh
>  
>          install -d ${D}${sysconfdir}/xdg/autostart
> -        sed -i -e 's,^Exec=.*,Exec=${bindir}/xinput_calibrator_once.sh,' scripts/xinput_calibrator.desktop
> +        sed -i -e 's,^Exec=.*,Exec=${bindir}/run-xinput-calibrator.sh --boot-mode,' scripts/xinput_calibrator.desktop
>          install -m 0644 scripts/xinput_calibrator.desktop ${D}${sysconfdir}/xdg/autostart
>  }
>  
> -- 
> 1.7.2.5
> 
> 
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel

-- 
Martin 'JaMa' Jansa     jabber: Martin.Jansa@gmail.com

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 205 bytes --]

  reply	other threads:[~2013-02-04 13:18 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-04 12:53 [PATCH] xinput-calibrator: add --boot-mode comand line option to wrapper script Mario Domenech Goulart
2013-02-04 12:02 ` Martin Jansa [this message]
2013-02-04 13:49   ` Andreas Müller
2013-02-04 15:39     ` Otavio Salvador
2013-02-04 15:50       ` Andreas Müller
2013-02-04 15:48   ` Mario Domenech Goulart
2013-02-04 16:53     ` Andreas Müller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130204120212.GA3271@jama \
    --to=martin.jansa@gmail.com \
    --cc=mario@ossystems.com.br \
    --cc=openembedded-devel@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.