gravit: pull fix pending upstream inclusion for -fno-common toolchains

Without the change build fails on upstream gcc-10 as:

    ld: tool.o:(.bss+0x0): multiple definition of `view'; color.o:(.bss+0x0): first defined here
    ld: tool.o:(.bss+0x820): multiple definition of `video'; color.o:(.bss+0x820): first defined here
    ld: png_save.o:(.bss+0x0): multiple definition of `view'; color.o:(.bss+0x0): first defined here
This commit is contained in:
Sergei Trofimovich 2022-06-04 07:02:02 +01:00
parent 99b94f9522
commit 60ba187b0f

View file

@ -1,4 +1,4 @@
{ lib, stdenv, fetchFromGitHub, SDL, SDL_ttf, SDL_image, libSM, libICE, libGLU, libGL, libpng, lua5, autoconf, automake }:
{ lib, stdenv, fetchFromGitHub, fetchpatch, SDL, SDL_ttf, SDL_image, libSM, libICE, libGLU, libGL, libpng, lua5, autoconf, automake }:
stdenv.mkDerivation rec {
pname = "gravit";
@ -11,6 +11,16 @@ stdenv.mkDerivation rec {
hash = "sha256-JuqnLLD5+Ec8kQI0SK98V1O6TTbGM6+yKn5KCHe85eM=";
};
patches = [
# Pull fix pending upstream inclusion for -fno-common toolchains:
# https://github.com/gak/gravit/pull/100
(fetchpatch {
name = "fno-common.patch";
url = "https://github.com/gak/gravit/commit/0f848834889212f16201fd404d2d5b9bb5b47d23.patch";
hash = "sha256-k1aMIg7idMt53o6dFgIKJflOMp0Jp5NwgWEijcIwXrQ=";
})
];
buildInputs = [ libGLU libGL SDL SDL_ttf SDL_image lua5 libpng libSM libICE ];
nativeBuildInputs = [ autoconf automake ];