You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
calculate-overlay/profiles/templates/3.6/6_ac_install_patch/media-libs/allegro/allegro-5.2.4-fix_mesa2.patch

46 lines
1.5 KiB

# Calculate format=diff merge(media-libs/allegro)=>5.2.4,5.2.5
commit a40d30e21802ecf5c9382cf34af9b01bd3781e47
Author: Sebastian Krzyszkowiak <dos@dosowisko.net>
Date: Fri Dec 7 03:23:44 2018 +0100
opengl: fix compilation with Mesa 18.2.5 and later
Mesa headers have been updated and changed some defines that Allegro
is hackily relying on.
https://gitlab.freedesktop.org/mesa/mesa/commit/f7d42ee7d319256608ad60778f6787c140badada
diff --git a/include/allegro5/allegro_opengl.h b/include/allegro5/allegro_opengl.h
index 0f86a6768..652dd024e 100644
--- a/include/allegro5/allegro_opengl.h
+++ b/include/allegro5/allegro_opengl.h
@@ -103,10 +103,14 @@
/* HACK: Prevent both Mesa and SGI's broken headers from screwing us */
#define __glext_h_
+#define __gl_glext_h_
#define __glxext_h_
+#define __glx_glxext_h_
#include <GL/gl.h>
#undef __glext_h_
+#undef __gl_glext_h_
#undef __glxext_h_
+#undef __glx_glxext_h_
#endif /* ALLEGRO_MACOSX */
diff --git a/include/allegro5/opengl/GLext/glx_ext_defs.h b/include/allegro5/opengl/GLext/glx_ext_defs.h
index 49c502091..fba8aea5d 100644
--- a/include/allegro5/opengl/GLext/glx_ext_defs.h
+++ b/include/allegro5/opengl/GLext/glx_ext_defs.h
@@ -1,7 +1,9 @@
/* HACK: Prevent both Mesa and SGI's broken headers from screwing us */
#define __glxext_h_
+#define __glx_glxext_h_
#include <GL/glx.h>
#undef __glxext_h_
+#undef __glx_glxext_h_
#ifndef GLX_VERSION_1_3
#define _ALLEGRO_GLX_VERSION_1_3