diff options
Diffstat (limited to 'meta/recipes-qt/qt4')
19 files changed, 1178 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 @@ | |||
1 | Add configure option "crossarch" for cross compiling | ||
2 | |||
3 | Ported from OE by: Yu Ke <ke.yu@intel.com> | ||
4 | |||
5 | Index: 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 @@ | |||
1 | From acfeb18aa94bad6b2066e91cd15570889baaa252 Mon Sep 17 00:00:00 2001 | ||
2 | From: Michael Krelin <hacker@klever.net> | ||
3 | Date: Sat, 2 Jun 2007 16:04:01 +0200 | ||
4 | Subject: [PATCH] fix resinit declaration | ||
5 | |||
6 | --- | ||
7 | src/qt3support/network/q3dns.cpp | 2 +- | ||
8 | 1 files changed, 1 insertions(+), 1 deletions(-) | ||
9 | |||
10 | Index: 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 @@ | |||
1 | From f5a73ce944240de9013cc23288c115e8213add5e Mon Sep 17 00:00:00 2001 | ||
2 | From: Michael Krelin <hacker@klever.net> | ||
3 | Date: Sat, 2 Jun 2007 16:06:59 +0200 | ||
4 | Subject: [PATCH] no qmake | ||
5 | |||
6 | qmake is already built in qt4-tools-native, so disable it | ||
7 | |||
8 | Ported from OE by: Yu Ke <ke.yu@intel.com> | ||
9 | |||
10 | --- | ||
11 | configure | 2 +- | ||
12 | 1 files changed, 1 insertions(+), 1 deletions(-) | ||
13 | |||
14 | Index: 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 @@ | |||
1 | From c9ab62bd9a56643574b3ae6e59e0ca776d4860d2 Mon Sep 17 00:00:00 2001 | ||
2 | From: Michael Krelin <hacker@klever.net> | ||
3 | Date: Mon, 4 Jun 2007 14:48:50 +0200 | ||
4 | Subject: [PATCH] freetype host includes | ||
5 | |||
6 | Host include path should not be used in corss compiling case. | ||
7 | |||
8 | Ported 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 | |||
14 | Index: 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 @@ | |||
1 | Add lib infix to distinguish different qt compile version: e.g. "E" for embedded, "" for X11 | ||
2 | |||
3 | Ported 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 @@ | |||
1 | Add 2bpp support | ||
2 | |||
3 | Ported from OE by: Yu Ke <ke.yu@intel.com> | ||
4 | |||
5 | diff -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 | ||
30 | diff -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; | ||
44 | diff -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 ®ion) | ||
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 ®ion) | ||
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 | |||
2 | Ported 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 @@ | |||
1 | Fix invocation in case of "ccache some-compiler-gcc". As the command "ccache some-compiler-gcc" will not exist but "ccache" will. | ||
2 | |||
3 | both visibility and relocs were affected. | ||
4 | |||
5 | Ported from OE by: Yu Ke <ke.yu@intel.com> | ||
6 | |||
7 | Index: 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 | ||
20 | Index: 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 | |||
5 | QMAKE_CC = $(OE_QMAKE_CC) | ||
6 | QMAKE_CFLAGS += -pipe $(OE_QMAKE_CFLAGS) | ||
7 | QMAKE_CFLAGS_DEPS += -M | ||
8 | QMAKE_CFLAGS_WARN_ON += -Wall -W | ||
9 | QMAKE_CFLAGS_WARN_OFF += -w | ||
10 | QMAKE_CFLAGS_RELEASE += | ||
11 | QMAKE_CFLAGS_DEBUG += -g | ||
12 | QMAKE_CFLAGS_SHLIB += -fPIC | ||
13 | QMAKE_CFLAGS_STATIC_LIB += -fPIC | ||
14 | QMAKE_CFLAGS_YACC += -Wno-unused -Wno-parentheses | ||
15 | QMAKE_CFLAGS_HIDESYMS += -fvisibility=hidden | ||
16 | QMAKE_CFLAGS_PRECOMPILE += -x c-header -c ${QMAKE_PCH_INPUT} -o ${QMAKE_PCH_OUTPUT} | ||
17 | QMAKE_CFLAGS_USE_PRECOMPILE += -include ${QMAKE_PCH_OUTPUT_BASE} | ||
18 | |||
19 | QMAKE_CXX = $(OE_QMAKE_CXX) | ||
20 | QMAKE_CXXFLAGS += $$QMAKE_CFLAGS $(OE_QMAKE_CXXFLAGS) | ||
21 | QMAKE_CXXFLAGS_DEPS += $$QMAKE_CFLAGS_DEPS | ||
22 | QMAKE_CXXFLAGS_WARN_ON += $$QMAKE_CFLAGS_WARN_ON | ||
23 | QMAKE_CXXFLAGS_WARN_OFF += $$QMAKE_CFLAGS_WARN_OFF | ||
24 | QMAKE_CXXFLAGS_RELEASE += $$QMAKE_CFLAGS_RELEASE | ||
25 | QMAKE_CXXFLAGS_DEBUG += $$QMAKE_CFLAGS_DEBUG | ||
26 | QMAKE_CXXFLAGS_SHLIB += $$QMAKE_CFLAGS_SHLIB | ||
27 | QMAKE_CXXFLAGS_STATIC_LIB += $$QMAKE_CFLAGS_STATIC_LIB | ||
28 | QMAKE_CXXFLAGS_YACC += $$QMAKE_CFLAGS_YACC | ||
29 | QMAKE_CXXFLAGS_HIDESYMS += $$QMAKE_CFLAGS_HIDESYMS -fvisibility-inlines-hidden | ||
30 | QMAKE_CXXFLAGS_PRECOMPILE += -x c++-header -c ${QMAKE_PCH_INPUT} -o ${QMAKE_PCH_OUTPUT} | ||
31 | QMAKE_CXXFLAGS_USE_PRECOMPILE = $$QMAKE_CFLAGS_USE_PRECOMPILE | ||
32 | |||
33 | QMAKE_LINK = $(OE_QMAKE_LINK) | ||
34 | QMAKE_LINK_SHLIB = $(OE_QMAKE_LINK) | ||
35 | QMAKE_LFLAGS += $(OE_QMAKE_LDFLAGS) | ||
36 | QMAKE_LFLAGS_RELEASE += | ||
37 | QMAKE_LFLAGS_DEBUG += | ||
38 | QMAKE_LFLAGS_APP += | ||
39 | QMAKE_LFLAGS_SHLIB += -shared | ||
40 | QMAKE_LFLAGS_PLUGIN += $$QMAKE_LFLAGS_SHLIB | ||
41 | QMAKE_LFLAGS_SONAME += -Wl,-soname, | ||
42 | QMAKE_LFLAGS_THREAD += | ||
43 | QMAKE_LFLAGS_NOUNDEF += -Wl,--no-undefined | ||
44 | QMAKE_RPATH = -Wl,-rpath-link, | ||
45 | |||
46 | QMAKE_PCH_OUTPUT_EXT = .gch | ||
47 | |||
48 | # -Bsymbolic-functions (ld) support | ||
49 | QMAKE_LFLAGS_BSYMBOLIC_FUNC = -Wl,-Bsymbolic-functions | ||
50 | QMAKE_LFLAGS_DYNAMIC_LIST = -Wl,--dynamic-list, | ||
51 | |||
52 | # for the SDK | ||
53 | isEmpty(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 @@ | |||
1 | Hack to not use the pg_config of the host system which will add /usr/include | ||
2 | |||
3 | pg_config is a native binary so using that when cross compiling | ||
4 | will always fail. The commented out fix would do, but for OE | ||
5 | our -platform and -xplatform is the same so we are actually not | ||
6 | really cross compiling. Just comment out the test, we are passing | ||
7 | the location to the postgres headers and if they are okay we | ||
8 | will padd. | ||
9 | |||
10 | Ported from OE by: Yu Ke <ke.yu@intel.com> | ||
11 | |||
12 | Index: 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 | |||
5 | QMAKE_CFLAGS_THREAD += -D_REENTRANT | ||
6 | QMAKE_CXXFLAGS_THREAD += $$QMAKE_CFLAGS_THREAD | ||
7 | |||
8 | QMAKE_INCDIR = | ||
9 | QMAKE_LIBDIR = | ||
10 | QMAKE_INCDIR_X11 = | ||
11 | QMAKE_LIBDIR_X11 = | ||
12 | QMAKE_INCDIR_QT = $(OE_QMAKE_INCDIR_QT) | ||
13 | QMAKE_LIBDIR_QT = $(OE_QMAKE_LIBDIR_QT) | ||
14 | QMAKE_INCDIR_OPENGL = | ||
15 | QMAKE_LIBDIR_OPENGL = | ||
16 | |||
17 | |||
18 | QMAKE_LIBS = | ||
19 | QMAKE_LIBS_DYNLOAD = -ldl | ||
20 | QMAKE_LIBS_X11 = $(OE_QMAKE_LIBS_X11) | ||
21 | QMAKE_LIBS_X11SM = $(OE_QMAKE_LIBS_X11SM) | ||
22 | QMAKE_LIBS_NIS = -lnsl | ||
23 | QMAKE_LIBS_OPENGL = -lGLU -lGL | ||
24 | QMAKE_LIBS_OPENGL_QT = -lGL | ||
25 | QMAKE_LIBS_THREAD = -lpthread | ||
26 | |||
27 | QMAKE_MOC = $(OE_QMAKE_MOC) | ||
28 | QMAKE_UIC = $(OE_QMAKE_UIC) | ||
29 | QMAKE_UIC3 = $(OE_QMAKE_UIC3) | ||
30 | QMAKE_RCC = $(OE_QMAKE_RCC) | ||
31 | QMAKE_QDBUSCPP2XML = $(OE_QMAKE_QDBUSCPP2XML) | ||
32 | QMAKE_QDBUSXML2CPP = $(OE_QMAKE_QDBUSXML2CPP) | ||
33 | |||
34 | QMAKE_AR = $(OE_QMAKE_AR) cqs | ||
35 | QMAKE_OBJCOPY = objcopy | ||
36 | QMAKE_RANLIB = | ||
37 | |||
38 | QMAKE_TAR = tar -cf | ||
39 | QMAKE_GZIP = gzip -9f | ||
40 | |||
41 | QMAKE_COPY = cp -f | ||
42 | QMAKE_COPY_FILE = $(COPY) | ||
43 | QMAKE_COPY_DIR = $(COPY) -r | ||
44 | QMAKE_MOVE = mv -f | ||
45 | QMAKE_DEL_FILE = rm -f | ||
46 | QMAKE_DEL_DIR = rmdir | ||
47 | QMAKE_STRIP = $(OE_QMAKE_STRIP) | ||
48 | QMAKE_STRIPFLAGS_LIB += --strip-unneeded | ||
49 | QMAKE_CHK_DIR_EXISTS = test -d | ||
50 | QMAKE_MKDIR = mkdir -p | ||
51 | QMAKE_INSTALL_FILE = install -m 644 -p | ||
52 | QMAKE_INSTALL_PROGRAM = install -m 755 -p | ||
53 | |||
54 | include(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 | |||
2 | Ported 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 | ||
diff --git a/meta/recipes-qt/qt4/qt-4.6.3.inc b/meta/recipes-qt/qt4/qt-4.6.3.inc new file mode 100644 index 0000000000..9f4e221bb5 --- /dev/null +++ b/meta/recipes-qt/qt4/qt-4.6.3.inc | |||
@@ -0,0 +1,65 @@ | |||
1 | LICENSE = "LGPLv2.1 | GPLv3" | ||
2 | LIC_FILES_CHKSUM = "file://LICENSE.LGPL;md5=fbc093901857fcd118f065f900982c24 \ | ||
3 | file://LICENSE.GPL3;md5=babc5b6b77441da277f5c06b2e547720 \ | ||
4 | file://LGPL_EXCEPTION.txt;md5=411080a56ff917a5a1aa08c98acae354" | ||
5 | |||
6 | SRC_URI = "http://get.qt.nokia.com/qt/source/qt-everywhere-opensource-src-${PV}.tar.gz \ | ||
7 | file://0001-cross-compile.patch \ | ||
8 | file://0002-fix-resinit-declaration.patch \ | ||
9 | file://0004-no-qmake.patch \ | ||
10 | file://0006-freetype-host-includes.patch \ | ||
11 | file://0008-qt-lib-infix.patch \ | ||
12 | file://0009-support-2bpp.patch \ | ||
13 | file://0010-no-simpledecoration-example.patch \ | ||
14 | file://fix-config-tests.patch \ | ||
15 | file://qt-config.patch \ | ||
16 | file://g++.conf \ | ||
17 | file://linux.conf \ | ||
18 | file://hack-out-pg_config.patch \ | ||
19 | " | ||
20 | |||
21 | S = "${WORKDIR}/qt-everywhere-opensource-src-${PV}" | ||
22 | |||
23 | do_configure_prepend() { | ||
24 | for pro in $(find ${S} -name "*.pro") ; do | ||
25 | sed -i 's:$$QT_BUILD_TREE/bin/lrelease:${OE_QMAKE_LRELEASE}:g' $pro | ||
26 | done | ||
27 | |||
28 | sed -i s:SEDME:${S}: ${WORKDIR}/linux.conf | ||
29 | sed -i \ | ||
30 | -e /QMAKE_MOC\ /d \ | ||
31 | -e /QMAKE_UIC\ /d \ | ||
32 | -e /QMAKE_UIC3\ /d \ | ||
33 | -e /QMAKE_RCC\ /d \ | ||
34 | ${S}/configure | ||
35 | } | ||
36 | |||
37 | do_configure_append() { | ||
38 | sed -e '/QMAKE_TARGET /d' -e '/TARGET /d' -i ${S}/translations/Makefile | ||
39 | } | ||
40 | |||
41 | QT_GLFLAGS ?= "" | ||
42 | QT_CONFIG_FLAGS += " -no-rpath -qt3support -silent ${QT_GLFLAGS}" | ||
43 | |||
44 | do_compile() { | ||
45 | # Fixup missing wsegl header in some SGX SDKs | ||
46 | if ! [ -e ${STAGING_INCDIR}/wsegl.h ] ; then | ||
47 | cp src/3rdparty/powervr/wsegl.h src/plugins/gfxdrivers/powervr/QWSWSEGL/ | ||
48 | fi | ||
49 | |||
50 | unset CFLAGS CXXFLAGS | ||
51 | oe_runmake ${EXTRA_ENV} | ||
52 | } | ||
53 | |||
54 | do_install_append() { | ||
55 | install -d ${D}${bindir} | ||
56 | for i in rcc uic moc ; do | ||
57 | install -m 0755 ${S}/bin/$i ${D}${bindir}/ | ||
58 | done | ||
59 | |||
60 | #Append an E to the qtdemo file | ||
61 | if [ -n "${QT_LIBINFIX}" ] ; then | ||
62 | mv ${D}${bindir}/qtdemo ${D}${bindir}/qtdemo${QT_LIBINFIX} | ||
63 | fi | ||
64 | } | ||
65 | |||
diff --git a/meta/recipes-qt/qt4/qt4-tools-native.inc b/meta/recipes-qt/qt4/qt4-tools-native.inc new file mode 100644 index 0000000000..7621d629f1 --- /dev/null +++ b/meta/recipes-qt/qt4/qt4-tools-native.inc | |||
@@ -0,0 +1,74 @@ | |||
1 | DESCRIPTION = "Native tools for Qt/[X11|Mac|Embedded] version 4.x" | ||
2 | DEPENDS = "zlib-native dbus-native libsm-native" | ||
3 | SECTION = "libs" | ||
4 | HOMEPAGE = "http://qt.nokia.com" | ||
5 | PRIORITY = "optional" | ||
6 | |||
7 | inherit native | ||
8 | |||
9 | SRC_URI = "http://get.qt.nokia.com/qt/source/qt-everywhere-opensource-src-${PV}.tar.gz \ | ||
10 | file://qt-config.patch \ | ||
11 | file://g++.conf \ | ||
12 | file://linux.conf" | ||
13 | S = "${WORKDIR}/qt-everywhere-opensource-src-${PV}" | ||
14 | |||
15 | EXTRA_OECONF = "-prefix ${prefix} \ | ||
16 | -L ${STAGING_LIBDIR_NATIVE} \ | ||
17 | -I ${STAGING_INCDIR_NATIVE} \ | ||
18 | -qt-libjpeg -qt-gif -system-zlib \ | ||
19 | -no-libjpeg -no-libpng \ | ||
20 | -no-accessibility \ | ||
21 | -no-cups \ | ||
22 | -no-exceptions \ | ||
23 | -no-nas-sound \ | ||
24 | -no-nis \ | ||
25 | -verbose -release -static \ | ||
26 | -qt3support" | ||
27 | |||
28 | # yank default -e, otherwise we get the following error: | ||
29 | # moc_qbuffer.cpp: No such file or directory | ||
30 | EXTRA_OEMAKE = " " | ||
31 | |||
32 | do_configure() { | ||
33 | (echo o; echo yes) | ./configure ${EXTRA_OECONF} || die "Configuring qt failed. EXTRA_OECONF was ${EXTRA_OECONF}" | ||
34 | } | ||
35 | |||
36 | TOBUILD = "\ | ||
37 | src/tools/moc \ | ||
38 | src/corelib \ | ||
39 | src/sql \ | ||
40 | src/dbus \ | ||
41 | src/qt3support \ | ||
42 | src/xml \ | ||
43 | src/tools/uic \ | ||
44 | src/tools/rcc \ | ||
45 | src/network \ | ||
46 | src/gui \ | ||
47 | src/tools/uic3 \ | ||
48 | tools/linguist/lrelease \ | ||
49 | tools/linguist/lupdate \ | ||
50 | tools/qdbus \ | ||
51 | " | ||
52 | |||
53 | do_compile() { | ||
54 | for i in ${TOBUILD}; do | ||
55 | cd ${S}/$i && oe_runmake CC="${CC}" CXX="${CXX}" | ||
56 | done | ||
57 | } | ||
58 | |||
59 | NATIVE_INSTALL_WORKS = "1" | ||
60 | |||
61 | do_install() { | ||
62 | install -d ${D}${bindir}/ | ||
63 | install -m 0755 bin/qmake ${D}${bindir}/qmake2 | ||
64 | for i in moc uic uic3 rcc lrelease lupdate qdbuscpp2xml qdbusxml2cpp; do | ||
65 | install -m 0755 bin/${i} ${D}${bindir}/${i}4 | ||
66 | done | ||
67 | |||
68 | install -d ${D}${datadir}/qt4/ | ||
69 | cp -PfR mkspecs ${D}${datadir}/qt4/ | ||
70 | ln -sf linux-g++ ${D}${datadir}/qt4/mkspecs/${BUILD_OS}-oe-g++ | ||
71 | cp -f ${WORKDIR}/g++.conf ${WORKDIR}/linux.conf ${D}${datadir}/qt4/mkspecs/common/ | ||
72 | |||
73 | install -m 0644 tools/porting/src/q3porting.xml ${D}${datadir}/qt4/ | ||
74 | } | ||
diff --git a/meta/recipes-qt/qt4/qt4-tools-native_4.6.3.bb b/meta/recipes-qt/qt4/qt4-tools-native_4.6.3.bb new file mode 100644 index 0000000000..de24b38dea --- /dev/null +++ b/meta/recipes-qt/qt4/qt4-tools-native_4.6.3.bb | |||
@@ -0,0 +1,11 @@ | |||
1 | require qt4-tools-native.inc | ||
2 | |||
3 | LICENSE = "LGPLv2.1 | GPLv3" | ||
4 | LIC_FILES_CHKSUM = "file://LICENSE.LGPL;md5=fbc093901857fcd118f065f900982c24 \ | ||
5 | file://LICENSE.GPL3;md5=babc5b6b77441da277f5c06b2e547720 \ | ||
6 | file://LGPL_EXCEPTION.txt;md5=411080a56ff917a5a1aa08c98acae354" | ||
7 | PR = "r0" | ||
8 | |||
9 | EXTRA_OECONF += " -no-fast -silent -no-rpath" | ||
10 | |||
11 | TOBUILD := "src/tools/bootstrap ${TOBUILD}" | ||
diff --git a/meta/recipes-qt/qt4/qt4-x11-free-4.6.3/linux.conf b/meta/recipes-qt/qt4/qt4-x11-free-4.6.3/linux.conf new file mode 100644 index 0000000000..68ae80b929 --- /dev/null +++ b/meta/recipes-qt/qt4/qt4-x11-free-4.6.3/linux.conf | |||
@@ -0,0 +1,54 @@ | |||
1 | # | ||
2 | # qmake configuration for common linux | ||
3 | # | ||
4 | |||
5 | QMAKE_CFLAGS_THREAD += -D_REENTRANT | ||
6 | QMAKE_CXXFLAGS_THREAD += $$QMAKE_CFLAGS_THREAD | ||
7 | |||
8 | QMAKE_INCDIR = | ||
9 | QMAKE_LIBDIR = | ||
10 | QMAKE_INCDIR_X11 = | ||
11 | QMAKE_LIBDIR_X11 = | ||
12 | QMAKE_INCDIR_QT = $(OE_QMAKE_INCDIR_QT) | ||
13 | QMAKE_LIBDIR_QT = $(OE_QMAKE_LIBDIR_QT) | ||
14 | QMAKE_INCDIR_OPENGL = | ||
15 | QMAKE_LIBDIR_OPENGL = | ||
16 | |||
17 | |||
18 | QMAKE_LIBS = -Wl,-rpath-link,SEDME/lib -lglib-2.0 | ||
19 | QMAKE_LIBS_DYNLOAD = -ldl | ||
20 | QMAKE_LIBS_X11 = $(OE_QMAKE_LIBS_X11) | ||
21 | QMAKE_LIBS_X11SM = $(OE_QMAKE_LIBS_X11SM) | ||
22 | QMAKE_LIBS_NIS = -lnsl | ||
23 | QMAKE_LIBS_OPENGL = -lGLU -lGL | ||
24 | QMAKE_LIBS_OPENGL_QT = -lGL | ||
25 | QMAKE_LIBS_THREAD = -lpthread | ||
26 | |||
27 | QMAKE_MOC = $(OE_QMAKE_MOC) | ||
28 | QMAKE_UIC = $(OE_QMAKE_UIC) | ||
29 | QMAKE_UIC3 = $(OE_QMAKE_UIC3) | ||
30 | QMAKE_RCC = $(OE_QMAKE_RCC) | ||
31 | QMAKE_QDBUSCPP2XML = $(OE_QMAKE_QDBUSCPP2XML) | ||
32 | QMAKE_QDBUSXML2CPP = $(OE_QMAKE_QDBUSXML2CPP) | ||
33 | |||
34 | QMAKE_AR = $(OE_QMAKE_AR) cqs | ||
35 | QMAKE_OBJCOPY = ${OBJCOPY} | ||
36 | QMAKE_RANLIB = | ||
37 | |||
38 | QMAKE_TAR = tar -cf | ||
39 | QMAKE_GZIP = gzip -9f | ||
40 | |||
41 | QMAKE_COPY = cp -f | ||
42 | QMAKE_COPY_FILE = $(COPY) | ||
43 | QMAKE_COPY_DIR = $(COPY) -r | ||
44 | QMAKE_MOVE = mv -f | ||
45 | QMAKE_DEL_FILE = rm -f | ||
46 | QMAKE_DEL_DIR = rmdir | ||
47 | QMAKE_STRIP = $(OE_QMAKE_STRIP) | ||
48 | QMAKE_STRIPFLAGS_LIB += --strip-unneeded | ||
49 | QMAKE_CHK_DIR_EXISTS = test -d | ||
50 | QMAKE_MKDIR = mkdir -p | ||
51 | QMAKE_INSTALL_FILE = install -m 644 -p | ||
52 | QMAKE_INSTALL_PROGRAM = install -m 755 -p | ||
53 | |||
54 | include(unix.conf) | ||
diff --git a/meta/recipes-qt/qt4/qt4-x11-free.inc b/meta/recipes-qt/qt4/qt4-x11-free.inc new file mode 100644 index 0000000000..352df1e5a7 --- /dev/null +++ b/meta/recipes-qt/qt4/qt4-x11-free.inc | |||
@@ -0,0 +1,14 @@ | |||
1 | require qt4.inc | ||
2 | |||
3 | SECTION = "x11/libs" | ||
4 | PRIORITY = "optional" | ||
5 | DEPENDS += "virtual/libx11 fontconfig libxft libxext libxrender libxrandr libxcursor" | ||
6 | |||
7 | QT_GLFLAGS ?= "-no-opengl" | ||
8 | QT_CONFIG_FLAGS += "-no-xinerama -no-xkb ${QT_GLFLAGS}" | ||
9 | QT_BASE_NAME ?= "qt4" | ||
10 | QT_BASE_LIB ?= "libqt" | ||
11 | QT_DIR_NAME = "qt4" | ||
12 | QT_LIBINFIX = "" | ||
13 | |||
14 | inherit qmake2 | ||
diff --git a/meta/recipes-qt/qt4/qt4-x11-free_4.6.3.bb b/meta/recipes-qt/qt4/qt4-x11-free_4.6.3.bb new file mode 100644 index 0000000000..e42f650c07 --- /dev/null +++ b/meta/recipes-qt/qt4/qt4-x11-free_4.6.3.bb | |||
@@ -0,0 +1,6 @@ | |||
1 | require qt4-x11-free.inc | ||
2 | require qt-4.6.3.inc | ||
3 | |||
4 | PR = "r0" | ||
5 | |||
6 | QT_CONFIG_FLAGS += " -xrandr " | ||
diff --git a/meta/recipes-qt/qt4/qt4.inc b/meta/recipes-qt/qt4/qt4.inc new file mode 100644 index 0000000000..16d5bebd36 --- /dev/null +++ b/meta/recipes-qt/qt4/qt4.inc | |||
@@ -0,0 +1,300 @@ | |||
1 | DESCRIPTION = "Qt is a comprehensive cross-platform C++ application framework" | ||
2 | HOMEPAGE = "http://qt.nokia.com" | ||
3 | |||
4 | DEPENDS += "qt4-tools-native freetype jpeg libpng zlib dbus openssl glib-2.0 gstreamer gst-plugins-base sqlite3" | ||
5 | |||
6 | inherit qmake_base | ||
7 | |||
8 | QT_CONFIG_FLAGS += "-release -no-cups -no-accessibility -reduce-relocations \ | ||
9 | -shared -no-nas-sound -no-sm -no-nis \ | ||
10 | -qt-gif -system-libjpeg -system-libpng -system-zlib \ | ||
11 | -no-sql-ibase -no-sql-mysql -no-sql-psql -no-sql-odbc -plugin-sql-sqlite \ | ||
12 | -no-pch -dbus -stl -glib -phonon -webkit" | ||
13 | |||
14 | EXTRA_OEMAKE = "-e" | ||
15 | |||
16 | EXTRA_ENV = 'QMAKE="${STAGING_BINDIR_NATIVE}/qmake2 -after \ | ||
17 | INCPATH+=${STAGING_INCDIR}/freetype2 LIBS+=-L${STAGING_LIBDIR}" \ | ||
18 | QMAKESPEC="${QMAKESPEC}" LINK="${CXX} -Wl,-rpath-link,${STAGING_LIBDIR}" \ | ||
19 | AR="${TARGET_PREFIX}ar cqs" \ | ||
20 | MOC="${STAGING_BINDIR_NATIVE}/moc4" UIC="${STAGING_BINDIR_NATIVE}/uic4" MAKE="make -e"' | ||
21 | |||
22 | export QT_CONF_PATH="${WORKDIR}/qt.conf" | ||
23 | |||
24 | # Library packages | ||
25 | QT_LIB_NAMES = "Qt3Support QtAssistantClient QtCLucene QtCore QtDBus QtDesigner QtDesignerComponents QtGui QtHelp QtNetwork QtOpenGL QtScript QtScriptTools QtSql QtSvg QtTest QtUiTools QtWebKit QtXml QtXmlPatterns phonon QtMultimedia QtOpenVG QtMediaServices" | ||
26 | |||
27 | QT_EXTRA_LIBS = "pvrQWSWSEGL" | ||
28 | |||
29 | python __anonymous () { | ||
30 | import bb | ||
31 | |||
32 | lib_packages = [] | ||
33 | dev_packages = [] | ||
34 | dbg_packages = [] | ||
35 | for name in bb.data.getVar("QT_LIB_NAMES", d, 1).split(): | ||
36 | pkg = "${QT_BASE_LIB}" + name.lower().replace("qt", "") + "4" | ||
37 | # NOTE: the headers for QtAssistantClient are different | ||
38 | incname = name.replace("QtAssistantClient", "QtAssistant") | ||
39 | bb.data.setVar("FILES_%s" % pkg, "${libdir}/lib%(name)s${QT_LIBINFIX}.so.*" % locals(), d) | ||
40 | bb.data.setVar("FILES_%s-dev" % pkg, """${libdir}/lib%(name)s${QT_LIBINFIX}.prl | ||
41 | ${libdir}/lib%(name)s${QT_LIBINFIX}.a | ||
42 | ${libdir}/lib%(name)s${QT_LIBINFIX}.la | ||
43 | ${libdir}/lib%(name)s${QT_LIBINFIX}.so | ||
44 | ${includedir}/${QT_DIR_NAME}/%(incname)s | ||
45 | ${libdir}/pkgconfig/%(name)s${QT_LIBINFIX}.pc""" % locals(), d) | ||
46 | bb.data.setVar("FILES_%s-dbg" % pkg, "${libdir}/.debug/lib%(name)s${QT_LIBINFIX}.so.*" % locals(), d) | ||
47 | lib_packages.append(pkg) | ||
48 | dev_packages.append("%s-dev" % pkg) | ||
49 | dbg_packages.append("%s-dbg" % pkg) | ||
50 | for name in bb.data.getVar("OTHER_PACKAGES", d, 1).split(): | ||
51 | dbg_packages.append("%s-dbg" % name) | ||
52 | |||
53 | for name in bb.data.getVar("QT_EXTRA_LIBS", d, 1).split(): | ||
54 | pkg = "${QT_BASE_LIB}" + name.lower().replace("qt", "") + "4" | ||
55 | bb.data.setVar("FILES_%s" % pkg, "${libdir}/lib%(name)s.so.*" % locals(), d) | ||
56 | bb.data.setVar("FILES_%s-dev" % pkg, """${libdir}/lib%(name)s.prl | ||
57 | ${libdir}/lib%(name)s.a | ||
58 | ${libdir}/lib%(name)s.la | ||
59 | ${libdir}/lib%(name)s.so | ||
60 | ${includedir}/${QT_DIR_NAME}/%(incname)s | ||
61 | ${libdir}/pkgconfig/%(name)s.pc""" % locals(), d) | ||
62 | bb.data.setVar("FILES_%s-dbg" % pkg, "${libdir}/.debug/lib%(name)s.so.*" % locals(), d) | ||
63 | lib_packages.append(pkg) | ||
64 | dev_packages.append("%s-dev" % pkg) | ||
65 | dbg_packages.append("%s-dbg" % pkg) | ||
66 | |||
67 | bb.data.setVar("LIB_PACKAGES", " ".join(lib_packages), d) | ||
68 | bb.data.setVar("DEV_PACKAGES", " ".join(dev_packages), d) | ||
69 | bb.data.setVar("DBG_PACKAGES", " ".join(dbg_packages), d) | ||
70 | } | ||
71 | |||
72 | OTHER_PACKAGES = "\ | ||
73 | ${QT_BASE_NAME}-tools \ | ||
74 | ${QT_BASE_NAME}-assistant \ | ||
75 | ${QT_BASE_NAME}-common \ | ||
76 | ${QT_BASE_NAME}-dbus \ | ||
77 | ${QT_BASE_NAME}-demos \ | ||
78 | ${QT_BASE_NAME}-designer \ | ||
79 | ${QT_BASE_NAME}-examples \ | ||
80 | ${QT_BASE_NAME}-fonts \ | ||
81 | ${QT_BASE_NAME}-fonts-ttf-vera \ | ||
82 | ${QT_BASE_NAME}-fonts-ttf-dejavu \ | ||
83 | ${QT_BASE_NAME}-fonts-pfa \ | ||
84 | ${QT_BASE_NAME}-fonts-pfb \ | ||
85 | ${QT_BASE_NAME}-fonts-qpf \ | ||
86 | ${QT_BASE_NAME}-linguist \ | ||
87 | ${QT_BASE_NAME}-makeqpf \ | ||
88 | ${QT_BASE_NAME}-mkspecs \ | ||
89 | ${QT_BASE_NAME}-pixeltool \ | ||
90 | ${QT_BASE_NAME}-qt3to4" | ||
91 | |||
92 | PACKAGES += "${LIB_PACKAGES} ${DEV_PACKAGES} ${DBG_PACKAGES} ${OTHER_PACKAGES}" | ||
93 | PACKAGES_DYNAMIC = "${QT_BASE_NAME}-plugin-* ${QT_BASE_NAME}-translation-* ${QT_BASE_NAME}-fonts-*" | ||
94 | |||
95 | ALLOW_EMPTY_${PN} = "1" | ||
96 | ALLOW_EMPTY_${QT_BASE_NAME}-fonts = "1" | ||
97 | FILES_${PN} = "" | ||
98 | FILES_${PN}-dev = "${includedir}/${QT_DIR_NAME}/Qt/*" | ||
99 | FILES_${PN}-dbg = "" | ||
100 | RRECOMMENDS_${PN} = "${LIB_PACKAGES} ${OTHER_PACKAGES}" | ||
101 | RRECOMMENDS_${PN}-dev = "${DEV_PACKAGES}" | ||
102 | RRECOMMENDS_${PN}-dbg = "${DBG_PACKAGES}" | ||
103 | RRECOMMENDS_${QT_BASE_NAME}-fonts = " \ | ||
104 | ${QT_BASE_NAME}-fonts-ttf-vera \ | ||
105 | ${QT_BASE_NAME}-fonts-ttf-dejavu \ | ||
106 | ${QT_BASE_NAME}-fonts-pfa \ | ||
107 | ${QT_BASE_NAME}-fonts-pfb \ | ||
108 | ${QT_BASE_NAME}-fonts-qpf" | ||
109 | |||
110 | FILES_${QT_BASE_NAME}-tools = "${bindir}/uic* ${bindir}/moc ${bindir}/rcc ${bindir}/qttracereplay ${bindir}/qdoc*" | ||
111 | FILES_${QT_BASE_NAME}-assistant = "${bindir}/*assistant* ${bindir}/qcollectiongenerator ${bindir}/qhelpconverter ${bindir}/qhelpgenerator" | ||
112 | FILES_${QT_BASE_NAME}-assistant-dbg = "${bindir}/.debug/*assistant* ${bindir}/.debug/qcollectiongenerator ${bindir}/.debug/qhelpconverter ${bindir}/.debug/qhelpgenerator" | ||
113 | FILES_${QT_BASE_NAME}-common = "${bindir}/qtconfig" | ||
114 | FILES_${QT_BASE_NAME}-common-dbg = "${bindir}/.debug/qtconfig" | ||
115 | FILES_${QT_BASE_NAME}-dbus = "${bindir}/qdbus ${bindir}/qdbusxml2cpp ${bindir}/qdbuscpp2xml ${bindir}/qdbusviewer" | ||
116 | FILES_${QT_BASE_NAME}-dbus-dbg = "${bindir}/.debug/qdbus ${bindir}/.debug/qdbusxml2cpp ${bindir}/.debug/qdbuscpp2xml ${bindir}/.debug/qdbusviewer" | ||
117 | FILES_${QT_BASE_NAME}-demos = "${bindir}/qtdemo* ${bindir}/${QT_DIR_NAME}/demos/*" | ||
118 | FILES_${QT_BASE_NAME}-demos-dbg = "${bindir}/.debug/qtdemo* ${bindir}/${QT_DIR_NAME}/demos/.debug/* ${bindir}/${QT_DIR_NAME}/demos/*/.debug ${bindir}/${QT_DIR_NAME}/demos/*/*/.debug ${bindir}/${QT_DIR_NAME}/demos/*/*/*/.debug" | ||
119 | FILES_${QT_BASE_NAME}-designer = "${bindir}/*designer*" | ||
120 | FILES_${QT_BASE_NAME}-designer-dbg = "${bindir}/.debug/*designer*" | ||
121 | FILES_${QT_BASE_NAME}-examples = "${bindir}/${QT_DIR_NAME}/examples/*" | ||
122 | FILES_${QT_BASE_NAME}-examples-dbg = "${bindir}/${QT_DIR_NAME}/examples/.debug ${bindir}/${QT_DIR_NAME}/examples/*/.debug ${bindir}/${QT_DIR_NAME}/examples/*/*/.debug ${bindir}/${QT_DIR_NAME}/examples/*/*/*/.debug ${bindir}/${QT_DIR_NAME}/examples/*/*/*/*/.debug" | ||
123 | FILES_${QT_BASE_NAME}-fonts-ttf-vera = "${libdir}/fonts/Vera*.ttf" | ||
124 | FILES_${QT_BASE_NAME}-fonts-ttf-dejavu = "${libdir}/fonts/DejaVu*.ttf" | ||
125 | FILES_${QT_BASE_NAME}-fonts-pfa = "${libdir}/fonts/*.pfa" | ||
126 | FILES_${QT_BASE_NAME}-fonts-pfb = "${libdir}/fonts/*.pfb" | ||
127 | FILES_${QT_BASE_NAME}-fonts-qpf = "${libdir}/fonts/*.qpf" | ||
128 | FILES_${QT_BASE_NAME}-linguist = "${bindir}/*linguist* ${bindir}/lrelease ${bindir}/lupdate ${bindir}/lconvert ${bindir}/qm2ts" | ||
129 | FILES_${QT_BASE_NAME}-linguist-dbg = "${bindir}/.debug/*linguist* ${bindir}/.debug/lrelease ${bindir}/.debug/lupdate ${bindir}/.debug/lconvert ${bindir}/.debug/qm2ts" | ||
130 | FILES_${QT_BASE_NAME}-pixeltool = "${bindir}/pixeltool" | ||
131 | FILES_${QT_BASE_NAME}-pixeltool-dbg = "${bindir}/.debug/pixeltool" | ||
132 | FILES_${QT_BASE_NAME}-qt3to4 = "${bindir}/qt3to4 ${datadir}/${QT_DIR_NAME}/q3porting.xml" | ||
133 | FILES_${QT_BASE_NAME}-qt3to4-dbg = "${bindir}/.debug/qt3to4" | ||
134 | FILES_${QT_BASE_NAME}-makeqpf = "${bindir}/makeqpf" | ||
135 | FILES_${QT_BASE_NAME}-makeqpf-dbg = "${bindir}/.debug/makeqpf" | ||
136 | FILES_${QT_BASE_NAME}-mkspecs = "${datadir}/${QT_DIR_NAME}/mkspecs/*" | ||
137 | |||
138 | ARM_INSTRUCTION_SET = "arm" | ||
139 | |||
140 | set_arch() { | ||
141 | case ${TARGET_ARCH} in | ||
142 | arm*) QT_ARCH=arm ;; | ||
143 | i*86*) QT_ARCH=i386 ;; | ||
144 | mips*) QT_ARCH=mips ;; | ||
145 | powerpc*) QT_ARCH=powerpc ;; | ||
146 | x86_64*) QT_ARCH=x86_64 ;; | ||
147 | esac | ||
148 | } | ||
149 | |||
150 | do_configure() { | ||
151 | unset QMAKESPEC | ||
152 | unset QTDIR | ||
153 | |||
154 | set_arch | ||
155 | |||
156 | if [ ! -e bin/qmake ]; then | ||
157 | ln -sf ${STAGING_BINDIR_NATIVE}/qmake2 bin/qmake | ||
158 | fi | ||
159 | |||
160 | if [ ! -e mkspecs/${TARGET_OS}-oe-g++ ]; then | ||
161 | ln -sf linux-g++ mkspecs/${TARGET_OS}-oe-g++ | ||
162 | fi | ||
163 | |||
164 | cp -f ${WORKDIR}/g++.conf ${WORKDIR}/linux.conf mkspecs/common/ | ||
165 | |||
166 | echo "[Paths]" > $QT_CONF_PATH | ||
167 | echo "Prefix=${prefix}/" >> $QT_CONF_PATH | ||
168 | echo "Documentation=${docdir}/${QT_DIR_NAME}" >> $QT_CONF_PATH | ||
169 | echo "Headers=${includedir}/${QT_DIR_NAME}" >> $QT_CONF_PATH | ||
170 | echo "Libraries=${libdir}" >> $QT_CONF_PATH | ||
171 | echo "Binaries=${bindir}" >> $QT_CONF_PATH | ||
172 | echo "Plugins=${libdir}/${QT_DIR_NAME}/plugins" >> $QT_CONF_PATH | ||
173 | echo "Data=${datadir}/${QT_DIR_NAME}" >> $QT_CONF_PATH | ||
174 | echo "Translations=${datadir}/${QT_DIR_NAME}/translations" >> $QT_CONF_PATH | ||
175 | echo "Settings=${sysconfdir}/${QT_DIR_NAME}" >> $QT_CONF_PATH | ||
176 | echo "Examples=${bindir}/${QT_DIR_NAME}/examples" >> $QT_CONF_PATH | ||
177 | echo "Demos=${bindir}/${QT_DIR_NAME}/demos" >> $QT_CONF_PATH | ||
178 | |||
179 | ${EXTRA_QMAKE_MUNGE}|| true | ||
180 | |||
181 | (echo o; echo yes) | ./configure -v \ | ||
182 | -prefix ${prefix}/ \ | ||
183 | -bindir ${bindir} \ | ||
184 | -libdir ${libdir} \ | ||
185 | -datadir ${datadir}/${QT_DIR_NAME} \ | ||
186 | -sysconfdir ${sysconfdir}/${QT_DIR_NAME} \ | ||
187 | -docdir ${docdir}/${QT_DIR_NAME} \ | ||
188 | -headerdir ${includedir}/${QT_DIR_NAME} \ | ||
189 | -plugindir ${libdir}/${QT_DIR_NAME}/plugins \ | ||
190 | -translationdir ${datadir}/${QT_DIR_NAME}/translations \ | ||
191 | -examplesdir ${bindir}/${QT_DIR_NAME}/examples \ | ||
192 | -demosdir ${bindir}/${QT_DIR_NAME}/demos \ | ||
193 | -platform ${TARGET_OS}-oe-g++ \ | ||
194 | -xplatform ${TARGET_OS}-oe-g++ \ | ||
195 | -crossarch ${QT_ARCH} \ | ||
196 | ${QT_CONFIG_FLAGS} -no-fast \ | ||
197 | -L${STAGING_LIBDIR} -I${STAGING_INCDIR} \ | ||
198 | -I${STAGING_INCDIR}/freetype2 | ||
199 | } | ||
200 | |||
201 | do_compile() { | ||
202 | unset CFLAGS CXXFLAGS | ||
203 | install -m 0755 ${STAGING_BINDIR_NATIVE}/rcc4 ${S}/bin/rcc | ||
204 | install -m 0755 ${STAGING_BINDIR_NATIVE}/moc4 ${S}/bin/moc | ||
205 | install -m 0755 ${STAGING_BINDIR_NATIVE}/uic4 ${S}/bin/uic | ||
206 | |||
207 | oe_runmake ${EXTRA_ENV} | ||
208 | } | ||
209 | |||
210 | python populate_packages_prepend() { | ||
211 | translation_dir = bb.data.expand('${datadir}/${QT_DIR_NAME}/translations/', d) | ||
212 | translation_name = bb.data.expand('${QT_BASE_NAME}-translation-%s', d) | ||
213 | do_split_packages(d, translation_dir, '^(assistant|designer|linguist|qt|qtconfig|qvfb)_(.*)\.qm$', translation_name, '${PN} translation for %s', extra_depends='' ) | ||
214 | |||
215 | phrasebook_dir = bb.data.expand('${datadir}/${QT_DIR_NAME}/phrasebooks/', d) | ||
216 | phrasebook_name = bb.data.expand('${QT_BASE_NAME}-phrasebook-%s', d) | ||
217 | do_split_packages(d, phrasebook_dir, '^(.*)\.qph$', phrasebook_name, '${PN} phrasebook for %s', extra_depends='' ) | ||
218 | |||
219 | # Package all the plugins and their -dbg version and create a meta package | ||
220 | import os | ||
221 | def qtopia_split(path, name, glob): | ||
222 | """ | ||
223 | Split the package into a normal and -dbg package and then add the | ||
224 | new packages to the meta package. | ||
225 | """ | ||
226 | plugin_dir = bb.data.expand('${libdir}/${QT_DIR_NAME}/plugins/%s/' % path, d) | ||
227 | if not os.path.exists("%s%s" % (bb.data.expand('${D}',d), plugin_dir)): | ||
228 | bb.note("The path does not exist:", bb.data.expand('${D}', d), plugin_dir) | ||
229 | return | ||
230 | |||
231 | plugin_name = bb.data.expand('${QT_BASE_NAME}-plugin-%s-%%s' % name, d) | ||
232 | dev_packages = [] | ||
233 | dev_hook = lambda file,pkg,b,c,d:dev_packages.append((file,pkg)) | ||
234 | do_split_packages(d, plugin_dir, glob, plugin_name, '${PN} %s for %%s' % name, extra_depends='', hook=dev_hook) | ||
235 | # Create a -dbg package as well | ||
236 | plugin_dir_dbg = bb.data.expand('${libdir}/${QT_DIR_NAME}/plugins/%s/.debug' % path, d) | ||
237 | packages = bb.data.getVar('PACKAGES',d) | ||
238 | for (file,package) in dev_packages: | ||
239 | packages = "%s %s-dbg" % (packages, package) | ||
240 | file_name = os.path.join(plugin_dir_dbg, os.path.basename(file)) | ||
241 | bb.data.setVar("FILES_%s-dbg" % package, file_name, d) | ||
242 | bb.data.setVar("DESCRIPTION_%s-dbg" % package, "${PN} %s for %s" % (name, package), d) | ||
243 | |||
244 | bb.data.setVar('PACKAGES', packages, d) | ||
245 | |||
246 | qtopia_split('accessible', 'accessible', '^libq(.*)\.so$') | ||
247 | qtopia_split('codecs', 'codec', '^libq(.*)\.so$') | ||
248 | qtopia_split('decorations', 'decoration', '^libqdecoration(.*)\.so$') | ||
249 | qtopia_split('designer', 'designer', '^lib(.*)\.so$') | ||
250 | qtopia_split('gfxdrivers', 'gfxdriver', '^libq(.*)\.so$') | ||
251 | qtopia_split('graphicssystems','graphicssystems', '^libq(.*)\.so$') | ||
252 | qtopia_split('mousedrivers', 'mousedriver', '^libq(.*)mousedriver\.so$') | ||
253 | qtopia_split('iconengines', 'iconengine', '^libq(.*)\.so$') | ||
254 | qtopia_split('imageformats', 'imageformat', '^libq(.*)\.so$') | ||
255 | qtopia_split('inputmethods', 'inputmethod', '^libq(.*)\.so$') | ||
256 | qtopia_split('sqldrivers', 'sqldriver', '^libq(.*)\.so$') | ||
257 | qtopia_split('script', 'script', '^libqtscript(.*)\.so$') | ||
258 | qtopia_split('styles', 'style', '^libq(.*)\.so$') | ||
259 | qtopia_split('phonon_backend','phonon-backend','^libphonon_(.*)\.so$') | ||
260 | } | ||
261 | |||
262 | do_install() { | ||
263 | oe_runmake install INSTALL_ROOT=${D} | ||
264 | |||
265 | # These are host binaries, we should only use them in staging | ||
266 | rm -rf ${D}/${bindir}/qmake | ||
267 | |||
268 | # fix pkgconfig, libtool and prl files | ||
269 | sed -i -e s#-L${S}/lib##g \ | ||
270 | -e s#-L${STAGING_LIBDIR}##g \ | ||
271 | -e 's#STAGING_LIBDIR}#libdir}'#g \ | ||
272 | -e s#-L${libdir}##g \ | ||
273 | -e s#'$(OE_QMAKE_LIBS_X11)'#"${OE_QMAKE_LIBS_X11}"#g \ | ||
274 | -e s#" -Wl,-rpath-link,${S}/lib"##g \ | ||
275 | -e s#" -Wl,-rpath-link,${libdir}"##g \ | ||
276 | -e 's#I/usr/include#Iincludedir}#g' \ | ||
277 | -e 's#Iin#I${in#g' \ | ||
278 | ${D}${libdir}/*.la ${D}${libdir}/*.prl ${D}${libdir}/pkgconfig/*.pc | ||
279 | |||
280 | sed -i -e s#" -Wl,-rpath-link,${S}/lib"##g \ | ||
281 | ${D}${datadir}/${QT_DIR_NAME}/mkspecs/common/linux.conf | ||
282 | |||
283 | # fix pkgconfig files | ||
284 | sed -i -e s#"moc_location=.*$"#"moc_location=${bindir}/moc4"# \ | ||
285 | -e s#"uic_location=.*$"#"uic_location=${bindir}/uic4"# \ | ||
286 | ${D}${libdir}/pkgconfig/*.pc | ||
287 | for name in ${QT_LIB_NAMES}; do | ||
288 | sed -i -e /Requires/s#"${name}"#"${name}${QT_LIBINFIX}"#g ${D}${libdir}/pkgconfig/*.pc | ||
289 | done | ||
290 | |||
291 | # QT abuses $includedir to point to its headers, which breaks pkgconfig sysroot, so manually fix it up here: | ||
292 | for pc in ${D}${libdir}/pkgconfig/*.pc ; do | ||
293 | sed -i -e "s:prefix}include/${QT_BASE_NAME}/$(basename $pc .pc):prefix}/include:" \ | ||
294 | -e "s,Cflags: ,Cflags: -IP{includedir}/${QT_BASE_NAME}/$(basename $pc .pc) ," \ | ||
295 | -e 's:IP{:I${:g' $pc | ||
296 | done | ||
297 | |||
298 | install -d ${D}/${libdir}/fonts | ||
299 | touch ${D}/${libdir}/fonts/fontdir | ||
300 | } | ||