summary refs log tree commit diff
path: root/pkgs/applications
diff options
context:
space:
mode:
authorVladimír Čunát <vcunat@gmail.com>2016-06-19 10:18:30 +0200
committerVladimír Čunát <vcunat@gmail.com>2016-06-19 10:18:30 +0200
commit97c484a10f4b38efc4fb3dd210defed96003ae7d (patch)
tree3cf505288a69445d7a0da288197352484942421c /pkgs/applications
parentd133a168f082d2f4c94984190e836e55f5e389a7 (diff)
downloadnixlib-97c484a10f4b38efc4fb3dd210defed96003ae7d.tar
nixlib-97c484a10f4b38efc4fb3dd210defed96003ae7d.tar.gz
nixlib-97c484a10f4b38efc4fb3dd210defed96003ae7d.tar.bz2
nixlib-97c484a10f4b38efc4fb3dd210defed96003ae7d.tar.lz
nixlib-97c484a10f4b38efc4fb3dd210defed96003ae7d.tar.xz
nixlib-97c484a10f4b38efc4fb3dd210defed96003ae7d.tar.zst
nixlib-97c484a10f4b38efc4fb3dd210defed96003ae7d.zip
treewide: fix #include errors after gcc-5.4
They were mostly missing <cmath> or <math.h>.
Diffstat (limited to 'pkgs/applications')
-rw-r--r--pkgs/applications/graphics/leocad/default.nix1
-rw-r--r--pkgs/applications/graphics/photivo/default.nix12
-rw-r--r--pkgs/applications/misc/cli-visualizer/default.nix4
-rw-r--r--pkgs/applications/misc/termite/default.nix2
-rw-r--r--pkgs/applications/science/robotics/qgroundcontrol/default.nix5
-rw-r--r--pkgs/applications/video/simplescreenrecorder/default.nix4
6 files changed, 24 insertions, 4 deletions
diff --git a/pkgs/applications/graphics/leocad/default.nix b/pkgs/applications/graphics/leocad/default.nix
index 884dc1158534..96384765bd03 100644
--- a/pkgs/applications/graphics/leocad/default.nix
+++ b/pkgs/applications/graphics/leocad/default.nix
@@ -17,6 +17,7 @@ stdenv.mkDerivation rec {
   buildInputs = [ qt4 qmake4Hook zlib ];
 
   postPatch = ''
+    sed '1i#include <cmath>' -i common/camera.cpp
     substituteInPlace common/camera.cpp --replace "isnan(" "std::isnan("
     export qmakeFlags="$qmakeFlags INSTALL_PREFIX=$out"
   '';
diff --git a/pkgs/applications/graphics/photivo/default.nix b/pkgs/applications/graphics/photivo/default.nix
index 12816ba96af4..d84363df899e 100644
--- a/pkgs/applications/graphics/photivo/default.nix
+++ b/pkgs/applications/graphics/photivo/default.nix
@@ -10,15 +10,19 @@ stdenv.mkDerivation rec {
     sha256 = "0f6y18k7db2ci6xn664zcwm1g1k04sdv7gg1yd5jk41bndjb7z8h";
   };
 
-  nativeBuildInputs = [ cmake pkgconfig ];
-
-  buildInputs = [ qt4 fftw graphicsmagick_q16 lcms2 lensfun libjpeg exiv2 liblqr1 ];
-  patchPhase = '' # kinda icky
+  postPatch = '' # kinda icky
     sed -e '/("@INSTALL@")/d' \
         -e s,@INSTALL@,$out/share/photivo, \
         -i Sources/ptSettings.cpp
+    sed '1i#include <math.h>' -i Sources/filters/ptFilter_StdCurve.cpp
   '';
 
+  nativeBuildInputs = [ cmake pkgconfig ];
+
+  buildInputs = [ qt4 fftw graphicsmagick_q16 lcms2 lensfun libjpeg exiv2 liblqr1 ];
+
+  enableParallelBuilding = true;
+
   meta = with stdenv.lib; {
       platforms = platforms.linux;
       maintainers = [ maintainers.mornfall ];
diff --git a/pkgs/applications/misc/cli-visualizer/default.nix b/pkgs/applications/misc/cli-visualizer/default.nix
index 6b9856a996ac..1c7fd62f8ecc 100644
--- a/pkgs/applications/misc/cli-visualizer/default.nix
+++ b/pkgs/applications/misc/cli-visualizer/default.nix
@@ -10,6 +10,10 @@ stdenv.mkDerivation rec {
     sha256 = "16768gyi85mkizfn874q2q9xf32knw08z27si3k5bk99492dxwzw";
   };
 
+  postPatch = ''
+    sed '1i#include <cmath>' -i src/Transformer/SpectrumCircleTransformer.cpp
+  '';
+
   buildInputs = [ fftw ncurses libpulseaudio ];
 
   buildFlags = [ "ENABLE_PULSE=1" ];
diff --git a/pkgs/applications/misc/termite/default.nix b/pkgs/applications/misc/termite/default.nix
index 33bc29f871c7..33c42e3dc1dd 100644
--- a/pkgs/applications/misc/termite/default.nix
+++ b/pkgs/applications/misc/termite/default.nix
@@ -13,6 +13,8 @@ let
       sha256 = "1cw4yw7n9m2si8b7zcfyz9pyihncabxm5g39v1mxslfajxgwzmd8";
     };
 
+    postPatch = "sed '1i#include <math.h>' -i termite.cc";
+
     makeFlags = [ "VERSION=v${version}" "PREFIX=" "DESTDIR=$(out)" ];
 
     buildInputs = [ pkgconfig vte gtk3 ncurses ];
diff --git a/pkgs/applications/science/robotics/qgroundcontrol/default.nix b/pkgs/applications/science/robotics/qgroundcontrol/default.nix
index b67da5b55162..37e9c9c858f1 100644
--- a/pkgs/applications/science/robotics/qgroundcontrol/default.nix
+++ b/pkgs/applications/science/robotics/qgroundcontrol/default.nix
@@ -27,6 +27,11 @@ stdenv.mkDerivation rec {
  ] ++ qtInputs;
 
   patches = [ ./0001-fix-gcc-cmath-namespace-issues.patch ];
+  postPatch = ''
+    sed '1i#include <cmath>' -i src/Vehicle/Vehicle.cc \
+      -i src/comm/{QGCFlightGearLink,QGCJSBSimLink}.cc \
+      -i src/{uas/UAS,ui/QGCDataPlot2D}.cc
+  '';
 
   preConfigure = ''
     mkdir build
diff --git a/pkgs/applications/video/simplescreenrecorder/default.nix b/pkgs/applications/video/simplescreenrecorder/default.nix
index a5fb122cf897..3ea04a39393b 100644
--- a/pkgs/applications/video/simplescreenrecorder/default.nix
+++ b/pkgs/applications/video/simplescreenrecorder/default.nix
@@ -11,11 +11,15 @@ stdenv.mkDerivation rec {
     sha256 = "1d89ncspjd8c4mckf0nb6y3hrxpv4rjpbj868pznhvfmdgr5nvql";
   };
 
+  postPatch = "sed '1i#include <random>' -i src/Benchmark.cpp";
+
   buildInputs = [
     alsaLib ffmpeg libjack2 libX11 libXext libXfixes mesa pkgconfig
     libpulseaudio qt4
   ];
 
+  enableParallelBuilding = true;
+
   meta = with stdenv.lib; {
     description = "A screen recorder for Linux";
     homepage = http://www.maartenbaert.be/simplescreenrecorder;