summaryrefslogtreecommitdiffstats
path: root/meta/recipes-qt/qt4/files
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-qt/qt4/files')
-rw-r--r--meta/recipes-qt/qt4/files/0001-cross-compile.patch36
-rw-r--r--meta/recipes-qt/qt4/files/0002-fix-resinit-declaration.patch22
-rw-r--r--meta/recipes-qt/qt4/files/0004-no-qmake.patch26
-rw-r--r--meta/recipes-qt/qt4/files/0006-freetype-host-includes.patch24
-rw-r--r--meta/recipes-qt/qt4/files/0008-qt-lib-infix.patch36
-rw-r--r--meta/recipes-qt/qt4/files/0009-support-2bpp.patch299
-rw-r--r--meta/recipes-qt/qt4/files/0010-no-simpledecoration-example.patch14
-rw-r--r--meta/recipes-qt/qt4/files/fix-config-tests.patch36
-rw-r--r--meta/recipes-qt/qt4/files/g++.conf53
-rw-r--r--meta/recipes-qt/qt4/files/hack-out-pg_config.patch30
-rw-r--r--meta/recipes-qt/qt4/files/linux.conf54
-rw-r--r--meta/recipes-qt/qt4/files/qt-config.patch24
12 files changed, 654 insertions, 0 deletions
diff --git a/meta/recipes-qt/qt4/files/0001-cross-compile.patch b/meta/recipes-qt/qt4/files/0001-cross-compile.patch
new file mode 100644
index 0000000000..053be06e54
--- /dev/null
+++ b/meta/recipes-qt/qt4/files/0001-cross-compile.patch
@@ -0,0 +1,36 @@
1Add configure option "crossarch" for cross compiling
2
3Ported from OE by: Yu Ke <ke.yu@intel.com>
4
5Index: qt-embedded-linux-opensource-src-4.4.3/configure
6===================================================================
7--- qt-embedded-linux-opensource-src-4.4.3.orig/configure 2009-03-26 17:02:45.000000000 +0100
8+++ qt-embedded-linux-opensource-src-4.4.3/configure 2009-03-26 17:03:43.000000000 +0100
9@@ -726,7 +726,7 @@
10 UNKNOWN_ARG=yes
11 fi
12 ;;
13- -prefix|-docdir|-headerdir|-plugindir|-datadir|-libdir|-bindir|-translationdir|-sysconfdir|-examplesdir|-demosdir|-depths|-make|-nomake|-platform|-xplatform|-buildkey|-sdk|-arch|-host-arch|-mysql_config)
14+ -prefix|-docdir|-headerdir|-plugindir|-datadir|-libdir|-bindir|-translationdir|-sysconfdir|-examplesdir|-demosdir|-depths|-make|-nomake|-platform|-xplatform|-buildkey|-sdk|-arch|-host-arch|-mysql_config|-crossarch)
15 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
16 shift
17 VAL="$1"
18@@ -1143,6 +1143,9 @@
19 xplatform)
20 XPLATFORM="$VAL"
21 ;;
22+ crossarch)
23+ CROSSARCH="$VAL"
24+ ;;
25 debug-and-release)
26 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
27 CFG_DEBUG_RELEASE="$VAL"
28@@ -2405,6 +2408,8 @@
29 CFG_ARCH=$CFG_HOST_ARCH
30 fi
31
32+CFG_ARCH="$CROSSARCH"
33+
34 if [ -d "$relpath/src/corelib/arch/$CFG_ARCH" ]; then
35 if [ "$OPT_VERBOSE" = "yes" ]; then
36 echo " '$CFG_ARCH' is supported"
diff --git a/meta/recipes-qt/qt4/files/0002-fix-resinit-declaration.patch b/meta/recipes-qt/qt4/files/0002-fix-resinit-declaration.patch
new file mode 100644
index 0000000000..be4d5c0e22
--- /dev/null
+++ b/meta/recipes-qt/qt4/files/0002-fix-resinit-declaration.patch
@@ -0,0 +1,22 @@
1From acfeb18aa94bad6b2066e91cd15570889baaa252 Mon Sep 17 00:00:00 2001
2From: Michael Krelin <hacker@klever.net>
3Date: Sat, 2 Jun 2007 16:04:01 +0200
4Subject: [PATCH] fix resinit declaration
5
6---
7 src/qt3support/network/q3dns.cpp | 2 +-
8 1 files changed, 1 insertions(+), 1 deletions(-)
9
10Index: qt-embedded-linux-opensource-src-4.4.3/src/qt3support/network/q3dns.cpp
11===================================================================
12--- qt-embedded-linux-opensource-src-4.4.3.orig/src/qt3support/network/q3dns.cpp 2008-09-27 11:01:28.000000000 +0200
13+++ qt-embedded-linux-opensource-src-4.4.3/src/qt3support/network/q3dns.cpp 2009-03-26 17:04:05.000000000 +0100
14@@ -44,7 +44,7 @@
15 # include <netinet/in.h>
16 # include <arpa/nameser.h>
17 # include <resolv.h>
18-extern "C" int res_init();
19+extern "C" int res_init() throw();
20 #endif
21
22 // POSIX Large File Support redefines open -> open64
diff --git a/meta/recipes-qt/qt4/files/0004-no-qmake.patch b/meta/recipes-qt/qt4/files/0004-no-qmake.patch
new file mode 100644
index 0000000000..a58b19f904
--- /dev/null
+++ b/meta/recipes-qt/qt4/files/0004-no-qmake.patch
@@ -0,0 +1,26 @@
1From f5a73ce944240de9013cc23288c115e8213add5e Mon Sep 17 00:00:00 2001
2From: Michael Krelin <hacker@klever.net>
3Date: Sat, 2 Jun 2007 16:06:59 +0200
4Subject: [PATCH] no qmake
5
6qmake is already built in qt4-tools-native, so disable it
7
8Ported from OE by: Yu Ke <ke.yu@intel.com>
9
10---
11 configure | 2 +-
12 1 files changed, 1 insertions(+), 1 deletions(-)
13
14Index: qt-embedded-linux-opensource-src-4.4.3/configure
15===================================================================
16--- qt-embedded-linux-opensource-src-4.4.3.orig/configure 2009-03-26 17:03:43.000000000 +0100
17+++ qt-embedded-linux-opensource-src-4.4.3/configure 2009-03-26 17:04:17.000000000 +0100
18@@ -3786,7 +3786,7 @@
19 }
20
21 # build qmake
22-if true; then ###[ '!' -f "$outpath/bin/qmake" ];
23+if false; then ###[ '!' -f "$outpath/bin/qmake" ];
24 echo "Creating qmake. Please wait..."
25
26 OLD_QCONFIG_H=
diff --git a/meta/recipes-qt/qt4/files/0006-freetype-host-includes.patch b/meta/recipes-qt/qt4/files/0006-freetype-host-includes.patch
new file mode 100644
index 0000000000..081d8992ef
--- /dev/null
+++ b/meta/recipes-qt/qt4/files/0006-freetype-host-includes.patch
@@ -0,0 +1,24 @@
1From c9ab62bd9a56643574b3ae6e59e0ca776d4860d2 Mon Sep 17 00:00:00 2001
2From: Michael Krelin <hacker@klever.net>
3Date: Mon, 4 Jun 2007 14:48:50 +0200
4Subject: [PATCH] freetype host includes
5
6Host include path should not be used in corss compiling case.
7
8Ported from OE by: Yu Ke <ke.yu@intel.com>
9
10---
11 config.tests/unix/freetype/freetype.pri | 2 +-
12 1 files changed, 1 insertions(+), 1 deletions(-)
13
14Index: qt-embedded-linux-opensource-src-4.5.0/config.tests/unix/freetype/freetype.pri
15===================================================================
16--- qt-embedded-linux-opensource-src-4.5.0.orig/config.tests/unix/freetype/freetype.pri 2009-02-25 22:32:32.000000000 +0100
17+++ qt-embedded-linux-opensource-src-4.5.0/config.tests/unix/freetype/freetype.pri 2009-03-26 17:14:16.000000000 +0100
18@@ -1,5 +1,5 @@
19 !cross_compile {
20- TRY_INCLUDEPATHS = /include /usr/include $$QMAKE_INCDIR $$QMAKE_INCDIR_X11 $$INCLUDEPATH
21+ TRY_INCLUDEPATHS = $$QMAKE_INCDIR $$QMAKE_INCDIR_X11 $$INCLUDEPATH
22 # LSB doesn't allow using headers from /include or /usr/include
23 linux-lsb-g++:TRY_INCLUDEPATHS = $$QMAKE_INCDIR $$QMAKE_INCDIR_X11 $$INCLUDEPATH
24 for(p, TRY_INCLUDEPATHS) {
diff --git a/meta/recipes-qt/qt4/files/0008-qt-lib-infix.patch b/meta/recipes-qt/qt4/files/0008-qt-lib-infix.patch
new file mode 100644
index 0000000000..a1b89124dd
--- /dev/null
+++ b/meta/recipes-qt/qt4/files/0008-qt-lib-infix.patch
@@ -0,0 +1,36 @@
1Add lib infix to distinguish different qt compile version: e.g. "E" for embedded, "" for X11
2
3Ported from OE by: Yu Ke <ke.yu@intel.com>
4
5--- /tmp/uitools.prf 2009-12-01 18:38:22.000000000 +0100
6+++ qt-everywhere-opensource-src-4.6.0/mkspecs/features/uitools.prf 2009-12-01 18:58:16.000000000 +0100
7@@ -3,11 +3,11 @@
8
9 # Include the correct version of the UiLoader library
10 symbian: QTUITOOLS_LINKAGE = -lQtUiTools.lib
11-else: QTUITOOLS_LINKAGE = -lQtUiTools
12+else: QTUITOOLS_LINKAGE = -lQtUiTools$${QT_LIBINFIX}
13
14 CONFIG(debug, debug|release) {
15- mac: QTUITOOLS_LINKAGE = -lQtUiTools_debug
16- win32: QTUITOOLS_LINKAGE = -lQtUiToolsd
17+ mac: QTUITOOLS_LINKAGE = -lQtUiTools$${QT_LIBINFIX}_debug
18+ win32: QTUITOOLS_LINKAGE = -lQtUiTools$${QT_LIBINFIX}d
19 }
20 LIBS += $$QTUITOOLS_LINKAGE
21
22--- /tmp/uitools.pro 2009-12-01 18:40:28.000000000 +0100
23+++ qt-everywhere-opensource-src-4.6.0/tools/designer/src/uitools/uitools.pro 2009-12-01 18:59:18.000000000 +0100
24@@ -1,5 +1,5 @@
25 TEMPLATE = lib
26-TARGET = $$qtLibraryTarget(QtUiTools)
27+TARGET = QtUiTools
28 QT += xml
29 CONFIG += qt staticlib
30 DESTDIR = ../../../../lib
31@@ -43,3 +43,5 @@
32 QMAKE_PKGCONFIG_DESTDIR = pkgconfig
33 QMAKE_PKGCONFIG_REQUIRES += QtXml
34 }
35+
36+TARGET = $$qtLibraryTarget($$TARGET$$QT_LIBINFIX) #do this towards the end
diff --git a/meta/recipes-qt/qt4/files/0009-support-2bpp.patch b/meta/recipes-qt/qt4/files/0009-support-2bpp.patch
new file mode 100644
index 0000000000..cf44ea8214
--- /dev/null
+++ b/meta/recipes-qt/qt4/files/0009-support-2bpp.patch
@@ -0,0 +1,299 @@
1Add 2bpp support
2
3Ported from OE by: Yu Ke <ke.yu@intel.com>
4
5diff -urN qt-embedded-linux-opensource-src-4.4.3.orig/configure qt-embedded-linux-opensource-src-4.4.3/configure
6--- qt-embedded-linux-opensource-src-4.4.3.orig/configure 2008-09-27 11:01:23.000000000 +0200
7+++ qt-embedded-linux-opensource-src-4.4.3/configure 2009-01-14 14:30:53.000000000 +0100
8@@ -5045,6 +5045,7 @@
9 echo "Choose pixel-depths to support:"
10 echo
11 echo " 1. 1bpp, black/white"
12+ echo " 2. 2bpp, grayscale"
13 echo " 4. 4bpp, grayscale"
14 echo " 8. 8bpp, paletted"
15 echo " 12. 12bpp, rgb 4-4-4"
16@@ -5063,11 +5064,11 @@
17 fi
18 if [ -n "$CFG_QWS_DEPTHS" -a "$PLATFORM_QWS" = "yes" ]; then
19 if [ "$CFG_QWS_DEPTHS" = "all" ]; then
20- CFG_QWS_DEPTHS="1 4 8 12 15 16 18 24 32 generic"
21+ CFG_QWS_DEPTHS="1 2 4 8 12 15 16 18 24 32 generic"
22 fi
23 for D in `echo "$CFG_QWS_DEPTHS" | sed -e 's/,/ /g'`; do
24 case $D in
25- 1|4|8|12|15|16|18|24|32) QCONFIG_FLAGS="$QCONFIG_FLAGS QT_QWS_DEPTH_$D";;
26+ 1|2|4|8|12|15|16|18|24|32) QCONFIG_FLAGS="$QCONFIG_FLAGS QT_QWS_DEPTH_$D";;
27 generic) QCONFIG_FLAGS="$QCONFIG_FLAGS QT_QWS_DEPTH_GENERIC";;
28 esac
29 done
30diff -urN qt-embedded-linux-opensource-src-4.4.3.orig/src/gui/embedded/qscreenlinuxfb_qws.cpp qt-embedded-linux-opensource-src-4.4.3/src/gui/embedded/qscreenlinuxfb_qws.cpp
31--- qt-embedded-linux-opensource-src-4.4.3.orig/src/gui/embedded/qscreenlinuxfb_qws.cpp 2008-09-27 11:01:28.000000000 +0200
32+++ qt-embedded-linux-opensource-src-4.4.3/src/gui/embedded/qscreenlinuxfb_qws.cpp 2009-01-14 17:22:34.000000000 +0100
33@@ -404,8 +404,8 @@
34 setupOffScreen();
35
36 // Now read in palette
37- if((vinfo.bits_per_pixel==8) || (vinfo.bits_per_pixel==4)) {
38- screencols= (vinfo.bits_per_pixel==8) ? 256 : 16;
39+ if((vinfo.bits_per_pixel==8) || (vinfo.bits_per_pixel==4) || (vinfo.bits_per_pixel==2)) {
40+ screencols= 1 << vinfo.bits_per_pixel;
41 int loopc;
42 fb_cmap startcmap;
43 startcmap.start=0;
44diff -urN qt-embedded-linux-opensource-src-4.4.3.orig/src/gui/embedded/qscreen_qws.cpp qt-embedded-linux-opensource-src-4.4.3/src/gui/embedded/qscreen_qws.cpp
45--- qt-embedded-linux-opensource-src-4.4.3.orig/src/gui/embedded/qscreen_qws.cpp 2008-09-27 11:01:28.000000000 +0200
46+++ qt-embedded-linux-opensource-src-4.4.3/src/gui/embedded/qscreen_qws.cpp 2009-01-14 17:22:44.000000000 +0100
47@@ -444,6 +444,58 @@
48 }
49 #endif // QT_QWS_DEPTH_4
50
51+#ifdef QT_QWS_DEPTH_2
52+static inline void qt_rectfill_gray2(quint8 *dest, quint8 value,
53+ int x, int y, int width, int height,
54+ int stride)
55+{
56+ const int pixelsPerByte = 4;
57+ const int alignWidth = qMin(width, (4 - (x & 3)) & 3);
58+ const int doAlign = (alignWidth > 0 ? 1 : 0);
59+ const int alignStart = pixelsPerByte - 1 - (x & 3);
60+ const int alignStop = alignStart - (alignWidth - 1);
61+ const quint8 alignMask = ((1 << (2 * alignWidth)) - 1) << (2 * alignStop);
62+ const int tailWidth = (width - alignWidth) & 3;
63+ const int doTail = (tailWidth > 0 ? 1 : 0);
64+ const quint8 tailMask = (1 << (2 * (pixelsPerByte - tailWidth))) - 1;
65+ const int width8 = (width - alignWidth) / pixelsPerByte;
66+
67+ dest += y * stride + x / pixelsPerByte;
68+ stride -= (doAlign + width8);
69+
70+ for (int j = 0; j < height; ++j) {
71+ if (doAlign) {
72+ *dest = (*dest & ~alignMask) | (value & alignMask);
73+ ++dest;
74+ }
75+ if (width8) {
76+ qt_memfill<quint8>(dest, value, width8);
77+ dest += width8;
78+ }
79+ if (doTail)
80+ *dest = (*dest & tailMask) | (value & ~tailMask);
81+ dest += stride;
82+ }
83+}
84+
85+static void solidFill_gray2(QScreen *screen, const QColor &color,
86+ const QRegion &region)
87+{
88+ quint8 *dest = reinterpret_cast<quint8*>(screen->base());
89+ const quint8 c = qGray(color.rgba()) >> 6;
90+ const quint8 c8 = (c << 6) | (c << 4) | (c << 2) | c;
91+
92+ const int stride = screen->linestep();
93+ const QVector<QRect> rects = region.rects();
94+
95+ for (int i = 0; i < rects.size(); ++i) {
96+ const QRect r = rects.at(i);
97+ qt_rectfill_gray2(dest, c8, r.x(), r.y(), r.width(), r.height(),
98+ stride);
99+ }
100+}
101+#endif // QT_QWS_DEPTH_2
102+
103 #ifdef QT_QWS_DEPTH_1
104 static inline void qt_rectfill_mono(quint8 *dest, quint8 value,
105 int x, int y, int width, int height,
106@@ -551,6 +603,11 @@
107 screen->d_ptr->solidFill = solidFill_gray4;
108 break;
109 #endif
110+#ifdef QT_QWS_DEPTH_2
111+ case 2:
112+ screen->d_ptr->solidFill = solidFill_gray2;
113+ break;
114+#endif
115 #ifdef QT_QWS_DEPTH_1
116 case 1:
117 screen->d_ptr->solidFill = solidFill_mono;
118@@ -958,6 +1015,149 @@
119 }
120 #endif // QT_QWS_DEPTH_4
121
122+#ifdef QT_QWS_DEPTH_2
123+
124+struct qgray2 { quint8 dummy; } Q_PACKED;
125+
126+template <typename SRC>
127+static inline quint8 qt_convertToGray2(SRC color);
128+
129+template <>
130+inline quint8 qt_convertToGray2(quint32 color)
131+{
132+ return qGray(color) >> 6;
133+}
134+
135+template <>
136+inline quint8 qt_convertToGray2(quint16 color)
137+{
138+ const int r = (color & 0xf800) >> 11;
139+ const int g = (color & 0x07e0) >> 6; // only keep 5 bit
140+ const int b = (color & 0x001f);
141+ return (r * 11 + g * 16 + b * 5) >> 8;
142+}
143+
144+template <>
145+inline quint8 qt_convertToGray2(qrgb444 color)
146+{
147+ return qt_convertToGray2(quint32(color));
148+}
149+
150+template <>
151+inline quint8 qt_convertToGray2(qargb4444 color)
152+{
153+ return qt_convertToGray2(quint32(color));
154+}
155+
156+template <typename SRC>
157+static inline void qt_rectconvert_gray2(qgray2 *dest2, const SRC *src,
158+ int x, int y, int width, int height,
159+ int dstStride, int srcStride)
160+{
161+ const int pixelsPerByte = 4;
162+ quint8 *dest8 = reinterpret_cast<quint8*>(dest2)
163+ + y * dstStride + x / pixelsPerByte;
164+ const int alignWidth = qMin(width, (4 - (x & 3)) & 3);
165+ const int doAlign = (alignWidth > 0 ? 1 : 0);
166+ const int alignStart = pixelsPerByte - 1 - (x & 3);
167+ const int alignStop = alignStart - (alignWidth - 1);
168+ const quint8 alignMask = ((1 << (2 * alignWidth)) - 1) << (2 * alignStop);
169+ const int tailWidth = (width - alignWidth) & 3;
170+ const int doTail = (tailWidth > 0 ? 1 : 0);
171+ const quint8 tailMask = (1 << (2 * (pixelsPerByte - tailWidth))) - 1;
172+ const int width8 = (width - alignWidth) / pixelsPerByte;
173+
174+ srcStride = srcStride / sizeof(SRC) - (width8 * pixelsPerByte + alignWidth);
175+ dstStride -= (width8 + doAlign);
176+
177+ for (int j = 0; j < height; ++j) {
178+ if (doAlign) {
179+ quint8 d = *dest8 & ~alignMask;
180+ for (int i = alignStart; i >= alignStop; --i)
181+ d |= qt_convertToGray2<SRC>(*src++) << (2 * i);
182+ *dest8++ = d;
183+ }
184+ for (int i = 0; i < width8; ++i) {
185+ *dest8 = (qt_convertToGray2<SRC>(src[0]) << 6)
186+ | (qt_convertToGray2<SRC>(src[1]) << 4)
187+ | (qt_convertToGray2<SRC>(src[2]) << 2)
188+ | (qt_convertToGray2<SRC>(src[3]));
189+ src += 4;
190+ ++dest8;
191+ }
192+ if (doTail) {
193+ quint8 d = *dest8 & tailMask;
194+ switch (tailWidth) {
195+ case 3: d |= qt_convertToGray2<SRC>(src[2]) << 2;
196+ case 2: d |= qt_convertToGray2<SRC>(src[1]) << 4;
197+ case 1: d |= qt_convertToGray2<SRC>(src[0]) << 6;
198+ }
199+ *dest8 = d;
200+ }
201+
202+ dest8 += dstStride;
203+ src += srcStride;
204+ }
205+}
206+
207+template <>
208+void qt_rectconvert(qgray2 *dest, const quint32 *src,
209+ int x, int y, int width, int height,
210+ int dstStride, int srcStride)
211+{
212+ qt_rectconvert_gray2<quint32>(dest, src, x, y, width, height,
213+ dstStride, srcStride);
214+}
215+
216+template <>
217+void qt_rectconvert(qgray2 *dest, const quint16 *src,
218+ int x, int y, int width, int height,
219+ int dstStride, int srcStride)
220+{
221+ qt_rectconvert_gray2<quint16>(dest, src, x, y, width, height,
222+ dstStride, srcStride);
223+}
224+
225+template <>
226+void qt_rectconvert(qgray2 *dest, const qrgb444 *src,
227+ int x, int y, int width, int height,
228+ int dstStride, int srcStride)
229+{
230+ qt_rectconvert_gray2<qrgb444>(dest, src, x, y, width, height,
231+ dstStride, srcStride);
232+}
233+
234+template <>
235+void qt_rectconvert(qgray2 *dest, const qargb4444 *src,
236+ int x, int y, int width, int height,
237+ int dstStride, int srcStride)
238+{
239+ qt_rectconvert_gray2<qargb4444>(dest, src, x, y, width, height,
240+ dstStride, srcStride);
241+}
242+
243+static void blit_2(QScreen *screen, const QImage &image,
244+ const QPoint &topLeft, const QRegion &region)
245+{
246+ switch (image.format()) {
247+ case QImage::Format_ARGB32_Premultiplied:
248+ blit_template<qgray2, quint32>(screen, image, topLeft, region);
249+ return;
250+ case QImage::Format_RGB16:
251+ blit_template<qgray2, quint16>(screen, image, topLeft, region);
252+ return;
253+ case QImage::Format_RGB444:
254+ blit_template<qgray2, qrgb444>(screen, image, topLeft, region);
255+ return;
256+ case QImage::Format_ARGB4444_Premultiplied:
257+ blit_template<qgray2, qargb4444>(screen, image, topLeft, region);
258+ return;
259+ default:
260+ qCritical("blit_2(): Image format %d not supported!", image.format());
261+ }
262+}
263+#endif // QT_QWS_DEPTH_2
264+
265 #ifdef QT_QWS_DEPTH_1
266
267 struct qmono { quint8 dummy; } Q_PACKED;
268@@ -1206,6 +1406,11 @@
269 screen->d_ptr->blit = blit_4;
270 break;
271 #endif
272+#ifdef QT_QWS_DEPTH_2
273+ case 2:
274+ screen->d_ptr->blit = blit_2;
275+ break;
276+#endif
277 #ifdef QT_QWS_DEPTH_1
278 case 1:
279 screen->d_ptr->blit = blit_1;
280@@ -2056,6 +2261,8 @@
281 }
282 } else if (d == 4) {
283 ret = qGray(r, g, b) >> 4;
284+ } else if (d == 2) {
285+ ret = qGray(r, g, b) >> 6;
286 } else if (d == 1) {
287 ret = qGray(r, g, b) >= 128;
288 } else {
289@@ -2126,6 +2333,10 @@
290 } else if(d==1) {
291 return true;
292 #endif
293+#ifdef QT_QWS_DEPTH_2
294+ } else if(d==2) {
295+ return true;
296+#endif
297 #ifdef QT_QWS_DEPTH_4
298 } else if(d==4) {
299 return true;
diff --git a/meta/recipes-qt/qt4/files/0010-no-simpledecoration-example.patch b/meta/recipes-qt/qt4/files/0010-no-simpledecoration-example.patch
new file mode 100644
index 0000000000..e52736926f
--- /dev/null
+++ b/meta/recipes-qt/qt4/files/0010-no-simpledecoration-example.patch
@@ -0,0 +1,14 @@
1
2Ported from OE by: Yu Ke <ke.yu@intel.com>
3
4--- /tmp/qws.pro 2009-12-10 19:30:08.000000000 +0100
5+++ qt-everywhere-opensource-src-4.6.0/examples/qws/qws.pro 2009-12-10 19:30:21.000000000 +0100
6@@ -1,7 +1,7 @@
7 TEMPLATE = subdirs
8 # no /dev/fbX
9 !qnx:!vxworks:SUBDIRS = framebuffer
10-SUBDIRS += mousecalibration simpledecoration
11+SUBDIRS += mousecalibration
12
13 # install
14 sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS README *.pro
diff --git a/meta/recipes-qt/qt4/files/fix-config-tests.patch b/meta/recipes-qt/qt4/files/fix-config-tests.patch
new file mode 100644
index 0000000000..21054555bc
--- /dev/null
+++ b/meta/recipes-qt/qt4/files/fix-config-tests.patch
@@ -0,0 +1,36 @@
1Fix invocation in case of "ccache some-compiler-gcc". As the command "ccache some-compiler-gcc" will not exist but "ccache" will.
2
3both visibility and relocs were affected.
4
5Ported from OE by: Yu Ke <ke.yu@intel.com>
6
7Index: qt-x11-opensource-src-4.5.2/config.tests/unix/bsymbolic_functions.test
8===================================================================
9--- qt-x11-opensource-src-4.5.2.orig/config.tests/unix/bsymbolic_functions.test 2009-08-01 08:01:11.000000000 +0200
10+++ qt-x11-opensource-src-4.5.2/config.tests/unix/bsymbolic_functions.test 2009-08-01 08:01:16.000000000 +0200
11@@ -8,7 +8,7 @@
12 int main() { return 0; }
13 EOF
14
15-"$COMPILER" -o libtest.so -shared -Wl,-Bsymbolic-functions -fPIC bsymbolic_functions.c >/dev/null 2>&1 && BSYMBOLIC_FUNCTIONS_SUPPORT=yes
16+$COMPILER -o libtest.so -shared -Wl,-Bsymbolic-functions -fPIC bsymbolic_functions.c >/dev/null 2>&1 && BSYMBOLIC_FUNCTIONS_SUPPORT=yes
17 rm -f bsymbolic_functions.c libtest.so
18
19 # done
20Index: qt-x11-opensource-src-4.5.2/config.tests/unix/fvisibility.test
21===================================================================
22--- qt-x11-opensource-src-4.5.2.orig/config.tests/unix/fvisibility.test 2009-06-20 06:57:50.000000000 +0200
23+++ qt-x11-opensource-src-4.5.2/config.tests/unix/fvisibility.test 2009-08-01 07:59:05.000000000 +0200
24@@ -15,9 +15,9 @@
25 EOF
26
27 if [ "$VERBOSE" = "yes" ] ; then
28- "$COMPILER" -c -fvisibility=hidden fvisibility.c && FVISIBILITY_SUPPORT=yes
29+ $COMPILER -c -fvisibility=hidden fvisibility.c && FVISIBILITY_SUPPORT=yes
30 else
31- "$COMPILER" -c -fvisibility=hidden fvisibility.c >/dev/null 2>&1 && FVISIBILITY_SUPPORT=yes
32+ $COMPILER -c -fvisibility=hidden fvisibility.c >/dev/null 2>&1 && FVISIBILITY_SUPPORT=yes
33 fi
34 rm -f fvisibility.c fvisibility.o
35 }
36
diff --git a/meta/recipes-qt/qt4/files/g++.conf b/meta/recipes-qt/qt4/files/g++.conf
new file mode 100644
index 0000000000..4cd76e62ea
--- /dev/null
+++ b/meta/recipes-qt/qt4/files/g++.conf
@@ -0,0 +1,53 @@
1#
2# qmake configuration for common gcc
3#
4
5QMAKE_CC = $(OE_QMAKE_CC)
6QMAKE_CFLAGS += -pipe $(OE_QMAKE_CFLAGS)
7QMAKE_CFLAGS_DEPS += -M
8QMAKE_CFLAGS_WARN_ON += -Wall -W
9QMAKE_CFLAGS_WARN_OFF += -w
10QMAKE_CFLAGS_RELEASE +=
11QMAKE_CFLAGS_DEBUG += -g
12QMAKE_CFLAGS_SHLIB += -fPIC
13QMAKE_CFLAGS_STATIC_LIB += -fPIC
14QMAKE_CFLAGS_YACC += -Wno-unused -Wno-parentheses
15QMAKE_CFLAGS_HIDESYMS += -fvisibility=hidden
16QMAKE_CFLAGS_PRECOMPILE += -x c-header -c ${QMAKE_PCH_INPUT} -o ${QMAKE_PCH_OUTPUT}
17QMAKE_CFLAGS_USE_PRECOMPILE += -include ${QMAKE_PCH_OUTPUT_BASE}
18
19QMAKE_CXX = $(OE_QMAKE_CXX)
20QMAKE_CXXFLAGS += $$QMAKE_CFLAGS $(OE_QMAKE_CXXFLAGS)
21QMAKE_CXXFLAGS_DEPS += $$QMAKE_CFLAGS_DEPS
22QMAKE_CXXFLAGS_WARN_ON += $$QMAKE_CFLAGS_WARN_ON
23QMAKE_CXXFLAGS_WARN_OFF += $$QMAKE_CFLAGS_WARN_OFF
24QMAKE_CXXFLAGS_RELEASE += $$QMAKE_CFLAGS_RELEASE
25QMAKE_CXXFLAGS_DEBUG += $$QMAKE_CFLAGS_DEBUG
26QMAKE_CXXFLAGS_SHLIB += $$QMAKE_CFLAGS_SHLIB
27QMAKE_CXXFLAGS_STATIC_LIB += $$QMAKE_CFLAGS_STATIC_LIB
28QMAKE_CXXFLAGS_YACC += $$QMAKE_CFLAGS_YACC
29QMAKE_CXXFLAGS_HIDESYMS += $$QMAKE_CFLAGS_HIDESYMS -fvisibility-inlines-hidden
30QMAKE_CXXFLAGS_PRECOMPILE += -x c++-header -c ${QMAKE_PCH_INPUT} -o ${QMAKE_PCH_OUTPUT}
31QMAKE_CXXFLAGS_USE_PRECOMPILE = $$QMAKE_CFLAGS_USE_PRECOMPILE
32
33QMAKE_LINK = $(OE_QMAKE_LINK)
34QMAKE_LINK_SHLIB = $(OE_QMAKE_LINK)
35QMAKE_LFLAGS += $(OE_QMAKE_LDFLAGS)
36QMAKE_LFLAGS_RELEASE +=
37QMAKE_LFLAGS_DEBUG +=
38QMAKE_LFLAGS_APP +=
39QMAKE_LFLAGS_SHLIB += -shared
40QMAKE_LFLAGS_PLUGIN += $$QMAKE_LFLAGS_SHLIB
41QMAKE_LFLAGS_SONAME += -Wl,-soname,
42QMAKE_LFLAGS_THREAD +=
43QMAKE_LFLAGS_NOUNDEF += -Wl,--no-undefined
44QMAKE_RPATH = -Wl,-rpath-link,
45
46QMAKE_PCH_OUTPUT_EXT = .gch
47
48# -Bsymbolic-functions (ld) support
49QMAKE_LFLAGS_BSYMBOLIC_FUNC = -Wl,-Bsymbolic-functions
50QMAKE_LFLAGS_DYNAMIC_LIST = -Wl,--dynamic-list,
51
52# for the SDK
53isEmpty(QMAKE_QT_CONFIG):QMAKE_QT_CONFIG = $(OE_QMAKE_QT_CONFIG)
diff --git a/meta/recipes-qt/qt4/files/hack-out-pg_config.patch b/meta/recipes-qt/qt4/files/hack-out-pg_config.patch
new file mode 100644
index 0000000000..650ed7745e
--- /dev/null
+++ b/meta/recipes-qt/qt4/files/hack-out-pg_config.patch
@@ -0,0 +1,30 @@
1Hack to not use the pg_config of the host system which will add /usr/include
2
3pg_config is a native binary so using that when cross compiling
4will always fail. The commented out fix would do, but for OE
5our -platform and -xplatform is the same so we are actually not
6really cross compiling. Just comment out the test, we are passing
7the location to the postgres headers and if they are okay we
8will padd.
9
10Ported from OE by: Yu Ke <ke.yu@intel.com>
11
12Index: qt-embedded-linux-opensource-src-4.5.2/configure
13===================================================================
14--- qt-embedded-linux-opensource-src-4.5.2.orig/configure 2009-08-10 03:03:04.000000000 +0200
15+++ qt-embedded-linux-opensource-src-4.5.2/configure 2009-08-10 03:58:11.000000000 +0200
16@@ -4401,10 +4402,10 @@
17 ;;
18 psql)
19 if [ "$CFG_SQL_psql" != "no" ]; then
20- if "$WHICH" pg_config >/dev/null 2>&1; then
21- QT_CFLAGS_PSQL=`pg_config --includedir 2>/dev/null`
22- QT_LFLAGS_PSQL=`pg_config --libdir 2>/dev/null`
23- fi
24+# if [ "$QT_CROSS_COMPILE" = "no" ] && "$WHICH" pg_config >/dev/null 2>&1; then
25+# QT_CFLAGS_PSQL=`pg_config --includedir 2>/dev/null`
26+# QT_LFLAGS_PSQL=`pg_config --libdir 2>/dev/null`
27+# fi
28 [ -z "$QT_CFLAGS_PSQL" ] || QT_CFLAGS_PSQL="-I$QT_CFLAGS_PSQL"
29 [ -z "$QT_LFLAGS_PSQL" ] || QT_LFLAGS_PSQL="-L$QT_LFLAGS_PSQL"
30 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/psql "PostgreSQL" $QT_LFLAGS_PSQL $L_FLAGS $QT_CFLAGS_PSQL $I_FLAGS $l_FLAGS $MAC_ARCHS_COMMANDLINE; then
diff --git a/meta/recipes-qt/qt4/files/linux.conf b/meta/recipes-qt/qt4/files/linux.conf
new file mode 100644
index 0000000000..90b8d65aba
--- /dev/null
+++ b/meta/recipes-qt/qt4/files/linux.conf
@@ -0,0 +1,54 @@
1#
2# qmake configuration for common linux
3#
4
5QMAKE_CFLAGS_THREAD += -D_REENTRANT
6QMAKE_CXXFLAGS_THREAD += $$QMAKE_CFLAGS_THREAD
7
8QMAKE_INCDIR =
9QMAKE_LIBDIR =
10QMAKE_INCDIR_X11 =
11QMAKE_LIBDIR_X11 =
12QMAKE_INCDIR_QT = $(OE_QMAKE_INCDIR_QT)
13QMAKE_LIBDIR_QT = $(OE_QMAKE_LIBDIR_QT)
14QMAKE_INCDIR_OPENGL =
15QMAKE_LIBDIR_OPENGL =
16
17
18QMAKE_LIBS =
19QMAKE_LIBS_DYNLOAD = -ldl
20QMAKE_LIBS_X11 = $(OE_QMAKE_LIBS_X11)
21QMAKE_LIBS_X11SM = $(OE_QMAKE_LIBS_X11SM)
22QMAKE_LIBS_NIS = -lnsl
23QMAKE_LIBS_OPENGL = -lGLU -lGL
24QMAKE_LIBS_OPENGL_QT = -lGL
25QMAKE_LIBS_THREAD = -lpthread
26
27QMAKE_MOC = $(OE_QMAKE_MOC)
28QMAKE_UIC = $(OE_QMAKE_UIC)
29QMAKE_UIC3 = $(OE_QMAKE_UIC3)
30QMAKE_RCC = $(OE_QMAKE_RCC)
31QMAKE_QDBUSCPP2XML = $(OE_QMAKE_QDBUSCPP2XML)
32QMAKE_QDBUSXML2CPP = $(OE_QMAKE_QDBUSXML2CPP)
33
34QMAKE_AR = $(OE_QMAKE_AR) cqs
35QMAKE_OBJCOPY = objcopy
36QMAKE_RANLIB =
37
38QMAKE_TAR = tar -cf
39QMAKE_GZIP = gzip -9f
40
41QMAKE_COPY = cp -f
42QMAKE_COPY_FILE = $(COPY)
43QMAKE_COPY_DIR = $(COPY) -r
44QMAKE_MOVE = mv -f
45QMAKE_DEL_FILE = rm -f
46QMAKE_DEL_DIR = rmdir
47QMAKE_STRIP = $(OE_QMAKE_STRIP)
48QMAKE_STRIPFLAGS_LIB += --strip-unneeded
49QMAKE_CHK_DIR_EXISTS = test -d
50QMAKE_MKDIR = mkdir -p
51QMAKE_INSTALL_FILE = install -m 644 -p
52QMAKE_INSTALL_PROGRAM = install -m 755 -p
53
54include(unix.conf)
diff --git a/meta/recipes-qt/qt4/files/qt-config.patch b/meta/recipes-qt/qt4/files/qt-config.patch
new file mode 100644
index 0000000000..a31e7b3e2a
--- /dev/null
+++ b/meta/recipes-qt/qt4/files/qt-config.patch
@@ -0,0 +1,24 @@
1
2Ported from OE by: Yu Ke <ke.yu@intel.com>
3
4--- /tmp/qlibraryinfo.cpp 2008-08-02 17:16:41.000000000 +0200
5+++ qt-embedded-linux-opensource-src-4.4.1/src/corelib/global/qlibraryinfo.cpp 2008-08-02 17:17:42.000000000 +0200
6@@ -47,6 +47,7 @@
7 QT_BEGIN_NAMESPACE
8 extern QString qmake_libraryInfoFile();
9 QT_END_NAMESPACE
10+#include <stdlib.h>
11 #else
12 # include "qcoreapplication.h"
13 #endif
14@@ -113,6 +114,10 @@
15 #ifdef QT_BUILD_QMAKE
16 if(!QFile::exists(qtconfig))
17 qtconfig = qmake_libraryInfoFile();
18+ if (!QFile::exists(qtconfig)) {
19+ QByteArray config = getenv("QT_CONF_PATH");
20+ qtconfig = QFile::decodeName(config);
21+ }
22 #else
23 if (!QFile::exists(qtconfig) && QCoreApplication::instance()) {
24 #ifdef Q_OS_MAC