forked from mirrors/nixpkgs
Updating meshlab.
Their build system has changed, and the source tree they distribute too, so the dependencies changed a bit. To get meshlab working, I update lib3ds and add levmar. svn path=/nixpkgs/trunk/; revision=19595
This commit is contained in:
parent
e70276079f
commit
a3e4c7640f
|
@ -1,6 +1,6 @@
|
|||
{stdenv, fetchurl, qt, bzip2}:
|
||||
{stdenv, fetchurl, qt, bzip2, lib3ds, levmar, muparser, unzip}:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
stdenv.mkDerivation rec {
|
||||
name = "meshlab-1.2.2";
|
||||
|
||||
src = fetchurl {
|
||||
|
@ -8,14 +8,29 @@ stdenv.mkDerivation {
|
|||
sha256 = "166a8mx72wf3r84pnpr0ssqkd2xw6y5brviywlj8rjk6w9cy8fdc";
|
||||
};
|
||||
|
||||
srcGlew151 = fetchurl {
|
||||
url = http://dfn.dl.sourceforge.net/sourceforge/glew/glew-1.5.1-src.tgz;
|
||||
sha256 = "02n1p6s6sia92fgng9iq0kqq890rga8d8g0y34mc6qxmbh43vrl9";
|
||||
};
|
||||
|
||||
setSourceRoot = "sourceRoot=`pwd`/meshlab/src";
|
||||
srcQHull20031 = fetchurl {
|
||||
url = http://www.qhull.org/download/qhull-2003.1.zip;
|
||||
sha256 = "07mh371i6xs691qz6wwzkqk9h0d2dkih2q818is2b041w1l79b46";
|
||||
};
|
||||
|
||||
|
||||
patchPhase = ''
|
||||
cd meshlab/src
|
||||
mkdir external
|
||||
pushd external
|
||||
tar xf ${srcGlew151}
|
||||
mv glew glew-1.5.1
|
||||
unzip ${srcQHull20031}
|
||||
popd
|
||||
'';
|
||||
|
||||
buildPhase = ''
|
||||
pushd external
|
||||
qmake -recursive external.pro
|
||||
make
|
||||
popd
|
||||
pwd
|
||||
qmake -recursive meshlabv12.pro
|
||||
make
|
||||
'';
|
||||
|
@ -28,7 +43,7 @@ stdenv.mkDerivation {
|
|||
ln -s $out/opt/meshlab/meshlab $out/bin/meshlab
|
||||
'';
|
||||
|
||||
buildInputs = [ qt bzip2 ];
|
||||
buildInputs = [ qt bzip2 lib3ds levmar muparser unzip ];
|
||||
|
||||
meta = {
|
||||
description = "System for the processing and editing of unstructured 3D triangular meshes";
|
||||
|
|
28
pkgs/development/libraries/levmar/default.nix
Normal file
28
pkgs/development/libraries/levmar/default.nix
Normal file
|
@ -0,0 +1,28 @@
|
|||
{ stdenv, fetchurl }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "levmar-2.5";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://www.ics.forth.gr/~lourakis/levmar/${name}.tgz";
|
||||
sha256 = "0xcx9fvymr0j5kmfy5cqaa2lxf1c64vv25z2a28w43pkxz1nl3xp";
|
||||
};
|
||||
|
||||
patchPhase = ''
|
||||
sed -i 's/define HAVE_LAPACK/undef HAVE_LAPACK/' levmar.h
|
||||
sed -i 's/LAPACKLIBS=.*/LAPACKLIBS=/' Makefile
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
ensureDir $out/include $out/lib
|
||||
cp lm.h $out/include
|
||||
cp liblevmar.a $out/lib
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "ANSI C implementations of Levenberg-Marquardt, usable also from C++";
|
||||
homepage = http://www.ics.forth.gr/~lourakis/levmar/;
|
||||
license = "GPLv2+";
|
||||
};
|
||||
}
|
||||
|
37
pkgs/development/libraries/levmar/use-atlas.patch
Normal file
37
pkgs/development/libraries/levmar/use-atlas.patch
Normal file
|
@ -0,0 +1,37 @@
|
|||
diff --git a/Makefile b/Makefile
|
||||
index af70b4c..53c6fab 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -15,11 +15,11 @@ DEMOBJS=lmdemo.o
|
||||
DEMOSRCS=lmdemo.c
|
||||
AR=ar
|
||||
RANLIB=ranlib
|
||||
-LAPACKLIBS=-llapack -lblas -lf2c # comment this line if you are not using LAPACK.
|
||||
+#LAPACKLIBS=-llapack -lblas -lf2c # comment this line if you are not using LAPACK.
|
||||
# On systems with a FORTRAN (not f2c'ed) version of LAPACK, -lf2c is
|
||||
# not necessary; on others, -lf2c is equivalent to -lF77 -lI77
|
||||
|
||||
-#LAPACKLIBS=-L/usr/local/atlas/lib -llapack -lcblas -lf77blas -latlas -lf2c # This works with the ATLAS updated lapack and Linux_P4SSE2
|
||||
+LAPACKLIBS=-llapack -lcblas -lf77blas -latlas -lgfortran # This works with the ATLAS updated lapack and Linux_P4SSE2
|
||||
# from http://www.netlib.org/atlas/archives/linux/
|
||||
|
||||
#LAPACKLIBS=-llapack -lgoto2 -lpthread -lf2c # This works with GotoBLAS
|
||||
diff --git a/misc.h b/misc.h
|
||||
index e32f18d..827507e 100644
|
||||
--- a/misc.h
|
||||
+++ b/misc.h
|
||||
@@ -30,11 +30,11 @@
|
||||
/* f2c'd BLAS */
|
||||
//#define LM_BLAS_PREFIX f2c_
|
||||
/* C BLAS */
|
||||
-//#define LM_BLAS_PREFIX cblas_
|
||||
+#define LM_BLAS_PREFIX cblas_
|
||||
|
||||
/* common suffix for BLAS subroutines */
|
||||
-//#define LM_BLAS_SUFFIX // define empty if a f2c_ or cblas_ prefix was defined for LM_BLAS_PREFIX above
|
||||
-#define LM_BLAS_SUFFIX _ // use this in case of no BLAS prefix
|
||||
+#define LM_BLAS_SUFFIX // define empty if a f2c_ or cblas_ prefix was defined for LM_BLAS_PREFIX above
|
||||
+//#define LM_BLAS_SUFFIX _ // use this in case of no BLAS prefix
|
||||
|
||||
|
||||
#define LCAT_(a, b) #a b
|
|
@ -4,7 +4,7 @@ stdenv.mkDerivation rec {
|
|||
name = "lib3ds-1.3.0";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://sourceforge/lib3ds/${name}.zip";
|
||||
url = "http://lib3ds.googlecode.com/files/${name}.zip";
|
||||
sha256 = "1qr9arfdkjf7q11xhvxwzmhxqz3nhcjkyb8zzfjpz9jm54q0rc7m";
|
||||
};
|
||||
|
||||
|
|
|
@ -3820,6 +3820,10 @@ let
|
|||
inherit (xlibs) libXp libXau;
|
||||
};
|
||||
|
||||
levmar = import ../development/libraries/levmar {
|
||||
inherit fetchurl stdenv;
|
||||
};
|
||||
|
||||
lib3ds = import ../development/libraries/lib3ds {
|
||||
inherit fetchurl stdenv unzip;
|
||||
};
|
||||
|
@ -7304,7 +7308,7 @@ let
|
|||
};
|
||||
|
||||
meshlab = import ../applications/graphics/meshlab {
|
||||
inherit fetchurl stdenv bzip2;
|
||||
inherit fetchurl stdenv bzip2 lib3ds levmar muparser unzip;
|
||||
qt = qt4;
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue