From 0109b89c5834b5374f248dc3681702180013f41f Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Tue, 1 Jan 2019 10:22:34 +0200 Subject: gnu: allegro@5.0: Fix building with newer mesa. * gnu/packages/game-development.scm (allegro@5.0)[source]: Add patch. (allegro)[patch]: Rename patch file. * gnu/packages/patches/allegro-fix-compiliation-mesa-18.2.5-and-later.patch: Rename to gnu/packages/patches/allegro-mesa-18.2.5-and-later.patch. * gnu/local.mk (dist_patch_DATA): Register it. --- gnu/local.mk | 1 + gnu/packages/game-development.scm | 4 ++- ...gro-fix-compilation-mesa-18.2.5-and-later.patch | 41 ---------------------- .../patches/allegro-mesa-18.2.5-and-later.patch | 41 ++++++++++++++++++++++ 4 files changed, 45 insertions(+), 42 deletions(-) delete mode 100644 gnu/packages/patches/allegro-fix-compilation-mesa-18.2.5-and-later.patch create mode 100644 gnu/packages/patches/allegro-mesa-18.2.5-and-later.patch diff --git a/gnu/local.mk b/gnu/local.mk index 64f2bf9a9c..4d8813a9b8 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -577,6 +577,7 @@ dist_patch_DATA = \ %D%/packages/patches/aegisub-icu59-include-unistr.patch \ %D%/packages/patches/aegisub-boost68.patch \ %D%/packages/patches/agg-am_c_prototype.patch \ + %D%/packages/patches/allegro-mesa-18.2.5-and-later.patch \ %D%/packages/patches/allegro4-mesa-18.2.5-and-later.patch \ %D%/packages/patches/amule-crypto-6.patch \ %D%/packages/patches/antiword-CVE-2014-8123.patch \ diff --git a/gnu/packages/game-development.scm b/gnu/packages/game-development.scm index efca9852d6..9a77cdc645 100644 --- a/gnu/packages/game-development.scm +++ b/gnu/packages/game-development.scm @@ -655,7 +655,7 @@ etc.") "/download/" version "/allegro-" version ".tar.gz")) (patches (search-patches - "allegro-fix-compilation-mesa-18.2.5-and-later.patch")) + "allegro-mesa-18.2.5-and-later.patch")) (sha256 (base32 "1w9a5yqi5q03b2qvmx5ff90paz0xbr9cy7i7f0xiqa65ava66q9l")))) @@ -700,6 +700,8 @@ etc.") (string-drop-right version 2) version) ".tar.gz")) + (patches (search-patches + "allegro-mesa-18.2.5-and-later.patch")) (sha256 (base32 "0cd51qrh97jrr0xdmnivqgwljpmizg8pixsgvc4blqqlaz4i9zj9")))))) diff --git a/gnu/packages/patches/allegro-fix-compilation-mesa-18.2.5-and-later.patch b/gnu/packages/patches/allegro-fix-compilation-mesa-18.2.5-and-later.patch deleted file mode 100644 index fa273a5dfa..0000000000 --- a/gnu/packages/patches/allegro-fix-compilation-mesa-18.2.5-and-later.patch +++ /dev/null @@ -1,41 +0,0 @@ -Fixes compilation with Mesa >= 18.2.5. - -Taken from upstream: - -https://github.com/liballeg/allegro5/commit/a40d30e21802ecf5c9382cf34af9b01bd3781e47 - -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 - #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 - #undef __glxext_h_ -+#undef __glx_glxext_h_ - - #ifndef GLX_VERSION_1_3 - #define _ALLEGRO_GLX_VERSION_1_3 --- -2.20.0 diff --git a/gnu/packages/patches/allegro-mesa-18.2.5-and-later.patch b/gnu/packages/patches/allegro-mesa-18.2.5-and-later.patch new file mode 100644 index 0000000000..fa273a5dfa --- /dev/null +++ b/gnu/packages/patches/allegro-mesa-18.2.5-and-later.patch @@ -0,0 +1,41 @@ +Fixes compilation with Mesa >= 18.2.5. + +Taken from upstream: + +https://github.com/liballeg/allegro5/commit/a40d30e21802ecf5c9382cf34af9b01bd3781e47 + +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 + #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 + #undef __glxext_h_ ++#undef __glx_glxext_h_ + + #ifndef GLX_VERSION_1_3 + #define _ALLEGRO_GLX_VERSION_1_3 +-- +2.20.0 -- cgit v1.2.3