media-libs/cogl: Add patch to build with mesa-19.3
authorMatt Turner <mattst88@gentoo.org>
Sat, 23 Nov 2019 18:14:45 +0000 (13:14 -0500)
committerMatt Turner <mattst88@gentoo.org>
Sat, 23 Nov 2019 19:44:06 +0000 (14:44 -0500)
Closes: https://bugs.gentoo.org/692212
Signed-off-by: Matt Turner <mattst88@gentoo.org>
media-libs/cogl/cogl-1.22.2.ebuild
media-libs/cogl/cogl-1.22.4.ebuild
media-libs/cogl/files/cogl-eglmesaext-include.patch [new file with mode: 0644]

index c3702f70decdc91183cf7ad5460075dc4a3c0825..eae9521a25cdc08e607aeb9b22113f0ed350a932 100644 (file)
@@ -3,6 +3,7 @@
 
 EAPI=6
 
+GNOME2_EAUTORECONF="yes"
 inherit gnome2 multilib
 
 DESCRIPTION="A library for using 3D graphics hardware to draw pretty pictures"
@@ -58,6 +59,10 @@ DEPEND="${COMMON_DEPEND}
 # For some reason GL3 conformance test all fails again...
 RESTRICT="test"
 
+PATCHES=(
+       "${FILESDIR}"/${PN}-eglmesaext-include.patch
+)
+
 src_prepare() {
        # Do not build examples
        sed -e "s/^\(SUBDIRS +=.*\)examples\(.*\)$/\1\2/" \
index 3265c8399ccc97ce40283591954293885d95784f..f79e884927e82a4ef99c8bb405ef493462013310 100644 (file)
@@ -3,6 +3,7 @@
 
 EAPI=6
 
+GNOME2_EAUTORECONF="yes"
 inherit gnome2 multilib
 
 DESCRIPTION="A library for using 3D graphics hardware to draw pretty pictures"
@@ -58,6 +59,10 @@ DEPEND="${COMMON_DEPEND}
 # For some reason GL3 conformance test all fails again...
 RESTRICT="test"
 
+PATCHES=(
+       "${FILESDIR}"/${PN}-eglmesaext-include.patch
+)
+
 src_prepare() {
        # Do not build examples
        sed -e "s/^\(SUBDIRS +=.*\)examples\(.*\)$/\1\2/" \
diff --git a/media-libs/cogl/files/cogl-eglmesaext-include.patch b/media-libs/cogl/files/cogl-eglmesaext-include.patch
new file mode 100644 (file)
index 0000000..eff5c68
--- /dev/null
@@ -0,0 +1,60 @@
+From 9c4764224aded552fb855b1c2b85b26d2b894adf Mon Sep 17 00:00:00 2001
+From: Alexander Tsoy <alexander@tsoy.me>
+Date: Tue, 29 Oct 2019 18:17:51 +0300
+Subject: [PATCH] Fix building against libglvnd-provided EGL headers
+
+Add missing EGL/eglmesaext.h include. When building against mesa-provided
+headers, this header is included indirectly via EGL/eglext.h.
+
+Also fix typo COGL_EGL_INCLUDE -> COGL_EGL_INCLUDES
+---
+ configure.ac | 16 ++++++++++++++--
+ 1 file changed, 14 insertions(+), 2 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index da188edd..b0b0c94d 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -670,10 +670,15 @@ AS_IF([test "x$enable_gles1" = "xyes"],
+             AC_SUBST([COGL_EGL_INCLUDES])
+             AC_CHECK_HEADERS([EGL/eglext.h],
+-                             [COGL_EGL_INCLUDES="$COGL_EGL_INCLUDE
++                             [COGL_EGL_INCLUDES="$COGL_EGL_INCLUDES
+ #include <EGL/eglext.h>"],
+                              [],
+                              [$COGL_EGL_INCLUDES])
++            AC_CHECK_HEADERS([EGL/eglmesaext.h],
++                             [COGL_EGL_INCLUDES="$COGL_EGL_INCLUDES
++#include <EGL/eglmesaext.h>"],
++                             [],
++                             [$COGL_EGL_INCLUDES])
+             # Check for a GLES 1.x Common Profile library with/without EGL.
+             #
+@@ -1178,6 +1183,12 @@ AS_IF([test "x$NEED_EGL" = "xyes" && test "x$EGL_CHECKED" != "xyes"],
+               [],
+               [AC_MSG_ERROR([Unable to locate required EGL headers])],
+               [#include <EGL/egl.h>])
++            AC_CHECK_HEADERS(
++              [EGL/eglmesaext.h],
++              [],
++              [AC_MSG_ERROR([Unable to locate required EGL headers])],
++              [#include <EGL/egl.h>
++#include <EGL/eglext.h>])
+             AC_CHECK_LIB(EGL, [eglInitialize],
+               [COGL_EXTRA_LDFLAGS="$COGL_EXTRA_LDFLAGS -lEGL"],
+@@ -1188,7 +1199,8 @@ AS_IF([test "x$NEED_EGL" = "xyes" && test "x$EGL_CHECKED" != "xyes"],
+           )
+         COGL_EGL_INCLUDES="#include <EGL/egl.h>
+-#include <EGL/eglext.h>"
++#include <EGL/eglext.h>
++#include <EGL/eglmesaext.h>"
+         AC_SUBST([COGL_EGL_INCLUDES])
+       ])
+-- 
+2.22.0
+