guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

01/01: gnu: irrlicht: Fix build with mesa-10.


From: Mark H. Weaver
Subject: 01/01: gnu: irrlicht: Fix build with mesa-10.
Date: Fri, 26 Dec 2014 20:50:12 +0000

mhw pushed a commit to branch xorg-updates
in repository guix.

commit 977736fc4064e6575abde12dbfe7bb79afad54be
Author: Mark H Weaver <address@hidden>
Date:   Fri Dec 26 15:48:26 2014 -0500

    gnu: irrlicht: Fix build with mesa-10.
    
    * gnu/packages/patches/irrlicht-mesa-10.patch: New file.
    * gnu-system.am (dist_patch_DATA): Add it.
    * gnu/packages/games.scm (irrlicht): Add patch.  Add glu to inputs.
---
 gnu-system.am                               |    1 +
 gnu/packages/games.scm                      |   15 ++++++--
 gnu/packages/patches/irrlicht-mesa-10.patch |   46 +++++++++++++++++++++++++++
 3 files changed, 58 insertions(+), 4 deletions(-)

diff --git a/gnu-system.am b/gnu-system.am
index 2bc688b..5acc6f4 100644
--- a/gnu-system.am
+++ b/gnu-system.am
@@ -388,6 +388,7 @@ dist_patch_DATA =                                           
\
   gnu/packages/patches/icecat-CVE-2014-1592.patch              \
   gnu/packages/patches/icecat-CVE-2014-1593.patch              \
   gnu/packages/patches/icecat-CVE-2014-1594.patch              \
+  gnu/packages/patches/irrlicht-mesa-10.patch                  \
   gnu/packages/patches/jbig2dec-ignore-testtest.patch          \
   gnu/packages/patches/kmod-module-directory.patch             \
   gnu/packages/patches/libarchive-CVE-2013-0211.patch          \
diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm
index 2dadca6..b8696a5 100644
--- a/gnu/packages/games.scm
+++ b/gnu/packages/games.scm
@@ -611,14 +611,21 @@ buffers, and audio capture.")
                     (and (zero? (system* "unzip" source))
                          ;; The actual source is buried a few directories deep.
                          (chdir "irrlicht-1.8.1/source/Irrlicht/")))
-                  ;; No configure script
-                  (alist-delete 'configure %standard-phases)))
+                  (alist-cons-after
+                   'unpack 'apply-patch/mesa-10-fix
+                   (lambda* (#:key inputs #:allow-other-keys)
+                     (zero? (system* "patch" "--force" "-p3" "-i"
+                                     (assoc-ref inputs "patch/mesa-10-fix"))))
+                   ;; No configure script
+                   (alist-delete 'configure %standard-phases))))
        #:tests? #f ; no check target
        #:make-flags '("CC=gcc" "sharedlib")))
     (native-inputs
-     `(("unzip" ,unzip)))
+     `(("patch/mesa-10-fix" ,(search-patch "irrlicht-mesa-10.patch"))
+       ("unzip" ,unzip)))
     (inputs
-     `(("mesa" ,mesa)))
+     `(("mesa" ,mesa)
+       ("glu" ,glu)))
     (synopsis "3D game engine written in C++")
     (description
      "The Irrlicht Engine is a high performance realtime 3D engine written in
diff --git a/gnu/packages/patches/irrlicht-mesa-10.patch 
b/gnu/packages/patches/irrlicht-mesa-10.patch
new file mode 100644
index 0000000..b567c38
--- /dev/null
+++ b/gnu/packages/patches/irrlicht-mesa-10.patch
@@ -0,0 +1,46 @@
+Patch to work around incompatibility between irrlicht-1.8.1 and mesa-10.x.
+Upstream bug (fixed in trunk): http://sourceforge.net/p/irrlicht/bugs/429/
+Upstream fix: http://sourceforge.net/p/irrlicht/code/4810
+This patch copied from:
+http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/dev-games/irrlicht/files/irrlicht-1.8.1-mesa-10.x.patch?view=markup
+
+From 244d00280c1b082ca164f92337773e9e4e1a3898 Mon Sep 17 00:00:00 2001
+From: hiker <address@hidden>
+Date: Wed, 26 Feb 2014 11:13:03 +1100
+Subject: [PATCH] Applied patch from jpirie for fixing mesa 10 compilation
+ problems.
+
+--- irrlicht-1.8.1/source/Irrlicht/COpenGLExtensionHandler.h
++++ irrlicht-1.8.1/source/Irrlicht/COpenGLExtensionHandler.h
+@@ -21,6 +21,7 @@
+       #endif
+       #include <GL/gl.h>
+       #if defined(_IRR_OPENGL_USE_EXTPOINTER_)
++              typedef void (APIENTRYP PFNGLBLENDEQUATIONPROC) (GLenum mode);
+               #include "glext.h"
+       #endif
+       #include "wglext.h"
+@@ -35,6 +36,7 @@
+       #endif
+       #include <OpenGL/gl.h>
+       #if defined(_IRR_OPENGL_USE_EXTPOINTER_)
++              typedef void (APIENTRYP PFNGLBLENDEQUATIONPROC) (GLenum mode);
+               #include "glext.h"
+       #endif
+ #elif defined(_IRR_COMPILE_WITH_SDL_DEVICE_) && 
!defined(_IRR_COMPILE_WITH_X11_DEVICE_)
+@@ -48,6 +50,7 @@
+       #define NO_SDL_GLEXT
+       #include <SDL/SDL_video.h>
+       #include <SDL/SDL_opengl.h>
++      typedef void (APIENTRYP PFNGLBLENDEQUATIONPROC) (GLenum mode);
+       #include "glext.h"
+ #else
+       #if defined(_IRR_OPENGL_USE_EXTPOINTER_)
+@@ -60,6 +63,7 @@
+       #include <GL/gl.h>
+       #include <GL/glx.h>
+       #if defined(_IRR_OPENGL_USE_EXTPOINTER_)
++      typedef void (APIENTRYP PFNGLBLENDEQUATIONPROC) (GLenum mode);
+       #include "glext.h"
+       #undef GLX_ARB_get_proc_address // avoid problems with local glxext.h
+       #include "glxext.h"



reply via email to

[Prev in Thread] Current Thread [Next in Thread]