summaryrefslogtreecommitdiffstats
path: root/meta/packages/xtscal
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/xtscal
parenteabfa35d7ce40d5eb9c0f74e9ef3db400c0c696d (diff)
downloadpoky-d47f4af59523bf7c670737ab8a58c654d764f5f8.tar.gz
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/xtscal')
-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 @@
1---
2 main.c | 45 +++++----------------------------------------
3 1 file changed, 5 insertions(+), 40 deletions(-)
4
5Index: xtscal-0.6.3/main.c
6===================================================================
7--- xtscal-0.6.3.orig/main.c 2007-06-29 16:49:14.000000000 +0100
8+++ xtscal-0.6.3/main.c 2007-06-29 16:53:11.000000000 +0100
9@@ -52,8 +52,6 @@ int flag_debug;
10 int rotation = 0;
11 int error_base, event_base;
12
13-int using_xcalibrate;
14-
15 int moving;
16
17 #define CROSSHAIR_SIZE 25
18@@ -63,7 +61,6 @@ int moving;
19 #define ENOUGH 5
20 #define MAX_SAMPLES 40
21
22-#define RAW_DEVICE "/dev/h3600_tsraw"
23 #define FONTNAME "sans-10"
24
25 struct point
26@@ -291,8 +288,6 @@ set_calibration (calibration *cal)
27 int xtrans, ytrans, xscale, yscale, xyscale, yxscale;
28 calibration ocal = *cal;
29
30- if (using_xcalibrate)
31- {
32 FILE *fp;
33 if (flag_debug)
34 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]);
35@@ -304,29 +299,6 @@ set_calibration (calibration *cal)
36 }
37 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]);
38 fclose (fp);
39- return;
40- }
41-
42- xtrans = cal->a[0] / cal->a[6];
43- ytrans = cal->a[3] / cal->a[6];
44- xscale = cal->a[1] * 256 / cal->a[6];
45- yscale = cal->a[5] * 256 / cal->a[6];
46- xyscale = cal->a[2] * 256 / cal->a[6];
47- yxscale = cal->a[4] * 256 / cal->a[6];
48-
49- tc.xtrans = xtrans;
50- tc.ytrans = ytrans;
51- tc.xscale = xscale;
52- tc.yscale = yscale;
53- tc.xyswap = 0;
54-
55- printf ("%d %d %d %d %d\n", tc.xscale, tc.xtrans, tc.yscale, tc.ytrans, tc.xyswap);
56-
57- if (ioctl (ts_fd, TS_SET_CAL, (void *)&tc) != 0)
58- {
59- perror ("TS_SET_CAL");
60- exit (1);
61- }
62 }
63
64 void
65@@ -531,8 +503,11 @@ main (int argc, char *argv[])
66 fprintf (stderr, "failed to set raw mode: error %d\n", r);
67 exit (1);
68 }
69-
70- using_xcalibrate = 1;
71+ }
72+ else
73+ {
74+ perror ("XCALIBRATE extension missing");
75+ exit (1);
76 }
77
78 have_xrandr = xrr_supported ();
79@@ -693,16 +668,6 @@ main (int argc, char *argv[])
80
81 next_event ();
82
83- if (!using_xcalibrate)
84- {
85- ts_fd = open (RAW_DEVICE, O_RDONLY);
86- if (ts_fd < 0)
87- {
88- perror (RAW_DEVICE);
89- exit (1);
90- }
91- }
92-
93 max_fd = (xfd > ts_fd) ? xfd : ts_fd;
94
95 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 @@
1---
2 xtscal.in | 17 ++---------------
3 1 file changed, 2 insertions(+), 15 deletions(-)
4
5Index: xtscal-0.6.3/xtscal.in
6===================================================================
7--- xtscal-0.6.3.orig/xtscal.in 2007-06-29 16:46:18.000000000 +0100
8+++ xtscal-0.6.3/xtscal.in 2007-06-29 16:48:18.000000000 +0100
9@@ -1,19 +1,6 @@
10 #!/bin/sh
11
12-module_id() {
13- # Get model name
14- echo `grep "^Hardware" /proc/cpuinfo | sed -e "s/.*: *//" | tr a-z A-Z`
15-}
16-
17-case `module_id` in
18- "HP IPAQ H3100" | "HP IPAQ H3800" )
19- ARGS="-rotate 90" ;;
20- "HP IPAQ H3600" | "HP IPAQ H3700" | "HP IPAQ H3900" | *COLLIE | *POODLE)
21- ARGS="-rotate 270" ;;
22- # H2200: works without rotation
23-esac
24+. /etc/formfactor/config
25
26 # the things we do for autoconf
27-prefix=@prefix@
28-exec_prefix=@exec_prefix@
29-exec @libexecdir@/xtscal.bin $ARGS $*
30+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 @@
1--- xtscal-0.6.3/xtscal.in~ 2004-09-10 12:10:36.000000000 -0700
2+++ xtscal-0.6.3/xtscal.in 2005-08-04 09:26:46.000000000 -0700
3@@ -8,7 +8,7 @@
4 case `module_id` in
5 "HP IPAQ H3100" | "HP IPAQ H3800" )
6 ARGS="-rotate 90" ;;
7- "HP IPAQ H3600" | "HP IPAQ H3700" | "HP IPAQ H3900" | *COLLIE | *POODLE)
8+ "HP IPAQ H3600" | "HP IPAQ H3700" | "HP IPAQ H3900" | *COLLIE | *POODLE | *SPITZ | *AKITA | *BORZOI)
9 ARGS="-rotate 270" ;;
10 # H2200: works without rotation
11 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 @@
1diff -urN xtscal-0.5.1.orig/xtscal.in xtscal-0.5.1/xtscal.in
2--- xtscal-0.5.1.orig/xtscal.in 2004-06-13 07:59:37.000000000 -0400
3+++ xtscal-0.5.1/xtscal.in 2004-09-08 20:24:10.000000000 -0400
4@@ -8,7 +8,7 @@
5 case `module_id` in
6 "HP IPAQ H3100" | "HP IPAQ H3800" )
7 ARGS="-rotate 90" ;;
8- "HP IPAQ H3600" | "HP IPAQ H3700" | "HP IPAQ H3900" | *COLLIE)
9+ "HP IPAQ H3600" | "HP IPAQ H3700" | "HP IPAQ H3900" | *COLLIE | *POODLE)
10 ARGS="-rotate 270" ;;
11 # H2200: works without rotation
12 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"
3SECTION = "x11/base" 3SECTION = "x11/base"
4 4
5DEPENDS = "virtual/libx11 libxft libxrandr xcalibrate" 5DEPENDS = "virtual/libx11 libxft libxrandr xcalibrate"
6RDEPENDS = "formfactor"
6 7
7PR = "r2" 8PR = "r3"
8 9
9SRC_URI = "${GPE_MIRROR}/xtscal-${PV}.tar.bz2 \ 10SRC_URI = "${GPE_MIRROR}/xtscal-${PV}.tar.bz2 \
10 file://change-cross.patch;patch=1 \ 11 file://change-cross.patch;patch=1 \
11 file://xtscal-cxk.patch;patch=1" 12 file://formfactor.patch;patch=1 \
13 file://cleanup.patch;patch=1"
12 14
13inherit autotools 15inherit autotools