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 | |
parent | d133a168f082d2f4c94984190e836e55f5e389a7 (diff) |
treewide: fix #include errors after gcc-5.4
They were mostly missing <cmath> or <math.h>.
Diffstat (limited to 'pkgs/games')
-rw-r--r-- | pkgs/games/cataclysm-dda/default.nix | 3 | ||||
-rw-r--r-- | pkgs/games/dwarf-fortress/dfhack/default.nix | 1 | ||||
-rw-r--r-- | pkgs/games/dwarf-fortress/unfuck.nix | 2 | ||||
-rw-r--r-- | pkgs/games/openspades/default.nix | 5 | ||||
-rw-r--r-- | pkgs/games/openspades/git.nix | 2 | ||||
-rw-r--r-- | pkgs/games/the-butterfly-effect/default.nix | 4 |
6 files changed, 16 insertions, 1 deletions
diff --git a/pkgs/games/cataclysm-dda/default.nix b/pkgs/games/cataclysm-dda/default.nix index 3956c994531e3..b46114ec62bea 100644 --- a/pkgs/games/cataclysm-dda/default.nix +++ b/pkgs/games/cataclysm-dda/default.nix @@ -21,6 +21,9 @@ stdenv.mkDerivation rec { sed -i Makefile \ -e 's,-Werror,,g' \ -e 's,\(DATA_PREFIX=$(PREFIX)/share/\)cataclysm-dda/,\1,g' + + sed '1i#include <cmath>' \ + -i src/{crafting,skill,weather_data,melee,vehicle,overmap,iuse_actor}.cpp ''; makeFlags = "PREFIX=$(out) LUA=1 TILES=1 SOUND=1 RELEASE=1 USE_HOME_DIR=1"; diff --git a/pkgs/games/dwarf-fortress/dfhack/default.nix b/pkgs/games/dwarf-fortress/dfhack/default.nix index 3d3b1c4d9aa80..1ee0f829571db 100644 --- a/pkgs/games/dwarf-fortress/dfhack/default.nix +++ b/pkgs/games/dwarf-fortress/dfhack/default.nix @@ -39,6 +39,7 @@ in stdenv.mkDerivation rec { }; patches = [ ./use-system-libraries.patch ]; + postPatch = "sed '1i#include <math.h>' -i plugins/3dveins.cpp"; nativeBuildInputs = [ cmake perl XMLLibXML XMLLibXSLT fakegit ]; # we can't use native Lua; upstream uses private headers diff --git a/pkgs/games/dwarf-fortress/unfuck.nix b/pkgs/games/dwarf-fortress/unfuck.nix index 1d6ea1196dabb..5b2327c2ff54f 100644 --- a/pkgs/games/dwarf-fortress/unfuck.nix +++ b/pkgs/games/dwarf-fortress/unfuck.nix @@ -13,6 +13,8 @@ stdenv.mkDerivation { sha256 = "12bqh3k4wsk1c0bz2zly8h0ilbsdmsbwr9cdjc6i7liwg9906g7i"; }; + postPatch = "sed '1i#include <math.h>' -i g_src/ttf_manager.cpp"; + cmakeFlags = [ "-DGTK2_GLIBCONFIG_INCLUDE_DIR=${glib.out}/lib/glib-2.0/include" "-DGTK2_GDKCONFIG_INCLUDE_DIR=${gtk2.out}/lib/gtk-2.0/include" 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 ] diff --git a/pkgs/games/the-butterfly-effect/default.nix b/pkgs/games/the-butterfly-effect/default.nix index 8775fb103d8d4..cf587ce89dd6d 100644 --- a/pkgs/games/the-butterfly-effect/default.nix +++ b/pkgs/games/the-butterfly-effect/default.nix @@ -9,8 +9,12 @@ stdenv.mkDerivation rec { sha256 = "1cs4q9qiakfd2m1lvfsvfgf8yvhxzmc06glng5d80piwyn6ymzxg"; }; + postPatch = "sed '1i#include <vector>' -i src/model/World.h"; + buildInputs = [ qt4 box2d which cmake ]; + enableParallelBuilding = true; + installPhase = '' make DESTDIR=.. install mkdir -p $out/bin |