diff options
author | Max Krummenacher <max.krummenacher@toradex.com> | 2023-01-13 14:44:48 +0100 |
---|---|---|
committer | Max Krummenacher <max.krummenacher@toradex.com> | 2023-01-25 16:21:24 +0100 |
commit | fcceceb8ca66a0768c878fa9d386f81aaa69a53a (patch) | |
tree | 0f899df4666b37a3f9dfb3426d9641ce11f52324 /qt5-layer | |
parent | 10f18204aab6ceeee00e3307b8dfe20dfd129f20 (diff) |
qtbase: import from meta-arago, dunfell
Rework, so that it doesn't interfere with non am62xx machines.
I.e. rework the PACKAGECONFIG[gles2] setting and remove the patches
which do not apply to the weston version used in kirkstone.
Related-to: ELB-4978
Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
Diffstat (limited to 'qt5-layer')
8 files changed, 389 insertions, 0 deletions
diff --git a/qt5-layer/recipes-qt/qt5/qtbase/0001-calculator-Add-exit-button-for-non-window-environmen.patch b/qt5-layer/recipes-qt/qt5/qtbase/0001-calculator-Add-exit-button-for-non-window-environmen.patch new file mode 100644 index 0000000..e123df5 --- /dev/null +++ b/qt5-layer/recipes-qt/qt5/qtbase/0001-calculator-Add-exit-button-for-non-window-environmen.patch @@ -0,0 +1,60 @@ +From b0cb70d35131643dce61fa5a8ce9f652dc63e963 Mon Sep 17 00:00:00 2001 +From: Jake Stiffler <jake@mcsdk-hpc-test.(none)> +Date: Thu, 19 Mar 2015 15:21:08 -0400 +Subject: [PATCH 1/2] calculator: Add exit button for non-window environment. + +Signed-off-by: Jake Stiffler <jake@mcsdk-hpc-test.(none)> +--- + examples/widgets/widgets/calculator/calculator.cpp | 9 ++++++++- + examples/widgets/widgets/calculator/calculator.h | 1 + + 2 files changed, 9 insertions(+), 1 deletion(-) + +diff --git a/examples/widgets/widgets/calculator/calculator.cpp b/examples/widgets/widgets/calculator/calculator.cpp +index bb3836b..afe0bba 100644 +--- a/examples/widgets/widgets/calculator/calculator.cpp ++++ b/examples/widgets/widgets/calculator/calculator.cpp +@@ -78,6 +78,7 @@ Calculator::Calculator(QWidget *parent) + Button *backspaceButton = createButton(tr("Backspace"), SLOT(backspaceClicked())); + Button *clearButton = createButton(tr("Clear"), SLOT(clear())); + Button *clearAllButton = createButton(tr("Clear All"), SLOT(clearAll())); ++ Button *quitButton = createButton(tr("Quit"), SLOT(quitClicked())); + + Button *clearMemoryButton = createButton(tr("MC"), SLOT(clearMemory())); + Button *readMemoryButton = createButton(tr("MR"), SLOT(readMemory())); +@@ -100,7 +101,8 @@ Calculator::Calculator(QWidget *parent) + //! [5] //! [6] + mainLayout->setSizeConstraint(QLayout::SetFixedSize); + mainLayout->addWidget(display, 0, 0, 1, 6); +- mainLayout->addWidget(backspaceButton, 1, 0, 1, 2); ++ mainLayout->addWidget(quitButton, 1, 0, 1, 1); ++ mainLayout->addWidget(backspaceButton, 1, 1, 1, 1); + mainLayout->addWidget(clearButton, 1, 2, 1, 2); + mainLayout->addWidget(clearAllButton, 1, 4, 1, 2); + +@@ -297,6 +299,11 @@ void Calculator::changeSignClicked() + } + //! [24] + ++void Calculator::quitClicked() ++{ ++ qApp->quit(); ++} ++ + //! [26] + void Calculator::backspaceClicked() + { +diff --git a/examples/widgets/widgets/calculator/calculator.h b/examples/widgets/widgets/calculator/calculator.h +index 76cf048..5e5c52e 100644 +--- a/examples/widgets/widgets/calculator/calculator.h ++++ b/examples/widgets/widgets/calculator/calculator.h +@@ -64,6 +64,7 @@ private slots: + void equalClicked(); + void pointClicked(); + void changeSignClicked(); ++ void quitClicked(); + void backspaceClicked(); + void clear(); + void clearAll(); +-- +1.7.9.5 + diff --git a/qt5-layer/recipes-qt/qt5/qtbase/0001-deform-Fix-how-controls-are-shown.patch b/qt5-layer/recipes-qt/qt5/qtbase/0001-deform-Fix-how-controls-are-shown.patch new file mode 100644 index 0000000..076beca --- /dev/null +++ b/qt5-layer/recipes-qt/qt5/qtbase/0001-deform-Fix-how-controls-are-shown.patch @@ -0,0 +1,33 @@ +From adad036a785f6b3910e6305181e7711c2bac0df6 Mon Sep 17 00:00:00 2001 +From: Jacob Stiffler <j-stiffler@ti.com> +Date: Fri, 12 Jun 2015 08:34:17 -0400 +Subject: [PATCH 1/2] deform: Fix how controls are shown. + +* Workaround for issue when controls are full screen, and user clicks + OK, black surface remains covering the entire screen. +* If controls are not full screen, then they must retain focus while + opened. + +Signed-off-by: Jacob Stiffler <j-stiffler@ti.com> +--- + examples/widgets/painting/deform/pathdeform.cpp | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/examples/widgets/painting/deform/pathdeform.cpp b/examples/widgets/painting/deform/pathdeform.cpp +index 287f700..f8ecc3b 100644 +--- a/examples/widgets/painting/deform/pathdeform.cpp ++++ b/examples/widgets/painting/deform/pathdeform.cpp +@@ -266,7 +266,9 @@ PathDeformWidget::PathDeformWidget(QWidget *parent, bool smallScreen) + + void PathDeformWidget::showControls() + { +- m_controls->showFullScreen(); ++ // Hide first to keep controls in foreground. ++ m_controls->hide(); ++ m_controls->show(); + } + + void PathDeformWidget::hideControls() +-- +1.7.9.5 + diff --git a/qt5-layer/recipes-qt/qt5/qtbase/0001-eglfs-Force-888-format-only-on-env-flag.patch b/qt5-layer/recipes-qt/qt5/qtbase/0001-eglfs-Force-888-format-only-on-env-flag.patch new file mode 100644 index 0000000..b6f0eec --- /dev/null +++ b/qt5-layer/recipes-qt/qt5/qtbase/0001-eglfs-Force-888-format-only-on-env-flag.patch @@ -0,0 +1,44 @@ +From 7288496d08108b8b6514f9fb20c575fd42f8027e Mon Sep 17 00:00:00 2001 +From: Gowtham Tammana <g-tammana@ti.com> +Date: Mon, 6 Jul 2020 12:47:23 -0500 +Subject: [PATCH] eglfs: Force 888 format only on env flag + +[ChangeLog][Platform Specific Changes][eglfs] In the case of elgfs +platform the surface format is being forced to RGB888 format which +conflicts if a different default format is specified in the json config +file. Force the surface format to be of RGB888 only when the environment +flag QT_QPA_EGLFS_FORCE888 is set. +set. + +Upstream-Status: Pending + +Change-Id: Id63f11eed2f41b322a95e103860888694ccd44db +--- + .../eglfs_kms_support/qeglfskmsintegration.cpp | 11 ++++++++--- + 1 file changed, 8 insertions(+), 3 deletions(-) + +diff --git a/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_support/qeglfskmsintegration.cpp b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_support/qeglfskmsintegration.cpp +index 06bc272050..41f2265208 100644 +--- a/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_support/qeglfskmsintegration.cpp ++++ b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_support/qeglfskmsintegration.cpp +@@ -102,9 +102,14 @@ QSurfaceFormat QEglFSKmsIntegration::surfaceFormatFor(const QSurfaceFormat &inpu + QSurfaceFormat format(inputFormat); + format.setRenderableType(QSurfaceFormat::OpenGLES); + format.setSwapBehavior(QSurfaceFormat::DoubleBuffer); +- format.setRedBufferSize(8); +- format.setGreenBufferSize(8); +- format.setBlueBufferSize(8); ++ ++ static const bool force888 = qEnvironmentVariableIntValue("QT_QPA_EGLFS_FORCE888"); ++ if (force888) { ++ format.setRedBufferSize(8); ++ format.setGreenBufferSize(8); ++ format.setBlueBufferSize(8); ++ } ++ + return format; + } + +-- +2.17.1 + diff --git a/qt5-layer/recipes-qt/qt5/qtbase/0001-qtbase-plugins-platforms-eglfs_kms-fix-compiler-erro.patch b/qt5-layer/recipes-qt/qt5/qtbase/0001-qtbase-plugins-platforms-eglfs_kms-fix-compiler-erro.patch new file mode 100644 index 0000000..16006aa --- /dev/null +++ b/qt5-layer/recipes-qt/qt5/qtbase/0001-qtbase-plugins-platforms-eglfs_kms-fix-compiler-erro.patch @@ -0,0 +1,29 @@ +From 7e1d01d4dc022f4da117f87a993d03b084134018 Mon Sep 17 00:00:00 2001 +From: Eric Ruei <e-ruei1@ti.com> +Date: Fri, 8 Mar 2019 17:02:38 -0500 +Subject: [PATCH] qtbase: plugins: platforms: eglfs_kms: fix compiler error + +Upstream_Status: Pending + +Signed-off-by: Eric Ruei <e-ruei1@ti.com> +--- + .../eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmintegration.cpp | 7 +------ + .../eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmintegration.h | 5 +++++ + 2 files changed, 6 insertions(+), 6 deletions(-) + +diff --git a/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmintegration.cpp b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmintegration.cpp +index 4023381..eb24175 100644 +--- a/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmintegration.cpp ++++ b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmintegration.cpp +@@ -83,7 +78,7 @@ EGLDisplay QEglFSKmsGbmIntegration::createDisplay(EGLNativeDisplayType nativeDis + } + + if (getPlatformDisplay) { +- display = getPlatformDisplay(EGL_PLATFORM_GBM_KHR, nativeDisplay, nullptr); ++ display = getPlatformDisplay(EGL_PLATFORM_GBM_KHR, (void *)nativeDisplay, nullptr); + } else { + qCDebug(qLcEglfsKmsDebug, "No eglGetPlatformDisplay for GBM, falling back to eglGetDisplay"); + display = eglGetDisplay(nativeDisplay); +-- +1.9.1 + diff --git a/qt5-layer/recipes-qt/qt5/qtbase/0002-animatedtiles-Add-exit-button-for-non-window-environ.patch b/qt5-layer/recipes-qt/qt5/qtbase/0002-animatedtiles-Add-exit-button-for-non-window-environ.patch new file mode 100644 index 0000000..7b7ab3c --- /dev/null +++ b/qt5-layer/recipes-qt/qt5/qtbase/0002-animatedtiles-Add-exit-button-for-non-window-environ.patch @@ -0,0 +1,81 @@ +From 98476756ed6313c13adadf9d86bb921008c61eff Mon Sep 17 00:00:00 2001 +From: Jake Stiffler <jake@mcsdk-hpc-test.(none)> +Date: Fri, 20 Mar 2015 15:00:51 -0400 +Subject: [PATCH 2/2] animatedtiles: Add exit button for non-window + environment. + +Signed-off-by: Jake Stiffler <jake@mcsdk-hpc-test.(none)> +--- + .../animation/animatedtiles/animatedtiles.qrc | 1 + + examples/widgets/animation/animatedtiles/main.cpp | 13 ++++++++++++- + 2 files changed, 13 insertions(+), 1 deletion(-) + +diff --git a/examples/widgets/animation/animatedtiles/animatedtiles.qrc b/examples/widgets/animation/animatedtiles/animatedtiles.qrc +index c43a979..3675345 100644 +--- a/examples/widgets/animation/animatedtiles/animatedtiles.qrc ++++ b/examples/widgets/animation/animatedtiles/animatedtiles.qrc +@@ -6,6 +6,7 @@ + <file>images/figure8.png</file> + <file>images/kinetic.png</file> + <file>images/random.png</file> ++ <file>images/quit.png</file> + <file>images/tile.png</file> + </qresource> + </RCC> +diff --git a/examples/widgets/animation/animatedtiles/main.cpp b/examples/widgets/animation/animatedtiles/main.cpp +index 09e9790..d8491d7 100644 +--- a/examples/widgets/animation/animatedtiles/main.cpp ++++ b/examples/widgets/animation/animatedtiles/main.cpp +@@ -97,6 +97,12 @@ public: + painter->drawPixmap(-_pix.width()/2, -_pix.height()/2, _pix); + } + ++public slots: ++ void quitClicked() ++ { ++ qApp->quit(); ++ } ++ + signals: + void pressed(); + +@@ -121,6 +127,7 @@ class View : public QGraphicsView + public: + View(QGraphicsScene *scene) : QGraphicsView(scene) { } + ++ + protected: + void resizeEvent(QResizeEvent *event) Q_DECL_OVERRIDE + { +@@ -156,16 +163,18 @@ int main(int argc, char **argv) + Button *randomButton = new Button(QPixmap(":/images/random.png"), buttonParent); + Button *tiledButton = new Button(QPixmap(":/images/tile.png"), buttonParent); + Button *centeredButton = new Button(QPixmap(":/images/centered.png"), buttonParent); ++ Button *quitButton = new Button(QPixmap(":/images/quit.png"), buttonParent); + + ellipseButton->setPos(-100, -100); + figure8Button->setPos(100, -100); + randomButton->setPos(0, 0); + tiledButton->setPos(-100, 100); + centeredButton->setPos(100, 100); ++ quitButton->setPos(100, -600); + + scene.addItem(buttonParent); + buttonParent->setTransform(QTransform::fromScale(0.75, 0.75), true); +- buttonParent->setPos(200, 200); ++ buttonParent->setPos(400, 200); + buttonParent->setZValue(65); + + // States +@@ -239,6 +248,8 @@ int main(int argc, char **argv) + trans = rootState->addTransition(centeredButton, SIGNAL(pressed()), centeredState); + trans->addAnimation(group); + ++ QObject::connect(quitButton, SIGNAL(pressed()), quitButton, SLOT(quitClicked())); ++ + QTimer timer; + timer.start(125); + timer.setSingleShot(true); +-- +1.7.9.5 + diff --git a/qt5-layer/recipes-qt/qt5/qtbase/0002-deform-disable-opengl-button.patch b/qt5-layer/recipes-qt/qt5/qtbase/0002-deform-disable-opengl-button.patch new file mode 100644 index 0000000..b15324b --- /dev/null +++ b/qt5-layer/recipes-qt/qt5/qtbase/0002-deform-disable-opengl-button.patch @@ -0,0 +1,71 @@ +From 066333592c77ef831286482c7d3636265777a774 Mon Sep 17 00:00:00 2001 +From: Jacob Stiffler <j-stiffler@ti.com> +Date: Fri, 12 Jun 2015 10:24:33 -0400 +Subject: [PATCH 2/2] deform: disable opengl button. + +Signed-off-by: Jacob Stiffler <j-stiffler@ti.com> +--- + examples/widgets/painting/deform/pathdeform.cpp | 12 ++++++------ + 1 file changed, 6 insertions(+), 6 deletions(-) + +diff --git a/examples/widgets/painting/deform/pathdeform.cpp b/examples/widgets/painting/deform/pathdeform.cpp +index f8ecc3b..9da6bf3 100644 +--- a/examples/widgets/painting/deform/pathdeform.cpp ++++ b/examples/widgets/painting/deform/pathdeform.cpp +@@ -91,7 +91,7 @@ void PathDeformControls::layoutForDesktop() + QPushButton *showSourceButton = new QPushButton(mainGroup); + showSourceButton->setText(tr("Show Source")); + +-#ifdef QT_OPENGL_SUPPORT ++#if 0 + QPushButton *enableOpenGLButton = new QPushButton(mainGroup); + enableOpenGLButton->setText(tr("Use OpenGL")); + enableOpenGLButton->setCheckable(true); +@@ -114,7 +114,7 @@ void PathDeformControls::layoutForDesktop() + mainGroupLayout->addWidget(textGroup); + mainGroupLayout->addWidget(animateButton); + mainGroupLayout->addStretch(1); +-#ifdef QT_OPENGL_SUPPORT ++#if 0 + mainGroupLayout->addWidget(enableOpenGLButton); + #endif + mainGroupLayout->addWidget(showSourceButton); +@@ -140,7 +140,7 @@ void PathDeformControls::layoutForDesktop() + connect(deformSlider, SIGNAL(valueChanged(int)), m_renderer, SLOT(setIntensity(int))); + connect(fontSizeSlider, SIGNAL(valueChanged(int)), m_renderer, SLOT(setFontSize(int))); + connect(animateButton, SIGNAL(clicked(bool)), m_renderer, SLOT(setAnimated(bool))); +-#ifdef QT_OPENGL_SUPPORT ++#if 0 + connect(enableOpenGLButton, SIGNAL(clicked(bool)), m_renderer, SLOT(enableOpenGL(bool))); + #endif + +@@ -183,7 +183,7 @@ void PathDeformControls::layoutForSmallScreen() + QPushButton *animateButton = new QPushButton(tr("Animated"), mainGroup); + animateButton->setCheckable(true); + +-#ifdef QT_OPENGL_SUPPORT ++#if 0 + QPushButton *enableOpenGLButton = new QPushButton(mainGroup); + enableOpenGLButton->setText(tr("Use OpenGL")); + enableOpenGLButton->setCheckable(mainGroup); +@@ -205,7 +205,7 @@ void PathDeformControls::layoutForSmallScreen() + mainGroupLayout->addWidget(fontSizeLabel, 2, 0, Qt::AlignRight); + mainGroupLayout->addWidget(fontSizeSlider, 2, 1); + mainGroupLayout->addWidget(animateButton, 3,0, 1,2); +-#ifdef QT_OPENGL_SUPPORT ++#if 0 + mainGroupLayout->addWidget(enableOpenGLButton, 4,0, 1,2); + #endif + +@@ -221,7 +221,7 @@ void PathDeformControls::layoutForSmallScreen() + connect(deformSlider, SIGNAL(valueChanged(int)), m_renderer, SLOT(setIntensity(int))); + connect(fontSizeSlider, SIGNAL(valueChanged(int)), m_renderer, SLOT(setFontSize(int))); + connect(animateButton, SIGNAL(clicked(bool)), m_renderer, SLOT(setAnimated(bool))); +-#ifdef QT_OPENGL_SUPPORT ++#if 0 + connect(enableOpenGLButton, SIGNAL(clicked(bool)), m_renderer, SLOT(enableOpenGL(bool))); + #endif + +-- +1.7.9.5 + diff --git a/qt5-layer/recipes-qt/qt5/qtbase/quit.png b/qt5-layer/recipes-qt/qt5/qtbase/quit.png Binary files differnew file mode 100755 index 0000000..b9eb270 --- /dev/null +++ b/qt5-layer/recipes-qt/qt5/qtbase/quit.png diff --git a/qt5-layer/recipes-qt/qt5/qtbase_%.bbappend b/qt5-layer/recipes-qt/qt5/qtbase_%.bbappend new file mode 100644 index 0000000..d79db07 --- /dev/null +++ b/qt5-layer/recipes-qt/qt5/qtbase_%.bbappend @@ -0,0 +1,71 @@ +FILESEXTRAPATHS:prepend := "${THISDIR}/${BPN}:" + +# am62xx extra gles2 packageconfig flags +GLES_EXTRA_DEPS:am62xx = "libdrm wayland" +PACKAGECONFIG:append:am62xx = " gles2extra" +PACKAGECONFIG[gles2extra] = "-opengl es2 -eglfs,,virtual/libgles2 virtual/egl ${GLES_EXTRA_DEPS}" + +PR:append:am62xx = ".arago17" + +QT_CONFIG_FLAGS:append:am62xx = " -qpa ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland', 'eglfs', d)}" + +QT_EGLFS_PATCHES = "\ + file://0001-calculator-Add-exit-button-for-non-window-environmen.patch \ + file://0002-animatedtiles-Add-exit-button-for-non-window-environ.patch \ + file://quit.png \ +" + +# file://0002-deform-disable-opengl-button.patch + +SRC_URI:append:am62xx = "\ + ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', '', "${QT_EGLFS_PATCHES}", d)}\ + file://0001-deform-Fix-how-controls-are-shown.patch \ + file://0001-qtbase-plugins-platforms-eglfs_kms-fix-compiler-erro.patch \ + file://0001-eglfs-Force-888-format-only-on-env-flag.patch \ +" + +python do_patch:append:am62xx () { + import shutil + + work_dir = d.getVar("WORKDIR") + s = d.getVar("S") + + if not bb.utils.contains('DISTRO_FEATURES','wayland',True,False,d): + shutil.copy(os.path.join(work_dir,"quit.png"),os.path.join(s,"examples/widgets/animation/animatedtiles/images/")) +} + +# Add symbolic link qt5/examples for backward compatibility +do_install:append:am62xx () { + + install -d ${D}${datadir}/qt5 + ln -sf ../examples ${D}${datadir}/qt5/examples +} + +FILES:${PN}-examples:append:am62xx = " ${datadir}/qt5/*" + + +RDEPENDS:${PN}:am62xx += "${PN}-conf" + +PACKAGE_ARCH:am62xx = "${MACHINE_ARCH}" + + +############################### TDX added + +DEPENDS:append:am62xx = " ti-img-rogue-umlibs" + +# from meta-arago/conf/layer.conf +PACKAGECONFIG_GL:am62xx = "gles2 linuxfb" +PACKAGECONFIG_DISTRO:am62xx = "icu examples accessibility gif gbm kms libinput" +PACKAGECONFIG_FONTS:am62xx = "fontconfig" + +PACKAGECONFIG:remove:am62xx = "kms" +PACKAGECONFIG:remove:am62xx = "vulkan" +PACKAGECONFIG:remove:am62xx = "xcb glib xkbcommon glib" +# they don't apply without changes, drop them for now +SRC_URI:remove = " \ + file://0002-deform-disable-opengl-button.patch \ + \ + file://0001-deform-Fix-how-controls-are-shown.patch \ + file://0001-qtbase-plugins-platforms-eglfs_kms-fix-compiler-erro.patch \ + file://0001-eglfs-Force-888-format-only-on-env-flag.patch \ +" |