allegro4: fix build with mesa 18.2.5

GL/glxext.h include guard was changed in
https://cgit.freedesktop.org/mesa/mesa/commit/include/GL/glxext.h?h=mesa-18.2.5&id=06eb33960e85994bd4ee952395dde6d1762c93b5
This commit is contained in:
Orivej Desh 2018-12-27 17:14:33 +00:00
parent 167e748d94
commit 6d315ab1fa
2 changed files with 27 additions and 0 deletions

View file

@ -0,0 +1,26 @@
--- a/addons/allegrogl/include/alleggl.h
+++ b/addons/allegrogl/include/alleggl.h
@@ -63,9 +63,11 @@ typedef __int64 INT64;
/* HACK: Prevent both Mesa and SGI's broken headers from screwing us */
#define __glext_h_
#define __glxext_h_
+#define __glx_glxext_h_
#include <GL/gl.h>
#undef __glext_h_
#undef __glxext_h_
+#undef __glx_glxext_h_
#endif /* ALLEGRO_MACOSX */
--- a/addons/allegrogl/include/allegrogl/GLext/glx_ext_defs.h
+++ b/addons/allegrogl/include/allegrogl/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 AGLX_VERSION_1_3

View file

@ -13,6 +13,7 @@ stdenv.mkDerivation rec {
};
patches = [
./allegro4-mesa-18.2.5.patch
./nix-unstable-sandbox-fix.patch
];