summaryrefslogtreecommitdiffstats
path: root/patches/qt-everywhere-src-5.12.1
diff options
context:
space:
mode:
Diffstat (limited to 'patches/qt-everywhere-src-5.12.1')
-rw-r--r--patches/qt-everywhere-src-5.12.1/0001-qtwayland-use-QT_EGL_NO_X11-and-qt_egl_p.h-everywher.patch87
-rw-r--r--patches/qt-everywhere-src-5.12.1/0002-videonode-egl-use-QT_EGL_NO_X11-and-qt_egl_p.h.patch47
-rw-r--r--patches/qt-everywhere-src-5.12.1/0003-qt3d-link-with-latomic-if-necessary.patch25
-rw-r--r--patches/qt-everywhere-src-5.12.1/0004-eglfs_kms-device-ordering-robustness.patch58
-rw-r--r--patches/qt-everywhere-src-5.12.1/0005-ptxdist-qtwebengine-allow-building-with-ptxdist.patch23
-rw-r--r--patches/qt-everywhere-src-5.12.1/0006-ptxdist-qtwebengine-let-ninja-use-the-jobserver.patch22
-rw-r--r--patches/qt-everywhere-src-5.12.1/0007-HACK-qtwebengine-workaround-for-too-long-file-names.patch39
-rw-r--r--patches/qt-everywhere-src-5.12.1/0008-HACK-don-t-resolv-library-paths.patch30
-rw-r--r--patches/qt-everywhere-src-5.12.1/series11
9 files changed, 342 insertions, 0 deletions
diff --git a/patches/qt-everywhere-src-5.12.1/0001-qtwayland-use-QT_EGL_NO_X11-and-qt_egl_p.h-everywher.patch b/patches/qt-everywhere-src-5.12.1/0001-qtwayland-use-QT_EGL_NO_X11-and-qt_egl_p.h-everywher.patch
new file mode 100644
index 000000000..1872c83ad
--- /dev/null
+++ b/patches/qt-everywhere-src-5.12.1/0001-qtwayland-use-QT_EGL_NO_X11-and-qt_egl_p.h-everywher.patch
@@ -0,0 +1,87 @@
+From: Michael Olbrich <m.olbrich@pengutronix.de>
+Date: Tue, 7 Nov 2017 14:51:03 +0100
+Subject: [PATCH] qtwayland: use QT_EGL_NO_X11 and qt_egl_p.h everywhere
+
+Otherwise egl.h is included without MESA_EGL_NO_X11_HEADERS
+
+Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
+---
+ .../src/hardwareintegration/client/drm-egl-server/drm-egl-server.pri | 4 ++++
+ .../client/drm-egl-server/drmeglserverbufferintegration.h | 4 ++--
+ .../hardwareintegration/compositor/drm-egl-server/drm-egl-server.pri | 3 +++
+ .../compositor/drm-egl-server/drmeglserverbufferintegration.h | 4 ++--
+ .../src/hardwareintegration/compositor/wayland-egl/wayland-egl.pri | 2 ++
+ 5 files changed, 13 insertions(+), 4 deletions(-)
+
+diff --git a/qtwayland/src/hardwareintegration/client/drm-egl-server/drm-egl-server.pri b/qtwayland/src/hardwareintegration/client/drm-egl-server/drm-egl-server.pri
+index 700e95e32df5..7667b5418261 100644
+--- a/qtwayland/src/hardwareintegration/client/drm-egl-server/drm-egl-server.pri
++++ b/qtwayland/src/hardwareintegration/client/drm-egl-server/drm-egl-server.pri
+@@ -2,6 +2,10 @@ INCLUDEPATH += $$PWD
+
+ QMAKE_USE += egl wayland-client
+
++QT += egl_support-private
++
++DEFINES += QT_EGL_NO_X11
++
+ SOURCES += \
+ $$PWD/drmeglserverbufferintegration.cpp
+
+diff --git a/qtwayland/src/hardwareintegration/client/drm-egl-server/drmeglserverbufferintegration.h b/qtwayland/src/hardwareintegration/client/drm-egl-server/drmeglserverbufferintegration.h
+index 2c65969f8488..e6387c37158b 100644
+--- a/qtwayland/src/hardwareintegration/client/drm-egl-server/drmeglserverbufferintegration.h
++++ b/qtwayland/src/hardwareintegration/client/drm-egl-server/drmeglserverbufferintegration.h
+@@ -48,8 +48,8 @@
+ #include <QtWaylandClient/private/qwaylanddisplay_p.h>
+ #include <QtCore/QTextStream>
+
+-#include <EGL/egl.h>
+-#include <EGL/eglext.h>
++#include <QtEglSupport/private/qt_egl_p.h>
++
+ #ifndef EGL_KHR_image
+ typedef void *EGLImageKHR;
+ typedef EGLImageKHR (EGLAPIENTRYP PFNEGLCREATEIMAGEKHRPROC) (EGLDisplay dpy, EGLContext ctx, EGLenum target, EGLClientBuffer buffer, const EGLint *attrib_list);
+diff --git a/qtwayland/src/hardwareintegration/compositor/drm-egl-server/drm-egl-server.pri b/qtwayland/src/hardwareintegration/compositor/drm-egl-server/drm-egl-server.pri
+index 7d6841748c5a..553b49f3fe38 100644
+--- a/qtwayland/src/hardwareintegration/compositor/drm-egl-server/drm-egl-server.pri
++++ b/qtwayland/src/hardwareintegration/compositor/drm-egl-server/drm-egl-server.pri
+@@ -5,6 +5,9 @@ QMAKE_USE_PRIVATE += egl wayland-server
+ SOURCES += \
+ $$PWD/drmeglserverbufferintegration.cpp
+
++QT += egl_support-private
++
++DEFINES += QT_EGL_NO_X11
+
+ HEADERS += \
+ $$PWD/drmeglserverbufferintegration.h
+diff --git a/qtwayland/src/hardwareintegration/compositor/drm-egl-server/drmeglserverbufferintegration.h b/qtwayland/src/hardwareintegration/compositor/drm-egl-server/drmeglserverbufferintegration.h
+index ff329c1a17fc..3d4f23d9404f 100644
+--- a/qtwayland/src/hardwareintegration/compositor/drm-egl-server/drmeglserverbufferintegration.h
++++ b/qtwayland/src/hardwareintegration/compositor/drm-egl-server/drmeglserverbufferintegration.h
+@@ -52,8 +52,8 @@
+ #include <QtWaylandCompositor/private/qwayland-server-server-buffer-extension.h>
+
+ #include <QtCore/QDebug>
+-#include <EGL/egl.h>
+-#include <EGL/eglext.h>
++
++#include <QtEglSupport/private/qt_egl_p.h>
+
+ #ifndef EGL_KHR_image
+ typedef void *EGLImageKHR;
+diff --git a/qtwayland/src/hardwareintegration/compositor/wayland-egl/wayland-egl.pri b/qtwayland/src/hardwareintegration/compositor/wayland-egl/wayland-egl.pri
+index e20c6802c200..078b74839cb1 100644
+--- a/qtwayland/src/hardwareintegration/compositor/wayland-egl/wayland-egl.pri
++++ b/qtwayland/src/hardwareintegration/compositor/wayland-egl/wayland-egl.pri
+@@ -4,6 +4,8 @@ QMAKE_USE_PRIVATE += egl wayland-server wayland-egl
+
+ QT += egl_support-private
+
++DEFINES += QT_EGL_NO_X11
++
+ SOURCES += \
+ $$PWD/waylandeglclientbufferintegration.cpp
+
diff --git a/patches/qt-everywhere-src-5.12.1/0002-videonode-egl-use-QT_EGL_NO_X11-and-qt_egl_p.h.patch b/patches/qt-everywhere-src-5.12.1/0002-videonode-egl-use-QT_EGL_NO_X11-and-qt_egl_p.h.patch
new file mode 100644
index 000000000..c3935b413
--- /dev/null
+++ b/patches/qt-everywhere-src-5.12.1/0002-videonode-egl-use-QT_EGL_NO_X11-and-qt_egl_p.h.patch
@@ -0,0 +1,47 @@
+From: Michael Olbrich <m.olbrich@pengutronix.de>
+Date: Tue, 7 Nov 2017 14:51:03 +0100
+Subject: [PATCH] videonode: egl: use QT_EGL_NO_X11 and qt_egl_p.h
+
+Otherwise egl.h is included without MESA_EGL_NO_X11_HEADERS
+
+Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
+---
+ qtmultimedia/src/plugins/videonode/egl/egl.pro | 4 +++-
+ qtmultimedia/src/plugins/videonode/egl/qsgvideonode_egl.h | 3 +--
+ 2 files changed, 4 insertions(+), 3 deletions(-)
+
+diff --git a/qtmultimedia/src/plugins/videonode/egl/egl.pro b/qtmultimedia/src/plugins/videonode/egl/egl.pro
+index 7151123ea7a3..106f982e5ec0 100644
+--- a/qtmultimedia/src/plugins/videonode/egl/egl.pro
++++ b/qtmultimedia/src/plugins/videonode/egl/egl.pro
+@@ -1,6 +1,6 @@
+ TARGET = eglvideonode
+
+-QT += multimedia-private qtmultimediaquicktools-private
++QT += multimedia-private qtmultimediaquicktools-private egl_support-private
+ CONFIG += egl
+
+ HEADERS += \
+@@ -12,6 +12,8 @@ SOURCES += \
+ OTHER_FILES += \
+ egl.json
+
++DEFINES += QT_EGL_NO_X11
++
+ PLUGIN_TYPE = video/videonode
+ PLUGIN_EXTENDS = quick
+ PLUGIN_CLASS_NAME = QSGVideoNodeFactory_EGL
+diff --git a/qtmultimedia/src/plugins/videonode/egl/qsgvideonode_egl.h b/qtmultimedia/src/plugins/videonode/egl/qsgvideonode_egl.h
+index 0ec63eac1798..1a753463a5b7 100644
+--- a/qtmultimedia/src/plugins/videonode/egl/qsgvideonode_egl.h
++++ b/qtmultimedia/src/plugins/videonode/egl/qsgvideonode_egl.h
+@@ -45,8 +45,7 @@
+ #include <QSGOpaqueTextureMaterial>
+ #include <QSGTexture>
+
+-#include <EGL/egl.h>
+-#include <EGL/eglext.h>
++#include <QtEglSupport/private/qt_egl_p.h>
+
+ #ifdef Bool
+ # undef Bool
diff --git a/patches/qt-everywhere-src-5.12.1/0003-qt3d-link-with-latomic-if-necessary.patch b/patches/qt-everywhere-src-5.12.1/0003-qt3d-link-with-latomic-if-necessary.patch
new file mode 100644
index 000000000..6445dc4f4
--- /dev/null
+++ b/patches/qt-everywhere-src-5.12.1/0003-qt3d-link-with-latomic-if-necessary.patch
@@ -0,0 +1,25 @@
+From: Michael Olbrich <m.olbrich@pengutronix.de>
+Date: Thu, 21 Apr 2016 16:25:30 +0200
+Subject: [PATCH] qt3d: link with -latomic if necessary
+
+Without this, building qt3d on PowerPC fails with:
+
+.obj/qnodeid.o:qnodeid.cpp:function Qt3DCore::QNodeId::createId(): error: undefined reference to '__atomic_fetch_add_8'
+
+Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
+---
+ qt3d/src/core/nodes/nodes.pri | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/qt3d/src/core/nodes/nodes.pri b/qt3d/src/core/nodes/nodes.pri
+index 785ae2b21472..de97caee8662 100644
+--- a/qt3d/src/core/nodes/nodes.pri
++++ b/qt3d/src/core/nodes/nodes.pri
+@@ -1,5 +1,7 @@
+ INCLUDEPATH += $$PWD
+
++atomic64-libatomic: LIBS += -latomic
++
+ HEADERS += \
+ $$PWD/qnode.h \
+ $$PWD/qnode_p.h \
diff --git a/patches/qt-everywhere-src-5.12.1/0004-eglfs_kms-device-ordering-robustness.patch b/patches/qt-everywhere-src-5.12.1/0004-eglfs_kms-device-ordering-robustness.patch
new file mode 100644
index 000000000..d466e32b3
--- /dev/null
+++ b/patches/qt-everywhere-src-5.12.1/0004-eglfs_kms-device-ordering-robustness.patch
@@ -0,0 +1,58 @@
+From: Lucas Stach <l.stach@pengutronix.de>
+Date: Mon, 29 Jan 2018 14:02:03 +0100
+Subject: [PATCH] eglfs_kms: device ordering robustness
+
+Check the DRM device for available mode resources before deciding to
+use it as the KMS device. This way we are robust against changes in
+DRM device ordering, where some of the devices are render only.
+
+Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
+---
+ .../eglfs_kms/qeglfskmsgbmintegration.cpp | 20 ++++++++++++++++++++
+ 1 file changed, 20 insertions(+)
+
+diff --git a/qtbase/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmintegration.cpp b/qtbase/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmintegration.cpp
+index 402338197d0f..227f6fe3e9fb 100644
+--- a/qtbase/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmintegration.cpp
++++ b/qtbase/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmintegration.cpp
+@@ -47,6 +47,7 @@
+ #include "private/qeglfscursor_p.h"
+
+ #include <QtCore/QLoggingCategory>
++#include <QtCore/private/qcore_unix_p.h>
+ #include <QtGui/QScreen>
+ #include <QtDeviceDiscoverySupport/private/qdevicediscovery_p.h>
+
+@@ -129,6 +130,20 @@ void QEglFSKmsGbmIntegration::presentBuffer(QPlatformSurface *surface)
+ screen->flip();
+ }
+
++static bool check_modesetting(QString devpath)
++{
++ bool moderes = false;
++ struct drm_mode_card_res res = { };
++ int fd = qt_safe_open(devpath.toLocal8Bit().constData(), O_RDWR | O_CLOEXEC);
++
++ if (!drmIoctl(fd, DRM_IOCTL_MODE_GETRESOURCES, &res))
++ moderes = true;
++
++ qt_safe_close(fd);
++
++ return moderes;
++}
++
+ QKmsDevice *QEglFSKmsGbmIntegration::createDevice()
+ {
+ QString path = screenConfig()->devicePath();
+@@ -144,6 +159,11 @@ QKmsDevice *QEglFSKmsGbmIntegration::createDevice()
+ qFatal("Could not find DRM device!");
+
+ path = devices.first();
++ for (int i = 0; i < devices.count(); i++) {
++ path = devices.at(i);
++ if (check_modesetting(path))
++ break;
++ }
+ qCDebug(qLcEglfsKmsDebug) << "Using" << path;
+ }
+
diff --git a/patches/qt-everywhere-src-5.12.1/0005-ptxdist-qtwebengine-allow-building-with-ptxdist.patch b/patches/qt-everywhere-src-5.12.1/0005-ptxdist-qtwebengine-allow-building-with-ptxdist.patch
new file mode 100644
index 000000000..c7292d4c1
--- /dev/null
+++ b/patches/qt-everywhere-src-5.12.1/0005-ptxdist-qtwebengine-allow-building-with-ptxdist.patch
@@ -0,0 +1,23 @@
+From: Michael Olbrich <m.olbrich@pengutronix.de>
+Date: Tue, 12 May 2015 11:38:35 +0200
+Subject: [PATCH] ptxdist: qtwebengine: allow building with ptxdist
+
+Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
+---
+ qtwebengine/mkspecs/features/functions.prf | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/qtwebengine/mkspecs/features/functions.prf b/qtwebengine/mkspecs/features/functions.prf
+index f433de3b278f..e7e4955c8292 100644
+--- a/qtwebengine/mkspecs/features/functions.prf
++++ b/qtwebengine/mkspecs/features/functions.prf
+@@ -11,7 +11,8 @@ defineReplace(getChromiumSrcDir) {
+ }
+
+ defineReplace(extractCFlag) {
+- CFLAGS = $$QMAKE_CC $$QMAKE_CFLAGS
++ PTX_QMAKE_CFLAGS = $$(PTX_QMAKE_CFLAGS)
++ CFLAGS = $$QMAKE_CC $$QMAKE_CFLAGS $$split(PTX_QMAKE_CFLAGS, " ")
+ OPTION = $$find(CFLAGS, $$1)
+ OPTION = $$split(OPTION, =)
+ PARAM = $$member(OPTION, 1)
diff --git a/patches/qt-everywhere-src-5.12.1/0006-ptxdist-qtwebengine-let-ninja-use-the-jobserver.patch b/patches/qt-everywhere-src-5.12.1/0006-ptxdist-qtwebengine-let-ninja-use-the-jobserver.patch
new file mode 100644
index 000000000..58de4fe78
--- /dev/null
+++ b/patches/qt-everywhere-src-5.12.1/0006-ptxdist-qtwebengine-let-ninja-use-the-jobserver.patch
@@ -0,0 +1,22 @@
+From: Michael Olbrich <m.olbrich@pengutronix.de>
+Date: Tue, 14 Nov 2017 21:52:24 +0100
+Subject: [PATCH] ptxdist: qtwebengine: let ninja use the jobserver
+
+Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
+---
+ qtwebengine/src/core/gn_run.pro | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/qtwebengine/src/core/gn_run.pro b/qtwebengine/src/core/gn_run.pro
+index 9860c4541882..777625f96ec0 100644
+--- a/qtwebengine/src/core/gn_run.pro
++++ b/qtwebengine/src/core/gn_run.pro
+@@ -49,7 +49,7 @@ build_pass|!debug_and_release {
+ ninjaflags = $$(NINJAFLAGS)
+ isEmpty(ninjaflags):!silent: ninjaflags = "-v"
+
+- runninja.commands = $$NINJA $$ninjaflags -C $$gn_build_root QtWebEngineCore
++ runninja.commands = +$$NINJA $$ninjaflags -C $$gn_build_root QtWebEngineCore
+ QMAKE_EXTRA_TARGETS += runninja
+
+ build_pass:build_all: default_target.target = all
diff --git a/patches/qt-everywhere-src-5.12.1/0007-HACK-qtwebengine-workaround-for-too-long-file-names.patch b/patches/qt-everywhere-src-5.12.1/0007-HACK-qtwebengine-workaround-for-too-long-file-names.patch
new file mode 100644
index 000000000..bef3dfc2f
--- /dev/null
+++ b/patches/qt-everywhere-src-5.12.1/0007-HACK-qtwebengine-workaround-for-too-long-file-names.patch
@@ -0,0 +1,39 @@
+From: Michael Olbrich <m.olbrich@pengutronix.de>
+Date: Tue, 7 Nov 2017 10:20:09 +0100
+Subject: [PATCH] HACK: qtwebengine: workaround for too long file names
+
+Without this building fails with:
+ninja: error: WriteFile(__third_party_WebKit_Source_bindings_modules_v8_bindings_modules_v8_generated_init_partial__XXX_path_to_the_bsp_platform_XX_build-target_qt-everywhere-opensource-src-5.9.2-build_qtwebengine_src_toolchain_target__rule.rsp): Unable to create file. File name too long
+
+Hack taken from the upstream bugreport:
+https://bugreports.qt.io/browse/QTBUG-59769
+
+Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
+Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
+---
+ .../src/3rdparty/gn/tools/gn/ninja_action_target_writer.cc | 9 +++++++++
+ 1 file changed, 9 insertions(+)
+
+diff --git a/qtwebengine/src/3rdparty/gn/tools/gn/ninja_action_target_writer.cc b/qtwebengine/src/3rdparty/gn/tools/gn/ninja_action_target_writer.cc
+index 7e945c0de0ed..cd98df3c5657 100644
+--- a/qtwebengine/src/3rdparty/gn/tools/gn/ninja_action_target_writer.cc
++++ b/qtwebengine/src/3rdparty/gn/tools/gn/ninja_action_target_writer.cc
+@@ -118,9 +118,18 @@ std::string NinjaActionTargetWriter::WriteRuleDefinition() {
+ // strictly necessary for regular one-shot actions, but it's easier to
+ // just always define unique_name.
+ std::string rspfile = custom_rule_name;
++
++ //quick workaround if filename length > 255 - ".rsp", just cut the dirs starting from the end
++ //please note ".$unique_name" is not used at the moment
++ int pos = 0;
++ std::string delimiter("_");
++ while (rspfile.length() > 250 && (pos = rspfile.find_last_of(delimiter)) != std::string::npos)
++ rspfile = rspfile.substr(0,pos);
++
+ if (!target_->sources().empty())
+ rspfile += ".$unique_name";
+ rspfile += ".rsp";
++
+ out_ << " rspfile = " << rspfile << std::endl;
+
+ // Response file contents.
diff --git a/patches/qt-everywhere-src-5.12.1/0008-HACK-don-t-resolv-library-paths.patch b/patches/qt-everywhere-src-5.12.1/0008-HACK-don-t-resolv-library-paths.patch
new file mode 100644
index 000000000..962acdbb2
--- /dev/null
+++ b/patches/qt-everywhere-src-5.12.1/0008-HACK-don-t-resolv-library-paths.patch
@@ -0,0 +1,30 @@
+From: Michael Olbrich <m.olbrich@pengutronix.de>
+Date: Fri, 8 Feb 2019 15:56:46 +0100
+Subject: [PATCH] HACK: don't resolv library paths
+
+qtConfResolveLibs turns '-lfoo' into the full path for libfoo.so and fails
+if the library is not found.
+
+This break when the library is a ld scripts in a relocatable toolchain.
+For example libm.so may contain 'GROUP ( /lib/libm.so.6 ...)' and this path
+is not prefixed with the toolchain sysroot when the absolute path for
+libm.so is used.
+
+Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
+---
+ qtbase/mkspecs/features/qt_configure.prf | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/qtbase/mkspecs/features/qt_configure.prf b/qtbase/mkspecs/features/qt_configure.prf
+index c45439c3ef1d..1a0368bc5481 100644
+--- a/qtbase/mkspecs/features/qt_configure.prf
++++ b/qtbase/mkspecs/features/qt_configure.prf
+@@ -561,7 +561,7 @@ defineTest(qtConfResolveLibs) {
+ out += $$l
+ }
+ }
+- $$1 = $$out
++ $$1 = $$2
+ export($$1)
+ !isEmpty(4) {
+ $$4 = $$paths
diff --git a/patches/qt-everywhere-src-5.12.1/series b/patches/qt-everywhere-src-5.12.1/series
new file mode 100644
index 000000000..3dab08f03
--- /dev/null
+++ b/patches/qt-everywhere-src-5.12.1/series
@@ -0,0 +1,11 @@
+# generated by git-ptx-patches
+#tag:base --start-number 1
+0001-qtwayland-use-QT_EGL_NO_X11-and-qt_egl_p.h-everywher.patch
+0002-videonode-egl-use-QT_EGL_NO_X11-and-qt_egl_p.h.patch
+0003-qt3d-link-with-latomic-if-necessary.patch
+0004-eglfs_kms-device-ordering-robustness.patch
+0005-ptxdist-qtwebengine-allow-building-with-ptxdist.patch
+0006-ptxdist-qtwebengine-let-ninja-use-the-jobserver.patch
+0007-HACK-qtwebengine-workaround-for-too-long-file-names.patch
+0008-HACK-don-t-resolv-library-paths.patch
+# 70ad5e6c28ffb057886e0363cdb43ef6 - git-ptx-patches magic