diff options
author | Eric BENARD <eric@eukrea.com> | 2013-05-27 23:43:53 +0000 |
---|---|---|
committer | Martin Jansa <Martin.Jansa@gmail.com> | 2013-05-28 10:55:11 +0200 |
commit | f52b59a5cc9ddfb0ede39194e284c858bfd0cbd8 (patch) | |
tree | 0a9f78660182a932e4047d94e1d697f76d36dee4 | |
parent | 7994fc13da2971376621e9d8653f89e1d9323eaa (diff) | |
download | meta-qt5-f52b59a5cc9ddfb0ede39194e284c858bfd0cbd8.tar.gz |
qtbase: add option to enable tslib support
- the tslib support is not enabled by default and configure doesn't have any option
to active it, so add the option to the build system,
- patch tslib support to get the device from the environment variable
(patch taken from https://github.com/prabindh/qt-configs/blob/master/qt5_1.0_Feb13/tslib.patch
- provide variable to enable tslib support in a bbappend (disabled by default)
- tested on an i.MX5x target with qt 5.0.2
TODO : test with 5.0, 5.0.1 and _git
Signed-off-by: Eric Bénard <eric@eukrea.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
4 files changed, 122 insertions, 1 deletions
diff --git a/recipes-qt/qt5/qtbase-5.0.2/0001-configure-add-tslib-support.patch b/recipes-qt/qt5/qtbase-5.0.2/0001-configure-add-tslib-support.patch new file mode 100644 index 00000000..3407f609 --- /dev/null +++ b/recipes-qt/qt5/qtbase-5.0.2/0001-configure-add-tslib-support.patch | |||
@@ -0,0 +1,78 @@ | |||
1 | From b4edefdc1fb5ba67b202fad7df5a8def554d16fd Mon Sep 17 00:00:00 2001 | ||
2 | From: =?UTF-8?q?Eric=20B=C3=A9nard?= <eric@eukrea.com> | ||
3 | Date: Mon, 27 May 2013 18:45:03 +0200 | ||
4 | Subject: [PATCH] configure: add tslib support | ||
5 | MIME-Version: 1.0 | ||
6 | Content-Type: text/plain; charset=UTF-8 | ||
7 | Content-Transfer-Encoding: 8bit | ||
8 | |||
9 | Signed-off-by: Eric Bénard <eric@eukrea.com> | ||
10 | --- | ||
11 | configure | 24 ++++++++++++++++++++++++ | ||
12 | src/plugins/generic/generic.pro | 4 ++++ | ||
13 | 2 files changed, 28 insertions(+) | ||
14 | |||
15 | diff --git a/configure b/configure | ||
16 | index 2ea1ea4..727fed9 100755 | ||
17 | --- a/configure | ||
18 | +++ b/configure | ||
19 | @@ -810,6 +810,7 @@ CFG_KMS=auto | ||
20 | CFG_LIBUDEV=auto | ||
21 | CFG_OBSOLETE_WAYLAND=no | ||
22 | CFG_EVDEV=auto | ||
23 | +CFG_TSLIB=auto | ||
24 | CFG_NIS=auto | ||
25 | CFG_CUPS=auto | ||
26 | CFG_ICONV=auto | ||
27 | @@ -1782,6 +1783,13 @@ while [ "$#" -gt 0 ]; do | ||
28 | UNKNOWN_OPT=yes | ||
29 | fi | ||
30 | ;; | ||
31 | + tslib) | ||
32 | + if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then | ||
33 | + CFG_TSLIB="$VAL" | ||
34 | + else | ||
35 | + UNKNOWN_OPT=yes | ||
36 | + fi | ||
37 | + ;; | ||
38 | cups) | ||
39 | if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then | ||
40 | CFG_CUPS="$VAL" | ||
41 | @@ -4775,6 +4783,22 @@ if [ "$CFG_EVDEV" = "no" ]; then | ||
42 | QMakeVar add DEFINES QT_NO_EVDEV | ||
43 | fi | ||
44 | |||
45 | +if [ "$CFG_TSLIB" != "no" ]; then | ||
46 | + if compileTest unix/tslib "tslib"; then | ||
47 | + CFG_TSLIB=yes | ||
48 | + QT_CONFIG="$QT_CONFIG tslib" | ||
49 | + elif [ "$CFG_TSLIB" = "yes" ]; then | ||
50 | + echo "The tslib functionality test failed!" | ||
51 | + exit 1 | ||
52 | + else | ||
53 | + CFG_TSLIB=no | ||
54 | + fi | ||
55 | +fi | ||
56 | +if [ "$CFG_TSLIB" = "no" ]; then | ||
57 | + QMakeVar add DEFINES QT_NO_TSLIB | ||
58 | +fi | ||
59 | + | ||
60 | + | ||
61 | # Check we actually have X11 :-) | ||
62 | if compileTest x11/xlib "XLib"; then | ||
63 | QT_CONFIG="$QT_CONFIG xlib" | ||
64 | diff --git a/src/plugins/generic/generic.pro b/src/plugins/generic/generic.pro | ||
65 | index 078db2f..18a8295 100644 | ||
66 | --- a/src/plugins/generic/generic.pro | ||
67 | +++ b/src/plugins/generic/generic.pro | ||
68 | @@ -5,3 +5,7 @@ TEMPLATE = subdirs | ||
69 | contains(QT_CONFIG, evdev) { | ||
70 | SUBDIRS += evdevmouse evdevtouch evdevkeyboard evdevtablet | ||
71 | } | ||
72 | + | ||
73 | +contains(QT_CONFIG, tslib) { | ||
74 | + SUBDIRS += tslib | ||
75 | +} | ||
76 | -- | ||
77 | 1.8.1.4 | ||
78 | |||
diff --git a/recipes-qt/qt5/qtbase-5.0.2/0001-enables-tslib-device-to-be-read-from-env-variable.patch b/recipes-qt/qt5/qtbase-5.0.2/0001-enables-tslib-device-to-be-read-from-env-variable.patch new file mode 100644 index 00000000..77ddcba3 --- /dev/null +++ b/recipes-qt/qt5/qtbase-5.0.2/0001-enables-tslib-device-to-be-read-from-env-variable.patch | |||
@@ -0,0 +1,34 @@ | |||
1 | From cb7d4b978d7b29e3f4ef5dba1ca1319ccd289a0d Mon Sep 17 00:00:00 2001 | ||
2 | From: =?UTF-8?q?Eric=20B=C3=A9nard?= <eric@eukrea.com> | ||
3 | Date: Mon, 27 May 2013 18:32:37 +0200 | ||
4 | Subject: [PATCH] enables tslib device to be read from env variable | ||
5 | MIME-Version: 1.0 | ||
6 | Content-Type: text/plain; charset=UTF-8 | ||
7 | Content-Transfer-Encoding: 8bit | ||
8 | |||
9 | from : | ||
10 | https://github.com/prabindh/qt-configs/blob/master/qt5_1.0_Feb13/tslib.patch | ||
11 | |||
12 | Signed-off-by: Eric Bénard <eric@eukrea.com> | ||
13 | --- | ||
14 | src/plugins/generic/tslib/qtslib.cpp | 4 +++- | ||
15 | 1 file changed, 3 insertions(+), 1 deletion(-) | ||
16 | |||
17 | diff --git a/src/plugins/generic/tslib/qtslib.cpp b/src/plugins/generic/tslib/qtslib.cpp | ||
18 | index 6986fd5..2ed4a69 100644 | ||
19 | --- a/src/plugins/generic/tslib/qtslib.cpp | ||
20 | +++ b/src/plugins/generic/tslib/qtslib.cpp | ||
21 | @@ -64,7 +64,9 @@ QTsLibMouseHandler::QTsLibMouseHandler(const QString &key, | ||
22 | qDebug() << "QTsLibMouseHandler" << key << specification; | ||
23 | setObjectName(QLatin1String("TSLib Mouse Handler")); | ||
24 | |||
25 | - QByteArray device = "/dev/input/event1"; | ||
26 | + QByteArray device = qgetenv("TSLIB_TSDEVICE"); | ||
27 | + if(device.isEmpty()) | ||
28 | + device = "/dev/input/event1"; | ||
29 | if (specification.startsWith("/dev/")) | ||
30 | device = specification.toLocal8Bit(); | ||
31 | |||
32 | -- | ||
33 | 1.8.1.4 | ||
34 | |||
diff --git a/recipes-qt/qt5/qtbase.inc b/recipes-qt/qt5/qtbase.inc index 739a9361..f286274a 100644 --- a/recipes-qt/qt5/qtbase.inc +++ b/recipes-qt/qt5/qtbase.inc | |||
@@ -15,7 +15,7 @@ SRC_URI += " \ | |||
15 | file://0012-configure.prf-Allow-to-add-extra-arguments-to-make.patch \ | 15 | file://0012-configure.prf-Allow-to-add-extra-arguments-to-make.patch \ |
16 | " | 16 | " |
17 | 17 | ||
18 | DEPENDS += "qtbase-native freetype jpeg libpng zlib openssl glib-2.0 ${ICU} udev ${XCB_DEPENDS} ${GL_DEPENDS}" | 18 | DEPENDS += "qtbase-native freetype jpeg libpng zlib openssl glib-2.0 ${ICU} udev ${XCB_DEPENDS} ${GL_DEPENDS} ${TSLIB_DEPENDS}" |
19 | 19 | ||
20 | # to provide xcb/xcb_icccm.h, xcb/xcb_image.h, xcb/xcb_keysyms.h and dbus/dbus.h | 20 | # to provide xcb/xcb_icccm.h, xcb/xcb_image.h, xcb/xcb_keysyms.h and dbus/dbus.h |
21 | # XCB_DEPENDS += "xcb-util-wm xcb-util-image xcb-util-keysyms dbus" | 21 | # XCB_DEPENDS += "xcb-util-wm xcb-util-image xcb-util-keysyms dbus" |
@@ -40,6 +40,12 @@ QT_SQL_DRIVER_FLAGS ?= "-no-sql-ibase -no-sql-mysql -no-sql-psql -no-sql-odbc -p | |||
40 | GL_DEPENDS ?= "virtual/libgl" | 40 | GL_DEPENDS ?= "virtual/libgl" |
41 | QT_GLFLAGS ?= "-opengl" | 41 | QT_GLFLAGS ?= "-opengl" |
42 | 42 | ||
43 | # if you want to enable tslib in your .bbappend, don't forget to add tslib dependencies | ||
44 | # TSLIB_DEPENDS = "tslib" | ||
45 | # QT_TSLIB = "-tslib" | ||
46 | TSLIB_DEPENDS ?= "" | ||
47 | QT_TSLIB ?= "-no-tslib" | ||
48 | |||
43 | QT_WIDGETS ?= "-widgets" | 49 | QT_WIDGETS ?= "-widgets" |
44 | QT_XML ?= "-xmlpatterns" | 50 | QT_XML ?= "-xmlpatterns" |
45 | QT_WEBKIT ?= "-webkit" | 51 | QT_WEBKIT ?= "-webkit" |
@@ -74,6 +80,7 @@ QT_CONFIG_FLAGS += " \ | |||
74 | ${QT_GLFLAGS} \ | 80 | ${QT_GLFLAGS} \ |
75 | ${QT_TESTS} \ | 81 | ${QT_TESTS} \ |
76 | ${QT_EXAMPLES} \ | 82 | ${QT_EXAMPLES} \ |
83 | ${QT_TSLIB} \ | ||
77 | " | 84 | " |
78 | 85 | ||
79 | INC_PR = "r1" | 86 | INC_PR = "r1" |
diff --git a/recipes-qt/qt5/qtbase_5.0.2.bb b/recipes-qt/qt5/qtbase_5.0.2.bb index 357c06e7..2cd94dd7 100644 --- a/recipes-qt/qt5/qtbase_5.0.2.bb +++ b/recipes-qt/qt5/qtbase_5.0.2.bb | |||
@@ -5,6 +5,8 @@ PR = "${INC_PR}.0" | |||
5 | 5 | ||
6 | SRC_URI += "file://0004-Disable-mkv8snapshot.patch \ | 6 | SRC_URI += "file://0004-Disable-mkv8snapshot.patch \ |
7 | file://0001-qtbase-allow-build-of-examples.patch \ | 7 | file://0001-qtbase-allow-build-of-examples.patch \ |
8 | file://0001-enables-tslib-device-to-be-read-from-env-variable.patch \ | ||
9 | file://0001-configure-add-tslib-support.patch \ | ||
8 | " | 10 | " |
9 | 11 | ||
10 | SRC_URI[md5sum] = "a4fec8ed03867c4ee4fe5a46001a11f0" | 12 | SRC_URI[md5sum] = "a4fec8ed03867c4ee4fe5a46001a11f0" |