summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKoen Kooi <koen@dominion.thruhere.net>2011-01-03 11:03:36 +0100
committerKoen Kooi <koen@dominion.thruhere.net>2011-01-03 12:04:28 +0100
commit1ec312f314343f287956dcab5482571039a94ff1 (patch)
tree604453191dd176e0b53f42eb538be017496235b7
parent63057a32d7b877c39b85eb3e9168c6fd7e4ce579 (diff)
downloadmeta-openembedded-1ec312f314343f287956dcab5482571039a94ff1.tar.gz
qt4: import files from OE
This gives us both qt4-x11 and qt4-embedded; qt4-x11 was already present in yocto, but was lacking features Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
-rw-r--r--classes/qt4e.bbclass17
-rw-r--r--classes/qt4x11.bbclass9
-rw-r--r--recipes-qt/qt4/files/0001-cross-compile.patch32
-rw-r--r--recipes-qt/qt4/files/0001-fix-mkspecs.patch102
-rw-r--r--recipes-qt/qt4/files/0002-fix-resinit-declaration.patch22
-rw-r--r--recipes-qt/qt4/files/0004-no-qmake.patch22
-rw-r--r--recipes-qt/qt4/files/0006-freetype-host-includes.patch24
-rw-r--r--recipes-qt/qt4/files/0008-qt-lib-infix.patch36
-rw-r--r--recipes-qt/qt4/files/0009-support-2bpp.patch295
-rw-r--r--recipes-qt/qt4/files/0010-no-simpledecoration-example.patch14
-rw-r--r--recipes-qt/qt4/files/common.pro108
-rw-r--r--recipes-qt/qt4/files/compile.test-lflags.patch13
-rw-r--r--recipes-qt/qt4/files/configure-lflags.patch13
-rw-r--r--recipes-qt/qt4/files/fix-config-tests.patch34
-rw-r--r--recipes-qt/qt4/files/g++.conf53
-rw-r--r--recipes-qt/qt4/files/hack-out-pg_config.patch30
-rw-r--r--recipes-qt/qt4/files/linux-oe-qmake.conf82
-rw-r--r--recipes-qt/qt4/files/linux.conf54
-rw-r--r--recipes-qt/qt4/files/mips-relocate.patch28
-rw-r--r--recipes-qt/qt4/files/qmake-hack.diff15
-rw-r--r--recipes-qt/qt4/files/qt-config.patch21
-rw-r--r--recipes-qt/qt4/files/qte.sh7
-rw-r--r--recipes-qt/qt4/files/use-lflags-last.patch22
-rw-r--r--recipes-qt/qt4/qmake2_2.10a.bb2
-rw-r--r--recipes-qt/qt4/qt-4.6.0/.1165-NEON-configure-detection-and-initial-blend-function-.patch.swpbin0 -> 16384 bytes
-rw-r--r--recipes-qt/qt4/qt-4.6.3.inc76
-rw-r--r--recipes-qt/qt4/qt-4.7.1.inc76
-rw-r--r--recipes-qt/qt4/qt-4.7.1/0001-Added-Openembedded-crossarch-option.patch44
-rw-r--r--recipes-qt/qt4/qt-4.7.1/g++.conf60
-rw-r--r--recipes-qt/qt4/qt-4.7.1/hack-out-pg2-4.7.0.patch19
-rw-r--r--recipes-qt/qt4/qt-4.7.1/linux.conf66
-rw-r--r--recipes-qt/qt4/qt4-embedded-4.6.3/0006-freetype-host-includes.patch20
-rw-r--r--recipes-qt/qt4/qt4-embedded-4.6.3/0008-qt-lib-infix.patch32
-rw-r--r--recipes-qt/qt4/qt4-embedded-4.6.3/0010-no-simpledecoration-example.patch11
-rw-r--r--recipes-qt/qt4/qt4-embedded-4.6.3/linux.conf54
-rw-r--r--recipes-qt/qt4/qt4-embedded.inc51
-rw-r--r--recipes-qt/qt4/qt4-embedded/0006-freetype-host-includes.patch20
-rw-r--r--recipes-qt/qt4/qt4-embedded_4.6.3.bb7
-rw-r--r--recipes-qt/qt4/qt4-embedded_4.7.1.bb14
-rw-r--r--recipes-qt/qt4/qt4-tools-native.inc77
-rw-r--r--recipes-qt/qt4/qt4-tools-native_4.6.3.bb18
-rw-r--r--recipes-qt/qt4/qt4-tools-native_4.7.1.bb21
-rw-r--r--recipes-qt/qt4/qt4-tools-sdk.inc88
-rw-r--r--recipes-qt/qt4/qt4-tools-sdk_4.6.3.bb90
-rw-r--r--recipes-qt/qt4/qt4-tools-sdk_4.7.1.bb8
-rw-r--r--recipes-qt/qt4/qt4-x11-free-4.6.3/linux.conf54
-rw-r--r--recipes-qt/qt4/qt4-x11-free.inc36
-rw-r--r--recipes-qt/qt4/qt4-x11-free_4.6.3.bb9
-rw-r--r--recipes-qt/qt4/qt4.inc301
-rw-r--r--recipes-qt/qt4/qt4_arch.inc25
50 files changed, 2331 insertions, 1 deletions
diff --git a/classes/qt4e.bbclass b/classes/qt4e.bbclass
new file mode 100644
index 0000000000..303b79b8a6
--- /dev/null
+++ b/classes/qt4e.bbclass
@@ -0,0 +1,17 @@
1DEPENDS_prepend = "${@["qt4-embedded ", ""][(bb.data.getVar('PN', d, 1)[:12] == 'qt4-embedded')]}"
2inherit qmake2
3
4QT_DIR_NAME = "qtopia"
5QT_LIBINFIX = "E"
6# override variables set by qmake-base to compile Qt/Embedded apps
7#
8export QMAKESPEC = "${STAGING_DATADIR}/${QT_DIR_NAME}/mkspecs/${TARGET_OS}-oe-g++"
9export OE_QMAKE_INCDIR_QT = "${STAGING_INCDIR}/${QT_DIR_NAME}"
10export OE_QMAKE_LIBDIR_QT = "${STAGING_LIBDIR}"
11export OE_QMAKE_LIBS_QT = "qt"
12export OE_QMAKE_LIBS_X11 = ""
13export OE_QMAKE_EXTRA_MODULES = "network"
14EXTRA_QMAKEVARS_PRE += " QT_LIBINFIX=${QT_LIBINFIX} "
15
16# Qt4 uses atomic instructions not supported in thumb mode
17ARM_INSTRUCTION_SET = "arm"
diff --git a/classes/qt4x11.bbclass b/classes/qt4x11.bbclass
new file mode 100644
index 0000000000..abb1d9d2e4
--- /dev/null
+++ b/classes/qt4x11.bbclass
@@ -0,0 +1,9 @@
1DEPENDS_prepend = "${@["qt4-x11-free ", ""][(bb.data.getVar('PN', d, 1)[:12] == 'qt4-x11-free')]}"
2
3inherit qmake2
4
5QT_DIR_NAME = "qt4"
6QT_LIBINFIX = ""
7
8# Qt4 uses atomic instructions not supported in thumb mode
9ARM_INSTRUCTION_SET = "arm"
diff --git a/recipes-qt/qt4/files/0001-cross-compile.patch b/recipes-qt/qt4/files/0001-cross-compile.patch
new file mode 100644
index 0000000000..0cf1b8c304
--- /dev/null
+++ b/recipes-qt/qt4/files/0001-cross-compile.patch
@@ -0,0 +1,32 @@
1Index: qt-embedded-linux-opensource-src-4.4.3/configure
2===================================================================
3--- qt-embedded-linux-opensource-src-4.4.3.orig/configure 2009-03-26 17:02:45.000000000 +0100
4+++ qt-embedded-linux-opensource-src-4.4.3/configure 2009-03-26 17:03:43.000000000 +0100
5@@ -726,7 +726,7 @@
6 UNKNOWN_ARG=yes
7 fi
8 ;;
9- -prefix|-docdir|-headerdir|-plugindir|-datadir|-libdir|-bindir|-translationdir|-sysconfdir|-examplesdir|-demosdir|-depths|-make|-nomake|-platform|-xplatform|-buildkey|-sdk|-arch|-host-arch|-mysql_config)
10+ -prefix|-docdir|-headerdir|-plugindir|-datadir|-libdir|-bindir|-translationdir|-sysconfdir|-examplesdir|-demosdir|-depths|-make|-nomake|-platform|-xplatform|-buildkey|-sdk|-arch|-host-arch|-mysql_config|-crossarch)
11 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
12 shift
13 VAL="$1"
14@@ -1143,6 +1143,9 @@
15 xplatform)
16 XPLATFORM="$VAL"
17 ;;
18+ crossarch)
19+ CROSSARCH="$VAL"
20+ ;;
21 debug-and-release)
22 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
23 CFG_DEBUG_RELEASE="$VAL"
24@@ -2405,6 +2408,8 @@
25 CFG_ARCH=$CFG_HOST_ARCH
26 fi
27
28+CFG_ARCH="$CROSSARCH"
29+
30 if [ -d "$relpath/src/corelib/arch/$CFG_ARCH" ]; then
31 if [ "$OPT_VERBOSE" = "yes" ]; then
32 echo " '$CFG_ARCH' is supported"
diff --git a/recipes-qt/qt4/files/0001-fix-mkspecs.patch b/recipes-qt/qt4/files/0001-fix-mkspecs.patch
new file mode 100644
index 0000000000..0fccb57c04
--- /dev/null
+++ b/recipes-qt/qt4/files/0001-fix-mkspecs.patch
@@ -0,0 +1,102 @@
1--- /tmp/g++.conf 2008-07-08 10:32:18.000000000 +0200
2+++ qt-embedded-linux-opensource-src-4.4.0/mkspecs/common/g++.conf 2008-07-08 10:34:15.000000000 +0200
3@@ -2,12 +2,12 @@
4 # qmake configuration for common gcc
5 #
6
7-QMAKE_CC = gcc
8-QMAKE_CFLAGS += -pipe
9+QMAKE_CC = $(OE_QMAKE_CC)
10+QMAKE_CFLAGS += -pipe $(OE_QMAKE_CFLAGS)
11 QMAKE_CFLAGS_DEPS += -M
12 QMAKE_CFLAGS_WARN_ON += -Wall -W
13 QMAKE_CFLAGS_WARN_OFF += -w
14-QMAKE_CFLAGS_RELEASE += -O2
15+QMAKE_CFLAGS_RELEASE +=
16 QMAKE_CFLAGS_DEBUG += -g
17 QMAKE_CFLAGS_SHLIB += -fPIC
18 QMAKE_CFLAGS_STATIC_LIB += -fPIC
19@@ -16,8 +16,8 @@
20 QMAKE_CFLAGS_PRECOMPILE += -x c-header -c ${QMAKE_PCH_INPUT} -o ${QMAKE_PCH_OUTPUT}
21 QMAKE_CFLAGS_USE_PRECOMPILE += -include ${QMAKE_PCH_OUTPUT_BASE}
22
23-QMAKE_CXX = g++
24-QMAKE_CXXFLAGS += $$QMAKE_CFLAGS
25+QMAKE_CXX = $(OE_QMAKE_CXX)
26+QMAKE_CXXFLAGS += $$QMAKE_CFLAGS $(OE_QMAKE_CXXFLAGS)
27 QMAKE_CXXFLAGS_DEPS += $$QMAKE_CFLAGS_DEPS
28 QMAKE_CXXFLAGS_WARN_ON += $$QMAKE_CFLAGS_WARN_ON
29 QMAKE_CXXFLAGS_WARN_OFF += $$QMAKE_CFLAGS_WARN_OFF
30@@ -30,9 +30,9 @@
31 QMAKE_CXXFLAGS_PRECOMPILE += -x c++-header -c ${QMAKE_PCH_INPUT} -o ${QMAKE_PCH_OUTPUT}
32 QMAKE_CXXFLAGS_USE_PRECOMPILE = $$QMAKE_CFLAGS_USE_PRECOMPILE
33
34-QMAKE_LINK = g++
35-QMAKE_LINK_SHLIB = g++
36-QMAKE_LFLAGS +=
37+QMAKE_LINK = $(OE_QMAKE_LINK)
38+QMAKE_LINK_SHLIB = $(OE_QMAKE_LINK)
39+QMAKE_LFLAGS += $(OE_QMAKE_LDFLAGS)
40 QMAKE_LFLAGS_RELEASE +=
41 QMAKE_LFLAGS_DEBUG +=
42 QMAKE_LFLAGS_APP +=
43@@ -41,7 +41,7 @@
44 QMAKE_LFLAGS_SONAME += -Wl,-soname,
45 QMAKE_LFLAGS_THREAD +=
46 QMAKE_LFLAGS_NOUNDEF += -Wl,--no-undefined
47-QMAKE_RPATH = -Wl,-rpath,
48+QMAKE_RPATH = -Wl,-rpath-link,
49
50 QMAKE_PCH_OUTPUT_EXT = .gch
51
52--- /tmp/linux.conf 2008-07-08 10:32:18.000000000 +0200
53+++ qt-embedded-linux-opensource-src-4.4.0/mkspecs/common/linux.conf 2008-07-08 10:38:37.000000000 +0200
54@@ -7,26 +7,28 @@
55
56 QMAKE_INCDIR =
57 QMAKE_LIBDIR =
58-QMAKE_INCDIR_X11 = /usr/X11R6/include
59-QMAKE_LIBDIR_X11 = /usr/X11R6/lib
60-QMAKE_INCDIR_QT = $$[QT_INSTALL_HEADERS]
61-QMAKE_LIBDIR_QT = $$[QT_INSTALL_LIBS]
62-QMAKE_INCDIR_OPENGL = /usr/X11R6/include
63-QMAKE_LIBDIR_OPENGL = /usr/X11R6/lib
64+QMAKE_INCDIR_X11 =
65+QMAKE_LIBDIR_X11 =
66+QMAKE_INCDIR_QT = $(OE_QMAKE_INCDIR_QT)
67+QMAKE_LIBDIR_QT = $(OE_QMAKE_LIBDIR_QT)
68+QMAKE_INCDIR_OPENGL =
69+QMAKE_LIBDIR_OPENGL =
70+
71
72 QMAKE_LIBS =
73 QMAKE_LIBS_DYNLOAD = -ldl
74-QMAKE_LIBS_X11 = -lXext -lX11 -lm
75-QMAKE_LIBS_X11SM = -lSM -lICE
76+QMAKE_LIBS_X11 = $(OE_QMAKE_LIBS_X11)
77+QMAKE_LIBS_X11SM = $(OE_QMAKE_LIBS_X11SM)
78 QMAKE_LIBS_NIS = -lnsl
79 QMAKE_LIBS_OPENGL = -lGLU -lGL
80 QMAKE_LIBS_OPENGL_QT = -lGL
81 QMAKE_LIBS_THREAD = -lpthread
82
83-QMAKE_MOC = $$[QT_INSTALL_BINS]/moc
84-QMAKE_UIC = $$[QT_INSTALL_BINS]/uic
85+QMAKE_MOC = $(OE_QMAKE_MOC)
86+QMAKE_UIC = $(OE_QMAKE_UIC)
87+QMAKE_RCC = $(OE_QMAKE_RCC)
88
89-QMAKE_AR = ar cqs
90+QMAKE_AR = $(OE_QMAKE_AR) cqs
91 QMAKE_OBJCOPY = objcopy
92 QMAKE_RANLIB =
93
94@@ -39,7 +40,7 @@
95 QMAKE_MOVE = mv -f
96 QMAKE_DEL_FILE = rm -f
97 QMAKE_DEL_DIR = rmdir
98-QMAKE_STRIP = strip
99+QMAKE_STRIP = $(OE_QMAKE_STRIP)
100 QMAKE_STRIPFLAGS_LIB += --strip-unneeded
101 QMAKE_CHK_DIR_EXISTS = test -d
102 QMAKE_MKDIR = mkdir -p
diff --git a/recipes-qt/qt4/files/0002-fix-resinit-declaration.patch b/recipes-qt/qt4/files/0002-fix-resinit-declaration.patch
new file mode 100644
index 0000000000..be4d5c0e22
--- /dev/null
+++ b/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/recipes-qt/qt4/files/0004-no-qmake.patch b/recipes-qt/qt4/files/0004-no-qmake.patch
new file mode 100644
index 0000000000..86613587a1
--- /dev/null
+++ b/recipes-qt/qt4/files/0004-no-qmake.patch
@@ -0,0 +1,22 @@
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
6---
7 configure | 2 +-
8 1 files changed, 1 insertions(+), 1 deletions(-)
9
10Index: qt-embedded-linux-opensource-src-4.4.3/configure
11===================================================================
12--- qt-embedded-linux-opensource-src-4.4.3.orig/configure 2009-03-26 17:03:43.000000000 +0100
13+++ qt-embedded-linux-opensource-src-4.4.3/configure 2009-03-26 17:04:17.000000000 +0100
14@@ -3786,7 +3786,7 @@
15 }
16
17 # build qmake
18-if true; then ###[ '!' -f "$outpath/bin/qmake" ];
19+if false; then ###[ '!' -f "$outpath/bin/qmake" ];
20 echo "Creating qmake. Please wait..."
21
22 OLD_QCONFIG_H=
diff --git a/recipes-qt/qt4/files/0006-freetype-host-includes.patch b/recipes-qt/qt4/files/0006-freetype-host-includes.patch
new file mode 100644
index 0000000000..081d8992ef
--- /dev/null
+++ b/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/recipes-qt/qt4/files/0008-qt-lib-infix.patch b/recipes-qt/qt4/files/0008-qt-lib-infix.patch
new file mode 100644
index 0000000000..a1b89124dd
--- /dev/null
+++ b/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/recipes-qt/qt4/files/0009-support-2bpp.patch b/recipes-qt/qt4/files/0009-support-2bpp.patch
new file mode 100644
index 0000000000..82506bcbec
--- /dev/null
+++ b/recipes-qt/qt4/files/0009-support-2bpp.patch
@@ -0,0 +1,295 @@
1diff -urN qt-embedded-linux-opensource-src-4.4.3.orig/configure qt-embedded-linux-opensource-src-4.4.3/configure
2--- qt-embedded-linux-opensource-src-4.4.3.orig/configure 2008-09-27 11:01:23.000000000 +0200
3+++ qt-embedded-linux-opensource-src-4.4.3/configure 2009-01-14 14:30:53.000000000 +0100
4@@ -5045,6 +5045,7 @@
5 echo "Choose pixel-depths to support:"
6 echo
7 echo " 1. 1bpp, black/white"
8+ echo " 2. 2bpp, grayscale"
9 echo " 4. 4bpp, grayscale"
10 echo " 8. 8bpp, paletted"
11 echo " 12. 12bpp, rgb 4-4-4"
12@@ -5063,11 +5064,11 @@
13 fi
14 if [ -n "$CFG_QWS_DEPTHS" -a "$PLATFORM_QWS" = "yes" ]; then
15 if [ "$CFG_QWS_DEPTHS" = "all" ]; then
16- CFG_QWS_DEPTHS="1 4 8 12 15 16 18 24 32 generic"
17+ CFG_QWS_DEPTHS="1 2 4 8 12 15 16 18 24 32 generic"
18 fi
19 for D in `echo "$CFG_QWS_DEPTHS" | sed -e 's/,/ /g'`; do
20 case $D in
21- 1|4|8|12|15|16|18|24|32) QCONFIG_FLAGS="$QCONFIG_FLAGS QT_QWS_DEPTH_$D";;
22+ 1|2|4|8|12|15|16|18|24|32) QCONFIG_FLAGS="$QCONFIG_FLAGS QT_QWS_DEPTH_$D";;
23 generic) QCONFIG_FLAGS="$QCONFIG_FLAGS QT_QWS_DEPTH_GENERIC";;
24 esac
25 done
26diff -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
27--- qt-embedded-linux-opensource-src-4.4.3.orig/src/gui/embedded/qscreenlinuxfb_qws.cpp 2008-09-27 11:01:28.000000000 +0200
28+++ qt-embedded-linux-opensource-src-4.4.3/src/gui/embedded/qscreenlinuxfb_qws.cpp 2009-01-14 17:22:34.000000000 +0100
29@@ -404,8 +404,8 @@
30 setupOffScreen();
31
32 // Now read in palette
33- if((vinfo.bits_per_pixel==8) || (vinfo.bits_per_pixel==4)) {
34- screencols= (vinfo.bits_per_pixel==8) ? 256 : 16;
35+ if((vinfo.bits_per_pixel==8) || (vinfo.bits_per_pixel==4) || (vinfo.bits_per_pixel==2)) {
36+ screencols= 1 << vinfo.bits_per_pixel;
37 int loopc;
38 fb_cmap startcmap;
39 startcmap.start=0;
40diff -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
41--- qt-embedded-linux-opensource-src-4.4.3.orig/src/gui/embedded/qscreen_qws.cpp 2008-09-27 11:01:28.000000000 +0200
42+++ qt-embedded-linux-opensource-src-4.4.3/src/gui/embedded/qscreen_qws.cpp 2009-01-14 17:22:44.000000000 +0100
43@@ -444,6 +444,58 @@
44 }
45 #endif // QT_QWS_DEPTH_4
46
47+#ifdef QT_QWS_DEPTH_2
48+static inline void qt_rectfill_gray2(quint8 *dest, quint8 value,
49+ int x, int y, int width, int height,
50+ int stride)
51+{
52+ const int pixelsPerByte = 4;
53+ const int alignWidth = qMin(width, (4 - (x & 3)) & 3);
54+ const int doAlign = (alignWidth > 0 ? 1 : 0);
55+ const int alignStart = pixelsPerByte - 1 - (x & 3);
56+ const int alignStop = alignStart - (alignWidth - 1);
57+ const quint8 alignMask = ((1 << (2 * alignWidth)) - 1) << (2 * alignStop);
58+ const int tailWidth = (width - alignWidth) & 3;
59+ const int doTail = (tailWidth > 0 ? 1 : 0);
60+ const quint8 tailMask = (1 << (2 * (pixelsPerByte - tailWidth))) - 1;
61+ const int width8 = (width - alignWidth) / pixelsPerByte;
62+
63+ dest += y * stride + x / pixelsPerByte;
64+ stride -= (doAlign + width8);
65+
66+ for (int j = 0; j < height; ++j) {
67+ if (doAlign) {
68+ *dest = (*dest & ~alignMask) | (value & alignMask);
69+ ++dest;
70+ }
71+ if (width8) {
72+ qt_memfill<quint8>(dest, value, width8);
73+ dest += width8;
74+ }
75+ if (doTail)
76+ *dest = (*dest & tailMask) | (value & ~tailMask);
77+ dest += stride;
78+ }
79+}
80+
81+static void solidFill_gray2(QScreen *screen, const QColor &color,
82+ const QRegion &region)
83+{
84+ quint8 *dest = reinterpret_cast<quint8*>(screen->base());
85+ const quint8 c = qGray(color.rgba()) >> 6;
86+ const quint8 c8 = (c << 6) | (c << 4) | (c << 2) | c;
87+
88+ const int stride = screen->linestep();
89+ const QVector<QRect> rects = region.rects();
90+
91+ for (int i = 0; i < rects.size(); ++i) {
92+ const QRect r = rects.at(i);
93+ qt_rectfill_gray2(dest, c8, r.x(), r.y(), r.width(), r.height(),
94+ stride);
95+ }
96+}
97+#endif // QT_QWS_DEPTH_2
98+
99 #ifdef QT_QWS_DEPTH_1
100 static inline void qt_rectfill_mono(quint8 *dest, quint8 value,
101 int x, int y, int width, int height,
102@@ -551,6 +603,11 @@
103 screen->d_ptr->solidFill = solidFill_gray4;
104 break;
105 #endif
106+#ifdef QT_QWS_DEPTH_2
107+ case 2:
108+ screen->d_ptr->solidFill = solidFill_gray2;
109+ break;
110+#endif
111 #ifdef QT_QWS_DEPTH_1
112 case 1:
113 screen->d_ptr->solidFill = solidFill_mono;
114@@ -958,6 +1015,149 @@
115 }
116 #endif // QT_QWS_DEPTH_4
117
118+#ifdef QT_QWS_DEPTH_2
119+
120+struct qgray2 { quint8 dummy; } Q_PACKED;
121+
122+template <typename SRC>
123+static inline quint8 qt_convertToGray2(SRC color);
124+
125+template <>
126+inline quint8 qt_convertToGray2(quint32 color)
127+{
128+ return qGray(color) >> 6;
129+}
130+
131+template <>
132+inline quint8 qt_convertToGray2(quint16 color)
133+{
134+ const int r = (color & 0xf800) >> 11;
135+ const int g = (color & 0x07e0) >> 6; // only keep 5 bit
136+ const int b = (color & 0x001f);
137+ return (r * 11 + g * 16 + b * 5) >> 8;
138+}
139+
140+template <>
141+inline quint8 qt_convertToGray2(qrgb444 color)
142+{
143+ return qt_convertToGray2(quint32(color));
144+}
145+
146+template <>
147+inline quint8 qt_convertToGray2(qargb4444 color)
148+{
149+ return qt_convertToGray2(quint32(color));
150+}
151+
152+template <typename SRC>
153+static inline void qt_rectconvert_gray2(qgray2 *dest2, const SRC *src,
154+ int x, int y, int width, int height,
155+ int dstStride, int srcStride)
156+{
157+ const int pixelsPerByte = 4;
158+ quint8 *dest8 = reinterpret_cast<quint8*>(dest2)
159+ + y * dstStride + x / pixelsPerByte;
160+ const int alignWidth = qMin(width, (4 - (x & 3)) & 3);
161+ const int doAlign = (alignWidth > 0 ? 1 : 0);
162+ const int alignStart = pixelsPerByte - 1 - (x & 3);
163+ const int alignStop = alignStart - (alignWidth - 1);
164+ const quint8 alignMask = ((1 << (2 * alignWidth)) - 1) << (2 * alignStop);
165+ const int tailWidth = (width - alignWidth) & 3;
166+ const int doTail = (tailWidth > 0 ? 1 : 0);
167+ const quint8 tailMask = (1 << (2 * (pixelsPerByte - tailWidth))) - 1;
168+ const int width8 = (width - alignWidth) / pixelsPerByte;
169+
170+ srcStride = srcStride / sizeof(SRC) - (width8 * pixelsPerByte + alignWidth);
171+ dstStride -= (width8 + doAlign);
172+
173+ for (int j = 0; j < height; ++j) {
174+ if (doAlign) {
175+ quint8 d = *dest8 & ~alignMask;
176+ for (int i = alignStart; i >= alignStop; --i)
177+ d |= qt_convertToGray2<SRC>(*src++) << (2 * i);
178+ *dest8++ = d;
179+ }
180+ for (int i = 0; i < width8; ++i) {
181+ *dest8 = (qt_convertToGray2<SRC>(src[0]) << 6)
182+ | (qt_convertToGray2<SRC>(src[1]) << 4)
183+ | (qt_convertToGray2<SRC>(src[2]) << 2)
184+ | (qt_convertToGray2<SRC>(src[3]));
185+ src += 4;
186+ ++dest8;
187+ }
188+ if (doTail) {
189+ quint8 d = *dest8 & tailMask;
190+ switch (tailWidth) {
191+ case 3: d |= qt_convertToGray2<SRC>(src[2]) << 2;
192+ case 2: d |= qt_convertToGray2<SRC>(src[1]) << 4;
193+ case 1: d |= qt_convertToGray2<SRC>(src[0]) << 6;
194+ }
195+ *dest8 = d;
196+ }
197+
198+ dest8 += dstStride;
199+ src += srcStride;
200+ }
201+}
202+
203+template <>
204+void qt_rectconvert(qgray2 *dest, const quint32 *src,
205+ int x, int y, int width, int height,
206+ int dstStride, int srcStride)
207+{
208+ qt_rectconvert_gray2<quint32>(dest, src, x, y, width, height,
209+ dstStride, srcStride);
210+}
211+
212+template <>
213+void qt_rectconvert(qgray2 *dest, const quint16 *src,
214+ int x, int y, int width, int height,
215+ int dstStride, int srcStride)
216+{
217+ qt_rectconvert_gray2<quint16>(dest, src, x, y, width, height,
218+ dstStride, srcStride);
219+}
220+
221+template <>
222+void qt_rectconvert(qgray2 *dest, const qrgb444 *src,
223+ int x, int y, int width, int height,
224+ int dstStride, int srcStride)
225+{
226+ qt_rectconvert_gray2<qrgb444>(dest, src, x, y, width, height,
227+ dstStride, srcStride);
228+}
229+
230+template <>
231+void qt_rectconvert(qgray2 *dest, const qargb4444 *src,
232+ int x, int y, int width, int height,
233+ int dstStride, int srcStride)
234+{
235+ qt_rectconvert_gray2<qargb4444>(dest, src, x, y, width, height,
236+ dstStride, srcStride);
237+}
238+
239+static void blit_2(QScreen *screen, const QImage &image,
240+ const QPoint &topLeft, const QRegion &region)
241+{
242+ switch (image.format()) {
243+ case QImage::Format_ARGB32_Premultiplied:
244+ blit_template<qgray2, quint32>(screen, image, topLeft, region);
245+ return;
246+ case QImage::Format_RGB16:
247+ blit_template<qgray2, quint16>(screen, image, topLeft, region);
248+ return;
249+ case QImage::Format_RGB444:
250+ blit_template<qgray2, qrgb444>(screen, image, topLeft, region);
251+ return;
252+ case QImage::Format_ARGB4444_Premultiplied:
253+ blit_template<qgray2, qargb4444>(screen, image, topLeft, region);
254+ return;
255+ default:
256+ qCritical("blit_2(): Image format %d not supported!", image.format());
257+ }
258+}
259+#endif // QT_QWS_DEPTH_2
260+
261 #ifdef QT_QWS_DEPTH_1
262
263 struct qmono { quint8 dummy; } Q_PACKED;
264@@ -1206,6 +1406,11 @@
265 screen->d_ptr->blit = blit_4;
266 break;
267 #endif
268+#ifdef QT_QWS_DEPTH_2
269+ case 2:
270+ screen->d_ptr->blit = blit_2;
271+ break;
272+#endif
273 #ifdef QT_QWS_DEPTH_1
274 case 1:
275 screen->d_ptr->blit = blit_1;
276@@ -2056,6 +2261,8 @@
277 }
278 } else if (d == 4) {
279 ret = qGray(r, g, b) >> 4;
280+ } else if (d == 2) {
281+ ret = qGray(r, g, b) >> 6;
282 } else if (d == 1) {
283 ret = qGray(r, g, b) >= 128;
284 } else {
285@@ -2126,6 +2333,10 @@
286 } else if(d==1) {
287 return true;
288 #endif
289+#ifdef QT_QWS_DEPTH_2
290+ } else if(d==2) {
291+ return true;
292+#endif
293 #ifdef QT_QWS_DEPTH_4
294 } else if(d==4) {
295 return true;
diff --git a/recipes-qt/qt4/files/0010-no-simpledecoration-example.patch b/recipes-qt/qt4/files/0010-no-simpledecoration-example.patch
new file mode 100644
index 0000000000..e52736926f
--- /dev/null
+++ b/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/recipes-qt/qt4/files/common.pro b/recipes-qt/qt4/files/common.pro
new file mode 100644
index 0000000000..382d93f5d1
--- /dev/null
+++ b/recipes-qt/qt4/files/common.pro
@@ -0,0 +1,108 @@
1#====================================================================================
2# common.pro (C) 2004 Michael 'Mickey' Lauer <mickey@Vanille.de>
3#====================================================================================
4#
5# Purpose: This file contains qmake scope rules of common usage
6#
7# Example: When building a qmake based application using libsdl,
8# use CONFIG+=sdl to add the proper include and library
9# paths and definitions to the resulting Makefile
10#
11#
12# General problem: One has to decide between evaluation at makefile generation time
13# and evaluation at makefile processing time.
14# The following example illustrates the difference:
15#
16# Evaluation at makefile processing time:
17#
18# sdl {
19# QMAKE_CFLAGS += `sdl-config --cflags`
20# LIBS += `sdl-config --libs`
21# }
22#
23# Evalutation at makefile generation time:
24#
25# sdl {
26# QMAKE_CFLAGS += $$system( sdl-config --cflags )
27# LIBS += `sdl-config --libs`
28# }
29#
30# For now I use version 2 which is a bit faster
31# See the fine qmake manual for more details
32#
33#
34
35#=============================================================================
36# pthread scope for multithreaded applications
37#
38
39pthread {
40 LIBS += -lpthread
41}
42
43#=============================================================================
44# sdl scopes for applications using the Simple Direct Media Layer (SDL)
45#
46
47sdl {
48 QMAKE_CXXFLAGS += $$system( sdl-config --cflags )
49 DEFINES += USE_SDL QTOPIA
50 LIBS += $$system( sdl-config --libs )
51}
52
53sdl-mixer {
54 LIBS += -lSDL_mixer
55}
56
57sdl-image {
58 LIBS += -lSDL_image
59}
60
61sdl-font {
62 LIBS += -lSDL_ttf
63}
64
65#=============================================================================
66#
67#
68
69opie {
70 DEFINES += QWS
71}
72
73opiecore {
74 LIBS += -lopiecore2
75}
76
77opieui {
78 CONFIG += opiecore
79 LIBS += -lopieui2
80}
81
82opienet {
83 CONFIG += opiecore
84 LIBS += -lopienet2
85}
86
87opiepim {
88 CONFIG += opiecore
89 LIBS += -lopiepim2
90}
91
92opiedb {
93 CONFIG += opiecore
94 LIBS += -lopiedb2
95}
96
97opiemm {
98 CONFIG += opiecore
99 LIBS += -lopiemm2
100}
101
102#=============================================================================
103#
104#
105
106#=============================================================================
107#
108#
diff --git a/recipes-qt/qt4/files/compile.test-lflags.patch b/recipes-qt/qt4/files/compile.test-lflags.patch
new file mode 100644
index 0000000000..e4b256b0ce
--- /dev/null
+++ b/recipes-qt/qt4/files/compile.test-lflags.patch
@@ -0,0 +1,13 @@
1Index: qt-everywhere-opensource-src-4.6.3/config.tests/unix/compile.test
2===================================================================
3--- qt-everywhere-opensource-src-4.6.3.orig/config.tests/unix/compile.test 2010-06-02 06:03:18.000000000 +0400
4+++ qt-everywhere-opensource-src-4.6.3/config.tests/unix/compile.test 2010-10-04 17:35:07.587783460 +0400
5@@ -11,7 +11,7 @@
6 EXE=`basename "$6"`
7 DESCRIPTION=$7
8 shift 7
9-LFLAGS=""
10+LFLAGS="$LDFLAGS"
11 INCLUDEPATH=""
12 CXXFLAGS=""
13 MAC_ARCH_CXXFLAGS=""
diff --git a/recipes-qt/qt4/files/configure-lflags.patch b/recipes-qt/qt4/files/configure-lflags.patch
new file mode 100644
index 0000000000..df195494ee
--- /dev/null
+++ b/recipes-qt/qt4/files/configure-lflags.patch
@@ -0,0 +1,13 @@
1Index: qtopia-core-opensource-src-4.3.3/configure
2===================================================================
3--- qtopia-core-opensource-src-4.3.3.orig/configure 2008-01-14 08:53:51.000000000 +0000
4+++ qtopia-core-opensource-src-4.3.3/configure 2008-01-14 08:54:07.000000000 +0000
5@@ -447,7 +447,7 @@
6 # initalize variables
7 #-------------------------------------------------------------------------------
8
9-SYSTEM_VARIABLES="CC CXX CFLAGS CXXFLAGS LDFLAGS"
10+SYSTEM_VARIABLES="CC CXX CFLAGS CXXFLAGS LDFLAGS LFLAGS"
11 for varname in $SYSTEM_VARIABLES; do
12 cmd=`echo \
13 'if [ -n "\$'${varname}'" ]; then
diff --git a/recipes-qt/qt4/files/fix-config-tests.patch b/recipes-qt/qt4/files/fix-config-tests.patch
new file mode 100644
index 0000000000..1e5101d8ad
--- /dev/null
+++ b/recipes-qt/qt4/files/fix-config-tests.patch
@@ -0,0 +1,34 @@
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
5Index: qt-x11-opensource-src-4.5.2/config.tests/unix/bsymbolic_functions.test
6===================================================================
7--- qt-x11-opensource-src-4.5.2.orig/config.tests/unix/bsymbolic_functions.test 2009-08-01 08:01:11.000000000 +0200
8+++ qt-x11-opensource-src-4.5.2/config.tests/unix/bsymbolic_functions.test 2009-08-01 08:01:16.000000000 +0200
9@@ -8,7 +8,7 @@
10 int main() { return 0; }
11 EOF
12
13-"$COMPILER" -o libtest.so -shared -Wl,-Bsymbolic-functions -fPIC bsymbolic_functions.c >/dev/null 2>&1 && BSYMBOLIC_FUNCTIONS_SUPPORT=yes
14+$COMPILER -o libtest.so -shared -Wl,-Bsymbolic-functions -fPIC bsymbolic_functions.c >/dev/null 2>&1 && BSYMBOLIC_FUNCTIONS_SUPPORT=yes
15 rm -f bsymbolic_functions.c libtest.so
16
17 # done
18Index: qt-x11-opensource-src-4.5.2/config.tests/unix/fvisibility.test
19===================================================================
20--- qt-x11-opensource-src-4.5.2.orig/config.tests/unix/fvisibility.test 2009-06-20 06:57:50.000000000 +0200
21+++ qt-x11-opensource-src-4.5.2/config.tests/unix/fvisibility.test 2009-08-01 07:59:05.000000000 +0200
22@@ -15,9 +15,9 @@
23 EOF
24
25 if [ "$VERBOSE" = "yes" ] ; then
26- "$COMPILER" -c -fvisibility=hidden fvisibility.c && FVISIBILITY_SUPPORT=yes
27+ $COMPILER -c -fvisibility=hidden fvisibility.c && FVISIBILITY_SUPPORT=yes
28 else
29- "$COMPILER" -c -fvisibility=hidden fvisibility.c >/dev/null 2>&1 && FVISIBILITY_SUPPORT=yes
30+ $COMPILER -c -fvisibility=hidden fvisibility.c >/dev/null 2>&1 && FVISIBILITY_SUPPORT=yes
31 fi
32 rm -f fvisibility.c fvisibility.o
33 }
34
diff --git a/recipes-qt/qt4/files/g++.conf b/recipes-qt/qt4/files/g++.conf
new file mode 100644
index 0000000000..4cd76e62ea
--- /dev/null
+++ b/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/recipes-qt/qt4/files/hack-out-pg_config.patch b/recipes-qt/qt4/files/hack-out-pg_config.patch
new file mode 100644
index 0000000000..2231adf0c7
--- /dev/null
+++ b/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
10
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/recipes-qt/qt4/files/linux-oe-qmake.conf b/recipes-qt/qt4/files/linux-oe-qmake.conf
new file mode 100644
index 0000000000..205b693fda
--- /dev/null
+++ b/recipes-qt/qt4/files/linux-oe-qmake.conf
@@ -0,0 +1,82 @@
1#
2# qmake configuration for linux-oe-g++ / OpenEmbedded Build System / http://openembedded.org
3#
4
5MAKEFILE_GENERATOR = UNIX
6TEMPLATE = app
7CONFIG += qt warn_on release
8
9QMAKE_CC = $(OE_QMAKE_CC)
10QMAKE_LEX = flex
11QMAKE_LEXFLAGS =
12QMAKE_YACC = yacc
13QMAKE_YACCFLAGS = -d
14QMAKE_CFLAGS = -pipe $(OE_QMAKE_CFLAGS) $(CFLAGS_EXTRA)
15QMAKE_CFLAGS_WARN_ON = -Wall -W
16QMAKE_CFLAGS_WARN_OFF =
17QMAKE_CFLAGS_RELEASE = $(if $(CFLAGS_RELEASE),$(CFLAGS_RELEASE), -O2)
18QMAKE_CFLAGS_DEBUG = -g
19QMAKE_CFLAGS_SHLIB = -fPIC
20QMAKE_CFLAGS_YACC = -Wno-unused -Wno-parentheses
21QMAKE_CFLAGS_THREAD = -D_REENTRANT
22
23QMAKE_CXX = $(OE_QMAKE_CXX)
24QMAKE_CXXFLAGS = $$QMAKE_CFLAGS $(OE_QMAKE_CXXFLAGS) $(CXXFLAGS_EXTRA)
25QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON
26QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF
27QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE
28QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG
29QMAKE_CXXFLAGS_SHLIB = $$QMAKE_CFLAGS_SHLIB
30QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC
31QMAKE_CXXFLAGS_THREAD = $$QMAKE_CFLAGS_THREAD
32
33QMAKE_INCDIR =
34QMAKE_LIBDIR =
35QMAKE_INCDIR_X11 =
36QMAKE_LIBDIR_X11 =
37QMAKE_INCDIR_QT = $(OE_QMAKE_INCDIR_QT)
38QMAKE_LIBDIR_QT = $(OE_QMAKE_LIBDIR_QT)
39QMAKE_INCDIR_OPENGL =
40QMAKE_LIBDIR_OPENGL =
41
42QMAKE_LINK = $(OE_QMAKE_LINK)
43QMAKE_LINK_SHLIB = $(OE_QMAKE_LINK)
44QMAKE_LFLAGS = $(OE_QMAKE_LDFLAGS) $(LFLAGS_EXTRA)
45QMAKE_LFLAGS_RELEASE =
46QMAKE_LFLAGS_DEBUG =
47QMAKE_LFLAGS_SHLIB = -shared
48QMAKE_LFLAGS_PLUGIN = $$QMAKE_LFLAGS_SHLIB
49QMAKE_LFLAGS_SONAME = -Wl,-soname,
50QMAKE_LFLAGS_THREAD =
51QMAKE_RPATH = -Wl,-rpath-link,
52
53QMAKE_LIBS = $(LIBS_EXTRA)
54QMAKE_LIBS_DYNLOAD = -ldl
55QMAKE_LIBS_X11 = $(OE_QMAKE_LIBS_X11)
56QMAKE_LIBS_X11SM =
57QMAKE_LIBS_QT = -l$(OE_QMAKE_LIBS_QT)
58QMAKE_LIBS_QT_THREAD = -l$(OE_QMAKE_LIBS_QT)-mt
59QMAKE_LIBS_OPENGL = $(OE_QMAKE_LIBS_OPENGL)
60QMAKE_LIBS_OPENGL_QT = $(OE_QMAKE_LIBS_OPENGL_QT)
61QMAKE_LIBS_THREAD = -lpthread
62
63QMAKE_MOC = $(OE_QMAKE_MOC)
64QMAKE_UIC = $(OE_QMAKE_UIC)
65
66QMAKE_AR = $(OE_QMAKE_AR) cqs
67QMAKE_RANLIB =
68
69QMAKE_TAR = tar -cf
70QMAKE_GZIP = gzip -9f
71
72QMAKE_COPY = cp -f
73QMAKE_COPY_FILE = $(COPY)
74QMAKE_COPY_DIR = $(COPY) -r
75QMAKE_MOVE = mv -f
76QMAKE_DEL_FILE = rm -f
77QMAKE_DEL_DIR = rmdir
78QMAKE_STRIP = $(OE_QMAKE_STRIP)
79QMAKE_STRIPFLAGS_LIB += --strip-unneeded
80QMAKE_CHK_DIR_EXISTS = test -d
81QMAKE_MKDIR = mkdir -p
82
diff --git a/recipes-qt/qt4/files/linux.conf b/recipes-qt/qt4/files/linux.conf
new file mode 100644
index 0000000000..90b8d65aba
--- /dev/null
+++ b/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/recipes-qt/qt4/files/mips-relocate.patch b/recipes-qt/qt4/files/mips-relocate.patch
new file mode 100644
index 0000000000..2fde9a0dcf
--- /dev/null
+++ b/recipes-qt/qt4/files/mips-relocate.patch
@@ -0,0 +1,28 @@
1Disable the LDFLAGS "-Bsymbolic-functions" for mips
2
3"-Bsymbolic-functions" flag makes ld to bind the global function symbol of shared library at compiling time, thus reduce the runtime relocation cost.
4
5However, this flag in binutil 2.20 cause QT4 mips building failure, which is "final link failed: Bad value" error in libQtWebKit.so linking stage. If downgrad to binutil 2.19, this error disappears. further investigation showes commit http://sourceware.org/cgi-bin/cvsweb.cgi/src/ld/scripttempl/mips.sc.diff?r1=1.2&r2=1.3&cvsroot=src cause this error.
6
7So this patch disable this flag for QT4 mips. If future binutils version fix this issue, this patch can be safely removed.
8
9Signed-off-by: Yu Ke <ke.yu@intel.com>
10
11diff --git a/configure b/configure
12index ca14279..5db9926 100755
13--- a/configure
14+++ b/configure
15@@ -3035,6 +3035,13 @@ if [ "$CFG_REDUCE_RELOCATIONS" != "no" ]; then
16 fi
17 fi
18
19+# Temporily disable -Bsymbolic-functions for mips, because libQtWebKit can not pass the build
20+# if has -Bsymbolic-functions and binutil 2.20
21+# -Bsymbolic-functions is OK in binutil 2.19
22+if [ "$CFG_ARCH" = "mips" ]; then
23+ CFG_REDUCE_RELOCATIONS=no
24+fi
25+
26 # auto-detect GNU make support
27 if [ "$CFG_USE_GNUMAKE" = "auto" ] && "$MAKE" -v | grep "GNU Make" >/dev/null 2>&1; then
28 CFG_USE_GNUMAKE=yes
diff --git a/recipes-qt/qt4/files/qmake-hack.diff b/recipes-qt/qt4/files/qmake-hack.diff
new file mode 100644
index 0000000000..290f54052b
--- /dev/null
+++ b/recipes-qt/qt4/files/qmake-hack.diff
@@ -0,0 +1,15 @@
1--- /tmp/configure 2010-02-10 15:41:58.000000000 +0100
2+++ qt-embedded-linux-opensource-src-4.4.3/configure 2010-02-10 15:42:01.000000000 +0100
3@@ -3946,6 +3946,12 @@
4 [ '!' -z "$QCONFIG_H" ] && mv -f "$QCONFIG_H" "$QMAKE_QCONFIG_H" #move qmake's qconfig.h to qconfig.h.qmake
5 [ '!' -z "$OLD_QCONFIG_H" ] && mv -f "${OLD_QCONFIG_H}.old" "$OLD_QCONFIG_H" #put back qconfig.h
6 [ "$QMAKE_BUILD_ERROR" = "yes" ] && exit 2
7+
8+# OE
9+if [ x$CROSSHACK = xtrue ] ; then
10+ echo "Exiting now, since we have what we want: a qmake binary"
11+ exit 0
12+fi
13 fi # Build qmake
14
15 #-------------------------------------------------------------------------------
diff --git a/recipes-qt/qt4/files/qt-config.patch b/recipes-qt/qt4/files/qt-config.patch
new file mode 100644
index 0000000000..a4a701ccd7
--- /dev/null
+++ b/recipes-qt/qt4/files/qt-config.patch
@@ -0,0 +1,21 @@
1--- /tmp/qlibraryinfo.cpp 2008-08-02 17:16:41.000000000 +0200
2+++ qt-embedded-linux-opensource-src-4.4.1/src/corelib/global/qlibraryinfo.cpp 2008-08-02 17:17:42.000000000 +0200
3@@ -47,6 +47,7 @@
4 QT_BEGIN_NAMESPACE
5 extern QString qmake_libraryInfoFile();
6 QT_END_NAMESPACE
7+#include <stdlib.h>
8 #else
9 # include "qcoreapplication.h"
10 #endif
11@@ -113,6 +114,10 @@
12 #ifdef QT_BUILD_QMAKE
13 if(!QFile::exists(qtconfig))
14 qtconfig = qmake_libraryInfoFile();
15+ if (!QFile::exists(qtconfig)) {
16+ QByteArray config = getenv("QT_CONF_PATH");
17+ qtconfig = QFile::decodeName(config);
18+ }
19 #else
20 if (!QFile::exists(qtconfig) && QCoreApplication::instance()) {
21 #ifdef Q_OS_MAC
diff --git a/recipes-qt/qt4/files/qte.sh b/recipes-qt/qt4/files/qte.sh
new file mode 100644
index 0000000000..21d6ecbd6a
--- /dev/null
+++ b/recipes-qt/qt4/files/qte.sh
@@ -0,0 +1,7 @@
1#!/bin/sh
2
3if [ -e /dev/input/touchscreen0 ]
4then
5 QWS_MOUSE_PROTO=Tslib:/dev/input/touchscreen0
6 export QWS_MOUSE_PROTO
7fi
diff --git a/recipes-qt/qt4/files/use-lflags-last.patch b/recipes-qt/qt4/files/use-lflags-last.patch
new file mode 100644
index 0000000000..4197dbbf64
--- /dev/null
+++ b/recipes-qt/qt4/files/use-lflags-last.patch
@@ -0,0 +1,22 @@
1Index: qtopia-core-opensource-src-4.3.1/qmake/generators/unix/unixmake2.cpp
2===================================================================
3--- qtopia-core-opensource-src-4.3.1.orig/qmake/generators/unix/unixmake2.cpp 2007-10-07 13:45:26.000000000 +0200
4+++ qtopia-core-opensource-src-4.3.1/qmake/generators/unix/unixmake2.cpp 2007-10-07 13:57:09.000000000 +0200
5@@ -416,7 +416,7 @@
6 t << "\n\t" << mkdir_p_asstring(destdir) << "\n\t";
7 if(!project->isEmpty("QMAKE_PRE_LINK"))
8 t << var("QMAKE_PRE_LINK") << "\n\t";
9- t << "$(LINK) $(LFLAGS) -o $(TARGET) " << incr_deps << " " << incr_objs << " $(OBJCOMP) $(LIBS)";
10+ t << "$(LINK) -o $(TARGET) " << incr_deps << " " << incr_objs << " $(OBJCOMP) $(LIBS) $(LFLAGS)";
11 if(!project->isEmpty("QMAKE_POST_LINK"))
12 t << "\n\t" << var("QMAKE_POST_LINK");
13 t << endl << endl;
14@@ -430,7 +430,7 @@
15 t << mkdir_p_asstring(destdir) << "\n\t";
16 if(!project->isEmpty("QMAKE_PRE_LINK"))
17 t << var("QMAKE_PRE_LINK") << "\n\t";
18- t << "$(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(OBJCOMP) $(LIBS)";
19+ t << "$(LINK) -o $(TARGET) $(OBJECTS) $(OBJCOMP) $(LIBS) $(LFLAGS)";
20 if(!project->isEmpty("QMAKE_POST_LINK"))
21 t << "\n\t" << var("QMAKE_POST_LINK");
22 t << endl << endl;
diff --git a/recipes-qt/qt4/qmake2_2.10a.bb b/recipes-qt/qt4/qmake2_2.10a.bb
index 77d909f8eb..3602a7f248 100644
--- a/recipes-qt/qt4/qmake2_2.10a.bb
+++ b/recipes-qt/qt4/qmake2_2.10a.bb
@@ -1,7 +1,7 @@
1QTVERSION="4.4.3" 1QTVERSION="4.4.3"
2FILESDIR += "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/qmake2" 2FILESDIR += "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/qmake2"
3 3
4BBCLASSEXTEND = "native sdk" 4BBCLASSEXTEND = "native nativesdk"
5 5
6require ${PN}.inc 6require ${PN}.inc
7 7
diff --git a/recipes-qt/qt4/qt-4.6.0/.1165-NEON-configure-detection-and-initial-blend-function-.patch.swp b/recipes-qt/qt4/qt-4.6.0/.1165-NEON-configure-detection-and-initial-blend-function-.patch.swp
new file mode 100644
index 0000000000..5a11254f65
--- /dev/null
+++ b/recipes-qt/qt4/qt-4.6.0/.1165-NEON-configure-detection-and-initial-blend-function-.patch.swp
Binary files differ
diff --git a/recipes-qt/qt4/qt-4.6.3.inc b/recipes-qt/qt4/qt-4.6.3.inc
new file mode 100644
index 0000000000..dc928c105c
--- /dev/null
+++ b/recipes-qt/qt4/qt-4.6.3.inc
@@ -0,0 +1,76 @@
1DEFAULT_PREFERENCE = "-1"
2
3LICENSE = "LGPLv2.1 | GPLv3"
4LIC_FILES_CHKSUM = "file://LICENSE.LGPL;md5=fbc093901857fcd118f065f900982c24 \
5 file://LICENSE.GPL3;md5=babc5b6b77441da277f5c06b2e547720 \
6 file://LGPL_EXCEPTION.txt;md5=411080a56ff917a5a1aa08c98acae354"
7
8FILESPATHPKG .= ":qt-${PV}"
9
10SRC_URI = "ftp://ftp.trolltech.com/qt/source/qt-everywhere-opensource-src-${PV}.tar.gz \
11 file://0001-cross-compile.patch \
12 file://0002-fix-resinit-declaration.patch \
13 file://0004-no-qmake.patch \
14 file://0006-freetype-host-includes.patch \
15 file://0008-qt-lib-infix.patch \
16 file://0009-support-2bpp.patch \
17 file://0010-no-simpledecoration-example.patch \
18 file://fix-config-tests.patch \
19 file://qt-config.patch \
20 file://g++.conf \
21 file://linux.conf \
22 file://hack-out-pg_config.patch \
23 file://mips-relocate.patch \
24 "
25
26# Set necessary variables in the profile
27SRC_URI += "file://qte.sh"
28
29S = "${WORKDIR}/qt-everywhere-opensource-src-${PV}"
30
31do_configure_prepend() {
32 for pro in $(find ${S} -name "*.pro") ; do
33 sed -i 's:$$QT_BUILD_TREE/bin/lrelease:${OE_QMAKE_LRELEASE}:g' $pro
34 done
35
36 sed -i s:SEDME:${S}: ${WORKDIR}/linux.conf
37 sed -i \
38 -e /QMAKE_MOC\ /d \
39 -e /QMAKE_UIC\ /d \
40 -e /QMAKE_UIC3\ /d \
41 -e /QMAKE_RCC\ /d \
42 ${S}/configure
43}
44
45do_configure_append() {
46 sed -e '/QMAKE_TARGET /d' -e '/TARGET /d' -i ${S}/translations/Makefile
47}
48
49QT_GLFLAGS ?= ""
50QT_CONFIG_FLAGS += " -no-rpath -qt3support -reduce-relocations -silent ${QT_GLFLAGS}"
51
52do_compile() {
53 # Fixup missing wsegl header in some SGX SDKs
54 if ! [ -e ${STAGING_INCDIR}/wsegl.h ] ; then
55 cp src/3rdparty/powervr/wsegl.h src/plugins/gfxdrivers/powervr/QWSWSEGL/
56 fi
57
58 unset CFLAGS CXXFLAGS
59 oe_runmake ${EXTRA_ENV}
60}
61
62do_install_append() {
63 install -d ${D}${bindir}
64 for i in rcc uic moc ; do
65 install -m 0755 ${S}/bin/$i ${D}${bindir}/
66 done
67
68 #Append an E to the qtdemo file
69 if [ -n "${QT_LIBINFIX}" ] ; then
70 mv ${D}${bindir}/qtdemo ${D}${bindir}/qtdemo${QT_LIBINFIX}
71 fi
72}
73
74SRC_URI[md5sum] = "5c69f16d452b0bb3d44bc3c10556c072"
75SRC_URI[sha256sum] = "f4e0ada8d4d516bbb8600a3ee7d9046c9c79e38cd781df9ffc46d8f16acd1768"
76
diff --git a/recipes-qt/qt4/qt-4.7.1.inc b/recipes-qt/qt4/qt-4.7.1.inc
new file mode 100644
index 0000000000..682707ad78
--- /dev/null
+++ b/recipes-qt/qt4/qt-4.7.1.inc
@@ -0,0 +1,76 @@
1DEFAULT_PREFERENCE = "-1"
2
3LICENSE = "LGPLv2.1 | GPLv3"
4LIC_FILES_CHKSUM = "file://LICENSE.LGPL;md5=fbc093901857fcd118f065f900982c24 \
5 file://LICENSE.GPL3;md5=babc5b6b77441da277f5c06b2e547720 \
6 file://LGPL_EXCEPTION.txt;md5=411080a56ff917a5a1aa08c98acae354"
7
8FILESPATH =. "${FILE_DIRNAME}/qt-${PV}:"
9
10SRC_URI = "\
11 ftp://ftp.trolltech.com/qt/source/qt-everywhere-opensource-src-${PV}.tar.gz \
12 file://0004-no-qmake.patch \
13 file://hack-out-pg2-4.7.0.patch \
14 file://0006-freetype-host-includes.patch \
15 file://0001-Added-Openembedded-crossarch-option.patch \
16 file://g++.conf \
17 file://linux.conf \
18 "
19# Set necessary variables in the profile
20SRC_URI += "file://qte.sh"
21
22S = "${WORKDIR}/qt-everywhere-opensource-src-${PV}"
23
24FILES_${QT_BASE_NAME}-tools += "${bindir}/qml"
25
26do_configure_prepend() {
27 for pro in $(find ${S} -name "*.pro") ; do
28 sed -i 's:$$QT_BUILD_TREE/bin/lrelease:${OE_QMAKE_LRELEASE}:g' $pro
29 done
30
31 sed -i s:SEDME:${S}: ${WORKDIR}/linux.conf
32 sed -i \
33 -e /QMAKE_MOC\ /d \
34 -e /QMAKE_UIC\ /d \
35 -e /QMAKE_UIC3\ /d \
36 -e /QMAKE_RCC\ /d \
37 ${S}/configure
38}
39
40do_configure_append() {
41 sed -e '/QMAKE_TARGET /d' -e '/TARGET /d' -i ${S}/translations/Makefile
42}
43
44QT_GLFLAGS ?= ""
45QT_CONFIG_FLAGS += " -xmlpatterns -no-rpath -qt3support -reduce-relocations -silent ${QT_GLFLAGS}"
46
47do_compile() {
48 # Fixup missing wsegl header in some SGX SDKs
49 if ! [ -e ${STAGING_INCDIR}/wsegl.h ] ; then
50 cp src/3rdparty/powervr/wsegl.h src/plugins/gfxdrivers/powervr/QWSWSEGL/
51 fi
52
53 unset CFLAGS CXXFLAGS
54 install -m 0755 ${STAGING_BINDIR_NATIVE}/rcc4 ${S}/bin/rcc
55 install -m 0755 ${STAGING_BINDIR_NATIVE}/moc4 ${S}/bin/moc
56 install -m 0755 ${STAGING_BINDIR_NATIVE}/uic4 ${S}/bin/uic
57 install -m 0755 ${STAGING_BINDIR_NATIVE}/lrelease4 ${S}/bin/lrelease
58
59 oe_runmake ${EXTRA_ENV}
60}
61
62do_install_append() {
63 install -d ${D}${bindir}
64 for i in rcc uic moc ; do
65 install -m 0755 ${S}/bin/$i ${D}${bindir}/
66 done
67
68 #Append an E to the qtdemo file
69 if [ -n "${QT_LIBINFIX}" ] ; then
70 mv ${D}${bindir}/qtdemo ${D}${bindir}/qtdemo${QT_LIBINFIX}
71 fi
72}
73
74SRC_URI[md5sum] = "6f88d96507c84e9fea5bf3a71ebeb6d7"
75SRC_URI[sha256sum] = "8cb5277c41f824cfc6dcee0e95e0bf23a9ad2c8d18d245105137481d092b124a"
76
diff --git a/recipes-qt/qt4/qt-4.7.1/0001-Added-Openembedded-crossarch-option.patch b/recipes-qt/qt4/qt-4.7.1/0001-Added-Openembedded-crossarch-option.patch
new file mode 100644
index 0000000000..71a04a59d2
--- /dev/null
+++ b/recipes-qt/qt4/qt-4.7.1/0001-Added-Openembedded-crossarch-option.patch
@@ -0,0 +1,44 @@
1From b1ba119f6a824dc01bd42ee00dba4a1653867b72 Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?Matthias=20G=C3=BCnther?= <matgnt@gmail.com>
3Date: Wed, 12 May 2010 16:52:45 +0200
4Subject: [PATCH 1/9] Added Openembedded "-crossarch" option
5
6---
7 configure | 7 ++++++-
8 1 files changed, 6 insertions(+), 1 deletions(-)
9
10diff --git a/configure b/configure
11index facd192..9d15136 100755
12--- a/configure
13+++ b/configure
14@@ -954,7 +954,7 @@ while [ "$#" -gt 0 ]; do
15 shift
16 VAL=$1
17 ;;
18- -prefix|-docdir|-headerdir|-plugindir|-importdir|-datadir|-libdir|-bindir|-translationdir|-sysconfdir|-examplesdir|-demosdir|-depths|-make|-nomake|-platform|-xplatform|-buildkey|-sdk|-arch|-host-arch|-mysql_config)
19+ -prefix|-docdir|-headerdir|-plugindir|-importdir|-datadir|-libdir|-bindir|-translationdir|-sysconfdir|-examplesdir|-demosdir|-depths|-make|-nomake|-platform|-xplatform|-buildkey|-sdk|-arch|-host-arch|-mysql_config|-crossarch)
20 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
21 shift
22 VAL="$1"
23@@ -1443,6 +1443,9 @@ while [ "$#" -gt 0 ]; do
24 xplatform)
25 XPLATFORM="$VAL"
26 ;;
27+ crossarch)
28+ CROSSARCH="$VAL"
29+ ;;
30 debug-and-release)
31 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
32 CFG_DEBUG_RELEASE="$VAL"
33@@ -2918,6 +2921,8 @@ elif [ "$PLATFORM_MAC" = "yes" ] || [ -z "$CFG_ARCH" ]; then
34 CFG_ARCH=$CFG_HOST_ARCH
35 fi
36
37+CFG_ARCH="$CROSSARCH"
38+
39 if [ -d "$relpath/src/corelib/arch/$CFG_ARCH" ]; then
40 if [ "$OPT_VERBOSE" = "yes" ]; then
41 echo " '$CFG_ARCH' is supported"
42--
431.7.0.4
44
diff --git a/recipes-qt/qt4/qt-4.7.1/g++.conf b/recipes-qt/qt4/qt-4.7.1/g++.conf
new file mode 100644
index 0000000000..80f925cc5e
--- /dev/null
+++ b/recipes-qt/qt4/qt-4.7.1/g++.conf
@@ -0,0 +1,60 @@
1#
2# qmake configuration for common gcc
3#
4
5QMAKE_CC = $(OE_QMAKE_CC)
6QMAKE_CFLAGS += -pipe $(OE_QMAKE_CFLAGS)
7QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO += $(OE_QMAKE_CFLAGS)
8QMAKE_CFLAGS_DEPS += -M
9QMAKE_CFLAGS_WARN_ON += -Wall -W
10QMAKE_CFLAGS_WARN_OFF += -w
11QMAKE_CFLAGS_RELEASE +=
12QMAKE_CFLAGS_DEBUG += -g
13QMAKE_CFLAGS_SHLIB += -fPIC
14QMAKE_CFLAGS_STATIC_LIB += -fPIC
15QMAKE_CFLAGS_YACC += -Wno-unused -Wno-parentheses
16QMAKE_CFLAGS_HIDESYMS += -fvisibility=hidden
17QMAKE_CFLAGS_PRECOMPILE += -x c-header -c ${QMAKE_PCH_INPUT} -o ${QMAKE_PCH_OUTPUT}
18QMAKE_CFLAGS_USE_PRECOMPILE += -include ${QMAKE_PCH_OUTPUT_BASE}
19
20QMAKE_CXX = $(OE_QMAKE_CXX)
21QMAKE_CXXFLAGS += $$QMAKE_CFLAGS $(OE_QMAKE_CXXFLAGS)
22QMAKE_CXXFLAGS_DEPS += $$QMAKE_CFLAGS_DEPS
23QMAKE_CXXFLAGS_WARN_ON += $$QMAKE_CFLAGS_WARN_ON
24QMAKE_CXXFLAGS_WARN_OFF += $$QMAKE_CFLAGS_WARN_OFF
25QMAKE_CXXFLAGS_RELEASE += $$QMAKE_CFLAGS_RELEASE
26QMAKE_CXXFLAGS_RELEASE_WITH_DEBUGINFO += $$QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO
27QMAKE_CXXFLAGS_DEBUG += $$QMAKE_CFLAGS_DEBUG
28QMAKE_CXXFLAGS_SHLIB += $$QMAKE_CFLAGS_SHLIB
29QMAKE_CXXFLAGS_STATIC_LIB += $$QMAKE_CFLAGS_STATIC_LIB
30QMAKE_CXXFLAGS_YACC += $$QMAKE_CFLAGS_YACC
31QMAKE_CXXFLAGS_HIDESYMS += $$QMAKE_CFLAGS_HIDESYMS -fvisibility-inlines-hidden
32QMAKE_CXXFLAGS_PRECOMPILE += -x c++-header -c ${QMAKE_PCH_INPUT} -o ${QMAKE_PCH_OUTPUT}
33QMAKE_CXXFLAGS_USE_PRECOMPILE = $$QMAKE_CFLAGS_USE_PRECOMPILE
34
35QMAKE_LINK = $(OE_QMAKE_LINK)
36QMAKE_LINK_SHLIB = $(OE_QMAKE_LINK)
37QMAKE_LINK_C = $(OE_QMAKE_LINK)
38QMAKE_LINK_C_SHLIB = $(OE_QMAKE_LINK)
39QMAKE_LFLAGS += $(OE_QMAKE_LDFLAGS)
40QMAKE_LFLAGS_RELEASE +=
41QMAKE_LFLAGS_DEBUG +=
42QMAKE_LFLAGS_APP +=
43QMAKE_LFLAGS_SHLIB += -shared
44QMAKE_LFLAGS_PLUGIN += $$QMAKE_LFLAGS_SHLIB
45QMAKE_LFLAGS_SONAME += -Wl,-soname,
46QMAKE_LFLAGS_THREAD +=
47QMAKE_LFLAGS_NOUNDEF += -Wl,--no-undefined
48QMAKE_LFLAGS_RPATH = -Wl,-rpath-link,
49
50QMAKE_PCH_OUTPUT_EXT = .gch
51
52# -Bsymbolic-functions (ld) support
53QMAKE_LFLAGS_BSYMBOLIC_FUNC = -Wl,-Bsymbolic-functions
54QMAKE_LFLAGS_DYNAMIC_LIST = -Wl,--dynamic-list,
55
56# some linking helper...
57CONFIG += rpath_libdirs
58
59# for the SDK
60isEmpty(QMAKE_QT_CONFIG):QMAKE_QT_CONFIG = $(OE_QMAKE_QT_CONFIG)
diff --git a/recipes-qt/qt4/qt-4.7.1/hack-out-pg2-4.7.0.patch b/recipes-qt/qt4/qt-4.7.1/hack-out-pg2-4.7.0.patch
new file mode 100644
index 0000000000..5c588ff0f7
--- /dev/null
+++ b/recipes-qt/qt4/qt-4.7.1/hack-out-pg2-4.7.0.patch
@@ -0,0 +1,19 @@
1Index: qt-everywhere-opensource-src-4.7.0/configure
2===================================================================
3--- qt-everywhere-opensource-src-4.7.0.orig/configure 2010-09-22 15:43:51.191162141 -0400
4+++ qt-everywhere-opensource-src-4.7.0/configure 2010-09-22 15:44:35.179981232 -0400
5@@ -4921,10 +4921,10 @@
6 psql)
7 if [ "$CFG_SQL_psql" != "no" ]; then
8 # Be careful not to use native pg_config when cross building.
9- if [ "$XPLATFORM_MINGW" != "yes" ] && "$WHICH" pg_config >/dev/null 2>&1; then
10- QT_CFLAGS_PSQL=`pg_config --includedir 2>/dev/null`
11- QT_LFLAGS_PSQL=`pg_config --libdir 2>/dev/null`
12- fi
13+# if [ "$XPLATFORM_MINGW" != "yes" ] && "$WHICH" pg_config >/dev/null 2>&1; then
14+# QT_CFLAGS_PSQL=`pg_config --includedir 2>/dev/null`
15+# QT_LFLAGS_PSQL=`pg_config --libdir 2>/dev/null`
16+# fi
17 [ -z "$QT_CFLAGS_PSQL" ] || QT_CFLAGS_PSQL="-I$QT_CFLAGS_PSQL"
18 [ -z "$QT_LFLAGS_PSQL" ] || QT_LFLAGS_PSQL="-L$QT_LFLAGS_PSQL"
19 # But, respect PSQL_LIBS if set
diff --git a/recipes-qt/qt4/qt-4.7.1/linux.conf b/recipes-qt/qt4/qt-4.7.1/linux.conf
new file mode 100644
index 0000000000..a54135513b
--- /dev/null
+++ b/recipes-qt/qt4/qt-4.7.1/linux.conf
@@ -0,0 +1,66 @@
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 =
16QMAKE_INCDIR_OPENGL_ES1 = $$QMAKE_INCDIR_OPENGL
17QMAKE_LIBDIR_OPENGL_ES1 = $$QMAKE_LIBDIR_OPENGL
18QMAKE_INCDIR_OPENGL_ES2 = $$QMAKE_INCDIR_OPENGL
19QMAKE_LIBDIR_OPENGL_ES2 = $$QMAKE_LIBDIR_OPENGL
20QMAKE_INCDIR_EGL =
21QMAKE_LIBDIR_EGL =
22QMAKE_INCDIR_OPENVG =
23QMAKE_LIBDIR_OPENVG =
24
25
26QMAKE_LIBS =
27QMAKE_LIBS_DYNLOAD = -ldl
28QMAKE_LIBS_X11 = $(OE_QMAKE_LIBS_X11)
29QMAKE_LIBS_X11SM = $(OE_QMAKE_LIBS_X11SM)
30QMAKE_LIBS_NIS = -lnsl
31QMAKE_LIBS_EGL = -lEGL
32QMAKE_LIBS_OPENGL = -lGLU -lGL
33QMAKE_LIBS_OPENGL_QT = -lGL
34QMAKE_LIBS_OPENGL_ES1 = -lGLES_CM
35QMAKE_LIBS_OPENGL_ES2 = -lGLESv2
36QMAKE_LIBS_OPENVG = -lOpenVG
37QMAKE_LIBS_THREAD = -lpthread
38
39QMAKE_MOC = $(OE_QMAKE_MOC)
40QMAKE_UIC = $(OE_QMAKE_UIC)
41QMAKE_UIC3 = $(OE_QMAKE_UIC3)
42QMAKE_RCC = $(OE_QMAKE_RCC)
43QMAKE_QDBUSCPP2XML = $(OE_QMAKE_QDBUSCPP2XML)
44QMAKE_QDBUSXML2CPP = $(OE_QMAKE_QDBUSXML2CPP)
45
46QMAKE_AR = $(OE_QMAKE_AR) cqs
47QMAKE_OBJCOPY = objcopy
48QMAKE_RANLIB =
49
50QMAKE_TAR = tar -cf
51QMAKE_GZIP = gzip -9f
52
53QMAKE_COPY = cp -f
54QMAKE_COPY_FILE = $(COPY)
55QMAKE_COPY_DIR = $(COPY) -r
56QMAKE_MOVE = mv -f
57QMAKE_DEL_FILE = rm -f
58QMAKE_DEL_DIR = rmdir
59QMAKE_STRIP = $(OE_QMAKE_STRIP)
60QMAKE_STRIPFLAGS_LIB += --strip-unneeded
61QMAKE_CHK_DIR_EXISTS = test -d
62QMAKE_MKDIR = mkdir -p
63QMAKE_INSTALL_FILE = install -m 644 -p
64QMAKE_INSTALL_PROGRAM = install -m 755 -p
65
66include(unix.conf)
diff --git a/recipes-qt/qt4/qt4-embedded-4.6.3/0006-freetype-host-includes.patch b/recipes-qt/qt4/qt4-embedded-4.6.3/0006-freetype-host-includes.patch
new file mode 100644
index 0000000000..987c425138
--- /dev/null
+++ b/recipes-qt/qt4/qt4-embedded-4.6.3/0006-freetype-host-includes.patch
@@ -0,0 +1,20 @@
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
6---
7 config.tests/unix/freetype/freetype.pri | 2 +-
8 1 files changed, 1 insertions(+), 1 deletions(-)
9
10Index: qt-embedded-linux-opensource-src-4.5.0/config.tests/unix/freetype/freetype.pri
11===================================================================
12--- qt-embedded-linux-opensource-src-4.5.0.orig/config.tests/unix/freetype/freetype.pri 2009-02-25 22:32:32.000000000 +0100
13+++ qt-embedded-linux-opensource-src-4.5.0/config.tests/unix/freetype/freetype.pri 2009-03-26 17:14:16.000000000 +0100
14@@ -1,5 +1,5 @@
15 !cross_compile {
16- TRY_INCLUDEPATHS = /include /usr/include $$QMAKE_INCDIR $$QMAKE_INCDIR_X11 $$INCLUDEPATH
17+ TRY_INCLUDEPATHS = $$QMAKE_INCDIR $$QMAKE_INCDIR_X11 $$INCLUDEPATH
18 # LSB doesn't allow using headers from /include or /usr/include
19 linux-lsb-g++:TRY_INCLUDEPATHS = $$QMAKE_INCDIR $$QMAKE_INCDIR_X11 $$INCLUDEPATH
20 for(p, TRY_INCLUDEPATHS) {
diff --git a/recipes-qt/qt4/qt4-embedded-4.6.3/0008-qt-lib-infix.patch b/recipes-qt/qt4/qt4-embedded-4.6.3/0008-qt-lib-infix.patch
new file mode 100644
index 0000000000..61e60a0eb6
--- /dev/null
+++ b/recipes-qt/qt4/qt4-embedded-4.6.3/0008-qt-lib-infix.patch
@@ -0,0 +1,32 @@
1--- /tmp/uitools.prf 2009-12-01 18:38:22.000000000 +0100
2+++ qt-everywhere-opensource-src-4.6.0/mkspecs/features/uitools.prf 2009-12-01 18:58:16.000000000 +0100
3@@ -3,11 +3,11 @@
4
5 # Include the correct version of the UiLoader library
6 symbian: QTUITOOLS_LINKAGE = -lQtUiTools.lib
7-else: QTUITOOLS_LINKAGE = -lQtUiTools
8+else: QTUITOOLS_LINKAGE = -lQtUiTools$${QT_LIBINFIX}
9
10 CONFIG(debug, debug|release) {
11- mac: QTUITOOLS_LINKAGE = -lQtUiTools_debug
12- win32: QTUITOOLS_LINKAGE = -lQtUiToolsd
13+ mac: QTUITOOLS_LINKAGE = -lQtUiTools$${QT_LIBINFIX}_debug
14+ win32: QTUITOOLS_LINKAGE = -lQtUiTools$${QT_LIBINFIX}d
15 }
16 LIBS += $$QTUITOOLS_LINKAGE
17
18--- /tmp/uitools.pro 2009-12-01 18:40:28.000000000 +0100
19+++ qt-everywhere-opensource-src-4.6.0/tools/designer/src/uitools/uitools.pro 2009-12-01 18:59:18.000000000 +0100
20@@ -1,5 +1,5 @@
21 TEMPLATE = lib
22-TARGET = $$qtLibraryTarget(QtUiTools)
23+TARGET = QtUiTools
24 QT += xml
25 CONFIG += qt staticlib
26 DESTDIR = ../../../../lib
27@@ -43,3 +43,5 @@
28 QMAKE_PKGCONFIG_DESTDIR = pkgconfig
29 QMAKE_PKGCONFIG_REQUIRES += QtXml
30 }
31+
32+TARGET = $$qtLibraryTarget($$TARGET$$QT_LIBINFIX) #do this towards the end
diff --git a/recipes-qt/qt4/qt4-embedded-4.6.3/0010-no-simpledecoration-example.patch b/recipes-qt/qt4/qt4-embedded-4.6.3/0010-no-simpledecoration-example.patch
new file mode 100644
index 0000000000..fce5bba938
--- /dev/null
+++ b/recipes-qt/qt4/qt4-embedded-4.6.3/0010-no-simpledecoration-example.patch
@@ -0,0 +1,11 @@
1--- /tmp/qws.pro 2009-12-10 19:30:08.000000000 +0100
2+++ qt-everywhere-opensource-src-4.6.0/examples/qws/qws.pro 2009-12-10 19:30:21.000000000 +0100
3@@ -1,7 +1,7 @@
4 TEMPLATE = subdirs
5 # no /dev/fbX
6 !qnx:!vxworks:SUBDIRS = framebuffer
7-SUBDIRS += mousecalibration simpledecoration
8+SUBDIRS += mousecalibration
9
10 # install
11 sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS README *.pro
diff --git a/recipes-qt/qt4/qt4-embedded-4.6.3/linux.conf b/recipes-qt/qt4/qt4-embedded-4.6.3/linux.conf
new file mode 100644
index 0000000000..68ae80b929
--- /dev/null
+++ b/recipes-qt/qt4/qt4-embedded-4.6.3/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 = -Wl,-rpath-link,SEDME/lib -lglib-2.0
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/recipes-qt/qt4/qt4-embedded.inc b/recipes-qt/qt4/qt4-embedded.inc
new file mode 100644
index 0000000000..60eb179a6b
--- /dev/null
+++ b/recipes-qt/qt4/qt4-embedded.inc
@@ -0,0 +1,51 @@
1SUMMARY = "Qt is a versatile cross-platform application framework -- this is the embedded version."
2SECTION = "libs"
3LICENSE = "GPL QPL"
4PRIORITY = "optional"
5HOMEPAGE = "http://www.trolltech.com"
6DEPENDS += "directfb tslib"
7INC_PR = "r25"
8
9QT_BASE_NAME ?= "qt4-embedded"
10QT_BASE_LIB ?= "libqt-embedded"
11QT_DIR_NAME = "qtopia"
12QT_LIBINFIX = "E"
13
14SRC_URI = "ftp://ftp.trolltech.com/qt/source/qt-embedded-linux-opensource-src-${PV}.tar.bz2 \
15 file://0001-cross-compile.patch \
16 file://0002-fix-resinit-declaration.patch \
17 file://0003-no-tools.patch \
18 file://0004-no-qmake.patch \
19 file://0006-freetype-host-includes.patch \
20 file://0007-openssl-host-includes.patch \
21 file://0008-qt-lib-infix.patch \
22 file://0009-support-2bpp.patch \
23 file://fix-config-tests.patch \
24 file://g++.conf \
25 file://linux.conf \
26 "
27
28# Set necessary variables in the profile
29SRC_URI += "file://qte.sh"
30
31S = "${WORKDIR}/qt-embedded-linux-opensource-src-${PV}"
32
33QT_CONFIG_FLAGS += " \
34 -qtlibinfix ${QT_LIBINFIX} \
35 -plugin-gfx-transformed -plugin-gfx-qvfb -plugin-gfx-vnc -plugin-gfx-directfb \
36 -plugin-mouse-tslib -qt-mouse-pc -qt-mouse-qvfb -qt-mouse-linuxinput \
37 -qt-kbd-tty \
38 -DQT_KEYPAD_NAVIGATION \
39 "
40
41require qt4.inc
42
43do_install_append() {
44 install -d ${D}${sysconfdir}/profile.d/
45 install -m 0755 ${WORKDIR}/qte.sh ${D}${sysconfdir}/profile.d/
46}
47
48FILES_${PN} += " ${sysconfdir}/profile.d/qte.sh"
49
50inherit qt4e
51
diff --git a/recipes-qt/qt4/qt4-embedded/0006-freetype-host-includes.patch b/recipes-qt/qt4/qt4-embedded/0006-freetype-host-includes.patch
new file mode 100644
index 0000000000..987c425138
--- /dev/null
+++ b/recipes-qt/qt4/qt4-embedded/0006-freetype-host-includes.patch
@@ -0,0 +1,20 @@
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
6---
7 config.tests/unix/freetype/freetype.pri | 2 +-
8 1 files changed, 1 insertions(+), 1 deletions(-)
9
10Index: qt-embedded-linux-opensource-src-4.5.0/config.tests/unix/freetype/freetype.pri
11===================================================================
12--- qt-embedded-linux-opensource-src-4.5.0.orig/config.tests/unix/freetype/freetype.pri 2009-02-25 22:32:32.000000000 +0100
13+++ qt-embedded-linux-opensource-src-4.5.0/config.tests/unix/freetype/freetype.pri 2009-03-26 17:14:16.000000000 +0100
14@@ -1,5 +1,5 @@
15 !cross_compile {
16- TRY_INCLUDEPATHS = /include /usr/include $$QMAKE_INCDIR $$QMAKE_INCDIR_X11 $$INCLUDEPATH
17+ TRY_INCLUDEPATHS = $$QMAKE_INCDIR $$QMAKE_INCDIR_X11 $$INCLUDEPATH
18 # LSB doesn't allow using headers from /include or /usr/include
19 linux-lsb-g++:TRY_INCLUDEPATHS = $$QMAKE_INCDIR $$QMAKE_INCDIR_X11 $$INCLUDEPATH
20 for(p, TRY_INCLUDEPATHS) {
diff --git a/recipes-qt/qt4/qt4-embedded_4.6.3.bb b/recipes-qt/qt4/qt4-embedded_4.6.3.bb
new file mode 100644
index 0000000000..13f3f00edf
--- /dev/null
+++ b/recipes-qt/qt4/qt4-embedded_4.6.3.bb
@@ -0,0 +1,7 @@
1require qt4-embedded.inc
2
3PR = "${INC_PR}.1"
4
5QT_CONFIG_FLAGS_append_armv6 = " -no-neon "
6
7require qt-${PV}.inc
diff --git a/recipes-qt/qt4/qt4-embedded_4.7.1.bb b/recipes-qt/qt4/qt4-embedded_4.7.1.bb
new file mode 100644
index 0000000000..1cd43a664b
--- /dev/null
+++ b/recipes-qt/qt4/qt4-embedded_4.7.1.bb
@@ -0,0 +1,14 @@
1DEFAULT_PREFERENCE = "-1"
2
3require qt4-embedded.inc
4
5PR = "${INC_PR}.0"
6
7QT_CONFIG_FLAGS_append_armv6 = " -no-neon "
8
9require qt-${PV}.inc
10
11QT_CONFIG_FLAGS += " \
12 -exceptions \
13"
14
diff --git a/recipes-qt/qt4/qt4-tools-native.inc b/recipes-qt/qt4/qt4-tools-native.inc
new file mode 100644
index 0000000000..bb81f74d81
--- /dev/null
+++ b/recipes-qt/qt4/qt4-tools-native.inc
@@ -0,0 +1,77 @@
1DESCRIPTION = "Native tools for Qt/[X11|Mac|Embedded] version 4.x"
2DEPENDS = "zlib-native dbus-native"
3SECTION = "libs"
4HOMEPAGE = "http://qt.nokia.com
5PRIORITY = "optional"
6
7INC_PR = "r10"
8
9inherit native
10
11SRC_URI = "ftp://ftp.trolltech.com/qt/source/qt-everywhere-opensource-src-${PV}.tar.gz \
12 file://qt-config.patch \
13 file://g++.conf \
14 file://linux.conf"
15S = "${WORKDIR}/qt-everywhere-opensource-src-${PV}"
16
17EXTRA_OECONF = "-prefix ${prefix} \
18 -L ${STAGING_LIBDIR_NATIVE} \
19 -I ${STAGING_INCDIR_NATIVE} \
20 -qt-libjpeg -qt-gif -system-zlib \
21 -no-libjpeg -no-libpng -no-libmng -no-libtiff \
22 -no-accessibility \
23 -no-cups \
24 -no-exceptions \
25 -no-nas-sound \
26 -no-nis -no-openssl \
27 -verbose -release -static \
28 -embedded -no-freetype -no-glib -no-iconv \
29 -qt3support"
30
31# yank default -e, otherwise we get the following error:
32# moc_qbuffer.cpp: No such file or directory
33EXTRA_OEMAKE = " "
34
35do_configure() {
36 (echo o; echo yes) | ./configure ${EXTRA_OECONF} || die "Configuring qt failed. EXTRA_OECONF was ${EXTRA_OECONF}"
37}
38
39TOBUILD = "\
40 src/tools/moc \
41 src/corelib \
42 src/sql \
43 src/dbus \
44 src/qt3support \
45 src/xml \
46 src/tools/uic \
47 src/tools/rcc \
48 src/network \
49 src/gui \
50 src/tools/uic3 \
51 tools/linguist/lrelease \
52 tools/linguist/lupdate \
53 tools/qdbus \
54"
55
56do_compile() {
57 for i in ${TOBUILD}; do
58 cd ${S}/$i && oe_runmake CC="${CC}" CXX="${CXX}"
59 done
60}
61
62NATIVE_INSTALL_WORKS = "1"
63
64do_install() {
65 install -d ${D}${bindir}/
66 install -m 0755 bin/qmake ${D}${bindir}/qmake2
67 for i in moc uic uic3 rcc lrelease lupdate qdbuscpp2xml qdbusxml2cpp; do
68 install -m 0755 bin/${i} ${D}${bindir}/${i}4
69 done
70
71 install -d ${D}${datadir}/qt4/
72 cp -PfR mkspecs ${D}${datadir}/qt4/
73 ln -sf linux-g++ ${D}${datadir}/qt4/mkspecs/${BUILD_OS}-oe-g++
74 cp -f ${WORKDIR}/g++.conf ${WORKDIR}/linux.conf ${D}${datadir}/qt4/mkspecs/common/
75
76 install -m 0644 tools/porting/src/q3porting.xml ${D}${datadir}/qt4/
77}
diff --git a/recipes-qt/qt4/qt4-tools-native_4.6.3.bb b/recipes-qt/qt4/qt4-tools-native_4.6.3.bb
new file mode 100644
index 0000000000..be6a72b7c3
--- /dev/null
+++ b/recipes-qt/qt4/qt4-tools-native_4.6.3.bb
@@ -0,0 +1,18 @@
1DEFAULT_PREFERENCE = "-1"
2
3LICENSE = "LGPLv2.1 | GPLv3"
4LIC_FILES_CHKSUM = "file://LICENSE.LGPL;md5=fbc093901857fcd118f065f900982c24 \
5 file://LICENSE.GPL3;md5=babc5b6b77441da277f5c06b2e547720 \
6 file://LGPL_EXCEPTION.txt;md5=411080a56ff917a5a1aa08c98acae354"
7
8require qt4-tools-native.inc
9LICENSE = "LGPLv2.1 GPLv3"
10PR = "${INC_PR}.0"
11
12EXTRA_OECONF += " -no-fast -silent -no-rpath"
13
14TOBUILD := "src/tools/bootstrap ${TOBUILD}"
15
16SRC_URI[md5sum] = "5c69f16d452b0bb3d44bc3c10556c072"
17SRC_URI[sha256sum] = "f4e0ada8d4d516bbb8600a3ee7d9046c9c79e38cd781df9ffc46d8f16acd1768"
18
diff --git a/recipes-qt/qt4/qt4-tools-native_4.7.1.bb b/recipes-qt/qt4/qt4-tools-native_4.7.1.bb
new file mode 100644
index 0000000000..452ddaa13d
--- /dev/null
+++ b/recipes-qt/qt4/qt4-tools-native_4.7.1.bb
@@ -0,0 +1,21 @@
1DEFAULT_PREFERENCE = "-1"
2
3require qt4-tools-native.inc
4LICENSE = "LGPLv2.1 GPLv3"
5
6PR = "${INC_PR}.0"
7
8# Find the g++.conf/linux.conf in the right directory.
9FILESPATHPKG =. "qt-${PV}:"
10SRC_URI = "ftp://ftp.trolltech.com/qt/source/qt-everywhere-opensource-src-${PV}.tar.gz \
11 file://qt-config.patch \
12 file://g++.conf \
13 file://linux.conf"
14S = "${WORKDIR}/qt-everywhere-opensource-src-${PV}"
15
16EXTRA_OECONF += " -no-fast -silent -no-rpath"
17
18TOBUILD := "src/tools/bootstrap ${TOBUILD}"
19
20SRC_URI[md5sum] = "6f88d96507c84e9fea5bf3a71ebeb6d7"
21SRC_URI[sha256sum] = "8cb5277c41f824cfc6dcee0e95e0bf23a9ad2c8d18d245105137481d092b124a"
diff --git a/recipes-qt/qt4/qt4-tools-sdk.inc b/recipes-qt/qt4/qt4-tools-sdk.inc
new file mode 100644
index 0000000000..1bcfed060f
--- /dev/null
+++ b/recipes-qt/qt4/qt4-tools-sdk.inc
@@ -0,0 +1,88 @@
1DESCRIPTION = "SDK tools for Qt/[X11|Mac|Embedded] version 4.x"
2DEPENDS = "zlib-native dbus-native"
3SECTION = "libs"
4HOMEPAGE = "http://www.trolltech.com"
5PRIORITY = "optional"
6LICENSE = "LGPLv2.1 GPLv3"
7
8INC_PR = "r2"
9
10FILESPATHPKG =. "qt-${PV}:"
11inherit nativesdk
12
13SRC_URI = "ftp://ftp.trolltech.com/qt/source/qt-everywhere-opensource-src-${PV}.tar.gz \
14 file://configure-lflags.patch \
15 file://compile.test-lflags.patch \
16 file://qt-config.patch \
17 file://g++.conf \
18 file://linux.conf"
19
20S = "${WORKDIR}/qt-everywhere-opensource-src-${PV}"
21
22
23# FIXME: make it work with "${STAGING_BINDIR_NATIVE}/pkg-config --cflags dbus-1"
24EXTRA_OECONF = "-prefix ${prefix} \
25 -qt-libjpeg -qt-gif -system-zlib \
26 -no-libjpeg -no-libpng -no-libmng -no-libtiff \
27 -no-accessibility \
28 -no-cups \
29 -no-exceptions \
30 -no-nas-sound \
31 -no-nis -no-openssl \
32 -verbose -release -fast -static \
33 -embedded -no-freetype -no-glib -no-iconv \
34 -qt3support \
35 -I${STAGING_DIR_NATIVE}/usr/include \
36 -I${STAGING_DIR_NATIVE}/usr/include/dbus-1.0 \
37 -I${STAGING_DIR_NATIVE}/usr/lib/dbus-1.0/include"
38
39# yank default -e, otherwise we get the following error:
40# moc_qbuffer.cpp: No such file or directory
41EXTRA_OEMAKE = " "
42
43do_configure() {
44 (echo o; echo yes) | ./configure ${EXTRA_OECONF} || die "Configuring qt failed. EXTRA_OECONF was ${EXTRA_OECONF}"
45}
46
47TOBUILD = "\
48 src/tools/bootstrap \
49 src/tools/moc \
50 src/corelib \
51 src/sql \
52 src/dbus \
53 src/qt3support \
54 src/xml \
55 src/tools/uic \
56 src/tools/rcc \
57 src/network \
58 src/gui \
59 src/tools/uic3 \
60 tools/linguist/lrelease \
61 tools/linguist/lupdate \
62 tools/qdbus \
63"
64
65do_compile() {
66 for i in ${TOBUILD}; do
67 cd ${S}/$i && oe_runmake CC="${CC}" CXX="${CXX}"
68 done
69}
70
71do_install() {
72 install -d ${D}${bindir}
73 install -m 0755 bin/qmake ${D}${bindir}/qmake2
74 for i in moc uic uic3 rcc lrelease lupdate qdbuscpp2xml qdbusxml2cpp; do
75 install -m 0755 bin/${i} ${D}${bindir}/${i}4
76 done
77
78 (cd ${D}${bindir}; \
79 ln -s qmake2 qmake; \
80 for i in moc uic uic3 rcc lrelease lupdate qdbuscpp2xml qdbusxml2cpp; do \
81 ln -s ${i}4 ${i}; \
82 done)
83
84 # make a symbolic link to mkspecs for compatibility with Nokia's SDK
85 # and QTCreator
86 (cd ${D}${bindir}/..; ln -s ${TARGET_SYS}/usr/share/qtopia/mkspecs mkspecs;)
87}
88
diff --git a/recipes-qt/qt4/qt4-tools-sdk_4.6.3.bb b/recipes-qt/qt4/qt4-tools-sdk_4.6.3.bb
new file mode 100644
index 0000000000..5913507179
--- /dev/null
+++ b/recipes-qt/qt4/qt4-tools-sdk_4.6.3.bb
@@ -0,0 +1,90 @@
1DESCRIPTION = "SDK tools for Qt/[X11|Mac|Embedded] version 4.x"
2DEPENDS = "zlib-native dbus-native"
3SECTION = "libs"
4HOMEPAGE = "http://www.trolltech.com"
5PRIORITY = "optional"
6LICENSE = "LGPLv2.1 GPLv3"
7
8PR = "r1"
9
10DEFAULT_PREFERENCE = "-1"
11inherit nativesdk
12
13SRC_URI = "ftp://ftp.trolltech.com/qt/source/qt-everywhere-opensource-src-${PV}.tar.gz \
14 file://configure-lflags.patch \
15 file://compile.test-lflags.patch \
16 file://qt-config.patch \
17 file://g++.conf \
18 file://linux.conf"
19
20S = "${WORKDIR}/qt-everywhere-opensource-src-${PV}"
21
22
23# FIXME: make it work with "${STAGING_BINDIR_NATIVE}/pkg-config --cflags dbus-1"
24EXTRA_OECONF = "-prefix ${prefix} \
25 -qt-libjpeg -qt-gif -system-zlib \
26 -no-libjpeg -no-libpng \
27 -no-accessibility \
28 -no-cups \
29 -no-exceptions \
30 -no-nas-sound \
31 -no-nis \
32 -verbose -release -fast -static \
33 -qt3support \
34 -I${STAGING_DIR_NATIVE}/usr/include \
35 -I${STAGING_DIR_NATIVE}/usr/include/freetype2 \
36 -I${STAGING_DIR_NATIVE}/usr/include/dbus-1.0 \
37 -I${STAGING_DIR_NATIVE}/usr/lib/dbus-1.0/include"
38
39# yank default -e, otherwise we get the following error:
40# moc_qbuffer.cpp: No such file or directory
41EXTRA_OEMAKE = " "
42
43do_configure() {
44 (echo o; echo yes) | ./configure ${EXTRA_OECONF} || die "Configuring qt failed. EXTRA_OECONF was ${EXTRA_OECONF}"
45}
46
47TOBUILD = "\
48 src/tools/bootstrap \
49 src/tools/moc \
50 src/corelib \
51 src/sql \
52 src/dbus \
53 src/qt3support \
54 src/xml \
55 src/tools/uic \
56 src/tools/rcc \
57 src/network \
58 src/gui \
59 src/tools/uic3 \
60 tools/linguist/lrelease \
61 tools/linguist/lupdate \
62 tools/qdbus \
63"
64
65do_compile() {
66 for i in ${TOBUILD}; do
67 cd ${S}/$i && oe_runmake CC="${CC}" CXX="${CXX}"
68 done
69}
70
71do_install() {
72 install -d ${D}${bindir}
73 install -m 0755 bin/qmake ${D}${bindir}/qmake2
74 for i in moc uic uic3 rcc lrelease lupdate qdbuscpp2xml qdbusxml2cpp; do
75 install -m 0755 bin/${i} ${D}${bindir}/${i}4
76 done
77
78 (cd ${D}${bindir}; \
79 ln -s qmake2 qmake; \
80 for i in moc uic uic3 rcc lrelease lupdate qdbuscpp2xml qdbusxml2cpp; do \
81 ln -s ${i}4 ${i}; \
82 done)
83
84 # make a symbolic link to mkspecs for compatibility with Nokia's SDK
85 # and QTCreator
86 (cd ${D}${bindir}/..; ln -s ${TARGET_SYS}/usr/share/qtopia/mkspecs mkspecs;)
87}
88
89SRC_URI[md5sum] = "5c69f16d452b0bb3d44bc3c10556c072"
90SRC_URI[sha256sum] = "f4e0ada8d4d516bbb8600a3ee7d9046c9c79e38cd781df9ffc46d8f16acd1768"
diff --git a/recipes-qt/qt4/qt4-tools-sdk_4.7.1.bb b/recipes-qt/qt4/qt4-tools-sdk_4.7.1.bb
new file mode 100644
index 0000000000..1018f74c36
--- /dev/null
+++ b/recipes-qt/qt4/qt4-tools-sdk_4.7.1.bb
@@ -0,0 +1,8 @@
1require qt4-tools-sdk.inc
2
3PR = "${INC_PR}.0"
4
5DEFAULT_PREFERENCE = "-1"
6
7SRC_URI[md5sum] = "6f88d96507c84e9fea5bf3a71ebeb6d7"
8SRC_URI[sha256sum] = "8cb5277c41f824cfc6dcee0e95e0bf23a9ad2c8d18d245105137481d092b124a"
diff --git a/recipes-qt/qt4/qt4-x11-free-4.6.3/linux.conf b/recipes-qt/qt4/qt4-x11-free-4.6.3/linux.conf
new file mode 100644
index 0000000000..68ae80b929
--- /dev/null
+++ b/recipes-qt/qt4/qt4-x11-free-4.6.3/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 = -Wl,-rpath-link,SEDME/lib -lglib-2.0
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/recipes-qt/qt4/qt4-x11-free.inc b/recipes-qt/qt4/qt4-x11-free.inc
new file mode 100644
index 0000000000..22242e4212
--- /dev/null
+++ b/recipes-qt/qt4/qt4-x11-free.inc
@@ -0,0 +1,36 @@
1DESCRIPTION = "Qt is a versatile cross-platform application framework -- this is the X11 version."
2SECTION = "x11/libs"
3PRIORITY = "optional"
4HOMEPAGE = "http://www.trolltech.com"
5DEPENDS += "virtual/libx11 fontconfig libxft libxext libxrender libxrandr libxcursor"
6
7INC_PR = "r21"
8
9SRC_URI = "ftp://ftp.trolltech.com/qt/source/qt-x11-opensource-src-${PV}.tar.gz \
10 file://0001-cross-compile.patch \
11 file://0002-fix-resinit-declaration.patch \
12 file://0003-no-tools.patch \
13 file://0004-no-qmake.patch \
14 file://0006-freetype-host-includes.patch \
15 file://0007-openssl-host-includes.patch \
16 file://0008-qt-lib-infix.patch \
17 file://fix-config-tests.patch \
18 file://g++.conf \
19 file://linux.conf \
20 "
21S = "${WORKDIR}/qt-x11-opensource-src-${PV}"
22
23QT_GLFLAGS ?= "-no-opengl"
24QT_GLFLAGS_qemux86 = "-opengl"
25QT_GLFLAGS_emenlow = "-opengl"
26QT_GLFLAGS_atom-pc = "-opengl"
27QT_CONFIG_FLAGS += "-no-xinerama -no-xkb ${QT_GLFLAGS}"
28QT_BASE_NAME ?= "qt4"
29QT_BASE_LIB ?= "libqt"
30QT_DIR_NAME = "qt4"
31QT_LIBINFIX = ""
32
33require qt4.inc
34
35inherit qt4x11
36
diff --git a/recipes-qt/qt4/qt4-x11-free_4.6.3.bb b/recipes-qt/qt4/qt4-x11-free_4.6.3.bb
new file mode 100644
index 0000000000..0a03e9b5a3
--- /dev/null
+++ b/recipes-qt/qt4/qt4-x11-free_4.6.3.bb
@@ -0,0 +1,9 @@
1require qt4-x11-free.inc
2require qt-4.6.3.inc
3
4PR = "r1"
5
6QT_CONFIG_FLAGS += " -xrandr "
7
8SRC_URI[md5sum] = "5c69f16d452b0bb3d44bc3c10556c072"
9SRC_URI[sha256sum] = "f4e0ada8d4d516bbb8600a3ee7d9046c9c79e38cd781df9ffc46d8f16acd1768"
diff --git a/recipes-qt/qt4/qt4.inc b/recipes-qt/qt4/qt4.inc
new file mode 100644
index 0000000000..ac1fc83b12
--- /dev/null
+++ b/recipes-qt/qt4/qt4.inc
@@ -0,0 +1,301 @@
1inherit qmake_base
2
3DEPENDS += "qt4-tools-native freetype jpeg libpng zlib dbus openssl glib-2.0 gstreamer gst-plugins-base mysql5 postgresql sqlite sqlite3"
4
5require qt4_arch.inc
6QT_ARCH := "${@qt_arch(d)}"
7QT_ENDIAN = "${@qt_endian(d)}"
8
9QT_CONFIG_FLAGS += "-release -no-cups -no-accessibility -reduce-relocations \
10 -shared -no-nas-sound -no-sm -no-nis \
11 -qt-gif -system-libjpeg -system-libpng -system-zlib \
12 -no-sql-ibase -plugin-sql-mysql -no-sql-odbc -plugin-sql-psql -plugin-sql-sqlite -plugin-sql-sqlite2 \
13 -no-pch -qdbus -stl -glib -phonon -webkit"
14
15EXTRA_OEMAKE = "-e"
16
17EXTRA_ENV = 'QMAKE="${STAGING_BINDIR_NATIVE}/qmake2 -after \
18 INCPATH+=${STAGING_INCDIR}/freetype2 LIBS+=-L${STAGING_LIBDIR}" \
19 QMAKESPEC="${QMAKESPEC}" LINK="${CXX} -Wl,-rpath-link,${STAGING_LIBDIR}" \
20 AR="${TARGET_PREFIX}ar cqs" \
21 MOC="${STAGING_BINDIR_NATIVE}/moc4" UIC="${STAGING_BINDIR_NATIVE}/uic4" MAKE="make -e"'
22
23export QT_CONF_PATH="${WORKDIR}/qt.conf"
24
25# Library packages
26QT_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 QtDeclarative"
27
28QT_EXTRA_LIBS = "pvrQWSWSEGL"
29
30python __anonymous () {
31 import bb
32
33 lib_packages = []
34 dev_packages = []
35 dbg_packages = []
36 for name in bb.data.getVar("QT_LIB_NAMES", d, 1).split():
37 pkg = "${QT_BASE_LIB}" + name.lower().replace("qt", "").replace("_", "-") + "4"
38 # NOTE: the headers for QtAssistantClient are different
39 incname = name.replace("QtAssistantClient", "QtAssistant")
40 bb.data.setVar("FILES_%s" % pkg, "${libdir}/lib%(name)s${QT_LIBINFIX}.so.*" % locals(), d)
41 bb.data.setVar("FILES_%s-dev" % pkg, """${libdir}/lib%(name)s${QT_LIBINFIX}.prl
42 ${libdir}/lib%(name)s${QT_LIBINFIX}.a
43 ${libdir}/lib%(name)s${QT_LIBINFIX}.la
44 ${libdir}/lib%(name)s${QT_LIBINFIX}.so
45 ${includedir}/${QT_DIR_NAME}/%(incname)s
46 ${libdir}/pkgconfig/%(name)s${QT_LIBINFIX}.pc""" % locals(), d)
47 bb.data.setVar("FILES_%s-dbg" % pkg, "${libdir}/.debug/lib%(name)s${QT_LIBINFIX}.so.*" % locals(), d)
48 lib_packages.append(pkg)
49 dev_packages.append("%s-dev" % pkg)
50 dbg_packages.append("%s-dbg" % pkg)
51 for name in bb.data.getVar("OTHER_PACKAGES", d, 1).split():
52 dbg_packages.append("%s-dbg" % name)
53
54 for name in bb.data.getVar("QT_EXTRA_LIBS", d, 1).split():
55 pkg = "${QT_BASE_LIB}" + name.lower().replace("qt", "").replace("_", "-") + "4"
56 bb.data.setVar("FILES_%s" % pkg, "${libdir}/lib%(name)s.so.*" % locals(), d)
57 bb.data.setVar("FILES_%s-dev" % pkg, """${libdir}/lib%(name)s.prl
58 ${libdir}/lib%(name)s.a
59 ${libdir}/lib%(name)s.la
60 ${libdir}/lib%(name)s.so
61 ${includedir}/${QT_DIR_NAME}/%(incname)s
62 ${libdir}/pkgconfig/%(name)s.pc""" % locals(), d)
63 bb.data.setVar("FILES_%s-dbg" % pkg, "${libdir}/.debug/lib%(name)s.so.*" % locals(), d)
64 lib_packages.append(pkg)
65 dev_packages.append("%s-dev" % pkg)
66 dbg_packages.append("%s-dbg" % pkg)
67
68 bb.data.setVar("LIB_PACKAGES", " ".join(lib_packages), d)
69 bb.data.setVar("DEV_PACKAGES", " ".join(dev_packages), d)
70 bb.data.setVar("DBG_PACKAGES", " ".join(dbg_packages), d)
71}
72
73OTHER_PACKAGES = "\
74 ${QT_BASE_NAME}-tools \
75 ${QT_BASE_NAME}-assistant \
76 ${QT_BASE_NAME}-common \
77 ${QT_BASE_NAME}-dbus \
78 ${QT_BASE_NAME}-demos \
79 ${QT_BASE_NAME}-designer \
80 ${QT_BASE_NAME}-examples \
81 ${QT_BASE_NAME}-fonts \
82 ${QT_BASE_NAME}-fonts-ttf-vera \
83 ${QT_BASE_NAME}-fonts-ttf-dejavu \
84 ${QT_BASE_NAME}-fonts-pfa \
85 ${QT_BASE_NAME}-fonts-pfb \
86 ${QT_BASE_NAME}-fonts-qpf \
87 ${QT_BASE_NAME}-linguist \
88 ${QT_BASE_NAME}-makeqpf \
89 ${QT_BASE_NAME}-mkspecs \
90 ${QT_BASE_NAME}-pixeltool \
91 ${QT_BASE_NAME}-qmlviewer \
92 ${QT_BASE_NAME}-xmlpatterns \
93 ${QT_BASE_NAME}-qt3to4"
94
95PACKAGES += "${LIB_PACKAGES} ${DEV_PACKAGES} ${DBG_PACKAGES} ${OTHER_PACKAGES}"
96PACKAGES_DYNAMIC = "${QT_BASE_NAME}-plugin-* ${QT_BASE_NAME}-translation-* ${QT_BASE_NAME}-fonts-*"
97
98ALLOW_EMPTY_${PN} = "1"
99ALLOW_EMPTY_${QT_BASE_NAME}-fonts = "1"
100FILES_${PN} = ""
101FILES_${PN}-dev = "${includedir}/${QT_DIR_NAME}/Qt/*"
102FILES_${PN}-dbg = ""
103RRECOMMENDS_${PN} = "${LIB_PACKAGES} ${OTHER_PACKAGES}"
104RRECOMMENDS_${PN}-dev = "${DEV_PACKAGES}"
105RRECOMMENDS_${PN}-dbg = "${DBG_PACKAGES}"
106RRECOMMENDS_${QT_BASE_NAME}-fonts = " \
107 ${QT_BASE_NAME}-fonts-ttf-vera \
108 ${QT_BASE_NAME}-fonts-ttf-dejavu \
109 ${QT_BASE_NAME}-fonts-pfa \
110 ${QT_BASE_NAME}-fonts-pfb \
111 ${QT_BASE_NAME}-fonts-qpf"
112
113FILES_${QT_BASE_NAME}-tools = "${bindir}/uic* ${bindir}/moc ${bindir}/rcc ${bindir}/qttracereplay ${bindir}/qdoc*"
114FILES_${QT_BASE_NAME}-tools-dbg = "${bindir}/.debug/uic* ${bindir}/.debug/moc ${bindir}/.debug/rcc ${bindir}/.debug/qttracereplay ${bindir}/.debug/qdoc*"
115FILES_${QT_BASE_NAME}-assistant = "${bindir}/*assistant* ${bindir}/qcollectiongenerator ${bindir}/qhelpconverter ${bindir}/qhelpgenerator"
116FILES_${QT_BASE_NAME}-assistant-dbg = "${bindir}/.debug/*assistant* ${bindir}/.debug/qcollectiongenerator ${bindir}/.debug/qhelpconverter ${bindir}/.debug/qhelpgenerator"
117FILES_${QT_BASE_NAME}-common = "${bindir}/qtconfig"
118FILES_${QT_BASE_NAME}-common-dbg = "${bindir}/.debug/qtconfig"
119FILES_${QT_BASE_NAME}-dbus = "${bindir}/qdbus ${bindir}/qdbusxml2cpp ${bindir}/qdbuscpp2xml ${bindir}/qdbusviewer"
120FILES_${QT_BASE_NAME}-dbus-dbg = "${bindir}/.debug/qdbus ${bindir}/.debug/qdbusxml2cpp ${bindir}/.debug/qdbuscpp2xml ${bindir}/.debug/qdbusviewer"
121FILES_${QT_BASE_NAME}-demos = "${bindir}/qtdemo* ${bindir}/${QT_DIR_NAME}/demos/*"
122FILES_${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"
123FILES_${QT_BASE_NAME}-designer = "${bindir}/*designer*"
124FILES_${QT_BASE_NAME}-designer-dbg = "${bindir}/.debug/*designer*"
125FILES_${QT_BASE_NAME}-examples = "${bindir}/${QT_DIR_NAME}/examples/*"
126FILES_${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 ${bindir}/${QT_DIR_NAME}/examples/declarative/*/*/*/*/*/.debug/* ${bindir}/${QT_DIR_NAME}/examples/declarative/*/*/*/*/.debug/*"
127FILES_${QT_BASE_NAME}-fonts-ttf-vera = "${libdir}/fonts/Vera*.ttf"
128FILES_${QT_BASE_NAME}-fonts-ttf-dejavu = "${libdir}/fonts/DejaVu*.ttf"
129FILES_${QT_BASE_NAME}-fonts-pfa = "${libdir}/fonts/*.pfa"
130FILES_${QT_BASE_NAME}-fonts-pfb = "${libdir}/fonts/*.pfb"
131FILES_${QT_BASE_NAME}-fonts-qpf = "${libdir}/fonts/*.qpf"
132FILES_${QT_BASE_NAME}-linguist = "${bindir}/*linguist* ${bindir}/lrelease ${bindir}/lupdate ${bindir}/lconvert ${bindir}/qm2ts"
133FILES_${QT_BASE_NAME}-linguist-dbg = "${bindir}/.debug/*linguist* ${bindir}/.debug/lrelease ${bindir}/.debug/lupdate ${bindir}/.debug/lconvert ${bindir}/.debug/qm2ts"
134FILES_${QT_BASE_NAME}-pixeltool = "${bindir}/pixeltool"
135FILES_${QT_BASE_NAME}-pixeltool-dbg = "${bindir}/.debug/pixeltool"
136FILES_${QT_BASE_NAME}-qt3to4 = "${bindir}/qt3to4 ${datadir}/${QT_DIR_NAME}/q3porting.xml"
137FILES_${QT_BASE_NAME}-qt3to4-dbg = "${bindir}/.debug/qt3to4"
138FILES_${QT_BASE_NAME}-qmlviewer = "${bindir}/qmlviewer"
139FILES_${QT_BASE_NAME}-qmlviewer-dbg = "${bindir}/.debug/qmlviewer"
140FILES_${QT_BASE_NAME}-makeqpf = "${bindir}/makeqpf"
141FILES_${QT_BASE_NAME}-makeqpf-dbg = "${bindir}/.debug/makeqpf"
142FILES_${QT_BASE_NAME}-mkspecs = "${datadir}/${QT_DIR_NAME}/mkspecs/*"
143FILES_${QT_BASE_NAME}-xmlpatterns = "${bindir}/xmlpatterns*"
144FILES_${QT_BASE_NAME}-xmlpatterns-dbg = "${bindir}/.debug/xmlpatterns*"
145
146
147do_configure() {
148 unset QMAKESPEC
149 unset QTDIR
150
151 if [ ! -e bin/qmake ]; then
152 ln -sf ${STAGING_BINDIR_NATIVE}/qmake2 bin/qmake
153 fi
154
155 if [ ! -e mkspecs/${TARGET_OS}-oe-g++ ]; then
156 ln -sf linux-g++ mkspecs/${TARGET_OS}-oe-g++
157 fi
158
159 cp -f ${WORKDIR}/g++.conf ${WORKDIR}/linux.conf mkspecs/common/
160
161 echo "[Paths]" > $QT_CONF_PATH
162 echo "Prefix=${prefix}/" >> $QT_CONF_PATH
163 echo "Documentation=${docdir}/${QT_DIR_NAME}" >> $QT_CONF_PATH
164 echo "Headers=${includedir}/${QT_DIR_NAME}" >> $QT_CONF_PATH
165 echo "Libraries=${libdir}" >> $QT_CONF_PATH
166 echo "Binaries=${bindir}" >> $QT_CONF_PATH
167 echo "Plugins=${libdir}/${QT_DIR_NAME}/plugins" >> $QT_CONF_PATH
168 echo "Data=${datadir}/${QT_DIR_NAME}" >> $QT_CONF_PATH
169 echo "Translations=${datadir}/${QT_DIR_NAME}/translations" >> $QT_CONF_PATH
170 echo "Settings=${sysconfdir}/${QT_DIR_NAME}" >> $QT_CONF_PATH
171 echo "Examples=${bindir}/${QT_DIR_NAME}/examples" >> $QT_CONF_PATH
172 echo "Demos=${bindir}/${QT_DIR_NAME}/demos" >> $QT_CONF_PATH
173
174 ${EXTRA_QMAKE_MUNGE}|| true
175
176 (echo o; echo yes) | ./configure -v \
177 -prefix ${prefix}/ \
178 -bindir ${bindir} \
179 -libdir ${libdir} \
180 -datadir ${datadir}/${QT_DIR_NAME} \
181 -sysconfdir ${sysconfdir}/${QT_DIR_NAME} \
182 -docdir ${docdir}/${QT_DIR_NAME} \
183 -headerdir ${includedir}/${QT_DIR_NAME} \
184 -plugindir ${libdir}/${QT_DIR_NAME}/plugins \
185 -translationdir ${datadir}/${QT_DIR_NAME}/translations \
186 -examplesdir ${bindir}/${QT_DIR_NAME}/examples \
187 -demosdir ${bindir}/${QT_DIR_NAME}/demos \
188 -platform ${TARGET_OS}-oe-g++ \
189 -xplatform ${TARGET_OS}-oe-g++ \
190 -embedded ${QT_ARCH} ${QT_ENDIAN} \
191 -crossarch ${QT_ARCH} \
192 ${QT_CONFIG_FLAGS} -no-fast \
193 -L${STAGING_LIBDIR} -I${STAGING_INCDIR} \
194 -I${STAGING_INCDIR}/freetype2 \
195 -I${STAGING_INCDIR}/mysql \
196 -I${STAGING_INCDIR}/postgresql
197}
198
199do_compile() {
200 unset CFLAGS CXXFLAGS
201 install -m 0755 ${STAGING_BINDIR_NATIVE}/rcc4 ${S}/bin/rcc
202 install -m 0755 ${STAGING_BINDIR_NATIVE}/moc4 ${S}/bin/moc
203 install -m 0755 ${STAGING_BINDIR_NATIVE}/uic4 ${S}/bin/uic
204
205 oe_runmake ${EXTRA_ENV}
206}
207
208python populate_packages_prepend() {
209 translation_dir = bb.data.expand('${datadir}/${QT_DIR_NAME}/translations/', d)
210 translation_name = bb.data.expand('${QT_BASE_NAME}-translation-%s', d)
211 do_split_packages(d, translation_dir, '^(assistant|designer|linguist|qt|qtconfig|qvfb)_(.*)\.qm$', translation_name, '${PN} translation for %s', extra_depends='' )
212
213 phrasebook_dir = bb.data.expand('${datadir}/${QT_DIR_NAME}/phrasebooks/', d)
214 phrasebook_name = bb.data.expand('${QT_BASE_NAME}-phrasebook-%s', d)
215 do_split_packages(d, phrasebook_dir, '^(.*)\.qph$', phrasebook_name, '${PN} phrasebook for %s', extra_depends='' )
216
217 # Package all the plugins and their -dbg version and create a meta package
218 import os
219 def qtopia_split(path, name, glob):
220 """
221 Split the package into a normal and -dbg package and then add the
222 new packages to the meta package.
223 """
224 plugin_dir = bb.data.expand('${libdir}/${QT_DIR_NAME}/plugins/%s/' % path, d)
225 if not os.path.exists("%s%s" % (bb.data.expand('${D}',d), plugin_dir)):
226 bb.note("The path does not exist:", bb.data.expand('${D}', d), plugin_dir)
227 return
228
229 plugin_name = bb.data.expand('${QT_BASE_NAME}-plugin-%s-%%s' % name, d)
230 dev_packages = []
231 dev_hook = lambda file,pkg,b,c,d:dev_packages.append((file,pkg))
232 do_split_packages(d, plugin_dir, glob, plugin_name, '${PN} %s for %%s' % name, extra_depends='', hook=dev_hook)
233 # Create a -dbg package as well
234 plugin_dir_dbg = bb.data.expand('${libdir}/${QT_DIR_NAME}/plugins/%s/.debug' % path, d)
235 packages = bb.data.getVar('PACKAGES',d)
236 for (file,package) in dev_packages:
237 packages = "%s %s-dbg" % (packages, package)
238 file_name = os.path.join(plugin_dir_dbg, os.path.basename(file))
239 bb.data.setVar("FILES_%s-dbg" % package, file_name, d)
240 bb.data.setVar("DESCRIPTION_%s-dbg" % package, "${PN} %s for %s" % (name, package), d)
241
242 bb.data.setVar('PACKAGES', packages, d)
243
244 qtopia_split('accessible', 'accessible', '^libq(.*)\.so$')
245 qtopia_split('codecs', 'codec', '^libq(.*)\.so$')
246 qtopia_split('decorations', 'decoration', '^libqdecoration(.*)\.so$')
247 qtopia_split('designer', 'designer', '^lib(.*)\.so$')
248 qtopia_split('gfxdrivers', 'gfxdriver', '^libq(.*)\.so$')
249 qtopia_split('graphicssystems','graphicssystems', '^libq(.*)\.so$')
250 qtopia_split('mousedrivers', 'mousedriver', '^libq(.*)mousedriver\.so$')
251 qtopia_split('iconengines', 'iconengine', '^libq(.*)\.so$')
252 qtopia_split('imageformats', 'imageformat', '^libq(.*)\.so$')
253 qtopia_split('inputmethods', 'inputmethod', '^libq(.*)\.so$')
254 qtopia_split('sqldrivers', 'sqldriver', '^libq(.*)\.so$')
255 qtopia_split('script', 'script', '^libqtscript(.*)\.so$')
256 qtopia_split('styles', 'style', '^libq(.*)\.so$')
257 qtopia_split('phonon_backend','phonon-backend','^libphonon_(.*)\.so$')
258 qtopia_split('bearer', 'bearer', '^libq(.*)bearer\.so$')
259}
260
261do_install() {
262 oe_runmake install INSTALL_ROOT=${D}
263
264 # These are host binaries, we should only use them in staging
265 rm -rf ${D}/${bindir}/qmake
266
267 # fix pkgconfig, libtool and prl files
268 sed -i -e s#-L${S}/lib##g \
269 -e s#-L${STAGING_LIBDIR}##g \
270 -e 's#STAGING_LIBDIR}#libdir}'#g \
271 -e s#-L${libdir}##g \
272 -e s#'$(OE_QMAKE_LIBS_X11)'#"${OE_QMAKE_LIBS_X11}"#g \
273 -e s#" -Wl,-rpath-link,${S}/lib"##g \
274 -e s#" -Wl,-rpath-link,${libdir}"##g \
275 -e 's#I/usr/include#Iincludedir}#g' \
276 -e 's#Iin#I${in#g' \
277 ${D}${libdir}/*.la ${D}${libdir}/*.prl ${D}${libdir}/pkgconfig/*.pc
278
279 sed -i -e s#" -Wl,-rpath-link,${S}/lib"##g \
280 ${D}${datadir}/${QT_DIR_NAME}/mkspecs/common/linux.conf
281
282 # fix pkgconfig files
283 sed -i -e s#"moc_location=.*$"#"moc_location=${bindir}/moc4"# \
284 -e s#"uic_location=.*$"#"uic_location=${bindir}/uic4"# \
285 ${D}${libdir}/pkgconfig/*.pc
286 for name in ${QT_LIB_NAMES}; do
287 sed -i -e /Requires/s#"${name}"#"${name}${QT_LIBINFIX}"#g ${D}${libdir}/pkgconfig/*.pc
288 done
289
290 # QT abuses $includedir to point to its headers, which breaks pkgconfig sysroot, so manually fix it up here:
291 for pc in ${D}${libdir}/pkgconfig/*.pc ; do
292 sed -i -e "s:prefix}include/${QT_BASE_NAME}/$(basename $pc .pc):prefix}/include:" \
293 -e "s,Cflags: ,Cflags: -IP{includedir}/${QT_BASE_NAME}/$(basename $pc .pc) ," \
294 -e 's:IP{:I${:g' $pc
295 done
296
297 install -d ${D}/${libdir}/fonts
298 touch ${D}/${libdir}/fonts/fontdir
299}
300
301
diff --git a/recipes-qt/qt4/qt4_arch.inc b/recipes-qt/qt4/qt4_arch.inc
new file mode 100644
index 0000000000..e8c8fabe68
--- /dev/null
+++ b/recipes-qt/qt4/qt4_arch.inc
@@ -0,0 +1,25 @@
1inherit siteinfo
2
3ARM_INSTRUCTION_SET = "arm"
4
5def qt_arch(d):
6 import bb, re
7 arch = bb.data.getVar('TARGET_ARCH', d, 1)
8 if re.match("^i.86$", arch):
9 arch = "i386"
10 elif re.match("^arm.*", arch):
11 arch = "arm"
12 elif arch == "x86_64":
13 arch = "x86"
14 elif arch == "mipsel":
15 arch = "mips"
16 return arch
17
18def qt_endian(d):
19 import bb
20 if bb.data.getVar('SITEINFO_ENDIANNESS', d, True) == "le":
21 return "-little-endian"
22 elif bb.data.getVar('SITEINFO_ENDIANNESS', d, True) == "be":
23 return "-big-endian"
24 else:
25 assert False