summaryrefslogtreecommitdiff
path: root/meta/packages
diff options
context:
space:
mode:
authorRichard Purdie <richard@openedhand.com>2007-06-29 15:41:01 +0000
committerRichard Purdie <richard@openedhand.com>2007-06-29 15:41:01 +0000
commitd47f4af59523bf7c670737ab8a58c654d764f5f8 (patch)
treef3e0590ce1cc00b2aedf41b883f539d0ab108563 /meta/packages
parenteabfa35d7ce40d5eb9c0f74e9ef3db400c0c696d (diff)
downloadopenembedded-core-d47f4af59523bf7c670737ab8a58c654d764f5f8.tar.gz
openembedded-core-d47f4af59523bf7c670737ab8a58c654d764f5f8.tar.bz2
openembedded-core-d47f4af59523bf7c670737ab8a58c654d764f5f8.zip
xtscal: Switch to use formfactor, remove non-xcalibrate mode and error instead
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@2064 311d38ba-8fff-0310-9ca6-ca027cbcb966
Diffstat (limited to 'meta/packages')
-rw-r--r--meta/packages/xtscal/xtscal/cleanup.patch95
-rw-r--r--meta/packages/xtscal/xtscal/formfactor.patch30
-rw-r--r--meta/packages/xtscal/xtscal/xtscal-cxk.patch11
-rw-r--r--meta/packages/xtscal/xtscal/xtscal-poodle.patch12
-rw-r--r--meta/packages/xtscal/xtscal_0.6.3.bb6
5 files changed, 129 insertions, 25 deletions
diff --git a/meta/packages/xtscal/xtscal/cleanup.patch b/meta/packages/xtscal/xtscal/cleanup.patch
new file mode 100644
index 0000000000..fc3ae8b10c
--- /dev/null
+++ b/meta/packages/xtscal/xtscal/cleanup.patch
@@ -0,0 +1,95 @@
+---
+ main.c | 45 +++++----------------------------------------
+ 1 file changed, 5 insertions(+), 40 deletions(-)
+
+Index: xtscal-0.6.3/main.c
+===================================================================
+--- xtscal-0.6.3.orig/main.c 2007-06-29 16:49:14.000000000 +0100
++++ xtscal-0.6.3/main.c 2007-06-29 16:53:11.000000000 +0100
+@@ -52,8 +52,6 @@ int flag_debug;
+ int rotation = 0;
+ int error_base, event_base;
+
+-int using_xcalibrate;
+-
+ int moving;
+
+ #define CROSSHAIR_SIZE 25
+@@ -63,7 +61,6 @@ int moving;
+ #define ENOUGH 5
+ #define MAX_SAMPLES 40
+
+-#define RAW_DEVICE "/dev/h3600_tsraw"
+ #define FONTNAME "sans-10"
+
+ struct point
+@@ -291,8 +288,6 @@ set_calibration (calibration *cal)
+ int xtrans, ytrans, xscale, yscale, xyscale, yxscale;
+ calibration ocal = *cal;
+
+- if (using_xcalibrate)
+- {
+ FILE *fp;
+ if (flag_debug)
+ printf ("constants are: %d %d %d %d %d %d %d\n", cal->a[1], cal->a[2], cal->a[0], cal->a[4], cal->a[5], cal->a[3], cal->a[6]);
+@@ -304,29 +299,6 @@ set_calibration (calibration *cal)
+ }
+ fprintf (fp, "%d %d %d %d %d %d %d\n", cal->a[1], cal->a[2], cal->a[0], cal->a[4], cal->a[5], cal->a[3], cal->a[6]);
+ fclose (fp);
+- return;
+- }
+-
+- xtrans = cal->a[0] / cal->a[6];
+- ytrans = cal->a[3] / cal->a[6];
+- xscale = cal->a[1] * 256 / cal->a[6];
+- yscale = cal->a[5] * 256 / cal->a[6];
+- xyscale = cal->a[2] * 256 / cal->a[6];
+- yxscale = cal->a[4] * 256 / cal->a[6];
+-
+- tc.xtrans = xtrans;
+- tc.ytrans = ytrans;
+- tc.xscale = xscale;
+- tc.yscale = yscale;
+- tc.xyswap = 0;
+-
+- printf ("%d %d %d %d %d\n", tc.xscale, tc.xtrans, tc.yscale, tc.ytrans, tc.xyswap);
+-
+- if (ioctl (ts_fd, TS_SET_CAL, (void *)&tc) != 0)
+- {
+- perror ("TS_SET_CAL");
+- exit (1);
+- }
+ }
+
+ void
+@@ -531,8 +503,11 @@ main (int argc, char *argv[])
+ fprintf (stderr, "failed to set raw mode: error %d\n", r);
+ exit (1);
+ }
+-
+- using_xcalibrate = 1;
++ }
++ else
++ {
++ perror ("XCALIBRATE extension missing");
++ exit (1);
+ }
+
+ have_xrandr = xrr_supported ();
+@@ -693,16 +668,6 @@ main (int argc, char *argv[])
+
+ next_event ();
+
+- if (!using_xcalibrate)
+- {
+- ts_fd = open (RAW_DEVICE, O_RDONLY);
+- if (ts_fd < 0)
+- {
+- perror (RAW_DEVICE);
+- exit (1);
+- }
+- }
+-
+ max_fd = (xfd > ts_fd) ? xfd : ts_fd;
+
+ for (;;)
diff --git a/meta/packages/xtscal/xtscal/formfactor.patch b/meta/packages/xtscal/xtscal/formfactor.patch
new file mode 100644
index 0000000000..79548000bc
--- /dev/null
+++ b/meta/packages/xtscal/xtscal/formfactor.patch
@@ -0,0 +1,30 @@
+---
+ xtscal.in | 17 ++---------------
+ 1 file changed, 2 insertions(+), 15 deletions(-)
+
+Index: xtscal-0.6.3/xtscal.in
+===================================================================
+--- xtscal-0.6.3.orig/xtscal.in 2007-06-29 16:46:18.000000000 +0100
++++ xtscal-0.6.3/xtscal.in 2007-06-29 16:48:18.000000000 +0100
+@@ -1,19 +1,6 @@
+ #!/bin/sh
+
+-module_id() {
+- # Get model name
+- echo `grep "^Hardware" /proc/cpuinfo | sed -e "s/.*: *//" | tr a-z A-Z`
+-}
+-
+-case `module_id` in
+- "HP IPAQ H3100" | "HP IPAQ H3800" )
+- ARGS="-rotate 90" ;;
+- "HP IPAQ H3600" | "HP IPAQ H3700" | "HP IPAQ H3900" | *COLLIE | *POODLE)
+- ARGS="-rotate 270" ;;
+- # H2200: works without rotation
+-esac
++. /etc/formfactor/config
+
+ # the things we do for autoconf
+-prefix=@prefix@
+-exec_prefix=@exec_prefix@
+-exec @libexecdir@/xtscal.bin $ARGS $*
++exec @libexecdir@/xtscal.bin -rotate ${DISPLAY_ORIENTATION} $*
diff --git a/meta/packages/xtscal/xtscal/xtscal-cxk.patch b/meta/packages/xtscal/xtscal/xtscal-cxk.patch
deleted file mode 100644
index 1cab8efb57..0000000000
--- a/meta/packages/xtscal/xtscal/xtscal-cxk.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- xtscal-0.6.3/xtscal.in~ 2004-09-10 12:10:36.000000000 -0700
-+++ xtscal-0.6.3/xtscal.in 2005-08-04 09:26:46.000000000 -0700
-@@ -8,7 +8,7 @@
- case `module_id` in
- "HP IPAQ H3100" | "HP IPAQ H3800" )
- ARGS="-rotate 90" ;;
-- "HP IPAQ H3600" | "HP IPAQ H3700" | "HP IPAQ H3900" | *COLLIE | *POODLE)
-+ "HP IPAQ H3600" | "HP IPAQ H3700" | "HP IPAQ H3900" | *COLLIE | *POODLE | *SPITZ | *AKITA | *BORZOI)
- ARGS="-rotate 270" ;;
- # H2200: works without rotation
- esac
diff --git a/meta/packages/xtscal/xtscal/xtscal-poodle.patch b/meta/packages/xtscal/xtscal/xtscal-poodle.patch
deleted file mode 100644
index f9a1651691..0000000000
--- a/meta/packages/xtscal/xtscal/xtscal-poodle.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff -urN xtscal-0.5.1.orig/xtscal.in xtscal-0.5.1/xtscal.in
---- xtscal-0.5.1.orig/xtscal.in 2004-06-13 07:59:37.000000000 -0400
-+++ xtscal-0.5.1/xtscal.in 2004-09-08 20:24:10.000000000 -0400
-@@ -8,7 +8,7 @@
- case `module_id` in
- "HP IPAQ H3100" | "HP IPAQ H3800" )
- ARGS="-rotate 90" ;;
-- "HP IPAQ H3600" | "HP IPAQ H3700" | "HP IPAQ H3900" | *COLLIE)
-+ "HP IPAQ H3600" | "HP IPAQ H3700" | "HP IPAQ H3900" | *COLLIE | *POODLE)
- ARGS="-rotate 270" ;;
- # H2200: works without rotation
- esac
diff --git a/meta/packages/xtscal/xtscal_0.6.3.bb b/meta/packages/xtscal/xtscal_0.6.3.bb
index 3f2f43da9d..19732101d4 100644
--- a/meta/packages/xtscal/xtscal_0.6.3.bb
+++ b/meta/packages/xtscal/xtscal_0.6.3.bb
@@ -3,11 +3,13 @@ DESCRIPTION = "Touchscreen calibration utility"
SECTION = "x11/base"
DEPENDS = "virtual/libx11 libxft libxrandr xcalibrate"
+RDEPENDS = "formfactor"
-PR = "r2"
+PR = "r3"
SRC_URI = "${GPE_MIRROR}/xtscal-${PV}.tar.bz2 \
file://change-cross.patch;patch=1 \
- file://xtscal-cxk.patch;patch=1"
+ file://formfactor.patch;patch=1 \
+ file://cleanup.patch;patch=1"
inherit autotools