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
This commit is contained in:
Sergei Trofimovich 2022-06-08 19:47:06 +01:00
parent 064a605987
commit 27d3d3bb04

View File

@ -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 ];