From 5c0764de01cd3b463121d2486ca6b4eb34b0fe37 Mon Sep 17 00:00:00 2001 From: Marc Weber Date: Sat, 28 Mar 2009 02:25:03 +0000 Subject: [PATCH] adding qcad-2.0.5.0 svn path=/nixpkgs/trunk/; revision=14744 --- pkgs/applications/misc/qcad/default.nix | 42 +++++++++++++++++++ .../misc/qcad/qcad-2.0.4.0-1.src-intptr.patch | 24 +++++++++++ pkgs/top-level/all-packages.nix | 5 +++ 3 files changed, 71 insertions(+) create mode 100644 pkgs/applications/misc/qcad/default.nix create mode 100644 pkgs/applications/misc/qcad/qcad-2.0.4.0-1.src-intptr.patch diff --git a/pkgs/applications/misc/qcad/default.nix b/pkgs/applications/misc/qcad/default.nix new file mode 100644 index 000000000000..00d4fe99ba3b --- /dev/null +++ b/pkgs/applications/misc/qcad/default.nix @@ -0,0 +1,42 @@ +# translations still misssing +args: with args; +stdenv.mkDerivation { + name = "qcad-2.0.5.0-1-community"; + + src = fetchurl { + url = http://www.ribbonsoft.com/archives/qcad/qcad-2.0.5.0-1-community.src.tar.gz; + sha256 = "07aiw7zjf1fc04dhgwwp29adwb2qs165n7v04lh09zy0k2aplcl3"; + }; + + # TODO: add translations + buildPhase = '' + cd scripts + sh build_qcad.sh notrans + cd .. + ''; + + buildInputs = [qt3 libpng libXext libX11]; + + patchPhase = '' + 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 */} + ''; + + # 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 + cat >> $out/bin/qcad << EOF + #!/bin/sh + cd $out/share/qcad + ./qcad "\$@" + EOF + chmod +x $out/bin/qcad + ''; + + meta = { + description="A 2D CAD package based upon Qt."; + homepage = http://www.ribbonsoft.de/qcad.html; + license = "GPLv2"; # community edition + }; +} diff --git a/pkgs/applications/misc/qcad/qcad-2.0.4.0-1.src-intptr.patch b/pkgs/applications/misc/qcad/qcad-2.0.4.0-1.src-intptr.patch new file mode 100644 index 000000000000..6d8b6acca5b5 --- /dev/null +++ b/pkgs/applications/misc/qcad/qcad-2.0.4.0-1.src-intptr.patch @@ -0,0 +1,24 @@ +diff -Naur qcad-2.0.4.0-1.src.orig/qcadlib/src/engine/rs_entity.cpp qcad-2.0.4.0-1.src.patched/qcadlib/src/engine/rs_entity.cpp +--- qcad-2.0.4.0-1.src.orig/qcadlib/src/engine/rs_entity.cpp 2004-09-14 15:13:02.000000000 -0500 ++++ qcad-2.0.4.0-1.src.patched/qcadlib/src/engine/rs_entity.cpp 2006-06-23 14:21:40.000000000 -0500 +@@ -849,7 +849,7 @@ + os << " layer: NULL "; + } else { + os << " layer: " << e.layer->getName().latin1() << " "; +- os << " layer address: " << (int)(e.layer) << " "; ++ os << " layer address: " << (intptr_t)(e.layer) << " "; + } + + os << e.pen << "\n"; +diff -Naur qcad-2.0.4.0-1.src.orig/qcadlib/src/engine/rs_layer.cpp qcad-2.0.4.0-1.src.patched/qcadlib/src/engine/rs_layer.cpp +--- qcad-2.0.4.0-1.src.orig/qcadlib/src/engine/rs_layer.cpp 2004-09-14 15:13:02.000000000 -0500 ++++ qcad-2.0.4.0-1.src.patched/qcadlib/src/engine/rs_layer.cpp 2006-06-23 14:21:23.000000000 -0500 +@@ -57,7 +57,7 @@ + os << " name: " << l.getName().latin1() + << " pen: " << l.getPen() + << " frozen: " << (int)l.isFrozen() +- << " address: " << (int)(&l) ++ << " address: " << (intptr_t)(&l) + << std::endl; + return os; + } diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 1d91e48eb1fd..87c45599bb67 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -8183,6 +8183,11 @@ let }); git = gitAndTools.git; + qcad = import ../applications/misc/qcad { + inherit fetchurl stdenv qt3 libpng; + inherit (xlibs) libXext libX11; + }; + qjackctl = import ../applications/audio/qjackctl { inherit fetchurl stdenv alsaLib jackaudio; qt4 = qt4;