qt5: fixed raspberrypi support
PATCH 1/2 qt5: fixed raspberrypi support
Because EGL properties were not defined properly, we always had the following error
make: *** [egl] Error 1
| EGL disabled.
| The EGL functionality test failed; EGL is required by some QPA plugins to manage cont | You might need to modify the include and library search paths by editing QMAKE_INCDIR
x11 in DISTRO_FEATURES also produced the following error
error: 'QAccessible' has not been declared
| } else if (QStyleHelper::isInstanceOf(groupBox->styleObject,
QAccessible::Grouping)) {
| ^
|Makefile:53048: recipe for target '.obj/qgtkstyle.o' failed
This bbappend definitively fix these bug
--- qt5-layer/recipes-qt/qt5/qtbase_%.bbappend | 33 ++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 qt5-layer/recipes-qt/qt5/qtbase_%.bbappend
qt5-layer/recipes-qt/qt5/qtbase_%.bbappend new file +33 -0
@@ -0,0 +1,33 @@ + +# Raspberrypi only need gles2 +PACKAGECONFIG_GL = "gles2" + +QT_CONFIG_FLAGS_append = "${@base_contains('DISTRO_FEATURES', 'x11', ' -accessibility ', '', d)}" +do_configure_prepend_rpi() { + + sed -i 's!load(qt_config)!!' ${S}/mkspecs/linux-oe-g++/qmake.conf + if ! grep -q '^EGLFS_' ${S}/mkspecs/linux-oe-g++/qmake.conf; then + cat >> ${S}/mkspecs/linux-oe-g++/qmake.conf <<EOF +QMAKE_INCDIR_EGL = \$\$[QT_SYSROOT]${includedir}/interface/vcos/pthreads \$\$[QT_SYSROOT]${includedir}/interface/vmcs_host/linux +QMAKE_INCDIR_OPENGL_ES2 = \$\${QMAKE_INCDIR_EGL} +QMAKE_LIBS_EGL = -lEGL -lGLESv2 +EOF + + if [ -d ${S}/src/plugins/platforms/eglfs/deviceintegration/eglfs_brcm ]; then + cat >> ${S}/mkspecs/linux-oe-g++/qmake.conf <<EOF +EGLFS_DEVICE_INTEGRATION = eglfs_brcm +EOF + else + cat >> ${S}/mkspecs/linux-oe-g++/qmake.conf <<EOF +EGLFS_PLATFORM_HOOKS_LIBS = -lbcm_host +EGLFS_PLATFORM_HOOKS_SOURCES = \$\$PWD/../devices/linux-rasp-pi-g++/qeglfshooks_pi.cpp +EOF + fi + fi + cat >> ${S}/mkspecs/linux-oe-g++/qmake.conf <<EOF + + +load(qt_config) + +EOF +}
Signature · 1 line
1.9.1
PATCH 2/2 layer.conf: avoid to force users to add the qt5 layer because of qtbase bbappend
--- conf/layer.conf | 4 ++++ 1 file changed, 4 insertions(+)
conf/layer.conf +4 -0
@@ -12,3 +12,7 @@ BBFILE_PRIORITY_raspberrypi = "9" # Additional license directories. LICENSE_PATH += "${LAYERDIR}/files/custom-licenses" +# Let us add layer-specific (such as qt5-layer) bbappends which +# are only applied when that layer is included in our configuration +BBFILES += "${@' '.join('${LAYERDIR}/%s/recipes*/*/*.bbappend' % layer \ + for layer in BBFILE_COLLECTIONS.split())}"
Signature · 1 line
1.9.1