The include guards in GL headers changed with Mesa 18.3
GL
__glcorearb_h_ -> __gl_glcorearb_h_
__glext_h_ -> __gl_glext_h_
__glxext_h_ -> __glx_glxext_h_
GLES2
__gl2_h_ -> __gles2_gl2_h_
__gl2ext_h_ -> __gles2_gl2ext_h_
GLES3
__gl3_h_ -> __gles2_gl3_h_
This causes users of devel/sdl's SDL_opengl.h to break:
In file included from sdlmain.cpp:58:
In file included from /usr/local/include/SDL/SDL_opengl.h:50:
In file included from /usr/X11R6/include/GL/gl.h:2055:
/usr/X11R6/include/GL/glext.h:4898:58: error: unknown type name 'GLhandleARB';
did you mean
'GLhalfARB'?
define/undefine the new define as well the old
devel/sdl2 and a user of it (games/quakespasm) build fine with
the new headers without a similiar change.
Index: Makefile
===================================================================
RCS file: /cvs/ports/devel/sdl/Makefile,v
retrieving revision 1.102
diff -u -p -r1.102 Makefile
--- Makefile 3 Aug 2018 07:07:44 -0000 1.102
+++ Makefile 22 Jan 2019 05:05:56 -0000
@@ -5,7 +5,7 @@ COMMENT= cross-platform multimedia libra
VERSION= 1.2.15
DISTNAME= SDL-${VERSION}
PKGNAME= ${DISTNAME:L}
-REVISION= 9
+REVISION= 10
CATEGORIES= devel
MASTER_SITES= ${HOMEPAGE}release/
Index: patches/patch-include_SDL_opengl_h
===================================================================
RCS file: /cvs/ports/devel/sdl/patches/patch-include_SDL_opengl_h,v
retrieving revision 1.2
diff -u -p -r1.2 patch-include_SDL_opengl_h
--- patches/patch-include_SDL_opengl_h 2 Mar 2012 09:10:38 -0000 1.2
+++ patches/patch-include_SDL_opengl_h 22 Jan 2019 05:05:56 -0000
@@ -1,10 +1,12 @@
$OpenBSD: patch-include_SDL_opengl_h,v 1.2 2012/03/02 09:10:38 dcoppa Exp $
---- include/SDL_opengl.h.orig Mon Oct 12 19:07:19 2009
-+++ include/SDL_opengl.h Thu Sep 2 19:02:50 2010
-@@ -35,7 +35,11 @@
+Index: include/SDL_opengl.h
+--- include/SDL_opengl.h.orig
++++ include/SDL_opengl.h
+@@ -35,7 +35,12 @@
#endif
#ifndef NO_SDL_GLEXT
#define __glext_h_ /* Don't let gl.h include glext.h */
++#define __gl_glext_h_ /* Don't let gl.h include glext.h */
+#ifndef GL_ARB_shader_objects
+#define GL_ARB_shader_objects 0
+#define undef_GL_ARB
@@ -13,10 +15,11 @@ $OpenBSD: patch-include_SDL_opengl_h,v 1
#if defined(__MACOSX__)
#include <OpenGL/gl.h> /* Header File For The OpenGL Library */
#include <OpenGL/glu.h> /* Header File For The GLU Library */
-@@ -48,6 +52,10 @@
+@@ -48,6 +53,11 @@
#endif
#ifndef NO_SDL_GLEXT
#undef __glext_h_
++#undef __gl_glext_h_
+#ifdef undef_GL_ARB
+#undef GL_ARB_shader_objects
+#undef undef_GL_ARB