summaryrefslogtreecommitdiffstats
path: root/meta/recipes-qt/qt4/nativesdk-qt4-tools.inc
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-qt/qt4/nativesdk-qt4-tools.inc')
-rw-r--r--meta/recipes-qt/qt4/nativesdk-qt4-tools.inc127
1 files changed, 127 insertions, 0 deletions
diff --git a/meta/recipes-qt/qt4/nativesdk-qt4-tools.inc b/meta/recipes-qt/qt4/nativesdk-qt4-tools.inc
new file mode 100644
index 0000000000..1c9ee2e6ea
--- /dev/null
+++ b/meta/recipes-qt/qt4/nativesdk-qt4-tools.inc
@@ -0,0 +1,127 @@
1SUMMARY = "SDK tools for Qt version 4.x"
2DEPENDS = "nativesdk-zlib nativesdk-dbus nativesdk-libx11 qt4-native"
3SECTION = "libs"
4HOMEPAGE = "http://qt-project.org/"
5LICENSE = "LGPLv2.1 | GPLv3"
6
7INC_PR = "r13"
8
9FILESEXTRAPATHS =. "${FILE_DIRNAME}/qt4-${PV}:"
10
11inherit nativesdk qmake2
12
13SRC_URI = "http://download.qt-project.org/official_releases/qt/4.8/${PV}/qt-everywhere-opensource-src-${PV}.tar.gz \
14 file://0001-qlibraryinfo-allow-to-set-qt.conf-from-the-outside-u.patch \
15 file://0004-configure-qmake-is-already-built-in-qt4-tools-native.patch \
16 file://0005-configure-set-LFLAGS-to-pick-up-zlib-from-staging.patch \
17 file://0006-configure-Use-OE_QMAKE_-values-to-specify-Qt-utility.patch \
18 file://0007-dbus-Remove-const-usage-that-causes-compile-failure-.patch \
19 file://0008-qmake.pro-Allow-building-a-separate-qmake-for-the-ta.patch \
20 file://g++.conf \
21 file://linux.conf"
22
23S = "${WORKDIR}/qt-everywhere-opensource-src-${PV}"
24
25LIC_FILES_CHKSUM = "file://LICENSE.LGPL;md5=fbc093901857fcd118f065f900982c24 \
26 file://LICENSE.GPL3;md5=6e1694ee338db410417517884918d4d2 \
27 file://LGPL_EXCEPTION.txt;md5=0145c4d1b6f96a661c2c139dfb268fb6"
28
29require qt4_arch.inc
30
31# FIXME: make it work with "${STAGING_BINDIR_NATIVE}/pkg-config --cflags dbus-1"
32EXTRA_OECONF = "-prefix ${prefix} \
33 -qt-libjpeg -system-zlib \
34 -no-libjpeg -no-libpng -no-libmng -no-libtiff \
35 -no-accessibility \
36 -no-cups \
37 -no-exceptions \
38 -no-nas-sound \
39 -no-nis -no-openssl \
40 -verbose -release -fast -static \
41 -platform ${TARGET_OS}-oe-g++ \
42 -xplatform ${TARGET_OS}-oe-g++ \
43 -arch ${QT_ARCH} \
44 -embedded -no-freetype -no-glib -no-iconv \
45 -qt3support \
46 -I${STAGING_DIR_HOST}${SDKPATHNATIVE}/usr/include/dbus-1.0 \
47 -I${STAGING_DIR_HOST}${SDKPATHNATIVE}/usr/lib/dbus-1.0/include"
48
49# yank default -e, otherwise we get the following error:
50# moc_qbuffer.cpp: No such file or directory
51EXTRA_OEMAKE = " "
52
53do_configure() {
54 # Avoid problems with Qt 4.8.0 configure setting QMAKE_LINK from LD (since we want the linker to be g++)
55 unset LD
56
57 if [ ! -e mkspecs/${TARGET_OS}-oe-g++ ]; then
58 ln -sf linux-g++ mkspecs/${TARGET_OS}-oe-g++
59 fi
60
61 cp ../g++.conf mkspecs/common
62 cp ../linux.conf mkspecs/common
63
64 if [ -f mkspecs/common/g++-base.conf ] ; then
65 # don't use host g++ even during configure (4.8.0+)
66 sed -i -e "s#= g++#= ${CXX}#" mkspecs/common/g++-base.conf
67 sed -i -e "s#= gcc#= ${CC}#" mkspecs/common/g++-base.conf
68 fi
69
70 # Use qmake from qt4-native for building
71 if [ ! -e bin/qmake ]; then
72 ln -sf ${STAGING_BINDIR_NATIVE}/qmake2 bin/qmake
73 fi
74 set_arch
75 (echo o; echo yes) | CC="${CC}" CXX="${CXX}" ./configure ${EXTRA_OECONF} || die "Configuring qt failed. EXTRA_OECONF was ${EXTRA_OECONF}"
76}
77
78TOBUILD = "\
79 src/tools/bootstrap \
80 src/tools/moc \
81 src/corelib \
82 src/sql \
83 src/dbus \
84 src/qt3support \
85 src/xml \
86 src/tools/uic \
87 src/tools/rcc \
88 src/network \
89 src/gui \
90 src/tools/uic3 \
91 tools/linguist/lrelease \
92 tools/linguist/lupdate \
93 tools/qdbus \
94"
95
96do_compile() {
97 for i in ${TOBUILD}; do
98 cd ${S}/$i && oe_runmake CC="${CC}" CXX="${CXX}"
99 done
100
101 # Build nativesdk qmake
102 export QMAKESPEC="${S}/mkspecs/${TARGET_OS}-oe-g++"
103 cd ${S}/qmake
104 ${OE_QMAKE_QMAKE}
105 oe_runmake CC="${CC}" CXX="${CXX}"
106 cd ${S}
107}
108
109do_install() {
110 install -d ${D}${bindir}
111 install -m 0755 bin/qmake2 ${D}${bindir}/qmake2
112 for i in moc uic uic3 rcc lrelease lupdate qdbuscpp2xml qdbusxml2cpp; do
113 install -m 0755 bin/${i} ${D}${bindir}/${i}4
114 done
115
116 (cd ${D}${bindir}; \
117 ln -s qmake2 qmake; \
118 for i in moc uic uic3 rcc lrelease lupdate qdbuscpp2xml qdbusxml2cpp; do \
119 ln -s ${i}4 ${i}; \
120 done)
121
122 install -d ${D}${sysconfdir}
123 cat >${D}${sysconfdir}/qt.conf <<EOF
124[Paths]
125Prefix = ${prefix}
126EOF
127}