diff options
author | Samuel Leathers <sam@appliedtrust.com> | 2017-08-31 22:59:37 -0400 |
---|---|---|
committer | Samuel Leathers <sam@appliedtrust.com> | 2017-08-31 22:59:37 -0400 |
commit | 04b8a85739661c02a76226311ce44edb4c139dc6 (patch) | |
tree | 45ddf12a106b45ac95f4c3636cc5e3de23ec15d8 /pkgs/applications | |
parent | 86e6e8016d0f9280167745c19d394311be0f9002 (diff) | |
download | nixlib-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.nix | 4 | ||||
-rw-r--r-- | pkgs/applications/science/electronics/caneda/gcc6.patch | 13 |
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 { |