Patch plasma-framework to build with EGL support

plasma-framework switched to CMake's OpenGl::EGL targets, which require
GLVND support for EGL being available, which is not yet available in
Yocto.
This commit is contained in:
Andreas Cord-Landwehr 2021-06-19 20:17:11 +02:00
parent bcb359e3f3
commit 0ba1bcb0e6
2 changed files with 59 additions and 1 deletions

View file

@ -33,7 +33,10 @@ DEPENDS = " \
gzip-native \
"
SRC_URI = "git://invent.kde.org/frameworks/${BPN};nobranch=1;protocol=https"
SRC_URI = " \
git://invent.kde.org/frameworks/${BPN};nobranch=1;protocol=https \
file://0001-Revert-Linking-to-EGL-EGL-target.patch \
"
S = "${WORKDIR}/git"
require plasma-framework_metainfo.inc

View file

@ -0,0 +1,55 @@
From 6f083d08a87283783ceb7af15ca71fe7b1cd4ccd Mon Sep 17 00:00:00 2001
From: Andreas Cord-Landwehr <cordlandwehr@kde.org>
Date: Sat, 19 Jun 2021 17:25:11 +0200
Subject: [PATCH] Revert Linking to EGL::EGL target
This reverts a70957d96c29aa6059753cbfe23d0615ea688b36 because it
requires GLVND support in CMake's FindOpenGL.cmake logic, which
currently is not available on Yocto.
---
CMakeLists.txt | 10 ++++++----
src/declarativeimports/core/CMakeLists.txt | 2 +-
tests/testengine/testengine.cpp | 0
3 files changed, 7 insertions(+), 5 deletions(-)
mode change 100644 => 100755 tests/testengine/testengine.cpp
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 3e68d148f..c24d1207d 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -111,10 +111,12 @@ else()
set(HAVE_GLX 0)
endif()
-add_feature_info(EGL ${OpenGL_EGL_FOUND}
- "A platform-agnostic mechanism for creating rendering surfaces for use with other graphics libraries, such as OpenGL|ES and OpenVG.")
-# OpenGL_EGL_FOUND is defined by FindOpenGL
-set(HAVE_EGL ${OpenGL_EGL_FOUND})
+find_package(EGL)
+set_package_properties(EGL PROPERTIES
+ PURPOSE "Support for Window Thumbnail on EGL platform"
+ TYPE OPTIONAL
+ )
+set(HAVE_EGL ${EGL_FOUND})
#########################################################################
diff --git a/src/declarativeimports/core/CMakeLists.txt b/src/declarativeimports/core/CMakeLists.txt
index 816f8fda7..c89dbf2dc 100644
--- a/src/declarativeimports/core/CMakeLists.txt
+++ b/src/declarativeimports/core/CMakeLists.txt
@@ -58,7 +58,7 @@ if(HAVE_X11)
endif()
if(HAVE_EGL)
- target_link_libraries(corebindingsplugin OpenGL::EGL)
+ target_link_libraries(corebindingsplugin EGL::EGL)
endif()
if (${Qt5Gui_OPENGL_IMPLEMENTATION} STREQUAL "GLESv2")
diff --git a/tests/testengine/testengine.cpp b/tests/testengine/testengine.cpp
old mode 100644
new mode 100755
--
2.30.2