diff options
author | Lluís Batlle i Rossell <viric@vicerveza.homeunix.net> | 2010-01-21 14:39:53 +0000 |
---|---|---|
committer | Lluís Batlle i Rossell <viric@vicerveza.homeunix.net> | 2010-01-21 14:39:53 +0000 |
commit | a3e4c7640f18ac4bc07feafc09a0c687c34b1554 (patch) | |
tree | e2baf7b650138cf7b9601584794e1cdb8e79c4eb /pkgs/development/libraries/levmar | |
parent | e70276079f7a0de76c67843acf252e354525dedd (diff) |
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
Diffstat (limited to 'pkgs/development/libraries/levmar')
-rw-r--r-- | pkgs/development/libraries/levmar/default.nix | 28 | ||||
-rw-r--r-- | pkgs/development/libraries/levmar/use-atlas.patch | 37 |
2 files changed, 65 insertions, 0 deletions
diff --git a/pkgs/development/libraries/levmar/default.nix b/pkgs/development/libraries/levmar/default.nix new file mode 100644 index 0000000000000..a17cdf0b4d586 --- /dev/null +++ b/pkgs/development/libraries/levmar/default.nix @@ -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+"; + }; +} + diff --git a/pkgs/development/libraries/levmar/use-atlas.patch b/pkgs/development/libraries/levmar/use-atlas.patch new file mode 100644 index 0000000000000..2be9999b40ffa --- /dev/null +++ b/pkgs/development/libraries/levmar/use-atlas.patch @@ -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 |