summaryrefslogtreecommitdiff
path: root/qt5-layer/recipes-qt/qt5
diff options
context:
space:
mode:
authorMax Krummenacher <max.krummenacher@toradex.com>2020-01-07 16:03:22 +0100
committerMax Krummenacher <max.krummenacher@toradex.com>2020-01-09 19:49:58 +0100
commitf4fac16e1033b3f8679b94e258e8c5d276167946 (patch)
treee79fac1b6964f40d82c5a0a91a5bbca08c9d9220 /qt5-layer/recipes-qt/qt5
parent888c731f3867e4f7bdcf851e6d81428295ac57eb (diff)
qt5: do not require meta-qt5
Move all qt5 relevant stuff where it only gets parsed if meta-qt5 is available. Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
Diffstat (limited to 'qt5-layer/recipes-qt/qt5')
-rw-r--r--qt5-layer/recipes-qt/qt5/packagegroup-qt5.bb26
-rw-r--r--qt5-layer/recipes-qt/qt5/qt3d/0001-qt3d-do-not-set-resources_big.patch51
-rw-r--r--qt5-layer/recipes-qt/qt5/qt3d_%.bbappend13
-rw-r--r--qt5-layer/recipes-qt/qt5/qt5-x11-free-systemd.bb25
-rw-r--r--qt5-layer/recipes-qt/qt5/qt5-x11-free-systemd/qt5-x11-demo-init43
-rw-r--r--qt5-layer/recipes-qt/qt5/qt5-x11-free-systemd/qt5-x11-demo.service10
-rw-r--r--qt5-layer/recipes-qt/qt5/qtbase_%.bbappend19
7 files changed, 187 insertions, 0 deletions
diff --git a/qt5-layer/recipes-qt/qt5/packagegroup-qt5.bb b/qt5-layer/recipes-qt/qt5/packagegroup-qt5.bb
new file mode 100644
index 0000000..32700ad
--- /dev/null
+++ b/qt5-layer/recipes-qt/qt5/packagegroup-qt5.bb
@@ -0,0 +1,26 @@
+DESCRIPTION = "QT5 base package group"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
+
+inherit packagegroup
+
+RDEPENDS_${PN} = " \
+ qtbase \
+ qtbase-tools \
+ qtmultimedia \
+ qtsvg \
+ qtsensors \
+ qtsystems \
+ qtsystems-tools \
+ qtscript \
+ qtgraphicaleffects-qmlplugins \
+ qtconnectivity-qmlplugins \
+ qtlocation-plugins \
+ qtlocation-qmlplugins \
+ qtdeclarative \
+ ${QTWEBKIT} \
+"
+
+QTWEBKIT ??= "\
+ qtwebkit \
+"
diff --git a/qt5-layer/recipes-qt/qt5/qt3d/0001-qt3d-do-not-set-resources_big.patch b/qt5-layer/recipes-qt/qt5/qt3d/0001-qt3d-do-not-set-resources_big.patch
new file mode 100644
index 0000000..d2c143f
--- /dev/null
+++ b/qt5-layer/recipes-qt/qt5/qt3d/0001-qt3d-do-not-set-resources_big.patch
@@ -0,0 +1,51 @@
+From 6d58507157d88160310545e2aedd91be311ae1d5 Mon Sep 17 00:00:00 2001
+From: Max Krummenacher <max.krummenacher@toradex.com>
+Date: Tue, 15 Jan 2019 09:30:12 +0000
+Subject: [PATCH] qt3d: do not set resources_big
+
+resources_big enables rcc's two pass mode.
+In an OE setup there seem to be a race condition which makes the build fail with
+the following error messages (with changing build targets):
+
+| No data signature found
+| make[3]: *** [Makefile:458: .rcc/qrc_controls.o] Error 1
+| make[3]: Leaving directory '.../build/examples/qt3d/controls'
+
+see also:
+https://bugreports.qt.io/browse/QTBUG-41301?focusedCommentId=255692&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel
+(the default is now 1 pass and 2 pass needs to be configured in CONFIG with ressource_big)
+
+Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
+---
+ examples/qt3d/examples.pri | 2 +-
+ examples/qt3d/planets-qml/planets-qml.pro | 3 ++-
+ 2 files changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/examples/qt3d/examples.pri b/examples/qt3d/examples.pri
+index 621b1473c..7d9a75073 100644
+--- a/examples/qt3d/examples.pri
++++ b/examples/qt3d/examples.pri
+@@ -1,7 +1,6 @@
+ TEMPLATE = app
+
+ QT += 3dextras
+-CONFIG += resources_big
+
+ target.path = $$[QT_INSTALL_EXAMPLES]/qt3d/$$TARGET
+ INSTALLS += target
+diff --git a/examples/qt3d/planets-qml/planets-qml.pro b/examples/qt3d/planets-qml/planets-qml.pro
+index de14ecc8a..a66712928 100644
+--- a/examples/qt3d/planets-qml/planets-qml.pro
++++ b/examples/qt3d/planets-qml/planets-qml.pro
+@@ -8,7 +8,7 @@ QT += qml quick \
+ 3dquick 3dquickrender 3dquickinput 3dquickextras \
+ network
+
+-CONFIG += resources_big c++11
++CONFIG += c++11
+
+ HEADERS += \
+ networkcontroller.h
+--
+2.13.6
+
diff --git a/qt5-layer/recipes-qt/qt5/qt3d_%.bbappend b/qt5-layer/recipes-qt/qt5/qt3d_%.bbappend
new file mode 100644
index 0000000..85d7eab
--- /dev/null
+++ b/qt5-layer/recipes-qt/qt5/qt3d_%.bbappend
@@ -0,0 +1,13 @@
+FILESEXTRAPATHS_prepend := "${THISDIR}/qt3d:"
+
+# qt3d links against the opengl flavours we configured qtbase for, so
+# depend on them here
+DEPENDS_GLES = ""
+DEPENDS_GLES_imxpxp += "virtual/libgles2 virtual/egl"
+DEPENDS_GLES_imgpu3d += "virtual/libgles2 virtual/egl"
+DEPENDS_GLES_use-mainline-bsp += "virtual/libgles2 virtual/egl"
+
+DEPENDS_class-target += " ${DEPENDS_GLES}"
+
+# Fix race condition
+SRC_URI += "file://0001-qt3d-do-not-set-resources_big.patch"
diff --git a/qt5-layer/recipes-qt/qt5/qt5-x11-free-systemd.bb b/qt5-layer/recipes-qt/qt5/qt5-x11-free-systemd.bb
new file mode 100644
index 0000000..f6ba46d
--- /dev/null
+++ b/qt5-layer/recipes-qt/qt5/qt5-x11-free-systemd.bb
@@ -0,0 +1,25 @@
+SECTION = "x11/libs"
+SUMMARY = "systemd qtapplication autostart"
+# The license is meant for this recipe and the files it installs.
+# RNDIS is part of the kernel, udhcpd is part of busybox
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
+
+inherit allarch systemd
+
+SRC_URI = " \
+ file://qt5-x11-demo.service \
+ file://qt5-x11-demo-init \
+"
+
+do_install () {
+ install -d ${D}/${bindir}
+ install -m 0755 ${WORKDIR}/qt5-x11-demo-init ${D}/${bindir}
+
+ install -d ${D}${systemd_unitdir}/system/
+ install -m 0644 ${WORKDIR}/qt5-x11-demo.service ${D}${systemd_unitdir}/system
+}
+
+NATIVE_SYSTEMD_SUPPORT = "1"
+SYSTEMD_PACKAGES = "${PN}"
+SYSTEMD_SERVICE_${PN} = "qt5-x11-demo.service"
diff --git a/qt5-layer/recipes-qt/qt5/qt5-x11-free-systemd/qt5-x11-demo-init b/qt5-layer/recipes-qt/qt5/qt5-x11-free-systemd/qt5-x11-demo-init
new file mode 100644
index 0000000..76922ec
--- /dev/null
+++ b/qt5-layer/recipes-qt/qt5/qt5-x11-free-systemd/qt5-x11-demo-init
@@ -0,0 +1,43 @@
+#!/bin/sh
+
+set -e
+
+cd /usr/share/qtsmarthome-1.0
+QTAPP="smarthome"
+QTAPPSTART="./${QTAPP} > /var/log/Xsession.log 2>&1"
+
+case "$1" in
+ start)
+ echo "Starting ${QTAPP}"
+ if [ -f /etc/profile.d/tslib.sh ]; then
+ source /etc/profile.d/tslib.sh
+ fi
+ if [ -e "$TSLIB_TSDEVICE" ]; then
+ if [ ! -f /etc/pointercal ]; then
+ /usr/bin/ts_calibrate
+ fi
+ else
+ if [ -e "/usr/bin/xinput_calibrator_once.sh" ]; then
+ xinput_calibrator_once.sh
+ fi
+ fi
+ Xorg &
+ export DISPLAY=:0
+ eval $QTAPPSTART &
+ ;;
+ stop)
+ echo "Stopping ${QTAPP}"
+ killall $QTAPP
+ killall Xorg
+ ;;
+ restart)
+ $0 stop
+ $0 start
+ ;;
+ *)
+ echo "usage: $0 { start | stop | restart }" >&2
+ exit 1
+ ;;
+esac
+
+exit 0
diff --git a/qt5-layer/recipes-qt/qt5/qt5-x11-free-systemd/qt5-x11-demo.service b/qt5-layer/recipes-qt/qt5/qt5-x11-free-systemd/qt5-x11-demo.service
new file mode 100644
index 0000000..053f273
--- /dev/null
+++ b/qt5-layer/recipes-qt/qt5/qt5-x11-free-systemd/qt5-x11-demo.service
@@ -0,0 +1,10 @@
+[Unit]
+Description=start X and a qt application
+
+[Service]
+Type=forking
+ExecStart=/usr/bin/qt5-x11-demo-init start
+ExecStop=/usr/bin/qt5-x11-demo-init stop
+
+[Install]
+WantedBy=graphical.target
diff --git a/qt5-layer/recipes-qt/qt5/qtbase_%.bbappend b/qt5-layer/recipes-qt/qt5/qtbase_%.bbappend
new file mode 100644
index 0000000..0b6f29b
--- /dev/null
+++ b/qt5-layer/recipes-qt/qt5/qtbase_%.bbappend
@@ -0,0 +1,19 @@
+PACKAGECONFIG_EXAMPLES ?= "examples"
+
+# | /build/krm/oe-core_V2.6/build/out-glibc/work/armv7at2hf-vfp-neon-mx6qdl-angstrom-linux-gnueabi/qtbase/5.5.1+gitAUTOINC+5afc431323-r0/git/src/widgets/styles/qgtkstyle.cpp: In member function 'virtual QRect QGtkStyle::subControlRect(QStyle::ComplexControl, const QStyleOptionComplex*, QStyle::SubControl, const QWidget*) const':
+# | /build/krm/oe-core_V2.6/build/out-glibc/work/armv7at2hf-vfp-neon-mx6qdl-angstrom-linux-gnueabi/qtbase/5.5.1+gitAUTOINC+5afc431323-r0/git/src/widgets/styles/qgtkstyle.cpp:3636:24: error: 'isInstanceOf' is not a member of 'QStyleHelper'
+# | } else if (QStyleHelper::isInstanceOf(groupBox->styleObject, QAccessible::Grouping)) {
+# | ^
+# | /build/krm/oe-core_V2.6/build/out-glibc/work/armv7at2hf-vfp-neon-mx6qdl-angstrom-linux-gnueabi/qtbase/5.5.1+gitAUTOINC+5afc431323-r0/git/src/widgets/styles/qgtkstyle.cpp:3636:74: error: 'QAccessible' has not been declared
+# | } else if (QStyleHelper::isInstanceOf(groupBox->styleObject, QAccessible::Grouping)) {
+
+PACKAGECONFIG_append = " accessibility"
+PACKAGECONFIG_append = " sql-sqlite"
+
+PACKAGECONFIG_FONTS_append = " fontconfig"
+
+#qtbase must be configured with icu for qtwebkit
+PACKAGECONFIG_append = " \
+ icu \
+ ${PACKAGECONFIG_EXAMPLES} \
+"