zaurusd: Support configurable portrait and landscape xrandr orientation.
authorStanislav Brabec <utx@penguin.cz>
Mon, 22 Jun 2009 20:54:10 +0000 (20:54 +0000)
committerutx@penguin.cz <utx@penguin.cz>
Mon, 22 Jun 2009 20:54:10 +0000 (20:54 +0000)
recipes/zaurusd/files/avoid-rotated-server.patch [new file with mode: 0644]
recipes/zaurusd/files/zaurus-hinge.matchbox-landscape
recipes/zaurusd/files/zaurus-hinge.matchbox-portrait
recipes/zaurusd/zaurusd_svn.bb

diff --git a/recipes/zaurusd/files/avoid-rotated-server.patch b/recipes/zaurusd/files/avoid-rotated-server.patch
new file mode 100644 (file)
index 0000000..be1005f
--- /dev/null
@@ -0,0 +1,126 @@
+Index: zaurusd/config/mach-config/mach-akita-vars.in
+===================================================================
+--- zaurusd.orig/config/mach-config/mach-akita-vars.in 2009-03-07 11:04:43.000000000 +0000
++++ zaurusd/config/mach-config/mach-akita-vars.in      2009-06-22 20:51:47.000000000 +0000
+@@ -7,4 +7,7 @@
+ TSKEYS_CONF=@appconfdir@/tskeys/zaurus-cxx00.conf
+ TSKEYS_DEVICE=/dev/input/event1
+-ALSA_MIXER_INIT=@appconfdir@/alsa/cxx00-default.state
+\ No newline at end of file
++ALSA_MIXER_INIT=@appconfdir@/alsa/cxx00-default.state
++
++export XRANDR_LANDSCAPE=normal
++export XRANDR_PORTRAIT=left
+Index: zaurusd/config/mach-config/mach-borzoi-vars.in
+===================================================================
+--- zaurusd.orig/config/mach-config/mach-borzoi-vars.in        2009-03-07 11:04:43.000000000 +0000
++++ zaurusd/config/mach-config/mach-borzoi-vars.in     2009-06-22 20:51:00.000000000 +0000
+@@ -5,6 +5,9 @@
+ SWITCH_EVENT_DEVICE=/dev/input/event0
+ TSKEYS_CONF=@appconfdir@/tskeys/zaurus-cxx00.conf
+-TSKEYS_DEVICE=/dev/input/event1
++TSKEYS_DEVICE=/dev/input/touchscreen0
+-ALSA_MIXER_INIT=@appconfdir@/alsa/cxx00-default.state
+\ No newline at end of file
++ALSA_MIXER_INIT=@appconfdir@/alsa/cxx00-default.state
++
++export XRANDR_LANDSCAPE=normal
++export XRANDR_PORTRAIT=left
+Index: zaurusd/config/mach-config/mach-corgi-vars.in
+===================================================================
+--- zaurusd.orig/config/mach-config/mach-corgi-vars.in 2009-03-07 11:04:43.000000000 +0000
++++ zaurusd/config/mach-config/mach-corgi-vars.in      2009-06-22 20:51:47.000000000 +0000
+@@ -7,4 +7,7 @@
+ TSKEYS_CONF=@appconfdir@/tskeys/zaurus-c7x0.conf
+ TSKEYS_DEVICE=/dev/input/event1
+-ALSA_MIXER_INIT=@appconfdir@/alsa/c7x0-default.state
+\ No newline at end of file
++ALSA_MIXER_INIT=@appconfdir@/alsa/c7x0-default.state
++
++export XRANDR_LANDSCAPE=normal
++export XRANDR_PORTRAIT=left
+Index: zaurusd/config/mach-config/mach-htcuniversal-vars
+===================================================================
+--- zaurusd.orig/config/mach-config/mach-htcuniversal-vars     2009-03-07 11:04:43.000000000 +0000
++++ zaurusd/config/mach-config/mach-htcuniversal-vars  2009-06-22 20:49:01.000000000 +0000
+@@ -2,3 +2,6 @@
+ export SWITCH_EVENT_ZHINGE=1
+ SWITCH_EVENT_DEVICE=/dev/input/event3
++
++export XRANDR_LANDSCAPE=normal
++export XRANDR_PORTRAIT=left
+Index: zaurusd/config/mach-config/mach-husky-vars.in
+===================================================================
+--- zaurusd.orig/config/mach-config/mach-husky-vars.in 2009-03-07 11:04:43.000000000 +0000
++++ zaurusd/config/mach-config/mach-husky-vars.in      2009-06-22 20:51:47.000000000 +0000
+@@ -7,4 +7,7 @@
+ TSKEYS_CONF=@appconfdir@/tskeys/zaurus-c7x0.conf
+ TSKEYS_DEVICE=/dev/input/event1
+-ALSA_MIXER_INIT=@appconfdir@/alsa/c7x0-default.state
+\ No newline at end of file
++ALSA_MIXER_INIT=@appconfdir@/alsa/c7x0-default.state
++
++export XRANDR_LANDSCAPE=normal
++export XRANDR_PORTRAIT=left
+Index: zaurusd/config/mach-config/mach-poodle-vars.in
+===================================================================
+--- zaurusd.orig/config/mach-config/mach-poodle-vars.in        2009-06-22 20:49:01.000000000 +0000
++++ zaurusd/config/mach-config/mach-poodle-vars.in     2009-06-22 20:51:47.000000000 +0000
+@@ -6,4 +6,7 @@
+ #TSKEYS_CONF=@appconfdir@/tskeys/zaurus-clamshell.conf
+ #TSKEYS_DEVICE=/dev/input/event1
+-ALSA_MIXER_INIT=@appconfdir@/alsa/poodle-default.state
+\ No newline at end of file
++ALSA_MIXER_INIT=@appconfdir@/alsa/poodle-default.state
++
++export XRANDR_LANDSCAPE=normal
++export XRANDR_PORTRAIT=left
+Index: zaurusd/config/mach-config/mach-shepherd-vars.in
+===================================================================
+--- zaurusd.orig/config/mach-config/mach-shepherd-vars.in      2009-03-07 11:04:43.000000000 +0000
++++ zaurusd/config/mach-config/mach-shepherd-vars.in   2009-06-22 20:51:47.000000000 +0000
+@@ -7,4 +7,7 @@
+ TSKEYS_CONF=@appconfdir@/tskeys/zaurus-c7x0.conf
+ TSKEYS_DEVICE=/dev/input/event1
+-ALSA_MIXER_INIT=@appconfdir@/alsa/c7x0-default.state
+\ No newline at end of file
++ALSA_MIXER_INIT=@appconfdir@/alsa/c7x0-default.state
++
++export XRANDR_LANDSCAPE=normal
++export XRANDR_PORTRAIT=left
+Index: zaurusd/config/mach-config/mach-spitz-vars.in
+===================================================================
+--- zaurusd.orig/config/mach-config/mach-spitz-vars.in 2009-03-07 11:04:43.000000000 +0000
++++ zaurusd/config/mach-config/mach-spitz-vars.in      2009-06-22 20:51:47.000000000 +0000
+@@ -7,4 +7,7 @@
+ TSKEYS_CONF=@appconfdir@/tskeys/zaurus-cxx00.conf
+ TSKEYS_DEVICE=/dev/input/event1
+-ALSA_MIXER_INIT=@appconfdir@/alsa/cxx00-default.state
+\ No newline at end of file
++ALSA_MIXER_INIT=@appconfdir@/alsa/cxx00-default.state
++
++export XRANDR_LANDSCAPE=normal
++export XRANDR_PORTRAIT=left
+Index: zaurusd/config/mach-config/mach-tosa-vars.in
+===================================================================
+--- zaurusd.orig/config/mach-config/mach-tosa-vars.in  2009-03-07 11:04:43.000000000 +0000
++++ zaurusd/config/mach-config/mach-tosa-vars.in       2009-06-22 20:51:47.000000000 +0000
+@@ -6,4 +6,7 @@
+ #TSKEYS_CONF=@appconfdir@/tskeys/zaurus-clamshell.conf
+ #TSKEYS_DEVICE=/dev/input/event1
+-ALSA_MIXER_INIT=@appconfdir@/alsa/6000x-default.state
+\ No newline at end of file
++ALSA_MIXER_INIT=@appconfdir@/alsa/6000x-default.state
++
++export XRANDR_LANDSCAPE=normal
++export XRANDR_PORTRAIT=left
index a048769..32710b2 100644 (file)
@@ -18,8 +18,8 @@
   killproc ${ZD_BINDIR}/matchbox-stroke
   
   if [ -x ${ZD_BINDIR}/xrandr ]; then
-       if ! ( xrandr | awk '{print $4}' | grep -q normal )
+       if ! ( xrandr | awk '{print $4}' | grep -q $XRANDR_LANDSCAPE )
        then
-               ${ZD_BINDIR}/xrandr -o normal 
+               ${ZD_BINDIR}/xrandr -o $XRANDR_LANDSCAPE
        fi
   fi
index 291617c..e540e66 100644 (file)
@@ -1,9 +1,9 @@
 #!/bin/sh
 
   if [ -x ${ZD_BINDIR}/xrandr ]; then
-       if ! ( xrandr | awk '{print $4}' | grep -q left )
+       if ! ( xrandr | awk '{print $4}' | grep -q $XRANDR_PORTRAIT )
        then
-               ${ZD_BINDIR}/xrandr -o left 
+               ${ZD_BINDIR}/xrandr -o $XRANDR_PORTRAIT
        fi
   fi
   # just to be extra safe
index 574e642..681ed2c 100644 (file)
@@ -4,7 +4,7 @@ LICENSE = "GPL"
 DEPENDS = "tslib"
 RDEPENDS = "procps"
 PV = "0.0+svn${SRCDATE}"
-PR = "r21"
+PR = "r22"
 
 SRC_URI = "svn://svn.o-hand.com/repos/misc/trunk;module=zaurusd;proto=http \
            file://zaurus-hinge.in \
@@ -12,7 +12,8 @@ SRC_URI = "svn://svn.o-hand.com/repos/misc/trunk;module=zaurusd;proto=http \
           file://alsa-cxx00-default.state.patch;patch=1 \
           file://alsa-6000x-default.state.patch;patch=1 \
           file://disable-alsa-handling.patch;patch=1 \
-          file://zaurus-hinge.matchbox-portrait \         
+          file://avoid-rotated-server.patch;patch=1 \
+          file://zaurus-hinge.matchbox-portrait \
           file://zaurus-hinge.matchbox-landscape \
           file://zaurus-hinge.bl-on \
           file://zaurus-hinge.bl-off \