From 901574fe8a94d4b193e04bb6d1729af7d1605532 Mon Sep 17 00:00:00 2001 From: Michael Raskin <7c6f434c@mail.ru> Date: Wed, 1 Aug 2012 19:03:52 +0400 Subject: Julia language: update to a fresh version Update julia and some of its dependencies Split PCRE because a lot of packages depend on it and I am not sure we want to test them in a hurry (and Julia specifies exact version). --- pkgs/development/libraries/fftw/default.nix | 18 +-- pkgs/development/libraries/pcre/8.30.nix | 38 ++++++ .../libraries/science/math/liblapack/default.nix | 6 +- .../libraries/science/math/openblas/default.nix | 36 ++++++ pkgs/development/libraries/suitesparse/default.nix | 11 +- .../libraries/suitesparse/disable-metis.patch | 130 +-------------------- 6 files changed, 99 insertions(+), 140 deletions(-) create mode 100644 pkgs/development/libraries/pcre/8.30.nix create mode 100644 pkgs/development/libraries/science/math/openblas/default.nix (limited to 'pkgs/development/libraries') diff --git a/pkgs/development/libraries/fftw/default.nix b/pkgs/development/libraries/fftw/default.nix index 845ec772010..6b4fbe7df6c 100644 --- a/pkgs/development/libraries/fftw/default.nix +++ b/pkgs/development/libraries/fftw/default.nix @@ -1,15 +1,19 @@ -{fetchurl, stdenv, builderDefs, stringsWithDeps, singlePrecision ? false}: -let localDefs = builderDefs.passthru.function { +{fetchurl, stdenv, builderDefs, stringsWithDeps, singlePrecision ? false, pthreads ? false}: +let + version = "3.3.2"; + localDefs = builderDefs.passthru.function { src = fetchurl { - url = ftp://ftp.fftw.org/pub/fftw/fftw-3.2.2.tar.gz; - sha256 = "13vnglardq413q2518zi4a8pam3znydrz28m9w09kss9xrjsx9va"; + url = "ftp://ftp.fftw.org/pub/fftw/fftw-${version}.tar.gz"; + sha256 = "b1236a780ca6e66fc5f8eda6ef0665d680e8253d9f01d7bf211b714a50032d01"; }; buildInputs = []; - configureFlags = ["--enable-shared" "--enable-openmp"] + configureFlags = ["--enable-shared"] # some distros seem to be shipping both versions within the same package? # why does --enable-float still result in ..3f.so instead of ..3.so? ++ (if singlePrecision then [ "--enable-single" ] else [ ]) + ++ (stdenv.lib.optional (!pthreads) "--enable-openmp") + ++ (stdenv.lib.optional pthreads "--enable-threads") # I think all i686 has sse ++ (if (stdenv.isi686 || stdenv.isx86_64) && singlePrecision then [ "--enable-sse" ] else [ ]) # I think all x86_64 has sse2 @@ -18,8 +22,8 @@ let localDefs = builderDefs.passthru.function { }; in with localDefs; stdenv.mkDerivation { - name = "fftw-3.2.2" + ( if singlePrecision then "-single" else "-double" ); - builder = writeScript "fftw-3.2.1-builder" + name = "fftw-3.3.2" + ( if singlePrecision then "-single" else "-double" ); + builder = writeScript "fftw-3.3.2-builder" (textClosure localDefs [doConfigure doMakeInstall doForceShare]); meta = { description = "Fastest Fourier Transform in the West library"; diff --git a/pkgs/development/libraries/pcre/8.30.nix b/pkgs/development/libraries/pcre/8.30.nix new file mode 100644 index 00000000000..2f636492eb6 --- /dev/null +++ b/pkgs/development/libraries/pcre/8.30.nix @@ -0,0 +1,38 @@ +{ stdenv, fetchurl, unicodeSupport ? true, cplusplusSupport ? true }: + +stdenv.mkDerivation rec { + name = "pcre-8.30"; + + src = fetchurl { + url = "ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/${name}.tar.bz2"; + sha256 = "c1113fd7db934e97ad8b3917d432e5b642e9eb9afd127eb797804937c965f4ac"; + }; + + # The compiler on Darwin crashes with an internal error while building the + # C++ interface. Disabling optimizations on that platform remedies the + # problem. In case we ever update the Darwin GCC version, the exception for + # that platform ought to be removed. + configureFlags = '' + ${if unicodeSupport then "--enable-unicode-properties" else ""} + ${if !cplusplusSupport then "--disable-cpp" else ""} + '' + stdenv.lib.optionalString stdenv.isDarwin "CXXFLAGS=-O0"; + + doCheck = !stdenv.isCygwin; # XXX: test failure on Cygwin + + meta = { + homepage = "http://www.pcre.org/"; + description = "A library for Perl Compatible Regular Expressions"; + license = "BSD-3"; + + longDescription = '' + The PCRE library is a set of functions that implement regular + expression pattern matching using the same syntax and semantics as + Perl 5. PCRE has its own native API, as well as a set of wrapper + functions that correspond to the POSIX regular expression API. The + PCRE library is free, even for building proprietary software. + ''; + + platforms = stdenv.lib.platforms.all; + maintainers = [ stdenv.lib.maintainers.simons ]; + }; +} diff --git a/pkgs/development/libraries/science/math/liblapack/default.nix b/pkgs/development/libraries/science/math/liblapack/default.nix index e2b43b6b053..9f25011b76f 100644 --- a/pkgs/development/libraries/science/math/liblapack/default.nix +++ b/pkgs/development/libraries/science/math/liblapack/default.nix @@ -4,10 +4,10 @@ let usedLibExtension = if shared then ".so" else ".a"; in stdenv.mkDerivation { - name = "liblapack-3.4.0"; + name = "liblapack-3.4.1"; src = fetchurl { - url = "http://www.netlib.org/lapack/lapack-3.4.0.tgz"; - sha256 = "1sf30v1ps5icg67dvw5sbx5yhypx13am470gqg2f7l04f3wrw4x7"; + url = "http://www.netlib.org/lapack/lapack-3.4.1.tgz"; + sha256 = "93b910f94f6091a2e71b59809c4db4a14655db527cfc5821ade2e8c8ab75380f"; }; propagatedBuildInputs = [ atlasMaybeShared ]; diff --git a/pkgs/development/libraries/science/math/openblas/default.nix b/pkgs/development/libraries/science/math/openblas/default.nix new file mode 100644 index 00000000000..4d30671c488 --- /dev/null +++ b/pkgs/development/libraries/science/math/openblas/default.nix @@ -0,0 +1,36 @@ +{ stdenv, fetchurl, gfortran, perl }: + +stdenv.mkDerivation rec { + version = "0.2.2"; + lapack_version = "3.4.1"; + lapack_src = fetchurl { + url = "http://www.netlib.org/lapack/lapack-${lapack_version}.tgz"; + sha256 = "93b910f94f6091a2e71b59809c4db4a14655db527cfc5821ade2e8c8ab75380f"; + }; + + name = "openblas-${version}"; + src = fetchurl { + url = "https://github.com/xianyi/OpenBLAS/tarball/v${version}"; + sha256 = "13kdx3knff5ajnmgn419g0dnh83plin07p7akwamr3v7z5qfrzqr"; + name = "openblas-${version}.tar.gz"; + }; + + preBuild = "cp ${lapack_src} lapack-${lapack_version}.tgz"; + + buildInputs = [gfortran perl]; + + cpu = builtins.head (stdenv.lib.splitString "-" stdenv.system); + + target = if cpu == "i686" then "P6" else + if cpu == "x86_64" then "CORE2" else + # allow autodetect + ""; + + makeFlags = "${if target != "" then "TARGET=" else ""}${target} FC=gfortran CC=cc PREFIX=\"\$(out)\""; + + meta = { + description = "Basic Linear Algebra Subprograms"; + license = stdenv.lib.licenses.bsd3; + homepage = "https://github.com/xianyi/OpenBLAS"; + }; +} diff --git a/pkgs/development/libraries/suitesparse/default.nix b/pkgs/development/libraries/suitesparse/default.nix index b3fe6db059a..e3a7fbb5a08 100644 --- a/pkgs/development/libraries/suitesparse/default.nix +++ b/pkgs/development/libraries/suitesparse/default.nix @@ -1,9 +1,10 @@ { stdenv, fetchurl, blas, liblapack, gfortran } : -stdenv.mkDerivation { - name = "suitesparse"; +stdenv.mkDerivation rec { + version = "4.0.0"; + name = "suitesparse-${version}"; src = fetchurl { - url = http://www.cise.ufl.edu/research/sparse/SuiteSparse/SuiteSparse-3.5.0.tar.gz ; - sha256 = "0npn7c1j5qag5m2r0cmh3bwc42c1jk8k2yg2cfyxlcrp0h7wn4rc"; + url = "http://www.cise.ufl.edu/research/sparse/SuiteSparse/SuiteSparse-${version}.tar.gz" ; + sha256 = "1nvbdw10wa6654k8sa2vhr607q6fflcywyji5xd767cqpwag4v5j"; }; buildInputs = [blas liblapack gfortran] ; patches = [./disable-metis.patch]; @@ -14,6 +15,8 @@ stdenv.mkDerivation { mkdir -p $out/include ''; + makeFlags = ''PREFIX=\"$(out)\" INSTALL_LIB=$(out)/lib INSTALL_INCLUDE=$(out)/include''; + NIX_CFLAGS = "-fPIC"; } diff --git a/pkgs/development/libraries/suitesparse/disable-metis.patch b/pkgs/development/libraries/suitesparse/disable-metis.patch index 68fd22bc643..5b735eb7d3c 100644 --- a/pkgs/development/libraries/suitesparse/disable-metis.patch +++ b/pkgs/development/libraries/suitesparse/disable-metis.patch @@ -1,140 +1,18 @@ -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 14:55:27.000000000 +0200 -*************** -*** 34,40 **** - # performance. You should select the optimization parameters that are best - # for your system. On Linux, use "CFLAGS = -O3 -fexceptions" for example. - CC = cc -! CFLAGS = -O3 -fexceptions - - # C++ compiler (also uses CFLAGS) - CPLUSPLUS = g++ ---- 34,40 ---- - # performance. You should select the optimization parameters that are best - # for your system. On Linux, use "CFLAGS = -O3 -fexceptions" for example. - CC = cc -! CFLAGS = -O3 -fexceptions -fPIC - - # C++ compiler (also uses CFLAGS) - CPLUSPLUS = g++ -*************** -*** 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 **** +*** 40,46 **** ../../CAMD/Lib/libcamd.a: ( cd ../../CAMD ; $(MAKE) library ) -- ../../metis-4.0/libmetis.a: -- ( cd ../../metis-4.0/Lib ; $(MAKE) ) +- $(METIS): +- ( cd $(METIS_PATH) && $(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 ---- +--- 40,44 ---- ../../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) -- cgit 1.4.1