2009-03-28 02:25:03 +00:00
|
|
|
# translations still misssing
|
2010-07-28 16:35:01 +01:00
|
|
|
|
|
|
|
{ stdenv, fetchurl, qt3, libpng, libXext, libX11 }:
|
|
|
|
|
2009-03-28 02:25:03 +00:00
|
|
|
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 ..
|
|
|
|
'';
|
|
|
|
|
2010-07-28 16:35:01 +01:00
|
|
|
buildInputs = [ qt3 libpng libXext libX11 ];
|
2009-03-28 02:25:03 +00:00
|
|
|
|
2011-11-02 15:00:04 +00:00
|
|
|
prePatch = ''
|
2009-03-28 02:25:03 +00:00
|
|
|
sed -i 's/-pedantic//' mkspecs/defs.pro
|
2011-11-02 15:00:04 +00:00
|
|
|
# patch -p1 < ${ ./qcad-2.0.4.0-1.src-intptr.patch }
|
2009-03-28 02:25:03 +00:00
|
|
|
'';
|
2011-11-02 15:00:04 +00:00
|
|
|
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
|
|
|
|
];
|
2009-03-28 02:25:03 +00:00
|
|
|
|
|
|
|
# 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
|
2011-11-02 15:00:04 +00:00
|
|
|
|
|
|
|
# The compilation does not fail with error code. But qcad will not exist
|
|
|
|
# if it failed.
|
|
|
|
test -f $out/share/qcad/qcad
|
|
|
|
|
2009-03-28 02:25:03 +00:00
|
|
|
cat >> $out/bin/qcad << EOF
|
|
|
|
#!/bin/sh
|
|
|
|
cd $out/share/qcad
|
|
|
|
./qcad "\$@"
|
|
|
|
EOF
|
|
|
|
chmod +x $out/bin/qcad
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
2010-07-28 16:35:01 +01:00
|
|
|
description = "A 2D CAD package based upon Qt";
|
|
|
|
homepage = http://www.ribbonsoft.de/qcad.html;
|
|
|
|
license = "GPLv2"; # community edition
|
2009-03-28 02:25:03 +00:00
|
|
|
};
|
|
|
|
}
|