diff options
author | Vladimír Čunát <vcunat@gmail.com> | 2016-06-19 10:18:30 +0200 |
---|---|---|
committer | Vladimír Čunát <vcunat@gmail.com> | 2016-06-19 10:18:30 +0200 |
commit | 97c484a10f4b38efc4fb3dd210defed96003ae7d (patch) | |
tree | 3cf505288a69445d7a0da288197352484942421c /pkgs/games/openspades | |
parent | d133a168f082d2f4c94984190e836e55f5e389a7 (diff) |
treewide: fix #include errors after gcc-5.4
They were mostly missing <cmath> or <math.h>.
Diffstat (limited to 'pkgs/games/openspades')
-rw-r--r-- | pkgs/games/openspades/default.nix | 5 | ||||
-rw-r--r-- | pkgs/games/openspades/git.nix | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/pkgs/games/openspades/default.nix b/pkgs/games/openspades/default.nix index 2203bb6337eb4..d263be3ec1156 100644 --- a/pkgs/games/openspades/default.nix +++ b/pkgs/games/openspades/default.nix @@ -16,7 +16,10 @@ stdenv.mkDerivation rec { postPatch = '' substituteInPlace Sources/Client/Client_Input.cpp --replace "isnan(" "std::isnan(" substituteInPlace Sources/Client/Corpse.cpp --replace "isnan(" "std::isnan(" - substituteInPlace Sources/Draw/SWMapRenderer.cpp --replace "isnan(" "std::isnan(" --replace "isinf(" "std::isinf(" + substituteInPlace Sources/Draw/SWMapRenderer.cpp \ + --replace "isnan(" "std::isnan(" --replace "isinf(" "std::isinf(" + sed '1i#include <cmath>' -i Sources/Client/{Player,Client_Input,Corpse}.cpp \ + -i Sources/Draw/SWMapRenderer.cpp ''; nativeBuildInputs = diff --git a/pkgs/games/openspades/git.nix b/pkgs/games/openspades/git.nix index 8212f160cda83..7d76573f73452 100644 --- a/pkgs/games/openspades/git.nix +++ b/pkgs/games/openspades/git.nix @@ -14,6 +14,8 @@ stdenv.mkDerivation rec { sha256 = "0vyvmgim03q8pcmfa1i0njr4w1lpjq5g3b47f67v9b5c5jcjycwn"; }; + postPatch = "sed '1i#include <cmath>' -i Sources/Client/{,Client}Player.cpp"; + nativeBuildInputs = with stdenv.lib; [ cmake curl glew makeWrapper mesa SDL2 SDL2_image unzip wget zlib ] |