summaryrefslogtreecommitdiffstats
path: root/meta/recipes-qt/qt4/qt4.inc
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-qt/qt4/qt4.inc')
-rw-r--r--meta/recipes-qt/qt4/qt4.inc66
1 files changed, 32 insertions, 34 deletions
diff --git a/meta/recipes-qt/qt4/qt4.inc b/meta/recipes-qt/qt4/qt4.inc
index 33824456ff..4dcf7a3210 100644
--- a/meta/recipes-qt/qt4/qt4.inc
+++ b/meta/recipes-qt/qt4/qt4.inc
@@ -1,9 +1,10 @@
1DESCRIPTION = "Qt is a comprehensive cross-platform C++ application framework" 1inherit qmake_base
2HOMEPAGE = "http://qt.nokia.com"
3 2
4DEPENDS += "qt4-tools-native freetype jpeg libpng zlib dbus openssl glib-2.0 gstreamer gst-plugins-base sqlite3" 3DEPENDS += "qt4-tools-native freetype jpeg libpng zlib dbus openssl glib-2.0 gstreamer gst-plugins-base sqlite3"
5 4
6inherit qmake_base 5require qt4_arch.inc
6QT_ARCH := "${@qt_arch(d)}"
7QT_ENDIAN = "${@qt_endian(d)}"
7 8
8QT_DISTRO_FLAGS ?= "-no-accessibility -no-sm" 9QT_DISTRO_FLAGS ?= "-no-accessibility -no-sm"
9QT_DISTRO_FLAGS_poky-lsb = "-sm" 10QT_DISTRO_FLAGS_poky-lsb = "-sm"
@@ -12,7 +13,7 @@ QT_CONFIG_FLAGS += "-release -no-cups -reduce-relocations \
12 -shared -no-nas-sound -no-nis \ 13 -shared -no-nas-sound -no-nis \
13 -qt-gif -system-libjpeg -system-libpng -system-zlib \ 14 -qt-gif -system-libjpeg -system-libpng -system-zlib \
14 -no-sql-ibase -no-sql-mysql -no-sql-psql -no-sql-odbc -plugin-sql-sqlite \ 15 -no-sql-ibase -no-sql-mysql -no-sql-psql -no-sql-odbc -plugin-sql-sqlite \
15 -no-pch -dbus -stl -glib -phonon -webkit \ 16 -no-pch -qdbus -stl -glib -phonon -webkit \
16 ${QT_DISTRO_FLAGS} " 17 ${QT_DISTRO_FLAGS} "
17 18
18EXTRA_OEMAKE = "-e" 19EXTRA_OEMAKE = "-e"
@@ -26,7 +27,7 @@ EXTRA_ENV = 'QMAKE="${STAGING_BINDIR_NATIVE}/qmake2 -after \
26export QT_CONF_PATH="${WORKDIR}/qt.conf" 27export QT_CONF_PATH="${WORKDIR}/qt.conf"
27 28
28# Library packages 29# Library packages
29QT_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" 30QT_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"
30 31
31QT_EXTRA_LIBS = "pvrQWSWSEGL" 32QT_EXTRA_LIBS = "pvrQWSWSEGL"
32 33
@@ -37,7 +38,7 @@ python __anonymous () {
37 dev_packages = [] 38 dev_packages = []
38 dbg_packages = [] 39 dbg_packages = []
39 for name in bb.data.getVar("QT_LIB_NAMES", d, 1).split(): 40 for name in bb.data.getVar("QT_LIB_NAMES", d, 1).split():
40 pkg = "${QT_BASE_LIB}" + name.lower().replace("qt", "") + "4" 41 pkg = "${QT_BASE_LIB}" + name.lower().replace("qt", "").replace("_", "-") + "4"
41 # NOTE: the headers for QtAssistantClient are different 42 # NOTE: the headers for QtAssistantClient are different
42 incname = name.replace("QtAssistantClient", "QtAssistant") 43 incname = name.replace("QtAssistantClient", "QtAssistant")
43 bb.data.setVar("FILES_%s" % pkg, "${libdir}/lib%(name)s${QT_LIBINFIX}.so.*" % locals(), d) 44 bb.data.setVar("FILES_%s" % pkg, "${libdir}/lib%(name)s${QT_LIBINFIX}.so.*" % locals(), d)
@@ -55,7 +56,7 @@ python __anonymous () {
55 dbg_packages.append("%s-dbg" % name) 56 dbg_packages.append("%s-dbg" % name)
56 57
57 for name in bb.data.getVar("QT_EXTRA_LIBS", d, 1).split(): 58 for name in bb.data.getVar("QT_EXTRA_LIBS", d, 1).split():
58 pkg = "${QT_BASE_LIB}" + name.lower().replace("qt", "") + "4" 59 pkg = "${QT_BASE_LIB}" + name.lower().replace("qt", "").replace("_", "-") + "4"
59 bb.data.setVar("FILES_%s" % pkg, "${libdir}/lib%(name)s.so.*" % locals(), d) 60 bb.data.setVar("FILES_%s" % pkg, "${libdir}/lib%(name)s.so.*" % locals(), d)
60 bb.data.setVar("FILES_%s-dev" % pkg, """${libdir}/lib%(name)s.prl 61 bb.data.setVar("FILES_%s-dev" % pkg, """${libdir}/lib%(name)s.prl
61 ${libdir}/lib%(name)s.a 62 ${libdir}/lib%(name)s.a
@@ -91,6 +92,8 @@ OTHER_PACKAGES = "\
91 ${QT_BASE_NAME}-makeqpf \ 92 ${QT_BASE_NAME}-makeqpf \
92 ${QT_BASE_NAME}-mkspecs \ 93 ${QT_BASE_NAME}-mkspecs \
93 ${QT_BASE_NAME}-pixeltool \ 94 ${QT_BASE_NAME}-pixeltool \
95 ${QT_BASE_NAME}-qmlviewer \
96 ${QT_BASE_NAME}-xmlpatterns \
94 ${QT_BASE_NAME}-qt3to4" 97 ${QT_BASE_NAME}-qt3to4"
95 98
96PACKAGES += "${LIB_PACKAGES} ${DEV_PACKAGES} ${DBG_PACKAGES} ${OTHER_PACKAGES}" 99PACKAGES += "${LIB_PACKAGES} ${DEV_PACKAGES} ${DBG_PACKAGES} ${OTHER_PACKAGES}"
@@ -112,6 +115,7 @@ RRECOMMENDS_${QT_BASE_NAME}-fonts = " \
112 ${QT_BASE_NAME}-fonts-qpf" 115 ${QT_BASE_NAME}-fonts-qpf"
113 116
114FILES_${QT_BASE_NAME}-tools = "${bindir}/uic* ${bindir}/moc ${bindir}/rcc ${bindir}/qttracereplay ${bindir}/qdoc*" 117FILES_${QT_BASE_NAME}-tools = "${bindir}/uic* ${bindir}/moc ${bindir}/rcc ${bindir}/qttracereplay ${bindir}/qdoc*"
118FILES_${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" 119FILES_${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" 120FILES_${QT_BASE_NAME}-assistant-dbg = "${bindir}/.debug/*assistant* ${bindir}/.debug/qcollectiongenerator ${bindir}/.debug/qhelpconverter ${bindir}/.debug/qhelpgenerator"
117FILES_${QT_BASE_NAME}-common = "${bindir}/qtconfig" 121FILES_${QT_BASE_NAME}-common = "${bindir}/qtconfig"
@@ -123,7 +127,7 @@ FILES_${QT_BASE_NAME}-demos-dbg = "${bindir}/.debug/qtdemo* ${bindir}
123FILES_${QT_BASE_NAME}-designer = "${bindir}/*designer*" 127FILES_${QT_BASE_NAME}-designer = "${bindir}/*designer*"
124FILES_${QT_BASE_NAME}-designer-dbg = "${bindir}/.debug/*designer*" 128FILES_${QT_BASE_NAME}-designer-dbg = "${bindir}/.debug/*designer*"
125FILES_${QT_BASE_NAME}-examples = "${bindir}/${QT_DIR_NAME}/examples/*" 129FILES_${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" 130FILES_${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" 131FILES_${QT_BASE_NAME}-fonts-ttf-vera = "${libdir}/fonts/Vera*.ttf"
128FILES_${QT_BASE_NAME}-fonts-ttf-dejavu = "${libdir}/fonts/DejaVu*.ttf" 132FILES_${QT_BASE_NAME}-fonts-ttf-dejavu = "${libdir}/fonts/DejaVu*.ttf"
129FILES_${QT_BASE_NAME}-fonts-pfa = "${libdir}/fonts/*.pfa" 133FILES_${QT_BASE_NAME}-fonts-pfa = "${libdir}/fonts/*.pfa"
@@ -135,28 +139,19 @@ FILES_${QT_BASE_NAME}-pixeltool = "${bindir}/pixeltool"
135FILES_${QT_BASE_NAME}-pixeltool-dbg = "${bindir}/.debug/pixeltool" 139FILES_${QT_BASE_NAME}-pixeltool-dbg = "${bindir}/.debug/pixeltool"
136FILES_${QT_BASE_NAME}-qt3to4 = "${bindir}/qt3to4 ${datadir}/${QT_DIR_NAME}/q3porting.xml" 140FILES_${QT_BASE_NAME}-qt3to4 = "${bindir}/qt3to4 ${datadir}/${QT_DIR_NAME}/q3porting.xml"
137FILES_${QT_BASE_NAME}-qt3to4-dbg = "${bindir}/.debug/qt3to4" 141FILES_${QT_BASE_NAME}-qt3to4-dbg = "${bindir}/.debug/qt3to4"
142FILES_${QT_BASE_NAME}-qmlviewer = "${bindir}/qmlviewer"
143FILES_${QT_BASE_NAME}-qmlviewer-dbg = "${bindir}/.debug/qmlviewer"
138FILES_${QT_BASE_NAME}-makeqpf = "${bindir}/makeqpf" 144FILES_${QT_BASE_NAME}-makeqpf = "${bindir}/makeqpf"
139FILES_${QT_BASE_NAME}-makeqpf-dbg = "${bindir}/.debug/makeqpf" 145FILES_${QT_BASE_NAME}-makeqpf-dbg = "${bindir}/.debug/makeqpf"
140FILES_${QT_BASE_NAME}-mkspecs = "${datadir}/${QT_DIR_NAME}/mkspecs/*" 146FILES_${QT_BASE_NAME}-mkspecs = "${datadir}/${QT_DIR_NAME}/mkspecs/*"
147FILES_${QT_BASE_NAME}-xmlpatterns = "${bindir}/xmlpatterns*"
148FILES_${QT_BASE_NAME}-xmlpatterns-dbg = "${bindir}/.debug/xmlpatterns*"
141 149
142ARM_INSTRUCTION_SET = "arm"
143
144set_arch() {
145 case ${TARGET_ARCH} in
146 arm*) QT_ARCH=arm ;;
147 i*86*) QT_ARCH=i386 ;;
148 mips*) QT_ARCH=mips ;;
149 powerpc*) QT_ARCH=powerpc ;;
150 x86_64*) QT_ARCH=x86_64 ;;
151 esac
152}
153 150
154do_configure() { 151do_configure() {
155 unset QMAKESPEC 152 unset QMAKESPEC
156 unset QTDIR 153 unset QTDIR
157 154
158 set_arch
159
160 if [ ! -e bin/qmake ]; then 155 if [ ! -e bin/qmake ]; then
161 ln -sf ${STAGING_BINDIR_NATIVE}/qmake2 bin/qmake 156 ln -sf ${STAGING_BINDIR_NATIVE}/qmake2 bin/qmake
162 fi 157 fi
@@ -196,30 +191,22 @@ do_configure() {
196 -demosdir ${bindir}/${QT_DIR_NAME}/demos \ 191 -demosdir ${bindir}/${QT_DIR_NAME}/demos \
197 -platform ${TARGET_OS}-oe-g++ \ 192 -platform ${TARGET_OS}-oe-g++ \
198 -xplatform ${TARGET_OS}-oe-g++ \ 193 -xplatform ${TARGET_OS}-oe-g++ \
194 ${QT_ENDIAN} \
199 -crossarch ${QT_ARCH} \ 195 -crossarch ${QT_ARCH} \
200 ${QT_CONFIG_FLAGS} -no-fast \ 196 ${QT_CONFIG_FLAGS} -no-fast \
201 -L${STAGING_LIBDIR} -I${STAGING_INCDIR} \ 197 -L${STAGING_LIBDIR} -I${STAGING_INCDIR} \
202 -I${STAGING_INCDIR}/freetype2 198 -I${STAGING_INCDIR}/freetype2
203} 199}
204 200
205do_compile() {
206 unset CFLAGS CXXFLAGS
207 install -m 0755 ${STAGING_BINDIR_NATIVE}/rcc4 ${S}/bin/rcc
208 install -m 0755 ${STAGING_BINDIR_NATIVE}/moc4 ${S}/bin/moc
209 install -m 0755 ${STAGING_BINDIR_NATIVE}/uic4 ${S}/bin/uic
210
211 oe_runmake ${EXTRA_ENV}
212}
213
214python populate_packages_prepend() { 201python populate_packages_prepend() {
215 translation_dir = bb.data.expand('${datadir}/${QT_DIR_NAME}/translations/', d) 202 translation_dir = bb.data.expand('${datadir}/${QT_DIR_NAME}/translations/', d)
216 translation_name = bb.data.expand('${QT_BASE_NAME}-translation-%s', d) 203 translation_name = bb.data.expand('${QT_BASE_NAME}-translation-%s', d)
217 do_split_packages(d, translation_dir, '^(assistant|designer|linguist|qt|qtconfig|qvfb)_(.*)\.qm$', translation_name, '${PN} translation for %s', extra_depends='' ) 204 do_split_packages(d, translation_dir, '^(assistant|designer|linguist|qt|qtconfig|qvfb)_(.*)\.qm$', translation_name, '${PN} translation for %s', extra_depends='' )
218 205
219 phrasebook_dir = bb.data.expand('${datadir}/${QT_DIR_NAME}/phrasebooks/', d) 206 phrasebook_dir = bb.data.expand('${datadir}/${QT_DIR_NAME}/phrasebooks/', d)
220 phrasebook_name = bb.data.expand('${QT_BASE_NAME}-phrasebook-%s', d) 207 phrasebook_name = bb.data.expand('${QT_BASE_NAME}-phrasebook-%s', d)
221 do_split_packages(d, phrasebook_dir, '^(.*)\.qph$', phrasebook_name, '${PN} phrasebook for %s', extra_depends='' ) 208 do_split_packages(d, phrasebook_dir, '^(.*)\.qph$', phrasebook_name, '${PN} phrasebook for %s', extra_depends='' )
222 209
223 # Package all the plugins and their -dbg version and create a meta package 210 # Package all the plugins and their -dbg version and create a meta package
224 import os 211 import os
225 def qtopia_split(path, name, glob): 212 def qtopia_split(path, name, glob):
@@ -231,7 +218,7 @@ python populate_packages_prepend() {
231 if not os.path.exists("%s%s" % (bb.data.expand('${D}',d), plugin_dir)): 218 if not os.path.exists("%s%s" % (bb.data.expand('${D}',d), plugin_dir)):
232 bb.note("The path does not exist:", bb.data.expand('${D}', d), plugin_dir) 219 bb.note("The path does not exist:", bb.data.expand('${D}', d), plugin_dir)
233 return 220 return
234 221
235 plugin_name = bb.data.expand('${QT_BASE_NAME}-plugin-%s-%%s' % name, d) 222 plugin_name = bb.data.expand('${QT_BASE_NAME}-plugin-%s-%%s' % name, d)
236 dev_packages = [] 223 dev_packages = []
237 dev_hook = lambda file,pkg,b,c,d:dev_packages.append((file,pkg)) 224 dev_hook = lambda file,pkg,b,c,d:dev_packages.append((file,pkg))
@@ -261,6 +248,7 @@ python populate_packages_prepend() {
261 qtopia_split('script', 'script', '^libqtscript(.*)\.so$') 248 qtopia_split('script', 'script', '^libqtscript(.*)\.so$')
262 qtopia_split('styles', 'style', '^libq(.*)\.so$') 249 qtopia_split('styles', 'style', '^libq(.*)\.so$')
263 qtopia_split('phonon_backend','phonon-backend','^libphonon_(.*)\.so$') 250 qtopia_split('phonon_backend','phonon-backend','^libphonon_(.*)\.so$')
251 qtopia_split('bearer', 'bearer', '^libq(.*)bearer\.so$')
264} 252}
265 253
266do_install() { 254do_install() {
@@ -289,7 +277,7 @@ do_install() {
289 -e s#"uic_location=.*$"#"uic_location=${bindir}/uic4"# \ 277 -e s#"uic_location=.*$"#"uic_location=${bindir}/uic4"# \
290 ${D}${libdir}/pkgconfig/*.pc 278 ${D}${libdir}/pkgconfig/*.pc
291 for name in ${QT_LIB_NAMES}; do 279 for name in ${QT_LIB_NAMES}; do
292 sed -i -e /Requires/s#"${name}"#"${name}${QT_LIBINFIX}"#g ${D}${libdir}/pkgconfig/*.pc 280 sed -i -e /Requires/s#"${name}"#"${name}${QT_LIBINFIX}"#g ${D}${libdir}/pkgconfig/*.pc
293 done 281 done
294 282
295 # QT abuses $includedir to point to its headers, which breaks pkgconfig sysroot, so manually fix it up here: 283 # QT abuses $includedir to point to its headers, which breaks pkgconfig sysroot, so manually fix it up here:
@@ -301,4 +289,14 @@ do_install() {
301 289
302 install -d ${D}/${libdir}/fonts 290 install -d ${D}/${libdir}/fonts
303 touch ${D}/${libdir}/fonts/fontdir 291 touch ${D}/${libdir}/fonts/fontdir
292
293 install -d ${D}${bindir}
294 for i in rcc uic moc ; do
295 install -m 0755 ${S}/bin/$i ${D}${bindir}/
296 done
297
298 #Append an E to the qtdemo file
299 if [ -n "${QT_LIBINFIX}" ] ; then
300 mv ${D}${bindir}/qtdemo ${D}${bindir}/qtdemo${QT_LIBINFIX}
301 fi
304} 302}