From 1b2862e896e31c89459f3186b7e9fdbd64d72bdd Mon Sep 17 00:00:00 2001 From: Mikko Gronoff Date: Mon, 24 Jun 2019 10:49:59 +0300 Subject: qt3d-runtime: update to ogl-runtime v2.4 Qt 3D Studio Runtime 2.x switches/upgrades to OpenGL Runtime with version update 2.3 -> 2.4. * Contains new 3rdparty submodule EASTL (Electronic Arts Standard Template Library), recipe adjusted accordingly. * format-security, examples & musl libc build issues fixed Signed-off-by: Mikko Gronoff --- .../0001-Fix-examples-build-error.patch | 62 ++++++++++++++++++ .../0002-Fix-format-security-issues.patch | 75 ++++++++++++++++++++++ .../ogl-runtime/0003-Fix-build-on-musl-libc.patch | 26 ++++++++ recipes-qt/qt5/ogl-runtime_git.bb | 28 ++++++++ recipes-qt/qt5/qt3d-runtime_git.bb | 16 ----- 5 files changed, 191 insertions(+), 16 deletions(-) create mode 100644 recipes-qt/qt5/ogl-runtime/0001-Fix-examples-build-error.patch create mode 100644 recipes-qt/qt5/ogl-runtime/0002-Fix-format-security-issues.patch create mode 100644 recipes-qt/qt5/ogl-runtime/0003-Fix-build-on-musl-libc.patch create mode 100644 recipes-qt/qt5/ogl-runtime_git.bb delete mode 100644 recipes-qt/qt5/qt3d-runtime_git.bb diff --git a/recipes-qt/qt5/ogl-runtime/0001-Fix-examples-build-error.patch b/recipes-qt/qt5/ogl-runtime/0001-Fix-examples-build-error.patch new file mode 100644 index 00000000..0d2f165f --- /dev/null +++ b/recipes-qt/qt5/ogl-runtime/0001-Fix-examples-build-error.patch @@ -0,0 +1,62 @@ +From 4fa69c1c5396bded20edccb2a1dd9b61f0b1140d Mon Sep 17 00:00:00 2001 +From: Samuli Piippo +Date: Fri, 2 Aug 2019 12:39:50 +0300 +Subject: [PATCH] Fix examples build error + +Add workaround for QTBUG-77288 which causes examples to fail to build + +Signed-off-by: Samuli Piippo +--- + examples/studio3d/cppdatainput/cppdatainput.pro | 1 + + examples/studio3d/dynamicelement/dynamicelement.pro | 1 + + examples/studio3d/qmldatainput/qmldatainput.pro | 1 + + examples/studio3d/simpleqml/simpleqml.pro | 1 + + 4 files changed, 4 insertions(+) + +diff --git a/examples/studio3d/cppdatainput/cppdatainput.pro b/examples/studio3d/cppdatainput/cppdatainput.pro +index 20b5c68..bbb403a 100644 +--- a/examples/studio3d/cppdatainput/cppdatainput.pro ++++ b/examples/studio3d/cppdatainput/cppdatainput.pro +@@ -1,5 +1,6 @@ + CONFIG += c++11 + QT += widgets qml quick studio3d ++QMAKE_LIBS += $$QMAKE_LIBS_3DSQMLSTREAMER $$QMAKE_LIBS_3DSOPENGL + + target.path = $$[QT_INSTALL_EXAMPLES]/studio3d/$$TARGET + INSTALLS += target +diff --git a/examples/studio3d/dynamicelement/dynamicelement.pro b/examples/studio3d/dynamicelement/dynamicelement.pro +index 1b804fd..ae3c005 100644 +--- a/examples/studio3d/dynamicelement/dynamicelement.pro ++++ b/examples/studio3d/dynamicelement/dynamicelement.pro +@@ -1,6 +1,7 @@ + TEMPLATE = app + + QT += qml quick studio3d ++QMAKE_LIBS += $$QMAKE_LIBS_3DSQMLSTREAMER $$QMAKE_LIBS_3DSOPENGL + + SOURCES += \ + demo.cpp \ +diff --git a/examples/studio3d/qmldatainput/qmldatainput.pro b/examples/studio3d/qmldatainput/qmldatainput.pro +index 9bafed5..496c2c1 100644 +--- a/examples/studio3d/qmldatainput/qmldatainput.pro ++++ b/examples/studio3d/qmldatainput/qmldatainput.pro +@@ -1,6 +1,7 @@ + TEMPLATE = app + + QT += widgets qml quick studio3d ++QMAKE_LIBS += $$QMAKE_LIBS_3DSQMLSTREAMER $$QMAKE_LIBS_3DSOPENGL + + integrity: DEFINES += USE_EMBEDDED_FONTS + +diff --git a/examples/studio3d/simpleqml/simpleqml.pro b/examples/studio3d/simpleqml/simpleqml.pro +index 62afa78..1a0784b 100644 +--- a/examples/studio3d/simpleqml/simpleqml.pro ++++ b/examples/studio3d/simpleqml/simpleqml.pro +@@ -1,6 +1,7 @@ + TEMPLATE = app + + QT += widgets qml quick studio3d ++QMAKE_LIBS += $$QMAKE_LIBS_3DSQMLSTREAMER $$QMAKE_LIBS_3DSOPENGL + + SOURCES += \ + main.cpp diff --git a/recipes-qt/qt5/ogl-runtime/0002-Fix-format-security-issues.patch b/recipes-qt/qt5/ogl-runtime/0002-Fix-format-security-issues.patch new file mode 100644 index 00000000..fcf6915d --- /dev/null +++ b/recipes-qt/qt5/ogl-runtime/0002-Fix-format-security-issues.patch @@ -0,0 +1,75 @@ +From c80b588cc3e11a80ffedd778fab3f19c686552f7 Mon Sep 17 00:00:00 2001 +From: Samuli Piippo +Date: Mon, 5 Aug 2019 14:24:44 +0300 +Subject: [PATCH] Fix format-security issues + +format not a string literal and no format arguments [-Wformat-security] + +Change-Id: I04c1d1598948b664b9d85036030c6f89fcf3c8b7 +--- + src/render/backends/gl/Q3DSRenderBackendGLES2.cpp | 4 ++-- + src/render/backends/gl/Qt3DSRenderBackendGLBase.cpp | 8 ++++---- + 2 files changed, 6 insertions(+), 6 deletions(-) + +diff --git a/src/render/backends/gl/Q3DSRenderBackendGLES2.cpp b/src/render/backends/gl/Q3DSRenderBackendGLES2.cpp +index ac5b992..02046ac 100644 +--- a/src/render/backends/gl/Q3DSRenderBackendGLES2.cpp ++++ b/src/render/backends/gl/Q3DSRenderBackendGLES2.cpp +@@ -663,7 +663,7 @@ NVRenderBackendGLES2Impl::CreateRenderbuffer(NVRenderRenderBufferFormats::Enum s + // check for error + GLenum error = m_glFunctions->glGetError(); + if (error != GL_NO_ERROR) { +- qCCritical(GL_ERROR, GLConversion::processGLError(error)); ++ qCCritical(GL_ERROR) << GLConversion::processGLError(error); + QT3DS_ASSERT(false); + GL_CALL_EXTRA_FUNCTION(glDeleteRenderbuffers(1, &bufID)); + bufID = 0; +@@ -699,7 +699,7 @@ bool NVRenderBackendGLES2Impl::ResizeRenderbuffer(NVRenderBackendRenderbufferObj + // check for error + GLenum error = m_glFunctions->glGetError(); + if (error != GL_NO_ERROR) { +- qCCritical(GL_ERROR, GLConversion::processGLError(error)); ++ qCCritical(GL_ERROR) << GLConversion::processGLError(error); + QT3DS_ASSERT(false); + success = false; + } +diff --git a/src/render/backends/gl/Qt3DSRenderBackendGLBase.cpp b/src/render/backends/gl/Qt3DSRenderBackendGLBase.cpp +index 0fe6e0f..5dfe9d1 100644 +--- a/src/render/backends/gl/Qt3DSRenderBackendGLBase.cpp ++++ b/src/render/backends/gl/Qt3DSRenderBackendGLBase.cpp +@@ -604,7 +604,7 @@ NVRenderBackendGLBase::CreateBuffer(size_t size, NVRenderBufferBindFlags bindFla + } else { + GL_CALL_FUNCTION(glDeleteBuffers(1, &bufID)); + bufID = 0; +- qCCritical(GL_ERROR, GLConversion::processGLError(target)); ++ qCCritical(GL_ERROR) << GLConversion::processGLError(target); + } + } + +@@ -832,7 +832,7 @@ NVRenderBackendGLBase::CreateRenderbuffer(NVRenderRenderBufferFormats::Enum stor + // check for error + GLenum error = m_glFunctions->glGetError(); + if (error != GL_NO_ERROR) { +- qCCritical(GL_ERROR, GLConversion::processGLError(error)); ++ qCCritical(GL_ERROR) << GLConversion::processGLError(error); + QT3DS_ASSERT(false); + GL_CALL_FUNCTION(glDeleteRenderbuffers(1, &bufID)); + bufID = 0; +@@ -869,7 +869,7 @@ bool NVRenderBackendGLBase::ResizeRenderbuffer(NVRenderBackendRenderbufferObject + // check for error + GLenum error = m_glFunctions->glGetError(); + if (error != GL_NO_ERROR) { +- qCCritical(GL_ERROR, GLConversion::processGLError(error)); ++ qCCritical(GL_ERROR) << GLConversion::processGLError(error); + QT3DS_ASSERT(false); + success = false; + } +@@ -1306,7 +1306,7 @@ bool NVRenderBackendGLBase::compileSource(GLuint shaderID, NVConstDataRefglGetError(); + if (binaryError != GL_NO_ERROR) { + shaderStatus = GL_FALSE; +- qCCritical(GL_ERROR, GLConversion::processGLError(binaryError)); ++ qCCritical(GL_ERROR) << GLConversion::processGLError(binaryError); + } + } + diff --git a/recipes-qt/qt5/ogl-runtime/0003-Fix-build-on-musl-libc.patch b/recipes-qt/qt5/ogl-runtime/0003-Fix-build-on-musl-libc.patch new file mode 100644 index 00000000..5fe840a0 --- /dev/null +++ b/recipes-qt/qt5/ogl-runtime/0003-Fix-build-on-musl-libc.patch @@ -0,0 +1,26 @@ +From f654a25f9df6583532798f30181d149d51b23808 Mon Sep 17 00:00:00 2001 +From: Samuli Piippo +Date: Thu, 8 Aug 2019 08:34:47 +0300 +Subject: [PATCH] Fix build on musl libc + +Use bits/local_lim.h only with glibc as it's not available +on musl libc. + +Change-Id: Ibffa4ab5649b544664f99b16e94d6865148eeeb5 +--- + src/foundation/linux/Qt3DSLinuxThread.cpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/foundation/linux/Qt3DSLinuxThread.cpp b/src/foundation/linux/Qt3DSLinuxThread.cpp +index fa6e069..99c4c3a 100644 +--- a/src/foundation/linux/Qt3DSLinuxThread.cpp ++++ b/src/foundation/linux/Qt3DSLinuxThread.cpp +@@ -35,7 +35,7 @@ + #include "foundation/Qt3DSAssert.h" + #include "foundation/Qt3DSIntrinsics.h" + #include "foundation/Qt3DSBroadcastingAllocator.h" +-#if !defined(QT3DS_APPLE) && !defined(ANDROID) && !defined(__CYGWIN__) && !defined(__QNX__) && !defined(__INTEGRITY) ++#if !defined(QT3DS_APPLE) && !defined(ANDROID) && !defined(__CYGWIN__) && !defined(__QNX__) && !defined(__INTEGRITY) && defined(__GLIBC__) + #include // PTHREAD_STACK_MIN + #endif + #include diff --git a/recipes-qt/qt5/ogl-runtime_git.bb b/recipes-qt/qt5/ogl-runtime_git.bb new file mode 100644 index 00000000..049f885a --- /dev/null +++ b/recipes-qt/qt5/ogl-runtime_git.bb @@ -0,0 +1,28 @@ +require qt5.inc +require qt5-git.inc + +LICENSE = "GPL-3.0 & The-Qt-Company-GPL-Exception-1.0 | The-Qt-Company-Commercial" +LIC_FILES_CHKSUM = " \ + file://LICENSE.GPL3;md5=d32239bcb673463ab874e80d47fae504 \ + file://LICENSE.GPL3-EXCEPT;md5=763d8c535a234d9a3fb682c7ecb6c073 \ +" + +DEPENDS += "qtbase qtdeclarative qtquickcontrols2" + +QT_MODULE_BRANCH = "2.4" +QT_MODULE_BRANCH_EASTL = "master" +QT_GIT_PROJECT = "qt3dstudio" +PV = "2.4+git${SRCPV}" + +SRC_URI += " \ + ${QT_GIT}/qt3dstudio-eastl.git;name=EASTL;branch=${QT_MODULE_BRANCH_EASTL};protocol=${QT_GIT_PROTOCOL};destsuffix=git/src/3rdparty/EASTL \ + file://0001-Fix-examples-build-error.patch \ + file://0002-Fix-format-security-issues.patch \ + file://0003-Fix-build-on-musl-libc.patch \ +" + +SRCREV_ogl-runtime = "a41270dced230d90e0e07f2ebb880e4f97317a7f" +SRCREV_EASTL = "31697c758f2ed19bd7c6bbe61f1b91f9e12035b5" +SRCREV = "${SRCREV_ogl-runtime}" + +SRCREV_FORMAT = "ogl-runtime_EASTL" diff --git a/recipes-qt/qt5/qt3d-runtime_git.bb b/recipes-qt/qt5/qt3d-runtime_git.bb deleted file mode 100644 index fb018e58..00000000 --- a/recipes-qt/qt5/qt3d-runtime_git.bb +++ /dev/null @@ -1,16 +0,0 @@ -require qt5.inc -require qt5-git.inc - -LICENSE = "GPL-3.0 & The-Qt-Company-GPL-Exception-1.0 | The-Qt-Company-Commercial" -LIC_FILES_CHKSUM = " \ - file://LICENSE.GPL3;md5=d32239bcb673463ab874e80d47fae504 \ - file://LICENSE.GPL3-EXCEPT;md5=763d8c535a234d9a3fb682c7ecb6c073 \ -" - -DEPENDS += "qtbase qtdeclarative qt3d" - -QT_MODULE_BRANCH = "2.3" -QT_GIT_PROJECT = "qt3dstudio" -PV = "2.3+git${SRCPV}" - -SRCREV = "5e0bfe934b9930b7e41d457b4f88fce91342a0ea" -- cgit v1.2.3