diff options
Diffstat (limited to 'packages')
-rw-r--r-- | packages/qt4/qt_packaging.inc | 67 |
1 files changed, 48 insertions, 19 deletions
diff --git a/packages/qt4/qt_packaging.inc b/packages/qt4/qt_packaging.inc index 63d314c6c5..ba2a037f59 100644 --- a/packages/qt4/qt_packaging.inc +++ b/packages/qt4/qt_packaging.inc @@ -8,13 +8,6 @@ NONDEV_PACKAGES += "${QT_BASE_LIB}core4 ${QT_BASE_LIB}gui4 ${QT_BASE_LIB}network ${QT_BASE_NAME}-demos ${QT_BASE_NAME}-examples \ ${QT_BASE_NAME}-linguist \ ${QT_BASE_NAME}-pixeltool ${QT_BASE_NAME}-dbus \ - ${QT_BASE_NAME}-plugins-accessible \ - ${QT_BASE_NAME}-plugins-codecs \ - ${QT_BASE_NAME}-plugins-designer \ - ${QT_BASE_NAME}-plugins-imageformats \ - ${QT_BASE_NAME}-plugins-sqldrivers \ - ${QT_BASE_NAME}-plugins-inputmethods \ - ${QT_BASE_NAME}-plugins-iconengines \ ${QT_BASE_NAME}-fonts " DEV_PACKAGES += "${QT_BASE_LIB}core4-dev \ @@ -46,7 +39,7 @@ DBG_PACKAGES += "${QT_BASE_LIB}core4-dbg \ ${QT_BASE_LIB}assistantclient4-dbg \ ${QT_BASE_LIB}script4-dbg \ ${QT_BASE_LIB}dbus4-dbg \ - ${QT_BASE_LIB}opengl4-dbg " + ${QT_BASE_LIB}opengl4-dbg" PACKAGES += "${DEV_PACKAGES} ${NONDEV_PACKAGES} ${DBG_PACKAGES}" @@ -54,7 +47,7 @@ PACKAGES += "${DEV_PACKAGES} ${NONDEV_PACKAGES} ${DBG_PACKAGES}" ALLOW_EMPTY_${PN} = "1" FILES_${PN} = "" FILES_${PN}-dev = " ${includedir}/${QT_DIR_NAME}/Qt/*" -FILES_${PN}-dbg = "${bindir}/*/.debug ${libdir}/${QT_DIR_NAME}/plugins/*/.debug/*.so" +FILES_${PN}-dbg = "${bindir}/*/.debug " RDEPENDS_${PN} = "${NONDEV_PACKAGES}" RDEPENDS_${PN}-dev = "${DEV_PACKAGES}" RDEPENDS_${PN}-dbg = "${DBG_PACKAGES}" @@ -112,14 +105,6 @@ FILES_${QT_BASE_LIB}opengl4-dbg = "${libdir}/.debug/libQtOpenGL*" FILES_${QT_BASE_LIB}uitools4-dev = "${libdir}/libQtUiTools* ${includedir}/${QT_DIR_NAME}/QtUiTools* ${libdir}/pkgconfig/QtUiTools${QT_LIBINFIX}.pc" -FILES_${QT_BASE_NAME}-plugins-accessible = "${libdir}/${QT_DIR_NAME}/plugins/accessible/*.so" -FILES_${QT_BASE_NAME}-plugins-codecs = "${libdir}/${QT_DIR_NAME}/plugins/codecs/*.so" -FILES_${QT_BASE_NAME}-plugins-designer = "${libdir}/${QT_DIR_NAME}/plugins/designer/*.so" -FILES_${QT_BASE_NAME}-plugins-imageformats = "${libdir}/${QT_DIR_NAME}/plugins/imageformats/*.so" -FILES_${QT_BASE_NAME}-plugins-sqldrivers = "${libdir}/${QT_DIR_NAME}/plugins/sqldrivers/*.so" -FILES_${QT_BASE_NAME}-plugins-inputmethods = "${libdir}/${QT_DIR_NAME}/plugins/inputmethods/*.so" -FILES_${QT_BASE_NAME}-plugins-iconengines = "${libdir}/${QT_DIR_NAME}/plugins/iconengines/*.so" - FILES_${QT_BASE_NAME}-assistant = "${bindir}/*assistant*" FILES_${QT_BASE_NAME}-designer = "${bindir}/*designer*" FILES_${QT_BASE_NAME}-linguist = "${bindir}/*linguist* ${bindir}/lrelease ${bindir}/lupdate ${bindir}/qm2ts" @@ -133,8 +118,52 @@ FILES_${QT_BASE_NAME}-demos = "${bindir}/qtdemo ${bindir}/${QT_DI FILES_${QT_BASE_NAME}-fonts = "${libdir}/fonts" python populate_packages_prepend() { - translationdir = bb.data.expand('${datadir}/${QT_DIR_NAME}/translations/', d) - do_split_packages(d, translationdir, '^qt_(.*)\.qm$', '${QT_DIR_NAME}-translation-%s', '{PN} translation for %s', extra_depends='' ) + 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('styles', 'style', '^libq(.*)\.so$') } |