From 5eb22ffbfafc558a66943e666c415a9749a39e2b Mon Sep 17 00:00:00 2001 From: Martin Jansa Date: Sat, 20 Jul 2013 14:39:37 +0200 Subject: qtwayland: add second recipe with latest SRCREV, compatible with qt5 5.1.0 Signed-off-by: Martin Jansa --- ...mmon-should-not-be-a-mandatory-dependency.patch | 46 ++++++++++++++ ...-patching-this-out-as-Qt5.0.0-does-not-ha.patch | 33 ++++++++++ ...eImageKHR-requires-the-context-to-be-NULL.patch | 71 ++++++++++++++++++++++ ...-qtwaylandscanner-tool-to-the-native-side.patch | 32 ++++++++++ ...mmon-should-not-be-a-mandatory-dependency.patch | 41 +++++++++++++ ...-patching-this-out-as-Qt5.0.0-does-not-ha.patch | 33 ++++++++++ ...eImageKHR-requires-the-context-to-be-NULL.patch | 71 ++++++++++++++++++++++ ...-vec2d-precision-qualifier-in-fragment-sh.patch | 31 ++++++++++ recipes-qt/qt5/qtwayland-native_git.bb | 4 +- recipes-qt/qt5/qtwayland.inc | 3 - ...-qtwaylandscanner-tool-to-the-native-side.patch | 32 ---------- ...mmon-should-not-be-a-mandatory-dependency.patch | 41 ------------- ...-patching-this-out-as-Qt5.0.0-does-not-ha.patch | 33 ---------- ...eImageKHR-requires-the-context-to-be-NULL.patch | 71 ---------------------- ...-vec2d-precision-qualifier-in-fragment-sh.patch | 31 ---------- recipes-qt/qt5/qtwayland_5.1.0+git.bb | 15 +++++ recipes-qt/qt5/qtwayland_git.bb | 12 +++- 17 files changed, 385 insertions(+), 215 deletions(-) create mode 100644 recipes-qt/qt5/qtwayland-5.1.0+git/0001-xcbcommon-should-not-be-a-mandatory-dependency.patch create mode 100644 recipes-qt/qt5/qtwayland-5.1.0+git/0002-Temporarily-patching-this-out-as-Qt5.0.0-does-not-ha.patch create mode 100644 recipes-qt/qt5/qtwayland-5.1.0+git/0003-eglCreateImageKHR-requires-the-context-to-be-NULL.patch create mode 100644 recipes-qt/qt5/qtwayland-git/0001-Install-the-qtwaylandscanner-tool-to-the-native-side.patch create mode 100644 recipes-qt/qt5/qtwayland-git/0001-xcbcommon-should-not-be-a-mandatory-dependency.patch create mode 100644 recipes-qt/qt5/qtwayland-git/0002-Temporarily-patching-this-out-as-Qt5.0.0-does-not-ha.patch create mode 100644 recipes-qt/qt5/qtwayland-git/0003-eglCreateImageKHR-requires-the-context-to-be-NULL.patch create mode 100644 recipes-qt/qt5/qtwayland-git/0004-EGL-Specify-vec2d-precision-qualifier-in-fragment-sh.patch delete mode 100644 recipes-qt/qt5/qtwayland/0001-Install-the-qtwaylandscanner-tool-to-the-native-side.patch delete mode 100644 recipes-qt/qt5/qtwayland/0001-xcbcommon-should-not-be-a-mandatory-dependency.patch delete mode 100644 recipes-qt/qt5/qtwayland/0002-Temporarily-patching-this-out-as-Qt5.0.0-does-not-ha.patch delete mode 100644 recipes-qt/qt5/qtwayland/0003-eglCreateImageKHR-requires-the-context-to-be-NULL.patch delete mode 100644 recipes-qt/qt5/qtwayland/0004-EGL-Specify-vec2d-precision-qualifier-in-fragment-sh.patch create mode 100644 recipes-qt/qt5/qtwayland_5.1.0+git.bb (limited to 'recipes-qt/qt5') diff --git a/recipes-qt/qt5/qtwayland-5.1.0+git/0001-xcbcommon-should-not-be-a-mandatory-dependency.patch b/recipes-qt/qt5/qtwayland-5.1.0+git/0001-xcbcommon-should-not-be-a-mandatory-dependency.patch new file mode 100644 index 00000000..0571ea5e --- /dev/null +++ b/recipes-qt/qt5/qtwayland-5.1.0+git/0001-xcbcommon-should-not-be-a-mandatory-dependency.patch @@ -0,0 +1,46 @@ +From 7f97da120b5b3dde22c9d89a8da8a4f35a9f2a26 Mon Sep 17 00:00:00 2001 +From: Mikko Levonmaa +Date: Tue, 19 Feb 2013 11:16:05 -0800 +Subject: [PATCH 1/3] xcbcommon should not be a mandatory dependency + +Not all platforms that use qtwayland depend on xcbcommon to be present +for them to be functional + +This change won't be needed when this commit from dev branch is merged +to stable: +commit 894adf8a447865119be7c6c4d01577d8032f4177 +Author: Oswald Buddenhagen +Date: Mon Apr 8 12:54:58 2013 +0200 + +make failure to configure wayland non-fatal for a top-level build of qt + +Signed-off-by: Martin Jansa +--- + qtwayland.pro | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/qtwayland.pro b/qtwayland.pro +index 24e104b..66dd38a 100644 +--- a/qtwayland.pro ++++ b/qtwayland.pro +@@ -11,7 +11,7 @@ qtCompileTest(xcomposite) + load(qt_parts) + + !config_wayland { +- error(QtWayland requires Wayland 1.0.3 or higher) ++ error("QtWayland requires Wayland 1.0.3 or higher") + } + + !config_xkbcommon { +@@ -19,7 +19,7 @@ load(qt_parts) + } + + !config_wayland_scanner { +- error(QtWayland requires wayland-scanner) ++ error("QtWayland requires wayland-scanner") + } + + !config_wayland_egl { +-- +1.8.2.1 + diff --git a/recipes-qt/qt5/qtwayland-5.1.0+git/0002-Temporarily-patching-this-out-as-Qt5.0.0-does-not-ha.patch b/recipes-qt/qt5/qtwayland-5.1.0+git/0002-Temporarily-patching-this-out-as-Qt5.0.0-does-not-ha.patch new file mode 100644 index 00000000..77172908 --- /dev/null +++ b/recipes-qt/qt5/qtwayland-5.1.0+git/0002-Temporarily-patching-this-out-as-Qt5.0.0-does-not-ha.patch @@ -0,0 +1,33 @@ +From 5b7c89d211a193acfd182eb0519b658629af3193 Mon Sep 17 00:00:00 2001 +From: Mikko Levonmaa +Date: Fri, 1 Mar 2013 13:00:53 -0800 +Subject: [PATCH 2/3] Temporarily patching this out as Qt5.0.0 does not have + qtHaveModule + +Signed-off-by: Martin Jansa +--- + src/compositor/compositor_api/compositor_api.pri | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/compositor/compositor_api/compositor_api.pri b/src/compositor/compositor_api/compositor_api.pri +index f0bbe76..e7905e5 100644 +--- a/src/compositor/compositor_api/compositor_api.pri ++++ b/src/compositor/compositor_api/compositor_api.pri +@@ -12,7 +12,7 @@ SOURCES += \ + + QT += core-private + +-qtHaveModule(quick) { ++#qtHaveModule(quick) { + SOURCES += \ + compositor_api/qwaylandsurfaceitem.cpp \ + compositor_api/qwaylandsurfacenode.cpp \ +@@ -27,4 +27,4 @@ qtHaveModule(quick) { + + QT += qml quick + QT += quick-private gui-private +-} ++#} +-- +1.8.2.1 + diff --git a/recipes-qt/qt5/qtwayland-5.1.0+git/0003-eglCreateImageKHR-requires-the-context-to-be-NULL.patch b/recipes-qt/qt5/qtwayland-5.1.0+git/0003-eglCreateImageKHR-requires-the-context-to-be-NULL.patch new file mode 100644 index 00000000..58f82663 --- /dev/null +++ b/recipes-qt/qt5/qtwayland-5.1.0+git/0003-eglCreateImageKHR-requires-the-context-to-be-NULL.patch @@ -0,0 +1,71 @@ +From 2d707f8dc9f0658d889aef4f4c5a62595598402c Mon Sep 17 00:00:00 2001 +From: Mikko Levonmaa +Date: Wed, 6 Mar 2013 10:18:49 -0800 +Subject: [PATCH 3/3] eglCreateImageKHR requires the context to be NULL + +As per the EGL spec the context passed to that function should +be null. + +Signed-off-by: Martin Jansa +--- + .../wayland-egl/waylandeglintegration.cpp | 16 ++-------------- + 1 file changed, 2 insertions(+), 14 deletions(-) + +diff --git a/src/plugins/waylandcompositors/wayland-egl/waylandeglintegration.cpp b/src/plugins/waylandcompositors/wayland-egl/waylandeglintegration.cpp +index 73877c4..16e77fb 100644 +--- a/src/plugins/waylandcompositors/wayland-egl/waylandeglintegration.cpp ++++ b/src/plugins/waylandcompositors/wayland-egl/waylandeglintegration.cpp +@@ -101,7 +101,6 @@ public: + + PFNGLEGLIMAGETARGETTEXTURE2DOESPROC gl_egl_image_target_texture_2d; + +- QPlatformNativeInterface::NativeResourceForContextFunction get_egl_context; + }; + + WaylandEglIntegration::WaylandEglIntegration() +@@ -121,10 +120,6 @@ void WaylandEglIntegration::initializeHardware(QtWayland::Display *waylandDispla + const char *extensionString = eglQueryString(d->egl_display, EGL_EXTENSIONS); + if (extensionString && strstr(extensionString, "EGL_WL_bind_wayland_display")) + { +- d->get_egl_context = nativeInterface->nativeResourceFunctionForContext("get_egl_context"); +- if (!d->get_egl_context) { +- qWarning("Failed to retrieve the get_egl_context function"); +- } + d->egl_bind_wayland_display = + reinterpret_cast(eglGetProcAddress("eglBindWaylandDisplayWL")); + d->egl_unbind_wayland_display = +@@ -137,7 +132,6 @@ void WaylandEglIntegration::initializeHardware(QtWayland::Display *waylandDispla + reinterpret_cast(eglGetProcAddress("glEGLImageTargetTexture2DOES")); + + if (d->egl_bind_wayland_display +- && d->get_egl_context + && d->egl_unbind_wayland_display + && d->egl_create_image + && d->egl_destroy_image +@@ -162,10 +156,7 @@ GLuint WaylandEglIntegration::createTextureFromBuffer(wl_buffer *buffer, QOpenGL + return 0; + } + +- QPlatformNativeInterface *nativeInterface = QGuiApplication::platformNativeInterface(); +- EGLContext egl_context = d->get_egl_context(context); +- +- EGLImageKHR image = d->egl_create_image(d->egl_display, egl_context, ++ EGLImageKHR image = d->egl_create_image(d->egl_display, NULL, + EGL_WAYLAND_BUFFER_WL, + buffer, NULL); + +@@ -229,10 +220,7 @@ void *WaylandEglIntegration::lockNativeBuffer(struct wl_buffer *buffer, QOpenGLC + { + Q_D(const WaylandEglIntegration); + +- QPlatformNativeInterface *nativeInterface = QGuiApplication::platformNativeInterface(); +- EGLContext egl_context = d->get_egl_context(context); +- +- EGLImageKHR image = d->egl_create_image(d->egl_display, egl_context, ++ EGLImageKHR image = d->egl_create_image(d->egl_display, NULL, + EGL_WAYLAND_BUFFER_WL, + buffer, NULL); + return image; +-- +1.8.2.1 + diff --git a/recipes-qt/qt5/qtwayland-git/0001-Install-the-qtwaylandscanner-tool-to-the-native-side.patch b/recipes-qt/qt5/qtwayland-git/0001-Install-the-qtwaylandscanner-tool-to-the-native-side.patch new file mode 100644 index 00000000..1fac95b7 --- /dev/null +++ b/recipes-qt/qt5/qtwayland-git/0001-Install-the-qtwaylandscanner-tool-to-the-native-side.patch @@ -0,0 +1,32 @@ +From 761367755efa529c41ba414521eaed0b10873d99 Mon Sep 17 00:00:00 2001 +From: Simon Busch +Date: Fri, 19 Jul 2013 13:35:14 +0000 +Subject: [PATCH] Install the qtwaylandscanner tool to the native side + +Upstream-Status: Inappropiate [configuration] + +Signed-off-by: Simon Busch +--- + src/qtwaylandscanner/qtwaylandscanner.pro | 8 ++++++-- + 1 file changed, 6 insertions(+), 2 deletions(-) + +diff --git a/src/qtwaylandscanner/qtwaylandscanner.pro b/src/qtwaylandscanner/qtwaylandscanner.pro +index ac2d07b..53b93f9 100644 +--- a/src/qtwaylandscanner/qtwaylandscanner.pro ++++ b/src/qtwaylandscanner/qtwaylandscanner.pro +@@ -1,6 +1,10 @@ + option(host_build) + +-SOURCES += qtwaylandscanner.cpp ++TARGET = qtwaylandscanner$$qtPlatformTargetSuffix() ++CONFIG += console warn_off ++QT = core + +-load(qt_tool) ++SOURCES += qtwaylandscanner.cpp + ++target.path = $$[QT_HOST_BINS] ++INSTALLS += target +-- +1.8.1.2 + diff --git a/recipes-qt/qt5/qtwayland-git/0001-xcbcommon-should-not-be-a-mandatory-dependency.patch b/recipes-qt/qt5/qtwayland-git/0001-xcbcommon-should-not-be-a-mandatory-dependency.patch new file mode 100644 index 00000000..e9e705cd --- /dev/null +++ b/recipes-qt/qt5/qtwayland-git/0001-xcbcommon-should-not-be-a-mandatory-dependency.patch @@ -0,0 +1,41 @@ +From c8417a2b0b66c26eaa0569c19422f87598e29629 Mon Sep 17 00:00:00 2001 +From: Mikko Levonmaa +Date: Tue, 19 Feb 2013 11:16:05 -0800 +Subject: [PATCH 1/4] xcbcommon should not be a mandatory dependency + +Not all platforms that use qtwayland depend on xcbcommon to be present +for them to be functional + +Change-Id: I899d9314bdf772a9d5b8b7c143636f9f12c8ad1d + +Signed-off-by: Martin Jansa +--- + qtwayland.pro | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/qtwayland.pro b/qtwayland.pro +index ee0e5ac..f1a6b6f 100644 +--- a/qtwayland.pro ++++ b/qtwayland.pro +@@ -11,15 +11,15 @@ qtCompileTest(xcomposite) + load(qt_parts) + + !config_wayland { +- error(QtWayland requires Wayland 1.0.0 or higher) ++ error("QtWayland requires Wayland 1.0.0 or higher") + } + + !config_xkbcommon { +- error(QtWayland requires xkbcommon 0.2.0 or higher) ++ warning("No xkbcommon 0.2.0 or higher found, disabling support for it") + } + + !config_wayland_scanner { +- error(QtWayland requires wayland-scanner) ++ error("QtWayland requires wayland-scanner") + } + + !config_wayland_egl { +-- +1.8.2.1 + diff --git a/recipes-qt/qt5/qtwayland-git/0002-Temporarily-patching-this-out-as-Qt5.0.0-does-not-ha.patch b/recipes-qt/qt5/qtwayland-git/0002-Temporarily-patching-this-out-as-Qt5.0.0-does-not-ha.patch new file mode 100644 index 00000000..0c9bbbe7 --- /dev/null +++ b/recipes-qt/qt5/qtwayland-git/0002-Temporarily-patching-this-out-as-Qt5.0.0-does-not-ha.patch @@ -0,0 +1,33 @@ +From ae72fc41609c15293b1027ca3f2c4d712e4ae478 Mon Sep 17 00:00:00 2001 +From: Mikko Levonmaa +Date: Fri, 1 Mar 2013 13:00:53 -0800 +Subject: [PATCH 2/4] Temporarily patching this out as Qt5.0.0 does not have + qtHaveModule + +Signed-off-by: Martin Jansa +--- + src/compositor/compositor_api/compositor_api.pri | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/compositor/compositor_api/compositor_api.pri b/src/compositor/compositor_api/compositor_api.pri +index f0bbe76..e7905e5 100644 +--- a/src/compositor/compositor_api/compositor_api.pri ++++ b/src/compositor/compositor_api/compositor_api.pri +@@ -12,7 +12,7 @@ SOURCES += \ + + QT += core-private + +-qtHaveModule(quick) { ++#qtHaveModule(quick) { + SOURCES += \ + compositor_api/qwaylandsurfaceitem.cpp \ + compositor_api/qwaylandsurfacenode.cpp \ +@@ -27,4 +27,4 @@ qtHaveModule(quick) { + + QT += qml quick + QT += quick-private gui-private +-} ++#} +-- +1.8.2.1 + diff --git a/recipes-qt/qt5/qtwayland-git/0003-eglCreateImageKHR-requires-the-context-to-be-NULL.patch b/recipes-qt/qt5/qtwayland-git/0003-eglCreateImageKHR-requires-the-context-to-be-NULL.patch new file mode 100644 index 00000000..48eb870b --- /dev/null +++ b/recipes-qt/qt5/qtwayland-git/0003-eglCreateImageKHR-requires-the-context-to-be-NULL.patch @@ -0,0 +1,71 @@ +From ca1f46a6192061e254deca1810d25ba423acb8de Mon Sep 17 00:00:00 2001 +From: Mikko Levonmaa +Date: Wed, 6 Mar 2013 10:18:49 -0800 +Subject: [PATCH 3/4] eglCreateImageKHR requires the context to be NULL + +As per the EGL spec the context passed to that function should +be null. + +Signed-off-by: Martin Jansa +--- + .../wayland-egl/waylandeglintegration.cpp | 16 ++-------------- + 1 file changed, 2 insertions(+), 14 deletions(-) + +diff --git a/src/plugins/waylandcompositors/wayland-egl/waylandeglintegration.cpp b/src/plugins/waylandcompositors/wayland-egl/waylandeglintegration.cpp +index 2a923ce..2be1e4c 100644 +--- a/src/plugins/waylandcompositors/wayland-egl/waylandeglintegration.cpp ++++ b/src/plugins/waylandcompositors/wayland-egl/waylandeglintegration.cpp +@@ -101,7 +101,6 @@ public: + + PFNGLEGLIMAGETARGETTEXTURE2DOESPROC gl_egl_image_target_texture_2d; + +- QPlatformNativeInterface::NativeResourceForContextFunction get_egl_context; + }; + + WaylandEglIntegration::WaylandEglIntegration() +@@ -121,10 +120,6 @@ void WaylandEglIntegration::initializeHardware(QtWayland::Display *waylandDispla + const char *extensionString = eglQueryString(d->egl_display, EGL_EXTENSIONS); + if (extensionString && strstr(extensionString, "EGL_WL_bind_wayland_display")) + { +- d->get_egl_context = nativeInterface->nativeResourceFunctionForContext("get_egl_context"); +- if (!d->get_egl_context) { +- qWarning("Failed to retrieve the get_egl_context function"); +- } + d->egl_bind_wayland_display = + reinterpret_cast(eglGetProcAddress("eglBindWaylandDisplayWL")); + d->egl_unbind_wayland_display = +@@ -137,7 +132,6 @@ void WaylandEglIntegration::initializeHardware(QtWayland::Display *waylandDispla + reinterpret_cast(eglGetProcAddress("glEGLImageTargetTexture2DOES")); + + if (d->egl_bind_wayland_display +- && d->get_egl_context + && d->egl_unbind_wayland_display + && d->egl_create_image + && d->egl_destroy_image +@@ -162,10 +156,7 @@ GLuint WaylandEglIntegration::createTextureFromBuffer(wl_buffer *buffer, QOpenGL + return 0; + } + +- QPlatformNativeInterface *nativeInterface = QGuiApplication::platformNativeInterface(); +- EGLContext egl_context = d->get_egl_context(context); +- +- EGLImageKHR image = d->egl_create_image(d->egl_display, egl_context, ++ EGLImageKHR image = d->egl_create_image(d->egl_display, NULL, + EGL_WAYLAND_BUFFER_WL, + buffer, NULL); + +@@ -229,10 +220,7 @@ void *WaylandEglIntegration::lockNativeBuffer(struct wl_buffer *buffer, QOpenGLC + { + Q_D(const WaylandEglIntegration); + +- QPlatformNativeInterface *nativeInterface = QGuiApplication::platformNativeInterface(); +- EGLContext egl_context = d->get_egl_context(context); +- +- EGLImageKHR image = d->egl_create_image(d->egl_display, egl_context, ++ EGLImageKHR image = d->egl_create_image(d->egl_display, NULL, + EGL_WAYLAND_BUFFER_WL, + buffer, NULL); + return image; +-- +1.8.2.1 + diff --git a/recipes-qt/qt5/qtwayland-git/0004-EGL-Specify-vec2d-precision-qualifier-in-fragment-sh.patch b/recipes-qt/qt5/qtwayland-git/0004-EGL-Specify-vec2d-precision-qualifier-in-fragment-sh.patch new file mode 100644 index 00000000..47ea65fd --- /dev/null +++ b/recipes-qt/qt5/qtwayland-git/0004-EGL-Specify-vec2d-precision-qualifier-in-fragment-sh.patch @@ -0,0 +1,31 @@ +From 5c70644070803b665f64c2d3212b55a4a3270765 Mon Sep 17 00:00:00 2001 +From: Daniel Stone +Date: Sun, 10 Mar 2013 11:29:38 -0700 +Subject: [PATCH 4/4] EGL: Specify vec2d precision qualifier in fragment shader + +GLSL does not specify a default precision qualifier here, so we have to +explicitly define it. Use highp, as it gets redefined to mediump by +QGLShaderProgram when not available. + +Signed-off-by: Daniel Stone +Signed-off-by: Martin Jansa +--- + src/plugins/platforms/qwayland-egl/qwaylandglcontext.cpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/plugins/platforms/qwayland-egl/qwaylandglcontext.cpp b/src/plugins/platforms/qwayland-egl/qwaylandglcontext.cpp +index 4d8017d..a0ac6d9 100644 +--- a/src/plugins/platforms/qwayland-egl/qwaylandglcontext.cpp ++++ b/src/plugins/platforms/qwayland-egl/qwaylandglcontext.cpp +@@ -124,7 +124,7 @@ void QWaylandGLContext::swapBuffers(QPlatformSurface *surface) + gl_Position = position;\n\ + outTexCoords = texCoords.xy;\n\ + }"); +- m_blitProgram->addShaderFromSourceCode(QOpenGLShader::Fragment, "varying vec2 outTexCoords;\n\ ++ m_blitProgram->addShaderFromSourceCode(QOpenGLShader::Fragment, "varying highp vec2 outTexCoords;\n\ + uniform sampler2D texture;\n\ + void main()\n\ + {\n\ +-- +1.8.2.1 + diff --git a/recipes-qt/qt5/qtwayland-native_git.bb b/recipes-qt/qt5/qtwayland-native_git.bb index 090faafa..20cd2519 100644 --- a/recipes-qt/qt5/qtwayland-native_git.bb +++ b/recipes-qt/qt5/qtwayland-native_git.bb @@ -2,6 +2,8 @@ require qt5-git.inc require ${PN}.inc # qtwayland wasn't released yet, last tag before this SRCREV is 5.0.0-beta1 -PV = "4.999+5.0.0-beta1+git${SRCPV}" +# this PV is only to indicate that this recipe is compatible with qt5 5.1.0 +# while qtwayland_git stays compatible with 5.0.2 +PV = "5.1.0+git${SRCPV}" SRCREV = "ede872db1cdfdc2810c2dd29edd5fb6e1cdac0f5" diff --git a/recipes-qt/qt5/qtwayland.inc b/recipes-qt/qt5/qtwayland.inc index 7cf39351..3ae98ede 100644 --- a/recipes-qt/qt5/qtwayland.inc +++ b/recipes-qt/qt5/qtwayland.inc @@ -13,13 +13,10 @@ LIC_FILES_CHKSUM = "file://${S}/src/compositor/compositor_api/qwaylandsurfacenod XKB_DEPENDS = "libxkbcommon xproto" DEPENDS += "qtbase qtdeclarative wayland wayland-native ${XKB_DEPENDS}" -INC_PR = "r1" - SRC_URI += " \ file://0001-xcbcommon-should-not-be-a-mandatory-dependency.patch \ file://0002-Temporarily-patching-this-out-as-Qt5.0.0-does-not-ha.patch \ file://0003-eglCreateImageKHR-requires-the-context-to-be-NULL.patch \ - file://0004-EGL-Specify-vec2d-precision-qualifier-in-fragment-sh.patch \ " QT_WAYLAND_CONFIG ?= "wayland-compositor" diff --git a/recipes-qt/qt5/qtwayland/0001-Install-the-qtwaylandscanner-tool-to-the-native-side.patch b/recipes-qt/qt5/qtwayland/0001-Install-the-qtwaylandscanner-tool-to-the-native-side.patch deleted file mode 100644 index 1fac95b7..00000000 --- a/recipes-qt/qt5/qtwayland/0001-Install-the-qtwaylandscanner-tool-to-the-native-side.patch +++ /dev/null @@ -1,32 +0,0 @@ -From 761367755efa529c41ba414521eaed0b10873d99 Mon Sep 17 00:00:00 2001 -From: Simon Busch -Date: Fri, 19 Jul 2013 13:35:14 +0000 -Subject: [PATCH] Install the qtwaylandscanner tool to the native side - -Upstream-Status: Inappropiate [configuration] - -Signed-off-by: Simon Busch ---- - src/qtwaylandscanner/qtwaylandscanner.pro | 8 ++++++-- - 1 file changed, 6 insertions(+), 2 deletions(-) - -diff --git a/src/qtwaylandscanner/qtwaylandscanner.pro b/src/qtwaylandscanner/qtwaylandscanner.pro -index ac2d07b..53b93f9 100644 ---- a/src/qtwaylandscanner/qtwaylandscanner.pro -+++ b/src/qtwaylandscanner/qtwaylandscanner.pro -@@ -1,6 +1,10 @@ - option(host_build) - --SOURCES += qtwaylandscanner.cpp -+TARGET = qtwaylandscanner$$qtPlatformTargetSuffix() -+CONFIG += console warn_off -+QT = core - --load(qt_tool) -+SOURCES += qtwaylandscanner.cpp - -+target.path = $$[QT_HOST_BINS] -+INSTALLS += target --- -1.8.1.2 - diff --git a/recipes-qt/qt5/qtwayland/0001-xcbcommon-should-not-be-a-mandatory-dependency.patch b/recipes-qt/qt5/qtwayland/0001-xcbcommon-should-not-be-a-mandatory-dependency.patch deleted file mode 100644 index e9e705cd..00000000 --- a/recipes-qt/qt5/qtwayland/0001-xcbcommon-should-not-be-a-mandatory-dependency.patch +++ /dev/null @@ -1,41 +0,0 @@ -From c8417a2b0b66c26eaa0569c19422f87598e29629 Mon Sep 17 00:00:00 2001 -From: Mikko Levonmaa -Date: Tue, 19 Feb 2013 11:16:05 -0800 -Subject: [PATCH 1/4] xcbcommon should not be a mandatory dependency - -Not all platforms that use qtwayland depend on xcbcommon to be present -for them to be functional - -Change-Id: I899d9314bdf772a9d5b8b7c143636f9f12c8ad1d - -Signed-off-by: Martin Jansa ---- - qtwayland.pro | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -diff --git a/qtwayland.pro b/qtwayland.pro -index ee0e5ac..f1a6b6f 100644 ---- a/qtwayland.pro -+++ b/qtwayland.pro -@@ -11,15 +11,15 @@ qtCompileTest(xcomposite) - load(qt_parts) - - !config_wayland { -- error(QtWayland requires Wayland 1.0.0 or higher) -+ error("QtWayland requires Wayland 1.0.0 or higher") - } - - !config_xkbcommon { -- error(QtWayland requires xkbcommon 0.2.0 or higher) -+ warning("No xkbcommon 0.2.0 or higher found, disabling support for it") - } - - !config_wayland_scanner { -- error(QtWayland requires wayland-scanner) -+ error("QtWayland requires wayland-scanner") - } - - !config_wayland_egl { --- -1.8.2.1 - diff --git a/recipes-qt/qt5/qtwayland/0002-Temporarily-patching-this-out-as-Qt5.0.0-does-not-ha.patch b/recipes-qt/qt5/qtwayland/0002-Temporarily-patching-this-out-as-Qt5.0.0-does-not-ha.patch deleted file mode 100644 index 0c9bbbe7..00000000 --- a/recipes-qt/qt5/qtwayland/0002-Temporarily-patching-this-out-as-Qt5.0.0-does-not-ha.patch +++ /dev/null @@ -1,33 +0,0 @@ -From ae72fc41609c15293b1027ca3f2c4d712e4ae478 Mon Sep 17 00:00:00 2001 -From: Mikko Levonmaa -Date: Fri, 1 Mar 2013 13:00:53 -0800 -Subject: [PATCH 2/4] Temporarily patching this out as Qt5.0.0 does not have - qtHaveModule - -Signed-off-by: Martin Jansa ---- - src/compositor/compositor_api/compositor_api.pri | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/src/compositor/compositor_api/compositor_api.pri b/src/compositor/compositor_api/compositor_api.pri -index f0bbe76..e7905e5 100644 ---- a/src/compositor/compositor_api/compositor_api.pri -+++ b/src/compositor/compositor_api/compositor_api.pri -@@ -12,7 +12,7 @@ SOURCES += \ - - QT += core-private - --qtHaveModule(quick) { -+#qtHaveModule(quick) { - SOURCES += \ - compositor_api/qwaylandsurfaceitem.cpp \ - compositor_api/qwaylandsurfacenode.cpp \ -@@ -27,4 +27,4 @@ qtHaveModule(quick) { - - QT += qml quick - QT += quick-private gui-private --} -+#} --- -1.8.2.1 - diff --git a/recipes-qt/qt5/qtwayland/0003-eglCreateImageKHR-requires-the-context-to-be-NULL.patch b/recipes-qt/qt5/qtwayland/0003-eglCreateImageKHR-requires-the-context-to-be-NULL.patch deleted file mode 100644 index 48eb870b..00000000 --- a/recipes-qt/qt5/qtwayland/0003-eglCreateImageKHR-requires-the-context-to-be-NULL.patch +++ /dev/null @@ -1,71 +0,0 @@ -From ca1f46a6192061e254deca1810d25ba423acb8de Mon Sep 17 00:00:00 2001 -From: Mikko Levonmaa -Date: Wed, 6 Mar 2013 10:18:49 -0800 -Subject: [PATCH 3/4] eglCreateImageKHR requires the context to be NULL - -As per the EGL spec the context passed to that function should -be null. - -Signed-off-by: Martin Jansa ---- - .../wayland-egl/waylandeglintegration.cpp | 16 ++-------------- - 1 file changed, 2 insertions(+), 14 deletions(-) - -diff --git a/src/plugins/waylandcompositors/wayland-egl/waylandeglintegration.cpp b/src/plugins/waylandcompositors/wayland-egl/waylandeglintegration.cpp -index 2a923ce..2be1e4c 100644 ---- a/src/plugins/waylandcompositors/wayland-egl/waylandeglintegration.cpp -+++ b/src/plugins/waylandcompositors/wayland-egl/waylandeglintegration.cpp -@@ -101,7 +101,6 @@ public: - - PFNGLEGLIMAGETARGETTEXTURE2DOESPROC gl_egl_image_target_texture_2d; - -- QPlatformNativeInterface::NativeResourceForContextFunction get_egl_context; - }; - - WaylandEglIntegration::WaylandEglIntegration() -@@ -121,10 +120,6 @@ void WaylandEglIntegration::initializeHardware(QtWayland::Display *waylandDispla - const char *extensionString = eglQueryString(d->egl_display, EGL_EXTENSIONS); - if (extensionString && strstr(extensionString, "EGL_WL_bind_wayland_display")) - { -- d->get_egl_context = nativeInterface->nativeResourceFunctionForContext("get_egl_context"); -- if (!d->get_egl_context) { -- qWarning("Failed to retrieve the get_egl_context function"); -- } - d->egl_bind_wayland_display = - reinterpret_cast(eglGetProcAddress("eglBindWaylandDisplayWL")); - d->egl_unbind_wayland_display = -@@ -137,7 +132,6 @@ void WaylandEglIntegration::initializeHardware(QtWayland::Display *waylandDispla - reinterpret_cast(eglGetProcAddress("glEGLImageTargetTexture2DOES")); - - if (d->egl_bind_wayland_display -- && d->get_egl_context - && d->egl_unbind_wayland_display - && d->egl_create_image - && d->egl_destroy_image -@@ -162,10 +156,7 @@ GLuint WaylandEglIntegration::createTextureFromBuffer(wl_buffer *buffer, QOpenGL - return 0; - } - -- QPlatformNativeInterface *nativeInterface = QGuiApplication::platformNativeInterface(); -- EGLContext egl_context = d->get_egl_context(context); -- -- EGLImageKHR image = d->egl_create_image(d->egl_display, egl_context, -+ EGLImageKHR image = d->egl_create_image(d->egl_display, NULL, - EGL_WAYLAND_BUFFER_WL, - buffer, NULL); - -@@ -229,10 +220,7 @@ void *WaylandEglIntegration::lockNativeBuffer(struct wl_buffer *buffer, QOpenGLC - { - Q_D(const WaylandEglIntegration); - -- QPlatformNativeInterface *nativeInterface = QGuiApplication::platformNativeInterface(); -- EGLContext egl_context = d->get_egl_context(context); -- -- EGLImageKHR image = d->egl_create_image(d->egl_display, egl_context, -+ EGLImageKHR image = d->egl_create_image(d->egl_display, NULL, - EGL_WAYLAND_BUFFER_WL, - buffer, NULL); - return image; --- -1.8.2.1 - diff --git a/recipes-qt/qt5/qtwayland/0004-EGL-Specify-vec2d-precision-qualifier-in-fragment-sh.patch b/recipes-qt/qt5/qtwayland/0004-EGL-Specify-vec2d-precision-qualifier-in-fragment-sh.patch deleted file mode 100644 index 47ea65fd..00000000 --- a/recipes-qt/qt5/qtwayland/0004-EGL-Specify-vec2d-precision-qualifier-in-fragment-sh.patch +++ /dev/null @@ -1,31 +0,0 @@ -From 5c70644070803b665f64c2d3212b55a4a3270765 Mon Sep 17 00:00:00 2001 -From: Daniel Stone -Date: Sun, 10 Mar 2013 11:29:38 -0700 -Subject: [PATCH 4/4] EGL: Specify vec2d precision qualifier in fragment shader - -GLSL does not specify a default precision qualifier here, so we have to -explicitly define it. Use highp, as it gets redefined to mediump by -QGLShaderProgram when not available. - -Signed-off-by: Daniel Stone -Signed-off-by: Martin Jansa ---- - src/plugins/platforms/qwayland-egl/qwaylandglcontext.cpp | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/plugins/platforms/qwayland-egl/qwaylandglcontext.cpp b/src/plugins/platforms/qwayland-egl/qwaylandglcontext.cpp -index 4d8017d..a0ac6d9 100644 ---- a/src/plugins/platforms/qwayland-egl/qwaylandglcontext.cpp -+++ b/src/plugins/platforms/qwayland-egl/qwaylandglcontext.cpp -@@ -124,7 +124,7 @@ void QWaylandGLContext::swapBuffers(QPlatformSurface *surface) - gl_Position = position;\n\ - outTexCoords = texCoords.xy;\n\ - }"); -- m_blitProgram->addShaderFromSourceCode(QOpenGLShader::Fragment, "varying vec2 outTexCoords;\n\ -+ m_blitProgram->addShaderFromSourceCode(QOpenGLShader::Fragment, "varying highp vec2 outTexCoords;\n\ - uniform sampler2D texture;\n\ - void main()\n\ - {\n\ --- -1.8.2.1 - diff --git a/recipes-qt/qt5/qtwayland_5.1.0+git.bb b/recipes-qt/qt5/qtwayland_5.1.0+git.bb new file mode 100644 index 00000000..aaa439cf --- /dev/null +++ b/recipes-qt/qt5/qtwayland_5.1.0+git.bb @@ -0,0 +1,15 @@ +require qt5-git.inc +require ${PN}.inc + +FILESEXTRAPATHS =. "${FILE_DIRNAME}/${BPN}-5.1.0+git:" + +DEPENDS += "qtwayland-native" + +# qtwayland wasn't released yet, last tag before this SRCREV is 5.0.0-beta1 +# this PV is only to indicate that this recipe is compatible with qt5 5.1.0 +# while qtwayland_git stays compatible with 5.0.2 +PV = "5.1.0+git${SRCPV}" + +# newer revisions depend on newer wayland-1.1 APIs +SRCREV = "87dba733acfddecd8562e8e26ce5f994aa499fe3" +# SRCREV = "ede872db1cdfdc2810c2dd29edd5fb6e1cdac0f5" diff --git a/recipes-qt/qt5/qtwayland_git.bb b/recipes-qt/qt5/qtwayland_git.bb index f91df4d5..170b3673 100644 --- a/recipes-qt/qt5/qtwayland_git.bb +++ b/recipes-qt/qt5/qtwayland_git.bb @@ -1,13 +1,19 @@ require qt5-git.inc require ${PN}.inc -# qtwayland wasn't released yet, last tag before this SRCREV is 5.0.0-beta1 -PV = "4.999+5.0.0-beta1+git${SRCPV}" +# qtwayland wasn't released yet, last tag before this SRCREV is 5.0.0-beta1, +# but we'll use 5.0.2+git to indicate this version is compatible with 5.0.2 +PV = "5.0.2+git${SRCPV}" -PR = "${INC_PR}.1" +# drop when bumping SRCREV +PR = "r2" SRCREV = "5cb159395eccb1d96fb73a78e499eef30aacb46d" +SRC_URI += " \ + file://0004-EGL-Specify-vec2d-precision-qualifier-in-fragment-sh.patch \ +" + do_configure_prepend() { # Temporary hack to get qtwayland build for Qt 5.0.2 if ! grep -q MODULE_VERSION ${S}/.qmake.conf; then -- cgit v1.2.3-54-g00ecf