2013-02-13 17:45:27 +01:00
|
|
|
{stdenv, fetchurl, qt4, bzip2, lib3ds, levmar, muparser, unzip}:
|
2009-05-13 12:21:29 +02:00
|
|
|
|
2010-01-21 15:39:53 +01:00
|
|
|
stdenv.mkDerivation rec {
|
2012-08-30 08:18:24 +02:00
|
|
|
name = "meshlab-1.3.2";
|
2009-05-13 12:21:29 +02:00
|
|
|
|
|
|
|
src = fetchurl {
|
2012-08-30 08:18:24 +02:00
|
|
|
url = "mirror://sourceforge/meshlab/meshlab/MeshLab%20v1.3.2/MeshLabSrc_AllInc_v132.tgz";
|
|
|
|
sha256 = "d57f0a99a55421aac54a66e2475d48f00f7b1752f9587cd69cf9b5b9c1a519b1";
|
2009-05-13 12:21:29 +02:00
|
|
|
};
|
|
|
|
|
2010-07-07 17:10:05 +02:00
|
|
|
# I don't know why I need this; without this, the rpath set at the beginning of the
|
|
|
|
# buildPhase gets removed from the 'meshlab' binary
|
|
|
|
dontPatchELF = true;
|
2009-05-13 12:21:29 +02:00
|
|
|
|
2014-04-20 11:30:06 +02:00
|
|
|
# Patches are from the Arch Linux package
|
|
|
|
patchPhase = ''
|
|
|
|
patch -Np0 -i "${./qt-4.8.patch}"
|
|
|
|
patch -Np1 -i "${./gcc-4.7.patch}"
|
|
|
|
'';
|
|
|
|
|
2010-07-07 17:10:05 +02:00
|
|
|
buildPhase = ''
|
2012-08-30 08:18:24 +02:00
|
|
|
mkdir -p "$out/include"
|
|
|
|
cp -r vcglib "$out/include"
|
|
|
|
export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I$out/include/vcglib"
|
2010-07-07 17:10:05 +02:00
|
|
|
export NIX_LDFLAGS="-rpath $out/opt/meshlab $NIX_LDFLAGS"
|
2010-01-21 15:39:53 +01:00
|
|
|
cd meshlab/src
|
2009-05-13 12:21:29 +02:00
|
|
|
pushd external
|
2010-07-07 17:10:05 +02:00
|
|
|
qmake -recursive external.pro
|
|
|
|
make
|
2009-05-13 12:21:29 +02:00
|
|
|
popd
|
2012-08-30 08:18:24 +02:00
|
|
|
qmake -recursive meshlab_full.pro
|
2009-05-13 12:21:29 +02:00
|
|
|
make
|
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
2012-01-18 21:16:00 +01:00
|
|
|
mkdir -p $out/opt/meshlab $out/bin $out/lib
|
2010-07-07 17:10:05 +02:00
|
|
|
pushd distrib
|
|
|
|
cp -R * $out/opt/meshlab
|
2009-05-13 12:21:29 +02:00
|
|
|
popd
|
|
|
|
ln -s $out/opt/meshlab/meshlab $out/bin/meshlab
|
|
|
|
'';
|
|
|
|
|
2012-08-30 08:18:24 +02:00
|
|
|
sourceRoot = ".";
|
|
|
|
|
2013-02-13 17:45:27 +01:00
|
|
|
buildInputs = [ qt4 unzip ];
|
2009-05-13 12:21:29 +02:00
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "System for the processing and editing of unstructured 3D triangular meshes";
|
|
|
|
homepage = http://meshlab.sourceforge.net/;
|
|
|
|
license = "GPLv2+";
|
2010-01-21 10:49:10 +01:00
|
|
|
maintainers = with stdenv.lib.maintainers; [viric];
|
|
|
|
platforms = with stdenv.lib.platforms; linux;
|
2009-05-13 12:21:29 +02:00
|
|
|
};
|
|
|
|
}
|