about summary refs log tree commit diff
path: root/pkgs/applications
diff options
context:
space:
mode:
authorSamuel Leathers <sam@appliedtrust.com>2017-08-31 22:59:37 -0400
committerSamuel Leathers <sam@appliedtrust.com>2017-08-31 22:59:37 -0400
commit04b8a85739661c02a76226311ce44edb4c139dc6 (patch)
tree45ddf12a106b45ac95f4c3636cc5e3de23ec15d8 /pkgs/applications
parent86e6e8016d0f9280167745c19d394311be0f9002 (diff)
downloadnixlib-04b8a85739661c02a76226311ce44edb4c139dc6.tar
nixlib-04b8a85739661c02a76226311ce44edb4c139dc6.tar.gz
nixlib-04b8a85739661c02a76226311ce44edb4c139dc6.tar.bz2
nixlib-04b8a85739661c02a76226311ce44edb4c139dc6.tar.lz
nixlib-04b8a85739661c02a76226311ce44edb4c139dc6.tar.xz
nixlib-04b8a85739661c02a76226311ce44edb4c139dc6.tar.zst
nixlib-04b8a85739661c02a76226311ce44edb4c139dc6.zip
caneda: fix build with gcc6
Diffstat (limited to 'pkgs/applications')
-rw-r--r--pkgs/applications/science/electronics/caneda/default.nix4
-rw-r--r--pkgs/applications/science/electronics/caneda/gcc6.patch13
2 files changed, 17 insertions, 0 deletions
diff --git a/pkgs/applications/science/electronics/caneda/default.nix b/pkgs/applications/science/electronics/caneda/default.nix
index 399815f943a8..2d6b12a5bb02 100644
--- a/pkgs/applications/science/electronics/caneda/default.nix
+++ b/pkgs/applications/science/electronics/caneda/default.nix
@@ -23,6 +23,10 @@ stdenv.mkDerivation rec {
 
   buildInputs = [ cmake qt4 libxml2 libxslt ];
 
+  patches = [
+    ./gcc6.patch
+  ];
+
   postInstall = ''
     mkdir $out/share/caneda/components
     cp -R ${srcComponents}/* $out/share/caneda/components
diff --git a/pkgs/applications/science/electronics/caneda/gcc6.patch b/pkgs/applications/science/electronics/caneda/gcc6.patch
new file mode 100644
index 000000000000..04c8f4502b2d
--- /dev/null
+++ b/pkgs/applications/science/electronics/caneda/gcc6.patch
@@ -0,0 +1,13 @@
+diff --git c/src/cgraphicsscene.cpp i/src/cgraphicsscene.cpp
+index ac2929a..c399706 100644
+--- c/src/cgraphicsscene.cpp
++++ i/src/cgraphicsscene.cpp
+@@ -1436,7 +1436,7 @@ namespace Caneda
+             QPointF newPos = m_currentWiringWire->mapFromScene(pos);
+             QPointF refPos = m_currentWiringWire->port1()->pos();
+ 
+-            if( abs(refPos.x()-newPos.x()) > abs(refPos.y()-newPos.y()) ) {
++            if( (refPos.x()-newPos.x()) > (refPos.y()-newPos.y()) ) {
+                 m_currentWiringWire->movePort2(QPointF(newPos.x(), refPos.y()));
+             }
+             else {