3
0
Fork 0
forked from mirrors/nixpkgs

freedroidrpg: add upstream fix for -fno-common toolchains

Without the upstream change build fails on toolchains that default to
`-fno-common` (like clang-13 or upstream  gcc-10+):

    $ nix build --impure --expr 'with import ./.{}; freedroidrpg.override { stdenv = clang13Stdenv; }' -L
    ...
    freedroidrpg> ld: addon_crafting_ui.o:/build/freedroidrpg-0.16.1/src/./struct.h:1025:
      multiple definition of `tux_rendering'; action.o:/build/freedroidrpg-0.16.1/src/./struct.h:1025: first defined here
    ...
This commit is contained in:
Sergei Trofimovich 2022-03-13 07:55:25 +00:00
parent 1944ec70cf
commit 71b07eaac3

View file

@ -1,4 +1,4 @@
{ fetchurl, lib, stdenv, pkg-config, gettext, python3, SDL, SDL_image, SDL_gfx, SDL_mixer, libogg, libvorbis, lua5_3, libjpeg, libpng, zlib, libiconv }:
{ fetchurl, fetchpatch, lib, stdenv, pkg-config, gettext, python3, SDL, SDL_image, SDL_gfx, SDL_mixer, libogg, libvorbis, lua5_3, libjpeg, libpng, zlib, libiconv }:
let
version = "0.16.1";
@ -11,6 +11,15 @@ in stdenv.mkDerivation {
sha256 = "0n4kn38ncmcy3lrxmq8fjry6c1z50z4q1zcqfig0j4jb0dsz2va2";
};
patches = [
# Pull upstream fix for -fno-common tolchains.
(fetchpatch {
name = "fno-common.patch";
url = "https://gitlab.com/freedroid/freedroid-src/-/commit/e610d427374226b79da5258d979936459f30c761.patch";
sha256 = "1s7sw4dkc7b6i72j6x47driq6v0k3wss48l9ivd4fw40n3iaxjb1";
})
];
nativeBuildInputs = [ pkg-config gettext python3 ];
buildInputs = [