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
This commit is contained in:
parent
bf457edff0
commit
665dc49d43
@ -19,15 +19,26 @@ stdenv.mkDerivation {
|
|||||||
|
|
||||||
buildInputs = [ qt3 libpng libXext libX11 ];
|
buildInputs = [ qt3 libpng libXext libX11 ];
|
||||||
|
|
||||||
patchPhase = ''
|
prePatch = ''
|
||||||
sed -i 's/-pedantic//' mkspecs/defs.pro
|
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)
|
# probably there is more to be done. But this seems to work for now (eg see gentoo ebuild)
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
ensureDir $out/{bin,share}
|
ensureDir $out/{bin,share}
|
||||||
cp -r qcad $out/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
|
cat >> $out/bin/qcad << EOF
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
cd $out/share/qcad
|
cd $out/share/qcad
|
||||||
|
45
pkgs/applications/misc/qcad/qcad-2.0.4.0-gcc43.patch
Normal file
45
pkgs/applications/misc/qcad/qcad-2.0.4.0-gcc43.patch
Normal file
@ -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
|
Loading…
x
Reference in New Issue
Block a user