[oe] [meta-qt5][PATCH 1/1] nativesdk-qtbase: make it possible to keep additional libraries
Anders Darander
anders at chargestorm.se
Thu Oct 16 09:07:59 UTC 2014
In some usecases for the nativesdk, you might need some build tools that are built upon Qt5. This means
that we're having a need to keep more of the libraries build by nativsdk-qtbase. This patch adds the
infrastructure to support that
Signed-off-by: Anders Darander <anders at chargestorm.se>
---
recipes-qt/qt5/nativesdk-qtbase.inc | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/recipes-qt/qt5/nativesdk-qtbase.inc b/recipes-qt/qt5/nativesdk-qtbase.inc
index faecc64..ed98c80 100644
--- a/recipes-qt/qt5/nativesdk-qtbase.inc
+++ b/recipes-qt/qt5/nativesdk-qtbase.inc
@@ -193,6 +193,16 @@ do_configure() {
bin/qmake ${OE_QMAKE_DEBUG_OUTPUT} ${S} -o Makefile || die "Configuring qt with qmake failed. EXTRA_OECONF was ${EXTRA_OECONF}"
}
+# Set the EXTRA_QTLIB variable to e.g. Xml, in order to net remove libQt5Xml.so.*
+EXTRA_QTLIB ?= ""
+
+python __anonymous () {
+ templibs = ""
+ for e in d.getVar("EXTRA_QTLIB", True).split():
+ templibs = "%s -not -name 'libQt5%s.so*' -and" % (templibs, e)
+ d.setVar("QTLIBSPRESERVE", templibs)
+}
+
do_install() {
# Fix install paths for all
find -name "Makefile*" | xargs sed -i "s,(INSTALL_ROOT)${STAGING_DIR_NATIVE}${STAGING_DIR_NATIVE},(INSTALL_ROOT)${STAGING_DIR_NATIVE},g"
@@ -215,6 +225,7 @@ do_install() {
${D}${libdir}/pkgconfig
find ${D}${libdir} -maxdepth 1 -name 'lib*' -and \
-not -name 'libQt5Core.so*' -and \
+ ${QTLIBSPRESERVE} \
-not -name 'libQt5Bootstrap.a' \
-exec rm '{}' ';'
}
--
1.8.4.5
More information about the Openembedded-devel
mailing list