From 0c8a51c7d28befa49e596421de22c0b4fef100f0 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Thu, 21 May 2020 22:09:21 +0200 Subject: gnu: cogl: Fix build with Mesa 20. * gnu/packages/gnome.scm (cogl)[arguments]: Add phase to adjust header includes. --- gnu/packages/gnome.scm | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'gnu/packages/gnome.scm') diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm index 938efbcdf3..e0e1ed1804 100644 --- a/gnu/packages/gnome.scm +++ b/gnu/packages/gnome.scm @@ -4486,6 +4486,17 @@ throughout GNOME for API documentation).") "/lib/libGL.so")) #:phases (modify-phases %standard-phases + (add-after 'unpack 'fix-build-with-mesa-20 + (lambda _ + ;; Work around a problem with Mesa 20 where some macros used by + ;; Cogl went missing from eglext.h. This can likely be removed + ;; for newer versions of Cogl or Mesa. + ;; https://gitlab.gnome.org/GNOME/cogl/-/merge_requests/19 + (substitute* '("configure" + "cogl/winsys/cogl-winsys-egl-kms.c") + (("#include " all) + (string-append all "\n#include \n"))) + #t)) (add-before 'check 'start-xorg-server (lambda* (#:key tests? inputs #:allow-other-keys) (if tests? -- cgit v1.2.3 From 682ae6f947ca3efb902f8c7ae25914e34cb74e8e Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Sat, 23 May 2020 11:22:45 +0200 Subject: gnu: mutter: Fix build with Mesa 20. * gnu/packages/gnome.scm (mutter)[arguments]: Add #:phases. --- gnu/packages/gnome.scm | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'gnu/packages/gnome.scm') diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm index e0e1ed1804..566c31f415 100644 --- a/gnu/packages/gnome.scm +++ b/gnu/packages/gnome.scm @@ -6084,7 +6084,21 @@ to display dialog boxes from the commandline and shell scripts.") ;; the remaining flags are needed for the bundled cogl (string-append "-Dopengl_libname=" (assoc-ref %build-inputs "mesa") - "/lib/libGL.so")))) + "/lib/libGL.so")) + #:phases (modify-phases %standard-phases + (add-after 'unpack 'fix-build-with-mesa-20 + (lambda _ + ;; Mimic upstream commit a444a4c5f58ea516ad for + ;; compatibility with Mesa 20. Remove for 3.36. + (substitute* '("src/backends/meta-egl-ext.h" + "src/backends/meta-egl.c" + "src/backends/meta-egl.h") + (("#include " all) + (string-append all "\n#include "))) + (substitute* "cogl/cogl/meson.build" + (("#include " all) + (string-append all "\\n#include "))) + #t))))) (native-inputs `(("desktop-file-utils" ,desktop-file-utils) ; for update-desktop-database ("glib:bin" ,glib "bin") ; for glib-compile-schemas, etc. -- cgit v1.2.3