[oe] [PATCH 3/4] xtscal: move recipe from oe-core

2016-09-21 Thread Maxin B. John
Move xtscal recipe from oe-core layer

Signed-off-by: Maxin B. John 
---
 .../xtscal/xtscal/30xTs_Calibrate.sh   |  13 +
 .../xtscal/xtscal/change-cross.patch   |  18 +
 .../recipes-graphics/xtscal/xtscal/cleanup.patch   | 621 +
 .../xtscal/dso_linking_change_build_fix.patch  |  27 +
 meta-oe/recipes-graphics/xtscal/xtscal_0.6.3.bb|  33 ++
 5 files changed, 712 insertions(+)
 create mode 100644 meta-oe/recipes-graphics/xtscal/xtscal/30xTs_Calibrate.sh
 create mode 100644 meta-oe/recipes-graphics/xtscal/xtscal/change-cross.patch
 create mode 100644 meta-oe/recipes-graphics/xtscal/xtscal/cleanup.patch
 create mode 100644 
meta-oe/recipes-graphics/xtscal/xtscal/dso_linking_change_build_fix.patch
 create mode 100644 meta-oe/recipes-graphics/xtscal/xtscal_0.6.3.bb

diff --git a/meta-oe/recipes-graphics/xtscal/xtscal/30xTs_Calibrate.sh 
b/meta-oe/recipes-graphics/xtscal/xtscal/30xTs_Calibrate.sh
new file mode 100644
index 000..fa43617
--- /dev/null
+++ b/meta-oe/recipes-graphics/xtscal/xtscal/30xTs_Calibrate.sh
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+. /etc/formfactor/config
+
+if [ "$HAVE_TOUCHSCREEN" = "1" ]; then
+   n=1
+   while [ ! -z $TSLIB_TSDEVICE ] && [ ! -f /etc/pointercal ] && [ $n -le 
5 ]
+   do
+  /usr/bin/xtscal
+  sleep 1
+  n=$(($n+1))
+   done
+fi
diff --git a/meta-oe/recipes-graphics/xtscal/xtscal/change-cross.patch 
b/meta-oe/recipes-graphics/xtscal/xtscal/change-cross.patch
new file mode 100644
index 000..1da7717
--- /dev/null
+++ b/meta-oe/recipes-graphics/xtscal/xtscal/change-cross.patch
@@ -0,0 +1,18 @@
+Upstream-Status: Pending
+
+--- tmp/main.c.orig2007-01-02 15:39:54.0 +
 tmp/main.c 2007-01-02 15:39:54.0 +
+@@ -131,9 +131,10 @@
+ {
+   XRenderFillRectangles (dpy, PictOpSrc, pict, &rect_color, rectangles, 2);
+ 
+-  XFillArc (dpy, crosshair_w, crosshair_gc, (CROSSHAIR_SIZE / 2) - (WIDTH / 
2) - 1, 
+-  (CROSSHAIR_SIZE / 2) - (WIDTH / 2) - 1,
+-  WIDTH + 1, WIDTH + 1, 0, 360 * 64);
++  XFillRectangle (dpy, crosshair_w, crosshair_gc,
++(CROSSHAIR_SIZE / 2) - (WIDTH / 2),
++(CROSSHAIR_SIZE / 2) - (WIDTH / 2),
++WIDTH, WIDTH);
+ }
+ 
+ void
diff --git a/meta-oe/recipes-graphics/xtscal/xtscal/cleanup.patch 
b/meta-oe/recipes-graphics/xtscal/xtscal/cleanup.patch
new file mode 100644
index 000..f7b0854
--- /dev/null
+++ b/meta-oe/recipes-graphics/xtscal/xtscal/cleanup.patch
@@ -0,0 +1,621 @@
+---
+ Makefile.am  |9 --
+ configure.ac |3 
+ gpe-dist.am  |   12 ---
+ h3600_ts.h   |  216 
---
+ main.c   |  210 ++---
+ xtscal.in|   19 -
+ 6 files changed, 14 insertions(+), 455 deletions(-)
+
+Upstream-Status: Pending
+
+Index: xtscal-0.6.3/xtscal.in
+===
+--- xtscal-0.6.3.orig/xtscal.in2004-09-10 20:10:36.0 +0100
 /dev/null  1970-01-01 00:00:00.0 +
+@@ -1,19 +0,0 @@
+-#!/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
+-
+-# the things we do for autoconf
+-prefix=@prefix@
+-exec_prefix=@exec_prefix@
+-exec @libexecdir@/xtscal.bin $ARGS $*
+Index: xtscal-0.6.3/main.c
+===
+--- xtscal-0.6.3.orig/main.c   2007-07-01 01:12:52.0 +0100
 xtscal-0.6.3/main.c2007-07-01 01:12:55.0 +0100
+@@ -22,12 +22,10 @@
+ #include 
+ 
+ #include 
+-#include 
+ #include 
+ #include 
+ #include 
+ 
+-#include "h3600_ts.h"
+ #include "calibrate.h"
+ 
+ Display *dpy;
+@@ -45,15 +43,11 @@ XftColor xftcol;
+ XftDraw *xftdraw;
+ XftFont *xftfont;
+ int screen_x, screen_y;
+-int ts_fd;
+ int samples;
+ Pixmap bg_pixmap;
+ int flag_debug;
+-int rotation = 0;
+ int error_base, event_base;
+ 
+-int using_xcalibrate;
+-
+ int moving;
+ 
+ #define CROSSHAIR_SIZE25
+@@ -63,7 +57,6 @@ int moving;
+ #define ENOUGH 5
+ #define MAX_SAMPLES 40
+ 
+-#define RAW_DEVICE "/dev/h3600_tsraw"
+ #define FONTNAME "sans-10"
+ 
+ struct point 
+@@ -287,12 +280,8 @@ sort_by_y (const void* a, const void *b)
+ void
+ set_calibration (calibration *cal)
+ {
+-  TS_CAL tc;
+-  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 +293,6 @@ set_calibrat

[oe] [PATCH 3/4] xtscal: move recipe from oe-core

2016-09-16 Thread Maxin B. John
Move xtscal recipe from oe-core layer.

Signed-off-by: Maxin B. John 
---
 .../xtscal/xtscal/30xTs_Calibrate.sh   |  13 +
 .../xtscal/xtscal/change-cross.patch   |  18 +
 .../recipes-graphics/xtscal/xtscal/cleanup.patch   | 621 +
 .../xtscal/dso_linking_change_build_fix.patch  |  27 +
 meta-gpe/recipes-graphics/xtscal/xtscal_0.6.3.bb   |  33 ++
 5 files changed, 712 insertions(+)
 create mode 100644 meta-gpe/recipes-graphics/xtscal/xtscal/30xTs_Calibrate.sh
 create mode 100644 meta-gpe/recipes-graphics/xtscal/xtscal/change-cross.patch
 create mode 100644 meta-gpe/recipes-graphics/xtscal/xtscal/cleanup.patch
 create mode 100644 
meta-gpe/recipes-graphics/xtscal/xtscal/dso_linking_change_build_fix.patch
 create mode 100644 meta-gpe/recipes-graphics/xtscal/xtscal_0.6.3.bb

diff --git a/meta-gpe/recipes-graphics/xtscal/xtscal/30xTs_Calibrate.sh 
b/meta-gpe/recipes-graphics/xtscal/xtscal/30xTs_Calibrate.sh
new file mode 100644
index 000..fa43617
--- /dev/null
+++ b/meta-gpe/recipes-graphics/xtscal/xtscal/30xTs_Calibrate.sh
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+. /etc/formfactor/config
+
+if [ "$HAVE_TOUCHSCREEN" = "1" ]; then
+   n=1
+   while [ ! -z $TSLIB_TSDEVICE ] && [ ! -f /etc/pointercal ] && [ $n -le 
5 ]
+   do
+  /usr/bin/xtscal
+  sleep 1
+  n=$(($n+1))
+   done
+fi
diff --git a/meta-gpe/recipes-graphics/xtscal/xtscal/change-cross.patch 
b/meta-gpe/recipes-graphics/xtscal/xtscal/change-cross.patch
new file mode 100644
index 000..1da7717
--- /dev/null
+++ b/meta-gpe/recipes-graphics/xtscal/xtscal/change-cross.patch
@@ -0,0 +1,18 @@
+Upstream-Status: Pending
+
+--- tmp/main.c.orig2007-01-02 15:39:54.0 +
 tmp/main.c 2007-01-02 15:39:54.0 +
+@@ -131,9 +131,10 @@
+ {
+   XRenderFillRectangles (dpy, PictOpSrc, pict, &rect_color, rectangles, 2);
+ 
+-  XFillArc (dpy, crosshair_w, crosshair_gc, (CROSSHAIR_SIZE / 2) - (WIDTH / 
2) - 1, 
+-  (CROSSHAIR_SIZE / 2) - (WIDTH / 2) - 1,
+-  WIDTH + 1, WIDTH + 1, 0, 360 * 64);
++  XFillRectangle (dpy, crosshair_w, crosshair_gc,
++(CROSSHAIR_SIZE / 2) - (WIDTH / 2),
++(CROSSHAIR_SIZE / 2) - (WIDTH / 2),
++WIDTH, WIDTH);
+ }
+ 
+ void
diff --git a/meta-gpe/recipes-graphics/xtscal/xtscal/cleanup.patch 
b/meta-gpe/recipes-graphics/xtscal/xtscal/cleanup.patch
new file mode 100644
index 000..f7b0854
--- /dev/null
+++ b/meta-gpe/recipes-graphics/xtscal/xtscal/cleanup.patch
@@ -0,0 +1,621 @@
+---
+ Makefile.am  |9 --
+ configure.ac |3 
+ gpe-dist.am  |   12 ---
+ h3600_ts.h   |  216 
---
+ main.c   |  210 ++---
+ xtscal.in|   19 -
+ 6 files changed, 14 insertions(+), 455 deletions(-)
+
+Upstream-Status: Pending
+
+Index: xtscal-0.6.3/xtscal.in
+===
+--- xtscal-0.6.3.orig/xtscal.in2004-09-10 20:10:36.0 +0100
 /dev/null  1970-01-01 00:00:00.0 +
+@@ -1,19 +0,0 @@
+-#!/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
+-
+-# the things we do for autoconf
+-prefix=@prefix@
+-exec_prefix=@exec_prefix@
+-exec @libexecdir@/xtscal.bin $ARGS $*
+Index: xtscal-0.6.3/main.c
+===
+--- xtscal-0.6.3.orig/main.c   2007-07-01 01:12:52.0 +0100
 xtscal-0.6.3/main.c2007-07-01 01:12:55.0 +0100
+@@ -22,12 +22,10 @@
+ #include 
+ 
+ #include 
+-#include 
+ #include 
+ #include 
+ #include 
+ 
+-#include "h3600_ts.h"
+ #include "calibrate.h"
+ 
+ Display *dpy;
+@@ -45,15 +43,11 @@ XftColor xftcol;
+ XftDraw *xftdraw;
+ XftFont *xftfont;
+ int screen_x, screen_y;
+-int ts_fd;
+ int samples;
+ Pixmap bg_pixmap;
+ int flag_debug;
+-int rotation = 0;
+ int error_base, event_base;
+ 
+-int using_xcalibrate;
+-
+ int moving;
+ 
+ #define CROSSHAIR_SIZE25
+@@ -63,7 +57,6 @@ int moving;
+ #define ENOUGH 5
+ #define MAX_SAMPLES 40
+ 
+-#define RAW_DEVICE "/dev/h3600_tsraw"
+ #define FONTNAME "sans-10"
+ 
+ struct point 
+@@ -287,12 +280,8 @@ sort_by_y (const void* a, const void *b)
+ void
+ set_calibration (calibration *cal)
+ {
+-  TS_CAL tc;
+-  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 +293,6 

[oe] [PATCH 3/4] xtscal: move recipe from oe-core

2016-09-01 Thread Maxin B. John
Move xtscal recipe from oe-core layer.

Signed-off-by: Maxin B. John 
---
 .../xtscal/xtscal/30xTs_Calibrate.sh   |  13 +
 .../xtscal/xtscal/change-cross.patch   |  18 +
 .../recipes-graphics/xtscal/xtscal/cleanup.patch   | 621 +
 .../xtscal/dso_linking_change_build_fix.patch  |  27 +
 meta-gpe/recipes-graphics/xtscal/xtscal_0.6.3.bb   |  33 ++
 5 files changed, 712 insertions(+)
 create mode 100644 meta-gpe/recipes-graphics/xtscal/xtscal/30xTs_Calibrate.sh
 create mode 100644 meta-gpe/recipes-graphics/xtscal/xtscal/change-cross.patch
 create mode 100644 meta-gpe/recipes-graphics/xtscal/xtscal/cleanup.patch
 create mode 100644 
meta-gpe/recipes-graphics/xtscal/xtscal/dso_linking_change_build_fix.patch
 create mode 100644 meta-gpe/recipes-graphics/xtscal/xtscal_0.6.3.bb

diff --git a/meta-gpe/recipes-graphics/xtscal/xtscal/30xTs_Calibrate.sh 
b/meta-gpe/recipes-graphics/xtscal/xtscal/30xTs_Calibrate.sh
new file mode 100644
index 000..fa43617
--- /dev/null
+++ b/meta-gpe/recipes-graphics/xtscal/xtscal/30xTs_Calibrate.sh
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+. /etc/formfactor/config
+
+if [ "$HAVE_TOUCHSCREEN" = "1" ]; then
+   n=1
+   while [ ! -z $TSLIB_TSDEVICE ] && [ ! -f /etc/pointercal ] && [ $n -le 
5 ]
+   do
+  /usr/bin/xtscal
+  sleep 1
+  n=$(($n+1))
+   done
+fi
diff --git a/meta-gpe/recipes-graphics/xtscal/xtscal/change-cross.patch 
b/meta-gpe/recipes-graphics/xtscal/xtscal/change-cross.patch
new file mode 100644
index 000..1da7717
--- /dev/null
+++ b/meta-gpe/recipes-graphics/xtscal/xtscal/change-cross.patch
@@ -0,0 +1,18 @@
+Upstream-Status: Pending
+
+--- tmp/main.c.orig2007-01-02 15:39:54.0 +
 tmp/main.c 2007-01-02 15:39:54.0 +
+@@ -131,9 +131,10 @@
+ {
+   XRenderFillRectangles (dpy, PictOpSrc, pict, &rect_color, rectangles, 2);
+ 
+-  XFillArc (dpy, crosshair_w, crosshair_gc, (CROSSHAIR_SIZE / 2) - (WIDTH / 
2) - 1, 
+-  (CROSSHAIR_SIZE / 2) - (WIDTH / 2) - 1,
+-  WIDTH + 1, WIDTH + 1, 0, 360 * 64);
++  XFillRectangle (dpy, crosshair_w, crosshair_gc,
++(CROSSHAIR_SIZE / 2) - (WIDTH / 2),
++(CROSSHAIR_SIZE / 2) - (WIDTH / 2),
++WIDTH, WIDTH);
+ }
+ 
+ void
diff --git a/meta-gpe/recipes-graphics/xtscal/xtscal/cleanup.patch 
b/meta-gpe/recipes-graphics/xtscal/xtscal/cleanup.patch
new file mode 100644
index 000..f7b0854
--- /dev/null
+++ b/meta-gpe/recipes-graphics/xtscal/xtscal/cleanup.patch
@@ -0,0 +1,621 @@
+---
+ Makefile.am  |9 --
+ configure.ac |3 
+ gpe-dist.am  |   12 ---
+ h3600_ts.h   |  216 
---
+ main.c   |  210 ++---
+ xtscal.in|   19 -
+ 6 files changed, 14 insertions(+), 455 deletions(-)
+
+Upstream-Status: Pending
+
+Index: xtscal-0.6.3/xtscal.in
+===
+--- xtscal-0.6.3.orig/xtscal.in2004-09-10 20:10:36.0 +0100
 /dev/null  1970-01-01 00:00:00.0 +
+@@ -1,19 +0,0 @@
+-#!/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
+-
+-# the things we do for autoconf
+-prefix=@prefix@
+-exec_prefix=@exec_prefix@
+-exec @libexecdir@/xtscal.bin $ARGS $*
+Index: xtscal-0.6.3/main.c
+===
+--- xtscal-0.6.3.orig/main.c   2007-07-01 01:12:52.0 +0100
 xtscal-0.6.3/main.c2007-07-01 01:12:55.0 +0100
+@@ -22,12 +22,10 @@
+ #include 
+ 
+ #include 
+-#include 
+ #include 
+ #include 
+ #include 
+ 
+-#include "h3600_ts.h"
+ #include "calibrate.h"
+ 
+ Display *dpy;
+@@ -45,15 +43,11 @@ XftColor xftcol;
+ XftDraw *xftdraw;
+ XftFont *xftfont;
+ int screen_x, screen_y;
+-int ts_fd;
+ int samples;
+ Pixmap bg_pixmap;
+ int flag_debug;
+-int rotation = 0;
+ int error_base, event_base;
+ 
+-int using_xcalibrate;
+-
+ int moving;
+ 
+ #define CROSSHAIR_SIZE25
+@@ -63,7 +57,6 @@ int moving;
+ #define ENOUGH 5
+ #define MAX_SAMPLES 40
+ 
+-#define RAW_DEVICE "/dev/h3600_tsraw"
+ #define FONTNAME "sans-10"
+ 
+ struct point 
+@@ -287,12 +280,8 @@ sort_by_y (const void* a, const void *b)
+ void
+ set_calibration (calibration *cal)
+ {
+-  TS_CAL tc;
+-  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 +293,6