Skip to contentSkip to conversation

qmake5_base.bbclass: Use Qt version path for headers

PATCH Superseded Otavio Salvador 3 participants 8 messages Feb 21, 2014 – Feb 23, 2014

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/4 qmake5_base.bbclass: Use Qt version path for headers

When looking for Qt5 headers we ought to use the Qt5 specific path. In case the distribution wants to have a flat tree it can set QT_DIR_NAME and it will still works as expected.

---
 classes/qmake5_base.bbclass |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
classes/qmake5_base.bbclass +1 -1
index 3861cd0..0cfb5a4 100644
@@ -57,7 +57,7 @@ do_generate_qt_config_file() {
     cat > ${QT_CONF_PATH} <<EOF
 [Paths]
 Prefix = ${OE_QMAKE_PATH_PREFIX}
-Headers = ${OE_QMAKE_PATH_HEADERS}
+Headers = ${OE_QMAKE_PATH_QT_HEADERS}
 Libraries = ${OE_QMAKE_PATH_LIBS}
 ArchData = ${OE_QMAKE_PATH_ARCHDATA}
 Data = ${OE_QMAKE_PATH_DATA}
Signature · 1 line
1.7.10.4
#1 lore raw

PATCH 2/4 mallit-framework-qt5: Don't set OE_QMAKE_PATH_HEADERS

The qmake class now respects the QT_DIR_NAME setting when setting the headers path, so this change is not needed anymore.

---
 recipes-qt/maliit/maliit-framework-qt5_git.bb |    6 ------
 1 file changed, 6 deletions(-)
recipes-qt/maliit/maliit-framework-qt5_git.bb +0 -6
index b6d8cb3..633bf6e 100644
@@ -6,12 +6,6 @@ LIC_FILES_CHKSUM = "file://LICENSE.LGPL;md5=5c917f6ce94ceb8d8d5e16e2fca5b9ad"
 
 inherit qmake5
 
-# Set path of qt5 headers as qmake5_base.bbclass sets this to just ${includedir}
-# but
-# actually it is ${includedir}/qt5
-OE_QMAKE_PATH_HEADERS = "${OE_QMAKE_PATH_QT_HEADERS}"
-
-
 SRC_URI = "git://github.com/maliit/framework.git;branch=master \
     file://0001-Fix-MALIIT_INSTALL_PRF-to-allow-the-build-with-opene.patch \
     file://maliit-server.desktop \
Signature · 1 line
1.7.10.4
#2 lore raw

PATCH 3/4 mallit-plugins-qt5: Don't set OE_QMAKE_PATH_HEADERS

In reply to Otavio Salvador

The qmake class now respects the QT_DIR_NAME setting when setting the headers path, so this change is not needed anymore.

---
 recipes-qt/maliit/maliit-plugins-qt5_git.bb |    5 -----
 1 file changed, 5 deletions(-)
recipes-qt/maliit/maliit-plugins-qt5_git.bb +0 -5
index 273b3e4..7dc1a73 100644
@@ -6,11 +6,6 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=f29b21caa8e460097bfad9c026a33621"
 
 inherit qmake5
 
-# Set path of qt5 headers as qmake5_base.bbclass sets this to just ${includedir}
-# but
-# actually it is ${includedir}/qt5
-OE_QMAKE_PATH_HEADERS = "${OE_QMAKE_PATH_QT_HEADERS}"
-
 DEPENDS = "maliit-framework-qt5"
 
 RDEPENDS_${PN} += "qtsvg-plugins"
Signature · 1 line
1.7.10.4
#3 lore raw

PATCH 4/4 qsiv: add the qsiv 1.1 example app

In reply to Otavio Salvador

From: Giulian Gonçalves Vivan <[email protected]>

This provides a simple image viewer for demonstration purposes.

---
 recipes-qt/qsiv/qsiv_1.1.bb |   28 ++++++++++++++++++++++++++++
 1 file changed, 28 insertions(+)
 create mode 100644 recipes-qt/qsiv/qsiv_1.1.bb
recipes-qt/qsiv/qsiv_1.1.bb new file +28 -0
new file mode 100644
index 0000000..bb2efa6
@@ -0,0 +1,28 @@
+SUMMARY = "Qt Simple Image Viewer"
+DESCRIPTION = "A simple image viewer using a mix of C++ and qml code for demonstration."
+LICENSE = "GPL-2.0"
+LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=11c7965a9059e287de5d93b98adf6d1a"
+DEPENDS = "qtdeclarative"
+
+SRCREV = "7b9810b0f02f9ac74fae3ead6e2e9fb5c1382173"
+SRC_URI = "git://code.ossystems.com.br/qt/qsiv;protocol=http"
+
+S = "${WORKDIR}/git"
+
+inherit qmake5
+
+EXTRA_QMAKEVARS_PRE += "target.path=${libdir}/${P}"
+
+do_install_append() {
+    install -d ${D}${bindir}
+    echo "#!/bin/sh" > ${D}${bindir}/qsiv
+    echo "export QML_IMPORT_PATH=${libdir}/${P}/qml/qsiv" >> ${D}${bindir}/qsiv
+    echo "export QML2_IMPORT_PATH=${libdir}/${P}/qml/qsiv" >> ${D}${bindir}/qsiv
+    echo "${libdir}/${P}/qsiv \$* " >> ${D}${bindir}/qsiv
+    chmod +x ${D}${bindir}/qsiv
+}
+
+FILES_${PN} += "${libdir}/${P}"
+RDEPENDS_${PN} += "qtdeclarative-qmlplugins"
+
+FILES_${PN}-dbg += "${libdir}/${P}/.debug"
Signature · 1 line
1.7.10.4
Acked-by on v1 1/4
#4 lore raw
In reply to Otavio Salvador
Quoted 5 lines · Otavio Salvador

When looking for Qt5 headers we ought to use the Qt5 specific path. In case the distribution wants to have a flat tree it can set QT_DIR_NAME and it will still works as expected.

Martin,

Thinking about what you said in that Wiki section - I believe the number of apps consuming headers from /usr/include/qt5 is much higher than number of non-Qt5 libs/modules potentially installing headers in there... So, we shouldn't require every app recipe to set PATH_HEADERS properly.

Quoted 24 lines
---
 classes/qmake5_base.bbclass |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
classes/qmake5_base.bbclass +1 -1
index 3861cd0..0cfb5a4 100644
@@ -57,7 +57,7 @@ do_generate_qt_config_file() {
     cat > ${QT_CONF_PATH} <<EOF
 [Paths]
 Prefix = ${OE_QMAKE_PATH_PREFIX}
-Headers = ${OE_QMAKE_PATH_HEADERS}
+Headers = ${OE_QMAKE_PATH_QT_HEADERS}
 Libraries = ${OE_QMAKE_PATH_LIBS}
 ArchData = ${OE_QMAKE_PATH_ARCHDATA}
 Data = ${OE_QMAKE_PATH_DATA}
Signature · 6 lines
1.7.10.4

_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-devel
#5 lore raw
Quoted 7 lines · Denys Dmytriyenko
Quoted 5 lines · Otavio Salvador

When looking for Qt5 headers we ought to use the Qt5 specific path. In case the distribution wants to have a flat tree it can set QT_DIR_NAME and it will still works as expected.

Quoted 8 lines

Martin,

Thinking about what you said in that Wiki section - I believe the number of apps consuming headers from /usr/include/qt5 is much higher than number of non-Qt5 libs/modules potentially installing headers in there... So, we shouldn't require every app recipe to set PATH_HEADERS properly.

I agree with Denys here.

Signature · 3 lines
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750
#6 lore raw
In reply to Denys Dmytriyenko
Quoted 7 lines · Denys Dmytriyenko
Quoted 5 lines · Otavio Salvador

When looking for Qt5 headers we ought to use the Qt5 specific path. In case the distribution wants to have a flat tree it can set QT_DIR_NAME and it will still works as expected.

Quoted 8 lines

Martin,

Thinking about what you said in that Wiki section - I believe the number of apps consuming headers from /usr/include/qt5 is much higher than number of non-Qt5 libs/modules potentially installing headers in there... So, we shouldn't require every app recipe to set PATH_HEADERS properly.

Setting OE_QMAKE_PATH_HEADERS is simple oneline change:
OE_QMAKE_PATH_HEADERS = "${OE_QMAKE_PATH_QT_HEADERS}"

undoing this implementation isn't, if you really want to change OE_QMAKE_PATH_HEADERS then include QT_DIR_NAME in it, but leave OE_QMAKE_PATH_QT_HEADERS alone.

Quoted 27 lines
Quoted 23 lines
 classes/qmake5_base.bbclass |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
classes/qmake5_base.bbclass +1 -1
index 3861cd0..0cfb5a4 100644
@@ -57,7 +57,7 @@ do_generate_qt_config_file() {
     cat > ${QT_CONF_PATH} <<EOF
 [Paths]
 Prefix = ${OE_QMAKE_PATH_PREFIX}
-Headers = ${OE_QMAKE_PATH_HEADERS}
+Headers = ${OE_QMAKE_PATH_QT_HEADERS}
 Libraries = ${OE_QMAKE_PATH_LIBS}
 ArchData = ${OE_QMAKE_PATH_ARCHDATA}
 Data = ${OE_QMAKE_PATH_DATA}
Signature · 6 lines
1.7.10.4

_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-devel

_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-devel

Signature · 1 line
Martin 'JaMa' Jansa     jabber: [email protected]
#7 lore raw
Quoted 17 lines · Martin Jansa
Quoted 7 lines · Denys Dmytriyenko
Quoted 5 lines · Otavio Salvador

When looking for Qt5 headers we ought to use the Qt5 specific path. In case the distribution wants to have a flat tree it can set QT_DIR_NAME and it will still works as expected.

Quoted 8 lines

Martin,

Thinking about what you said in that Wiki section - I believe the number of apps consuming headers from /usr/include/qt5 is much higher than number of non-Qt5 libs/modules potentially installing headers in there... So, we shouldn't require every app recipe to set PATH_HEADERS properly.

Quoted 6 lines

Setting OE_QMAKE_PATH_HEADERS is simple oneline change:
OE_QMAKE_PATH_HEADERS = "${OE_QMAKE_PATH_QT_HEADERS}"

undoing this implementation isn't, if you really want to change OE_QMAKE_PATH_HEADERS then include QT_DIR_NAME in it, but leave OE_QMAKE_PATH_QT_HEADERS alone.

Ok; I will rework the patches and send a v2.

Signature · 3 lines
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750