zeroad: apply patch to fix build with gcc 11 and glibc 2.35

0ad defines a variabel M_PIf, which is also included in math.h since gcc 11. This leads to the following build failure: https://hydra.nixos.org/build/186330284
This commit is contained in:
Charlotte Van Petegem 2022-08-05 13:37:48 +02:00
parent 6f73b0ca72
commit 70c49766af
No known key found for this signature in database
GPG key ID: 019E764B7184435A

View file

@ -1,4 +1,4 @@
{ stdenv, lib, perl, fetchurl, python3, fmt, libidn
{ stdenv, lib, fetchpatch, perl, fetchurl, python3, fmt, libidn
, pkg-config, spidermonkey_78, boost, icu, libxml2, libpng, libsodium
, libjpeg, zlib, curl, libogg, libvorbis, enet, miniupnpc
, openal, libGLU, libGL, xorgproto, libX11, libXcursor, nspr, SDL2
@ -50,7 +50,14 @@ stdenv.mkDerivation rec {
"-I${fmt.dev}/include"
];
patches = [ ./rootdir_env.patch ];
patches = [
./rootdir_env.patch
(fetchpatch {
# fix build with gcc11 and glibc 2.35
url = "https://github.com/0ad/0ad/commit/7df614338cbd41f5e254ce75f649490b2637e1d0.patch";
hash = "sha256-QZvcNm8Zni3aJnMPueft0OITf8zeMDXWBjOLYoirJs0=";
})
];
configurePhase = ''
# Delete shipped libraries which we don't need.