From 665dc49d4364d3f1156da30bef39b2abc97071b2 Mon Sep 17 00:00:00 2001 From: LluĂ­s Batlle i Rossell Date: Wed, 2 Nov 2011 15:00:04 +0000 Subject: 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 --- pkgs/applications/misc/qcad/default.nix | 15 +++++++- .../misc/qcad/qcad-2.0.4.0-gcc43.patch | 45 ++++++++++++++++++++++ 2 files changed, 58 insertions(+), 2 deletions(-) create mode 100644 pkgs/applications/misc/qcad/qcad-2.0.4.0-gcc43.patch (limited to 'pkgs/applications/misc/qcad') diff --git a/pkgs/applications/misc/qcad/default.nix b/pkgs/applications/misc/qcad/default.nix index 798f9eeec20..233ee0e6551 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 00000000000..bc68e81c715 --- /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 ++#include + + #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 ++#include + + #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 + + 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 + + /** + * Class for getting information about entities. This includes -- cgit 1.4.1