aboutsummaryrefslogtreecommitdiff
From https://github.com/xbmc/xbmc/pull/22291/commits/5449652abf0bb9dddd0d796de4120e60f19f89a5

From 5449652abf0bb9dddd0d796de4120e60f19f89a5 Mon Sep 17 00:00:00 2001
From: Alan Swanson <reiver@improbability.net>
Date: Mon, 19 Dec 2022 21:28:13 +0200
Subject: [PATCH] Work around Mesa eglchromium.h removal

I have polished Alan's snippet to buildable state and tested
on Kodi from Debian sid.

Signed-off-by: Vasyl Gello <vasek.gello@gmail.com>
---
 cmake/modules/FindEGL.cmake       | 6 ++++++
 xbmc/windowing/X11/GLContextEGL.h | 4 ++++
 2 files changed, 10 insertions(+)

diff --git a/cmake/modules/FindEGL.cmake b/cmake/modules/FindEGL.cmake
index b00fe08a25f95..a68a8db901222 100644
--- a/cmake/modules/FindEGL.cmake
+++ b/cmake/modules/FindEGL.cmake
@@ -9,6 +9,7 @@
 # EGL_INCLUDE_DIRS - the EGL include directory
 # EGL_LIBRARIES - the EGL libraries
 # EGL_DEFINITIONS - the EGL definitions
+# HAVE_EGLEXTANGLE - if eglext_angle.h exists else use eglextchromium.h
 #
 # and the following imported targets::
 #
@@ -35,6 +36,11 @@ if(EGL_FOUND)
   set(EGL_LIBRARIES ${EGL_LIBRARY})
   set(EGL_INCLUDE_DIRS ${EGL_INCLUDE_DIR})
   set(EGL_DEFINITIONS -DHAS_EGL=1)
+  include(CheckIncludeFiles)
+  check_include_files("EGL/egl.h;EGL/eglext.h;EGL/eglext_angle.h" HAVE_EGLEXTANGLE)
+  if(HAVE_EGLEXTANGLE)
+    list(APPEND EGL_DEFINITIONS "-DHAVE_EGLEXTANGLE=1")
+  endif()
 
   if(NOT TARGET EGL::EGL)
     add_library(EGL::EGL UNKNOWN IMPORTED)
diff --git a/xbmc/windowing/X11/GLContextEGL.h b/xbmc/windowing/X11/GLContextEGL.h
index 99a6a9024e8c6..afea0b7c43eac 100644
--- a/xbmc/windowing/X11/GLContextEGL.h
+++ b/xbmc/windowing/X11/GLContextEGL.h
@@ -13,7 +13,11 @@
 #include "threads/CriticalSection.h"
 
 #include <EGL/eglext.h>
+#ifdef HAVE_EGLEXTANGLE
+#include <EGL/eglext_angle.h>
+#else
 #include <EGL/eglextchromium.h>
+#endif
 #include <X11/Xutil.h>
 
 class CGLContextEGL : public CGLContext
href='/guix/commit/gnu/packages/kde.scm?id=75b775e81b5a81a59656eeba8811b42f45d503da'>Merge branch 'staging'Leo Famulari 2021-01-26gnu: krita: Update to 4.4.2....* gnu/packages/kde.scm (krita): Update to 4.4.2. Signed-off-by: Leo Famulari <leo@famulari.name> Michael Rohleder 2021-01-25Merge branch 'master' into stagingLeo Famulari 2021-01-20gnu: Add kdf....* gnu/packages/kde.scm (kdf): New variable. Signed-off-by: Efraim Flashner <efraim@flashner.co.il> Z572 2021-01-20gnu: Add poxml....* gnu/packages/kde.scm (poxml): New variable. Signed-off-by: Efraim Flashner <efraim@flashner.co.il> Z572 2021-01-12gnu: kdeconnect: Fix wayland compatibility....* gnu/packages/kde.scm (kdeconnect)[inputs]: Add qtwayland. Efraim Flashner 2021-01-10Merge branch 'master' into stagingEfraim Flashner 2021-01-09gnu: okular: Update to 20.12.1....* gnu/packages/kde.scm (okular): Update to 20.12.1. Tobias Geerinckx-Rice 2021-01-05gnu: Add akregator....* gnu/packages/kde.scm (akregator): New variable. Signed-off-by: Efraim Flashner <efraim@flashner.co.il> Z572 2020-12-30gnu: qca: Update to 2.3.1....* gnu/packages/kde.scm (qca): Update to 2.3.1. Efraim Flashner 2020-12-29Merge branch 'ungrafting' into stagingMarius Bakke 2020-12-29gnu: grantleetheme: Skip tests....* gnu/packages/kde.scm (grantleetheme)[arguments]: Skip tests. Efraim Flashner 2020-12-22gnu: kdevelop: Update to 5.6.1....* gnu/packages/kde.scm (kdevelop): Update to 5.6.1. Signed-off-by: Ludovic Courtès <ludo@gnu.org> Michael Rohleder 2020-12-18gnu: kdenlive: Add breeze-icons....Since breeze-icons are now longer united into breeze, these need to be explicitly added. * gnu/package/kde.scm (kdenlive)[inputs]: Add breeze-icons. [argmuments]{phases}<wrap-executable>: Add breeze-icons to XDG_DATA_DIRS. Hartmut Goebel 2020-12-17gnu: okular: Tweak synopsis and description....* gnu/packages/kde.scm (okular)[synopsis]: Tweak capitalization. [description]: Remove discussion of portability and mention supported file formats instead. Ludovic Courtès 2020-12-15gnu: Add Okular....* gnu/packages/kde.scm (okular): New variable. Signed-off-by: Leo Famulari <leo@famulari.name> Zheng Junjie 2020-12-12gnu: Add libkexiv2....* gnu/packages/kde.scm (libkexiv2): New variable. Signed-off-by: Leo Famulari <leo@famulari.name> Zheng Junjie 2020-12-12gnu: Add kdegraphics-mobipocket....* gnu/packages/kde.scm (kdegraphics-mobipocket): New variable. Signed-off-by: Leo Famulari <leo@famulari.name> Zheng Junjie 2020-12-12gnu: KDE: Fix old cgit home-pages....Fix all home-pages pointing to git-repos a cgit.kde.org, which is gone, to now use the correct repo at invent.kde.org. * gnu/packages/kde.scm (grantleetheme, kdiagram): Update home-page. * gnu/packages/kde-frameworks.scm (kholidays): Likewise. * gnu/packages/kde-internet.scm (libgravatar, libktorrent): Likewise. * gnu/packages/kde-multimedia.scm (libkcddb, libkcompactdisc): Likewise. * gnu/packages/kde-pim.scm (kblog, kdav, kdepim-apps-libs, kdepim-runtime, keventviews, kincidenceeditor, kmailcommon, kmailimporter, kmessagelib, kpimcommon, ksmtp, libkdepim, libkgapi, libkleo, libksieve): Likewise. * gnu/packages/kde-plasma.scm (kdecoration, kscreenlocker): Likewise. Hartmut Goebel 2020-12-08gnu: qca: Correct license....* gnu/packages/kde.scm (qca)[license]: Change from LGPL2.1 to LGPL2.1+. Marius Bakke 2020-11-07Merge branch 'master' into staging... Conflicts: gnu/local.mk gnu/packages/gdb.scm gnu/packages/lisp-xyz.scm gnu/packages/web-browsers.scm Marius Bakke 2020-11-07gnu: kdenlive: Update to 20.08.3....* gnu/packages/kde.scm (kdenlive): Update to 20.08.3. Tobias Geerinckx-Rice 2020-11-01gnu: krita: Update to 4.4.1....* gnu/packages/kde.scm (krita): Update to 4.4.1. Tobias Geerinckx-Rice 2020-10-29gnu: kuserfeedback: Fix typo....* gnu/packages/kde.scm (kuserfeedback)[description]: Fix spelling of the "itemize" keyword. Signed-off-by: Tobias Geerinckx-Rice <me@tobias.gr> Sébastien Lerique 2020-10-27gnu: Add kuserfeedback....* gnu/packages/kde.scm (kuserfeedback): New variable. Hartmut Goebel 2020-10-19Merge branch 'master' into stagingMarius Bakke 2020-10-13gnu: Krita: Update to 4.4.0....* gnu/packages/kde.scm (krita): Update to 4.4.0. Leo Famulari 2020-10-13Merge branch 'master' into stagingMarius Bakke 2020-10-13gnu: kdenlive: Update to 20.08.2....* gnu/packages/kde.scm (kdenlive): Update to 20.08.2. Tobias Geerinckx-Rice