diff options
author | Paul Eggleton <paul.eggleton@linux.intel.com> | 2011-01-21 15:38:29 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2011-02-01 15:57:26 +0000 |
commit | c5998e6def9b320eb50247765b096743f6efbfe8 (patch) | |
tree | fde827d88e0afb56b10a43ace0a24c7de1d40b26 /meta/recipes-qt/qt4 | |
parent | 70ce04977c9d752430f9a01a01d6db5bf501ba42 (diff) | |
download | openembedded-core-c5998e6def9b320eb50247765b096743f6efbfe8.tar.gz openembedded-core-c5998e6def9b320eb50247765b096743f6efbfe8.tar.bz2 openembedded-core-c5998e6def9b320eb50247765b096743f6efbfe8.zip |
qt4: Bring in improvements from meta-openembedded
Differences from meta-openembedded version:
* SRC_URI and S now come from qt-${PV}.inc since these are version specific
* Source checksums are also now in qt-${PV}.inc
* Remove do_compile as this is handled in qt-${PV}.inc
* Move contents of do_install_append from qt-${PV}.inc to do_install in
qt4.inc as this is the same for 4.6.3 and 4.7.1 and will get in the way of
do_install_append in qt-embedded.inc.
* Don't enable PostgreSQL, MySQL or SQLite 2.x plugins as we don't currently
have recipes for these DBMSs in Poky. These can be re-enabled easily when
or if we do.
* Use INC_PR in qt4-x11-free_4.6.3.bb
* Don't always specify -embedded config option in qt4.inc
* Don't add qte.sh to SRC_URI in qt-4.6.3.inc (this is embedded-specific)
Differences from what we have currently in Poky (plus the above):
* Set DESCRIPTION based on embedded/X11
* Move out arch-specific settings to qt4-arch.inc
* Add qt4x11.bbclass which can be inherited by application recipes to select
the X11 version (this makes more sense once the embedded version is added).
* Update HOMEPAGE
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Diffstat (limited to 'meta/recipes-qt/qt4')
-rw-r--r-- | meta/recipes-qt/qt4/qt-4.6.3.inc | 18 | ||||
-rw-r--r-- | meta/recipes-qt/qt4/qt4-x11-free.inc | 9 | ||||
-rw-r--r-- | meta/recipes-qt/qt4/qt4-x11-free_4.6.3.bb | 7 | ||||
-rw-r--r-- | meta/recipes-qt/qt4/qt4.inc | 66 | ||||
-rw-r--r-- | meta/recipes-qt/qt4/qt4_arch.inc | 25 |
5 files changed, 69 insertions, 56 deletions
diff --git a/meta/recipes-qt/qt4/qt-4.6.3.inc b/meta/recipes-qt/qt4/qt-4.6.3.inc index 155af66b89..ec2c9208d5 100644 --- a/meta/recipes-qt/qt4/qt-4.6.3.inc +++ b/meta/recipes-qt/qt4/qt-4.6.3.inc @@ -19,6 +19,9 @@ SRC_URI = "http://get.qt.nokia.com/qt/source/qt-everywhere-opensource-src-${PV}. file://mips-relocate.patch \ " +SRC_URI[md5sum] = "5c69f16d452b0bb3d44bc3c10556c072" +SRC_URI[sha256sum] = "f4e0ada8d4d516bbb8600a3ee7d9046c9c79e38cd781df9ffc46d8f16acd1768" + S = "${WORKDIR}/qt-everywhere-opensource-src-${PV}" do_configure_prepend() { @@ -40,7 +43,7 @@ do_configure_append() { } QT_GLFLAGS ?= "" -QT_CONFIG_FLAGS += " -no-rpath -qt3support -silent ${QT_GLFLAGS}" +QT_CONFIG_FLAGS += " -no-rpath -qt3support -reduce-relocations -silent ${QT_GLFLAGS}" do_compile() { # Fixup missing wsegl header in some SGX SDKs @@ -51,16 +54,3 @@ do_compile() { unset CFLAGS CXXFLAGS oe_runmake ${EXTRA_ENV} } - -do_install_append() { - install -d ${D}${bindir} - for i in rcc uic moc ; do - install -m 0755 ${S}/bin/$i ${D}${bindir}/ - done - - #Append an E to the qtdemo file - if [ -n "${QT_LIBINFIX}" ] ; then - mv ${D}${bindir}/qtdemo ${D}${bindir}/qtdemo${QT_LIBINFIX} - fi -} - diff --git a/meta/recipes-qt/qt4/qt4-x11-free.inc b/meta/recipes-qt/qt4/qt4-x11-free.inc index 22eef7c0eb..057a129ecf 100644 --- a/meta/recipes-qt/qt4/qt4-x11-free.inc +++ b/meta/recipes-qt/qt4/qt4-x11-free.inc @@ -1,9 +1,13 @@ require qt4.inc +DESCRIPTION = "Qt is a versatile cross-platform application framework -- this is the X11 version." +HOMEPAGE = "http://qt.nokia.com" SECTION = "x11/libs" PRIORITY = "optional" DEPENDS += "virtual/libx11 fontconfig libxft libxext libxrender libxrandr libxcursor" +INC_PR = "r21" + QT_GLFLAGS ?= "-no-opengl" QT_GLFLAGS_qemux86 = "-opengl" QT_GLFLAGS_emenlow = "-opengl" @@ -11,7 +15,6 @@ QT_GLFLAGS_atom-pc = "-opengl" QT_CONFIG_FLAGS += "-no-xinerama -no-xkb ${QT_GLFLAGS}" QT_BASE_NAME ?= "qt4" QT_BASE_LIB ?= "libqt" -QT_DIR_NAME = "qt4" -QT_LIBINFIX = "" -inherit qmake2 +inherit qt4x11 + diff --git a/meta/recipes-qt/qt4/qt4-x11-free_4.6.3.bb b/meta/recipes-qt/qt4/qt4-x11-free_4.6.3.bb index f13b94769f..8cf5449254 100644 --- a/meta/recipes-qt/qt4/qt4-x11-free_4.6.3.bb +++ b/meta/recipes-qt/qt4/qt4-x11-free_4.6.3.bb @@ -1,9 +1,6 @@ +require qt-${PV}.inc require qt4-x11-free.inc -require qt-4.6.3.inc -PR = "r2" +PR = "${INC_PR}.0" QT_CONFIG_FLAGS += " -xrandr " - -SRC_URI[md5sum] = "5c69f16d452b0bb3d44bc3c10556c072" -SRC_URI[sha256sum] = "f4e0ada8d4d516bbb8600a3ee7d9046c9c79e38cd781df9ffc46d8f16acd1768" 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 @@ -DESCRIPTION = "Qt is a comprehensive cross-platform C++ application framework" -HOMEPAGE = "http://qt.nokia.com" +inherit qmake_base DEPENDS += "qt4-tools-native freetype jpeg libpng zlib dbus openssl glib-2.0 gstreamer gst-plugins-base sqlite3" -inherit qmake_base +require qt4_arch.inc +QT_ARCH := "${@qt_arch(d)}" +QT_ENDIAN = "${@qt_endian(d)}" QT_DISTRO_FLAGS ?= "-no-accessibility -no-sm" QT_DISTRO_FLAGS_poky-lsb = "-sm" @@ -12,7 +13,7 @@ QT_CONFIG_FLAGS += "-release -no-cups -reduce-relocations \ -shared -no-nas-sound -no-nis \ -qt-gif -system-libjpeg -system-libpng -system-zlib \ -no-sql-ibase -no-sql-mysql -no-sql-psql -no-sql-odbc -plugin-sql-sqlite \ - -no-pch -dbus -stl -glib -phonon -webkit \ + -no-pch -qdbus -stl -glib -phonon -webkit \ ${QT_DISTRO_FLAGS} " EXTRA_OEMAKE = "-e" @@ -26,7 +27,7 @@ EXTRA_ENV = 'QMAKE="${STAGING_BINDIR_NATIVE}/qmake2 -after \ export QT_CONF_PATH="${WORKDIR}/qt.conf" # Library packages -QT_LIB_NAMES = "Qt3Support QtAssistantClient QtCLucene QtCore QtDBus QtDesigner QtDesignerComponents QtGui QtHelp QtNetwork QtOpenGL QtScript QtScriptTools QtSql QtSvg QtTest QtUiTools QtWebKit QtXml QtXmlPatterns phonon QtMultimedia QtOpenVG QtMediaServices" +QT_LIB_NAMES = "Qt3Support QtAssistantClient QtCLucene QtCore QtDBus QtDesigner QtDesignerComponents QtGui QtHelp QtNetwork QtOpenGL QtScript QtScriptTools QtSql QtSvg QtTest QtUiTools QtWebKit QtXml QtXmlPatterns phonon QtMultimedia QtOpenVG QtMediaServices QtDeclarative" QT_EXTRA_LIBS = "pvrQWSWSEGL" @@ -37,7 +38,7 @@ python __anonymous () { dev_packages = [] dbg_packages = [] for name in bb.data.getVar("QT_LIB_NAMES", d, 1).split(): - pkg = "${QT_BASE_LIB}" + name.lower().replace("qt", "") + "4" + pkg = "${QT_BASE_LIB}" + name.lower().replace("qt", "").replace("_", "-") + "4" # NOTE: the headers for QtAssistantClient are different incname = name.replace("QtAssistantClient", "QtAssistant") bb.data.setVar("FILES_%s" % pkg, "${libdir}/lib%(name)s${QT_LIBINFIX}.so.*" % locals(), d) @@ -55,7 +56,7 @@ python __anonymous () { dbg_packages.append("%s-dbg" % name) for name in bb.data.getVar("QT_EXTRA_LIBS", d, 1).split(): - pkg = "${QT_BASE_LIB}" + name.lower().replace("qt", "") + "4" + pkg = "${QT_BASE_LIB}" + name.lower().replace("qt", "").replace("_", "-") + "4" bb.data.setVar("FILES_%s" % pkg, "${libdir}/lib%(name)s.so.*" % locals(), d) bb.data.setVar("FILES_%s-dev" % pkg, """${libdir}/lib%(name)s.prl ${libdir}/lib%(name)s.a @@ -91,6 +92,8 @@ OTHER_PACKAGES = "\ ${QT_BASE_NAME}-makeqpf \ ${QT_BASE_NAME}-mkspecs \ ${QT_BASE_NAME}-pixeltool \ + ${QT_BASE_NAME}-qmlviewer \ + ${QT_BASE_NAME}-xmlpatterns \ ${QT_BASE_NAME}-qt3to4" PACKAGES += "${LIB_PACKAGES} ${DEV_PACKAGES} ${DBG_PACKAGES} ${OTHER_PACKAGES}" @@ -112,6 +115,7 @@ RRECOMMENDS_${QT_BASE_NAME}-fonts = " \ ${QT_BASE_NAME}-fonts-qpf" FILES_${QT_BASE_NAME}-tools = "${bindir}/uic* ${bindir}/moc ${bindir}/rcc ${bindir}/qttracereplay ${bindir}/qdoc*" +FILES_${QT_BASE_NAME}-tools-dbg = "${bindir}/.debug/uic* ${bindir}/.debug/moc ${bindir}/.debug/rcc ${bindir}/.debug/qttracereplay ${bindir}/.debug/qdoc*" FILES_${QT_BASE_NAME}-assistant = "${bindir}/*assistant* ${bindir}/qcollectiongenerator ${bindir}/qhelpconverter ${bindir}/qhelpgenerator" FILES_${QT_BASE_NAME}-assistant-dbg = "${bindir}/.debug/*assistant* ${bindir}/.debug/qcollectiongenerator ${bindir}/.debug/qhelpconverter ${bindir}/.debug/qhelpgenerator" FILES_${QT_BASE_NAME}-common = "${bindir}/qtconfig" @@ -123,7 +127,7 @@ FILES_${QT_BASE_NAME}-demos-dbg = "${bindir}/.debug/qtdemo* ${bindir} FILES_${QT_BASE_NAME}-designer = "${bindir}/*designer*" FILES_${QT_BASE_NAME}-designer-dbg = "${bindir}/.debug/*designer*" FILES_${QT_BASE_NAME}-examples = "${bindir}/${QT_DIR_NAME}/examples/*" -FILES_${QT_BASE_NAME}-examples-dbg = "${bindir}/${QT_DIR_NAME}/examples/.debug ${bindir}/${QT_DIR_NAME}/examples/*/.debug ${bindir}/${QT_DIR_NAME}/examples/*/*/.debug ${bindir}/${QT_DIR_NAME}/examples/*/*/*/.debug ${bindir}/${QT_DIR_NAME}/examples/*/*/*/*/.debug" +FILES_${QT_BASE_NAME}-examples-dbg = "${bindir}/${QT_DIR_NAME}/examples/.debug ${bindir}/${QT_DIR_NAME}/examples/*/.debug ${bindir}/${QT_DIR_NAME}/examples/*/*/.debug ${bindir}/${QT_DIR_NAME}/examples/*/*/*/.debug ${bindir}/${QT_DIR_NAME}/examples/*/*/*/*/.debug ${bindir}/${QT_DIR_NAME}/examples/declarative/*/*/*/*/*/.debug/* ${bindir}/${QT_DIR_NAME}/examples/declarative/*/*/*/*/.debug/*" FILES_${QT_BASE_NAME}-fonts-ttf-vera = "${libdir}/fonts/Vera*.ttf" FILES_${QT_BASE_NAME}-fonts-ttf-dejavu = "${libdir}/fonts/DejaVu*.ttf" FILES_${QT_BASE_NAME}-fonts-pfa = "${libdir}/fonts/*.pfa" @@ -135,28 +139,19 @@ FILES_${QT_BASE_NAME}-pixeltool = "${bindir}/pixeltool" FILES_${QT_BASE_NAME}-pixeltool-dbg = "${bindir}/.debug/pixeltool" FILES_${QT_BASE_NAME}-qt3to4 = "${bindir}/qt3to4 ${datadir}/${QT_DIR_NAME}/q3porting.xml" FILES_${QT_BASE_NAME}-qt3to4-dbg = "${bindir}/.debug/qt3to4" +FILES_${QT_BASE_NAME}-qmlviewer = "${bindir}/qmlviewer" +FILES_${QT_BASE_NAME}-qmlviewer-dbg = "${bindir}/.debug/qmlviewer" FILES_${QT_BASE_NAME}-makeqpf = "${bindir}/makeqpf" FILES_${QT_BASE_NAME}-makeqpf-dbg = "${bindir}/.debug/makeqpf" FILES_${QT_BASE_NAME}-mkspecs = "${datadir}/${QT_DIR_NAME}/mkspecs/*" +FILES_${QT_BASE_NAME}-xmlpatterns = "${bindir}/xmlpatterns*" +FILES_${QT_BASE_NAME}-xmlpatterns-dbg = "${bindir}/.debug/xmlpatterns*" -ARM_INSTRUCTION_SET = "arm" - -set_arch() { - case ${TARGET_ARCH} in - arm*) QT_ARCH=arm ;; - i*86*) QT_ARCH=i386 ;; - mips*) QT_ARCH=mips ;; - powerpc*) QT_ARCH=powerpc ;; - x86_64*) QT_ARCH=x86_64 ;; - esac -} do_configure() { unset QMAKESPEC unset QTDIR - set_arch - if [ ! -e bin/qmake ]; then ln -sf ${STAGING_BINDIR_NATIVE}/qmake2 bin/qmake fi @@ -196,30 +191,22 @@ do_configure() { -demosdir ${bindir}/${QT_DIR_NAME}/demos \ -platform ${TARGET_OS}-oe-g++ \ -xplatform ${TARGET_OS}-oe-g++ \ + ${QT_ENDIAN} \ -crossarch ${QT_ARCH} \ ${QT_CONFIG_FLAGS} -no-fast \ -L${STAGING_LIBDIR} -I${STAGING_INCDIR} \ -I${STAGING_INCDIR}/freetype2 } -do_compile() { - unset CFLAGS CXXFLAGS - install -m 0755 ${STAGING_BINDIR_NATIVE}/rcc4 ${S}/bin/rcc - install -m 0755 ${STAGING_BINDIR_NATIVE}/moc4 ${S}/bin/moc - install -m 0755 ${STAGING_BINDIR_NATIVE}/uic4 ${S}/bin/uic - - oe_runmake ${EXTRA_ENV} -} - python populate_packages_prepend() { translation_dir = bb.data.expand('${datadir}/${QT_DIR_NAME}/translations/', d) translation_name = bb.data.expand('${QT_BASE_NAME}-translation-%s', d) do_split_packages(d, translation_dir, '^(assistant|designer|linguist|qt|qtconfig|qvfb)_(.*)\.qm$', translation_name, '${PN} translation for %s', extra_depends='' ) - + phrasebook_dir = bb.data.expand('${datadir}/${QT_DIR_NAME}/phrasebooks/', d) phrasebook_name = bb.data.expand('${QT_BASE_NAME}-phrasebook-%s', d) do_split_packages(d, phrasebook_dir, '^(.*)\.qph$', phrasebook_name, '${PN} phrasebook for %s', extra_depends='' ) - + # Package all the plugins and their -dbg version and create a meta package import os def qtopia_split(path, name, glob): @@ -231,7 +218,7 @@ python populate_packages_prepend() { if not os.path.exists("%s%s" % (bb.data.expand('${D}',d), plugin_dir)): bb.note("The path does not exist:", bb.data.expand('${D}', d), plugin_dir) return - + plugin_name = bb.data.expand('${QT_BASE_NAME}-plugin-%s-%%s' % name, d) dev_packages = [] dev_hook = lambda file,pkg,b,c,d:dev_packages.append((file,pkg)) @@ -261,6 +248,7 @@ python populate_packages_prepend() { qtopia_split('script', 'script', '^libqtscript(.*)\.so$') qtopia_split('styles', 'style', '^libq(.*)\.so$') qtopia_split('phonon_backend','phonon-backend','^libphonon_(.*)\.so$') + qtopia_split('bearer', 'bearer', '^libq(.*)bearer\.so$') } do_install() { @@ -289,7 +277,7 @@ do_install() { -e s#"uic_location=.*$"#"uic_location=${bindir}/uic4"# \ ${D}${libdir}/pkgconfig/*.pc for name in ${QT_LIB_NAMES}; do - sed -i -e /Requires/s#"${name}"#"${name}${QT_LIBINFIX}"#g ${D}${libdir}/pkgconfig/*.pc + sed -i -e /Requires/s#"${name}"#"${name}${QT_LIBINFIX}"#g ${D}${libdir}/pkgconfig/*.pc done # QT abuses $includedir to point to its headers, which breaks pkgconfig sysroot, so manually fix it up here: @@ -301,4 +289,14 @@ do_install() { install -d ${D}/${libdir}/fonts touch ${D}/${libdir}/fonts/fontdir + + install -d ${D}${bindir} + for i in rcc uic moc ; do + install -m 0755 ${S}/bin/$i ${D}${bindir}/ + done + + #Append an E to the qtdemo file + if [ -n "${QT_LIBINFIX}" ] ; then + mv ${D}${bindir}/qtdemo ${D}${bindir}/qtdemo${QT_LIBINFIX} + fi } diff --git a/meta/recipes-qt/qt4/qt4_arch.inc b/meta/recipes-qt/qt4/qt4_arch.inc new file mode 100644 index 0000000000..7f4be63bca --- /dev/null +++ b/meta/recipes-qt/qt4/qt4_arch.inc @@ -0,0 +1,25 @@ +inherit siteinfo + +ARM_INSTRUCTION_SET = "arm" + +def qt_arch(d): + import bb, re + arch = bb.data.getVar('TARGET_ARCH', d, 1) + if re.match("^i.86$", arch): + arch = "i386" + elif re.match("^arm.*", arch): + arch = "arm" + elif arch == "x86_64": + arch = "x86" + elif arch == "mipsel": + arch = "mips" + return arch + +def qt_endian(d): + import bb + if bb.data.getVar('SITEINFO_ENDIANESS', d, True) == "le": + return "-little-endian" + elif bb.data.getVar('SITEINFO_ENDIANESS', d, True) == "be": + return "-big-endian" + else: + assert False |