diff options
Diffstat (limited to 'recipes/qt4/qt4.inc')
-rw-r--r-- | recipes/qt4/qt4.inc | 138 |
1 files changed, 81 insertions, 57 deletions
diff --git a/recipes/qt4/qt4.inc b/recipes/qt4/qt4.inc index 3deffa6617..f5da6527f0 100644 --- a/recipes/qt4/qt4.inc +++ b/recipes/qt4/qt4.inc @@ -1,6 +1,6 @@ inherit qmake_base -DEPENDS += " qt4-tools-native freetype jpeg libpng zlib dbus openssl glib-2.0 gstreamer gst-plugins-base" +DEPENDS += "qt4-tools-native freetype jpeg libpng zlib dbus openssl glib-2.0 gstreamer gst-plugins-base" require qt4_arch.inc QT_ARCH := "${@qt_arch(d)}" @@ -31,10 +31,10 @@ 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", "") + "4" # NOTE: the headers for QtAssistantClient are different incname = name.replace("QtAssistantClient", "QtAssistant") - bb.data.setVar("FILES_%s" % pkg, "%(pkg)s ${libdir}/lib%(name)s${QT_LIBINFIX}.so.*" % locals(), d) + bb.data.setVar("FILES_%s" % pkg, "${libdir}/lib%(name)s${QT_LIBINFIX}.so.*" % locals(), d) bb.data.setVar("FILES_%s-dev" % pkg, """${libdir}/lib%(name)s${QT_LIBINFIX}.prl ${libdir}/lib%(name)s${QT_LIBINFIX}.a ${libdir}/lib%(name)s${QT_LIBINFIX}.la @@ -45,6 +45,9 @@ python __anonymous () { lib_packages.append(pkg) dev_packages.append("%s-dev" % pkg) dbg_packages.append("%s-dbg" % pkg) + for name in bb.data.getVar("OTHER_PACKAGES", d, 1).split(): + dbg_packages.append("%s-dbg" % name) + bb.data.setVar("LIB_PACKAGES", " ".join(lib_packages), d) bb.data.setVar("DEV_PACKAGES", " ".join(dev_packages), d) bb.data.setVar("DBG_PACKAGES", " ".join(dbg_packages), d) @@ -59,28 +62,44 @@ OTHER_PACKAGES = "\ ${QT_BASE_NAME}-examples \ ${QT_BASE_NAME}-fonts \ ${QT_BASE_NAME}-linguist \ - ${QT_BASE_NAME}-pixeltool" + ${QT_BASE_NAME}-makeqpf \ + ${QT_BASE_NAME}-mkspecs \ + ${QT_BASE_NAME}-pixeltool \ + ${QT_BASE_NAME}-qt3to4" PACKAGES += "${LIB_PACKAGES} ${DEV_PACKAGES} ${DBG_PACKAGES} ${OTHER_PACKAGES}" PACKAGES_DYNAMIC = "${QT_BASE_NAME}-plugin-* ${QT_BASE_NAME}-translation-*" ALLOW_EMPTY_${PN} = "1" FILES_${PN} = "" -FILES_${PN}-dev = " ${includedir}/${QT_DIR_NAME}/Qt/*" -FILES_${PN}-dbg = "${bindir}/*/.debug " +FILES_${PN}-dev = "${includedir}/${QT_DIR_NAME}/Qt/*" +FILES_${PN}-dbg = "" RRECOMMENDS_${PN} = "${LIB_PACKAGES} ${OTHER_PACKAGES}" RRECOMMENDS_${PN}-dev = "${DEV_PACKAGES}" RRECOMMENDS_${PN}-dbg = "${DBG_PACKAGES}" -FILES_${QT_BASE_NAME}-assistant = "${bindir}/*assistant*" +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" +FILES_${QT_BASE_NAME}-common-dbg = "${bindir}/.debug/qtconfig" FILES_${QT_BASE_NAME}-dbus = "${bindir}/qdbus ${bindir}/qdbusxml2cpp ${bindir}/qdbuscpp2xml ${bindir}/qdbusviewer" +FILES_${QT_BASE_NAME}-dbus-dbg = "${bindir}/.debug/qdbus ${bindir}/.debug/qdbusxml2cpp ${bindir}/.debug/qdbuscpp2xml ${bindir}/.debug/qdbusviewer" FILES_${QT_BASE_NAME}-demos = "${bindir}/qtdemo ${bindir}/${QT_DIR_NAME}/demos/*" +FILES_${QT_BASE_NAME}-demos-dbg = "${bindir}/.debug/qtdemo ${bindir}/${QT_DIR_NAME}/demos/.debug/*" 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/*" FILES_${QT_BASE_NAME}-fonts = "${libdir}/fonts" -FILES_${QT_BASE_NAME}-linguist = "${bindir}/*linguist* ${bindir}/lrelease ${bindir}/lupdate ${bindir}/qm2ts" +FILES_${QT_BASE_NAME}-linguist = "${bindir}/*linguist* ${bindir}/lrelease ${bindir}/lupdate ${bindir}/lconvert ${bindir}/qm2ts" +FILES_${QT_BASE_NAME}-linguist-dbg = "${bindir}/.debug/*linguist* ${bindir}/.debug/lrelease ${bindir}/.debug/lupdate ${bindir}/.debug/lconvert ${bindir}/.debug/qm2ts" 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}-makeqpf = "${bindir}/makeqpf" +FILES_${QT_BASE_NAME}-makeqpf-dbg = "${bindir}/.debug/makeqpf" +FILES_${QT_BASE_NAME}-mkspecs = "${datadir}/${QT_DIR_NAME}/mkspecs/*" do_configure() { @@ -134,54 +153,54 @@ do_compile() { } 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, '^qt_(.*)\.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): - """ - Split the package into a normal and -dbg package and then add the - new packages to the meta package. - """ - plugin_dir = bb.data.expand('${libdir}/${QT_DIR_NAME}/plugins/%s/' % path, d) - 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)) - do_split_packages(d, plugin_dir, glob, plugin_name, '${PN} %s for %%s' % name, extra_depends='', hook=dev_hook) - # Create a -dbg package as well - plugin_dir_dbg = bb.data.expand('${libdir}/${QT_DIR_NAME}/plugins/%s/.debug' % path, d) - packages = bb.data.getVar('PACKAGES',d) - for (file,package) in dev_packages: - packages = "%s %s-dbg" % (packages, package) - file_name = os.path.join(plugin_dir_dbg, os.path.basename(file)) - bb.data.setVar("FILES_%s-dbg" % package, file_name, d) - bb.data.setVar("DESCRIPTION_%s-dbg" % package, "${PN} %s for %s" % (name, package), d) - - bb.data.setVar('PACKAGES', packages, d) - - qtopia_split('accessible', 'accessible', '^libq(.*)\.so$') - qtopia_split('codecs', 'codec', '^libq(.*)\.so$') - qtopia_split('decorations', 'decoration', '^libqdecoration(.*)\.so$') - qtopia_split('designer', 'designer', '^lib(.*)\.so$') - qtopia_split('gfxdrivers', 'gfxdriver', '^libqgfx(.*)\.so$') - qtopia_split('mousedrivers','mousedriver', '^libq(.*)mousedriver\.so$') - qtopia_split('iconengines', 'iconengine', '^libq(.*)\.so$') - qtopia_split('imageformats','imageformat', '^libq(.*)\.so$') - qtopia_split('inputmethods','inputmethod', '^libq(.*)\.so$') - qtopia_split('sqldrivers', 'sqldriver', '^libq(.*)\.so$') - qtopia_split('script', 'script', '^libqtscript(.*)\.so$') - qtopia_split('styles', 'style', '^libq(.*)\.so$') - qtopia_split('phonon_backend', 'phonon-backend', '^libphonon_(.*)\.so$') + 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): + """ + Split the package into a normal and -dbg package and then add the + new packages to the meta package. + """ + plugin_dir = bb.data.expand('${libdir}/${QT_DIR_NAME}/plugins/%s/' % path, d) + 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)) + do_split_packages(d, plugin_dir, glob, plugin_name, '${PN} %s for %%s' % name, extra_depends='', hook=dev_hook) + # Create a -dbg package as well + plugin_dir_dbg = bb.data.expand('${libdir}/${QT_DIR_NAME}/plugins/%s/.debug' % path, d) + packages = bb.data.getVar('PACKAGES',d) + for (file,package) in dev_packages: + packages = "%s %s-dbg" % (packages, package) + file_name = os.path.join(plugin_dir_dbg, os.path.basename(file)) + bb.data.setVar("FILES_%s-dbg" % package, file_name, d) + bb.data.setVar("DESCRIPTION_%s-dbg" % package, "${PN} %s for %s" % (name, package), d) + + bb.data.setVar('PACKAGES', packages, d) + + qtopia_split('accessible', 'accessible', '^libq(.*)\.so$') + qtopia_split('codecs', 'codec', '^libq(.*)\.so$') + qtopia_split('decorations', 'decoration', '^libqdecoration(.*)\.so$') + qtopia_split('designer', 'designer', '^lib(.*)\.so$') + qtopia_split('gfxdrivers', 'gfxdriver', '^libq(.*)\.so$') + qtopia_split('mousedrivers', 'mousedriver', '^libq(.*)mousedriver\.so$') + qtopia_split('iconengines', 'iconengine', '^libq(.*)\.so$') + qtopia_split('imageformats', 'imageformat', '^libq(.*)\.so$') + qtopia_split('inputmethods', 'inputmethod', '^libq(.*)\.so$') + qtopia_split('sqldrivers', 'sqldriver', '^libq(.*)\.so$') + qtopia_split('script', 'script', '^libqtscript(.*)\.so$') + qtopia_split('styles', 'style', '^libq(.*)\.so$') + qtopia_split('phonon_backend','phonon-backend','^libphonon_(.*)\.so$') } do_install() { @@ -192,7 +211,6 @@ do_install() { # XXX, FIXME, TODO: package the demos and examples properly rm -rf ${D}/${bindir}/${QT_DIR_NAME} - rm -rf ${D}/${datadir}/${QT_DIR_NAME}/mkspecs # fix pkgconfig, libtool and prl files sed -i -e s#-L${S}/lib##g \ @@ -205,6 +223,9 @@ do_install() { sed -i -e s#"moc_location=.*$"#"moc_location=${bindir}/moc4"# \ -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 + done install -d ${D}/${libdir}/fonts touch ${D}/${libdir}/fonts/fontdir @@ -227,6 +248,9 @@ do_stage() { sed -i -e s#"moc_location=.*$"## \ -e s#"uic_location=.*$"## \ ${STAGE_TEMP}/${libdir}/pkgconfig/*.pc + for name in ${QT_LIB_NAMES}; do + sed -i -e "/Requires/s#${name}#${name}${QT_LIBINFIX}#"g ${D}${libdir}/pkgconfig/*.pc + done # fix libtool files sed -i -e s#installed=yes#installed=no#g ${STAGE_TEMP}/${libdir}/*.la |