diff options
author | Lluís Batlle i Rossell <viric@vicerveza.homeunix.net> | 2011-11-02 15:00:04 +0000 |
---|---|---|
committer | Lluís Batlle i Rossell <viric@vicerveza.homeunix.net> | 2011-11-02 15:00:04 +0000 |
commit | 665dc49d4364d3f1156da30bef39b2abc97071b2 (patch) | |
tree | c37d1b60babb190d08a3da27834cd8973db59343 /pkgs/applications/misc/qcad | |
parent | bf457edff017cc2cf42c2bc15ee464aaea7c7e11 (diff) |
I make qcad compile further... and more importantly, I make it fail the build
if the compilation fails. It was not so. But it still needs some patching to build. svn path=/nixpkgs/trunk/; revision=30189
Diffstat (limited to 'pkgs/applications/misc/qcad')
-rw-r--r-- | pkgs/applications/misc/qcad/default.nix | 15 | ||||
-rw-r--r-- | pkgs/applications/misc/qcad/qcad-2.0.4.0-gcc43.patch | 45 |
2 files changed, 58 insertions, 2 deletions
diff --git a/pkgs/applications/misc/qcad/default.nix b/pkgs/applications/misc/qcad/default.nix index 798f9eeec2055..233ee0e655107 100644 --- a/pkgs/applications/misc/qcad/default.nix +++ b/pkgs/applications/misc/qcad/default.nix @@ -19,15 +19,26 @@ stdenv.mkDerivation { buildInputs = [ qt3 libpng libXext libX11 ]; - patchPhase = '' + prePatch = '' sed -i 's/-pedantic//' mkspecs/defs.pro - patch -p1 < ${ ./qcad-2.0.4.0-1.src-intptr.patch /* taken from gentoo, fixes amd64 compilation issue */} + # patch -p1 < ${ ./qcad-2.0.4.0-1.src-intptr.patch } ''; + patches = [ + /* taken from gentoo, fixes amd64 compilation issue */ + ./qcad-2.0.4.0-1.src-intptr.patch + /* taken from gentoo, fixes gcc 4.3 or above compilation issue */ + ./qcad-2.0.4.0-gcc43.patch + ]; # probably there is more to be done. But this seems to work for now (eg see gentoo ebuild) installPhase = '' ensureDir $out/{bin,share} cp -r qcad $out/share + + # The compilation does not fail with error code. But qcad will not exist + # if it failed. + test -f $out/share/qcad/qcad + cat >> $out/bin/qcad << EOF #!/bin/sh cd $out/share/qcad diff --git a/pkgs/applications/misc/qcad/qcad-2.0.4.0-gcc43.patch b/pkgs/applications/misc/qcad/qcad-2.0.4.0-gcc43.patch new file mode 100644 index 0000000000000..bc68e81c715b3 --- /dev/null +++ b/pkgs/applications/misc/qcad/qcad-2.0.4.0-gcc43.patch @@ -0,0 +1,45 @@ +diff -Naur qcad-2.0.4.0-1.src/dxflib/src/dl_writer_ascii.cpp qcad-2.0.4.0-1.src.new/dxflib/src/dl_writer_ascii.cpp +--- qcad-2.0.4.0-1.src/dxflib/src/dl_writer_ascii.cpp 2004-09-14 16:13:01.000000000 -0400 ++++ qcad-2.0.4.0-1.src.new/dxflib/src/dl_writer_ascii.cpp 2008-04-27 08:35:47.000000000 -0400 +@@ -30,6 +30,7 @@ + #endif // _MSC_VER > 1000 + + #include <stdio.h> ++#include <cstring> + + #include "dl_writer_ascii.h" + #include "dl_exception.h" +diff -Naur qcad-2.0.4.0-1.src/dxflib/src/dl_writer.h qcad-2.0.4.0-1.src.new/dxflib/src/dl_writer.h +--- qcad-2.0.4.0-1.src/dxflib/src/dl_writer.h 2004-09-14 16:13:01.000000000 -0400 ++++ qcad-2.0.4.0-1.src.new/dxflib/src/dl_writer.h 2008-04-27 08:35:48.000000000 -0400 +@@ -34,6 +34,7 @@ + + + #include <iostream> ++#include <cstring> + + #include "dl_attributes.h" + +diff -Naur qcad-2.0.4.0-1.src/qcadactions/src/rs_actionzoompan.cpp qcad-2.0.4.0-1.src.new/qcadactions/src/rs_actionzoompan.cpp +--- qcad-2.0.4.0-1.src/qcadactions/src/rs_actionzoompan.cpp 2004-09-14 16:13:03.000000000 -0400 ++++ qcad-2.0.4.0-1.src.new/qcadactions/src/rs_actionzoompan.cpp 2008-04-27 08:35:48.000000000 -0400 +@@ -28,6 +28,7 @@ + #include "rs_snapper.h" + #include "rs_point.h" + ++#include <cstdlib> + + RS_ActionZoomPan::RS_ActionZoomPan(RS_EntityContainer& container, + RS_GraphicView& graphicView) +diff -Naur qcad-2.0.4.0-1.src/qcadlib/src/information/rs_information.h qcad-2.0.4.0-1.src.new/qcadlib/src/information/rs_information.h +--- qcad-2.0.4.0-1.src/qcadlib/src/information/rs_information.h 2004-09-14 16:13:02.000000000 -0400 ++++ qcad-2.0.4.0-1.src.new/qcadlib/src/information/rs_information.h 2008-04-27 08:35:48.000000000 -0400 +@@ -31,7 +31,7 @@ + #include "rs_line.h" + #include "rs_arc.h" + +- ++#include <cstdlib> + + /** + * Class for getting information about entities. This includes |