about summary refs log tree commit diff
path: root/pkgs/games/megaglest
diff options
context:
space:
mode:
authorSergei Trofimovich <slyich@gmail.com>2022-06-08 19:47:06 +0100
committerSergei Trofimovich <slyich@gmail.com>2022-06-08 19:47:41 +0100
commit27d3d3bb04718ba356e758a4329774f1df237594 (patch)
treecaf9c9c04b15120fe43e862c8baa5d1cdb114cb3 /pkgs/games/megaglest
parent064a605987c0ff66db54b3caa185542c1115dee2 (diff)
megaglest: pull upstream fix for -fno-common toolchains
Without the change build fails on upstream gcc-10 as:

    ld: liblibmegaglest.a(ftpLib.c.o):(.bss+0x28): multiple definition of
      `VERBOSE_MODE_ENABLED'; liblibmegaglest.a(miniftpserver.cpp.o):(.bss+0x30): first defined here
Diffstat (limited to 'pkgs/games/megaglest')
-rw-r--r--pkgs/games/megaglest/default.nix11
1 files changed, 10 insertions, 1 deletions
diff --git a/pkgs/games/megaglest/default.nix b/pkgs/games/megaglest/default.nix
index 30383e5f4067e..6a21a74f70b4a 100644
--- a/pkgs/games/megaglest/default.nix
+++ b/pkgs/games/megaglest/default.nix
@@ -1,7 +1,7 @@
 { lib, stdenv, cmake, pkg-config, git, curl, SDL2, xercesc, openal, lua, libvlc
 , libjpeg, wxGTK, cppunit, ftgl, glew, libogg, libvorbis, buildEnv, libpng
 , fontconfig, freetype, xorg, makeWrapper, bash, which, gnome, libGLU, glib
-, fetchFromGitHub
+, fetchFromGitHub, fetchpatch
 }:
 let
   version = "3.13.0";
@@ -28,6 +28,15 @@ stdenv.mkDerivation {
     sha256 = "0fb58a706nic14ss89zrigphvdiwy5s9dwvhscvvgrfvjpahpcws";
   };
 
+  patches = [
+    # Pull upstream fix for -fno-common toolchains
+    (fetchpatch {
+      name = "fno-common.patch";
+      url = "https://github.com/MegaGlest/megaglest-source/commit/5a3520540276a6fd06f7c88e571b6462978e3eab.patch";
+      sha256 = "0y554kjw56dikq87vs709pmq97hdx9hvqsk27f81v4g90m3b3qhi";
+    })
+  ];
+
   nativeBuildInputs = [ cmake pkg-config ];
   buildInputs = [ git curl SDL2 xercesc openal lua libpng libjpeg libvlc wxGTK
     glib cppunit fontconfig freetype ftgl glew libogg libvorbis makeWrapper libGLU ];