diff options
author | Eric Bavier <bavier@posteo.net> | 2023-05-08 22:27:40 -0500 |
---|---|---|
committer | Eric Bavier <bavier@posteo.net> | 2023-05-10 13:56:10 -0500 |
commit | b4e5844700b2304bfde451322feb5797bf0c6179 (patch) | |
tree | 7c95e84aed0eb8004e8df247e1b7c42e13142963 | |
parent | 7e152870558e45f69fd7f40b9b5b10e12ac2162d (diff) |
gnu: kodi: Fix build against latest mesa.
* gnu/packages/patches/kodi-mesa-eglchromium.patch: New file.
* gnu/local.mk (dist_patch_DATA): Add it.
* gnu/packages/kodi.scm (kodi)[source]: Use it.
-rw-r--r-- | gnu/local.mk | 1 | ||||
-rw-r--r-- | gnu/packages/kodi.scm | 3 | ||||
-rw-r--r-- | gnu/packages/patches/kodi-mesa-eglchromium.patch | 56 |
3 files changed, 59 insertions, 1 deletions
diff --git a/gnu/local.mk b/gnu/local.mk index 224e87d509..664e11b2ea 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1429,6 +1429,7 @@ dist_patch_DATA = \ %D%/packages/patches/kobodeluxe-midicon-segmentation-fault.patch \ %D%/packages/patches/kobodeluxe-graphics-window-signed-char.patch \ %D%/packages/patches/kodi-set-libcurl-ssl-parameters.patch \ + %D%/packages/patches/kodi-mesa-eglchromium.patch \ %D%/packages/patches/kwayland-skip-flaky-test.patch \ %D%/packages/patches/laby-make-install.patch \ %D%/packages/patches/ldns-drill-examples.patch \ diff --git a/gnu/packages/kodi.scm b/gnu/packages/kodi.scm index e0710c9fc2..655c82ad6c 100644 --- a/gnu/packages/kodi.scm +++ b/gnu/packages/kodi.scm @@ -284,7 +284,8 @@ alternatives. In compilers, this can reduce the cascade of secondary errors.") (sha256 (base32 "1pfd1ajivr865h0fkpbv778626c4czrvq8650bzqv9aqzh8f36my")) - (patches (search-patches "kodi-set-libcurl-ssl-parameters.patch")) + (patches (search-patches "kodi-set-libcurl-ssl-parameters.patch" + "kodi-mesa-eglchromium.patch")) (modules '((guix build utils))) (snippet '(begin diff --git a/gnu/packages/patches/kodi-mesa-eglchromium.patch b/gnu/packages/patches/kodi-mesa-eglchromium.patch new file mode 100644 index 0000000000..3324062274 --- /dev/null +++ b/gnu/packages/patches/kodi-mesa-eglchromium.patch @@ -0,0 +1,56 @@ +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 |