]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
qt4: allow a reduction in build time
authorAnders Darander <anders@chargestorm.se>
Wed, 17 Aug 2011 17:47:51 +0000 (19:47 +0200)
committerSaul Wold <sgw@linux.intel.com>
Thu, 18 Aug 2011 20:45:44 +0000 (13:45 -0700)
When reducing build time by adding QT_DISTRO_FLAGS from the set '-no-gui -nomake tools
-nomake examples -nomake demos -nomake docs', build failure can occur, due to not building
all tools.

* Make rm not error out when removing one of the, possibly, non-existing tools.
* Only try to rename qtdemo, if qtdemo exists.
* Check if the phrasebook path exists, and only then call do_split_packages()

Signed-off-by: Anders Darander <anders@chargestorm.se>
meta/recipes-qt/qt4/qt4.inc

index 0410a92f76ad651d98e1d007703d2e78c572fe6b..5545be700a65afcaa057ce9cdbff9195c1d079a9 100644 (file)
@@ -227,10 +227,11 @@ python populate_packages_prepend() {
  
         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='' )
+        import os;
+        if os.path.exists(phrasebook_dir):
+                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
@@ -278,11 +279,11 @@ do_install() {
 
        # These are host binaries, we should only use them in staging
        rm ${D}/${bindir}/qmake
-       rm ${D}/${bindir}/uic
-       rm ${D}/${bindir}/uic3
+       rm -f ${D}/${bindir}/uic
+       rm -f ${D}/${bindir}/uic3
        rm ${D}/${bindir}/moc
        rm ${D}/${bindir}/rcc
-       rm ${D}/${bindir}/lrelease
+       rm -f ${D}/${bindir}/lrelease
 
        # fix pkgconfig, libtool and prl files
        sed -i -e s#-L${S}/lib##g \
@@ -319,6 +320,6 @@ do_install() {
 
        #Append an E to the qtdemo file
        if [ -n "${QT_LIBINFIX}" ] ; then
-               mv ${D}${bindir}/qtdemo ${D}${bindir}/qtdemo${QT_LIBINFIX}
+               [ -f ${D}${bindir}/qtdemo ] && mv ${D}${bindir}/qtdemo ${D}${bindir}/qtdemo${QT_LIBINFIX}
        fi
 }