diff --git a/pkgs/development/libraries/qrupdate/default.nix b/pkgs/development/libraries/qrupdate/default.nix new file mode 100644 index 000000000000..ee3416172308 --- /dev/null +++ b/pkgs/development/libraries/qrupdate/default.nix @@ -0,0 +1,19 @@ +{ stdenv +, fetchurl +, gfortran +, blas +, liblapack +}: +stdenv.mkDerivation { + name = "qrupdate-1.1.1"; + src = fetchurl { + url = mirror://sourceforge/qrupdate/1.1/qrupdate-1.1.1.tar.gz ; + sha256 = "0ak68qd15zccr2d2qahxcxsrcdgxy7drg362jj9swv7rb39h00cz"; + }; + + preConfigure = '' + export PREFIX=$out + ''; + + buildInputs = [gfortran blas liblapack] ; +} diff --git a/pkgs/development/libraries/suitesparse/default.nix b/pkgs/development/libraries/suitesparse/default.nix new file mode 100644 index 000000000000..202f29ae3e41 --- /dev/null +++ b/pkgs/development/libraries/suitesparse/default.nix @@ -0,0 +1,21 @@ +{ stdenv +, fetchurl +, blas +, liblapack +}: +stdenv.mkDerivation { + name = "suitespare"; + src = fetchurl { + url = http://www.cise.ufl.edu/research/sparse/SuiteSparse/SuiteSparse-3.5.0.tar.gz ; + sha256 = "0npn7c1j5qag5m2r0cmh3bwc42c1jk8k2yg2cfyxlcrp0h7wn4rc"; + }; + buildInputs = [blas liblapack] ; + patches = [./disable-metis.patch]; + + preConfigure = '' + export PREFIX=$out + ensureDir $out/lib + ensureDir $out/include + ''; + +} diff --git a/pkgs/development/libraries/suitesparse/disable-metis.patch b/pkgs/development/libraries/suitesparse/disable-metis.patch new file mode 100644 index 000000000000..32bb1d677fc0 --- /dev/null +++ b/pkgs/development/libraries/suitesparse/disable-metis.patch @@ -0,0 +1,123 @@ +diff -Nrc SuiteSparse/UFconfig/Makefile SuiteSparse-new/UFconfig/Makefile +*** SuiteSparse/UFconfig/Makefile 2009-11-11 20:59:08.000000000 +0100 +--- SuiteSparse-new/UFconfig/Makefile 2010-08-02 13:14:04.000000000 +0200 +*************** +*** 25,31 **** + + # install UFconfig + install: +! $(CP) Lib/libufconfig.a $(INSTALL_LIB)/libufconfig.$(VERSION).a + ( cd $(INSTALL_LIB) ; ln -s libufconfig.$(VERSION).a libufconfig.a ) + $(CP) UFconfig.h $(INSTALL_INCLUDE) + +--- 25,31 ---- + + # install UFconfig + install: +! $(CP) libufconfig.a $(INSTALL_LIB)/libufconfig.$(VERSION).a + ( cd $(INSTALL_LIB) ; ln -s libufconfig.$(VERSION).a libufconfig.a ) + $(CP) UFconfig.h $(INSTALL_INCLUDE) + +diff -Nrc SuiteSparse/UFconfig/UFconfig.mk SuiteSparse-new/UFconfig/UFconfig.mk +*** SuiteSparse/UFconfig/UFconfig.mk 2010-06-02 17:40:42.000000000 +0200 +--- SuiteSparse-new/UFconfig/UFconfig.mk 2010-08-02 13:14:30.000000000 +0200 +*************** +*** 71,78 **** + # MAKE = gmake + + # For "make install" +! INSTALL_LIB = /usr/local/lib +! INSTALL_INCLUDE = /usr/local/include + + #------------------------------------------------------------------------------ + # BLAS and LAPACK configuration: +--- 71,78 ---- + # MAKE = gmake + + # For "make install" +! INSTALL_LIB = $(out)/lib +! INSTALL_INCLUDE = $(out)/include + + #------------------------------------------------------------------------------ + # BLAS and LAPACK configuration: +*************** +*** 127,134 **** + # The path is relative to where it is used, in CHOLMOD/Lib, CHOLMOD/MATLAB, etc. + # You may wish to use an absolute path. METIS is optional. Compile + # CHOLMOD with -DNPARTITION if you do not wish to use METIS. +! METIS_PATH = ../../metis-4.0 +! METIS = ../../metis-4.0/libmetis.a + + # If you use CHOLMOD_CONFIG = -DNPARTITION then you must use the following + # options: +--- 127,134 ---- + # The path is relative to where it is used, in CHOLMOD/Lib, CHOLMOD/MATLAB, etc. + # You may wish to use an absolute path. METIS is optional. Compile + # CHOLMOD with -DNPARTITION if you do not wish to use METIS. +! #METIS_PATH = ../../metis-4.0 +! #METIS = + + # If you use CHOLMOD_CONFIG = -DNPARTITION then you must use the following + # options: +*************** +*** 189,195 **** + # -DNSUNPERF for Solaris only. If defined, do not use the Sun + # Performance Library + +! CHOLMOD_CONFIG = + + #------------------------------------------------------------------------------ + # SuiteSparseQR configuration: +--- 189,195 ---- + # -DNSUNPERF for Solaris only. If defined, do not use the Sun + # Performance Library + +! CHOLMOD_CONFIG = -DNPARTITION + + #------------------------------------------------------------------------------ + # SuiteSparseQR configuration: +*************** +*** 203,209 **** + # -DHAVE_TBB enable the use of Intel's Threading Building Blocks (TBB) + + # default, without timing, without TBB: +! SPQR_CONFIG = + # with timing and TBB: + # SPQR_CONFIG = -DTIMING -DHAVE_TBB + # with timing +--- 203,209 ---- + # -DHAVE_TBB enable the use of Intel's Threading Building Blocks (TBB) + + # default, without timing, without TBB: +! SPQR_CONFIG = -DNPARTITION + # with timing and TBB: + # SPQR_CONFIG = -DTIMING -DHAVE_TBB + # with timing +diff -Nrc SuiteSparse/UMFPACK/Demo/Makefile SuiteSparse-new/UMFPACK/Demo/Makefile +*** SuiteSparse/UMFPACK/Demo/Makefile 2009-11-11 21:09:45.000000000 +0100 +--- SuiteSparse-new/UMFPACK/Demo/Makefile 2010-08-02 12:53:16.000000000 +0200 +*************** +*** 40,51 **** + ../../CAMD/Lib/libcamd.a: + ( cd ../../CAMD ; $(MAKE) library ) + +- ../../metis-4.0/libmetis.a: +- ( cd ../../metis-4.0/Lib ; $(MAKE) ) + + UMFPACK = ../Lib/libumfpack.a ../../AMD/Lib/libamd.a \ + ../../CHOLMOD/Lib/libcholmod.a ../../COLAMD/Lib/libcolamd.a \ +! ../../CAMD/Lib/libcamd.a ../../metis-4.0/libmetis.a \ + ../../CCOLAMD/Lib/libccolamd.a + + libs: $(UMFPACK) +--- 40,49 ---- + ../../CAMD/Lib/libcamd.a: + ( cd ../../CAMD ; $(MAKE) library ) + + + UMFPACK = ../Lib/libumfpack.a ../../AMD/Lib/libamd.a \ + ../../CHOLMOD/Lib/libcholmod.a ../../COLAMD/Lib/libcolamd.a \ +! ../../CAMD/Lib/libcamd.a \ + ../../CCOLAMD/Lib/libccolamd.a + + libs: $(UMFPACK) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index bffa8f5d8d85..2786d7a65f2c 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -5353,6 +5353,10 @@ let inherit fetchurl stdenv pkgconfig librdf_raptor ladspaH openssl zlib; }; + qrupdate = import ../development/libraries/qrupdate { + inherit stdenv fetchurl gfortran blas liblapack; + }; + redland = makeOverridable (import ../development/libraries/redland/1.0.10.nix) { inherit fetchurl stdenv openssl libxml2 pkgconfig perl sqlite mysql libxslt curl pcre librdf_rasqal librdf_raptor; @@ -5447,6 +5451,10 @@ let inherit fetchurl stdenv; }; + suitesparse = import ../development/libraries/suitesparse { + inherit fetchurl stdenv blas liblapack; + }; + t1lib = import ../development/libraries/t1lib { inherit fetchurl stdenv x11; inherit (xlibs) libXaw libXpm;