gnu: ffmpeg: Set LDFLAGS to -ldl.
[jackhill/guix/guix.git] / gnu / packages / maths.scm
index 1aa3757..c1f270a 100644 (file)
@@ -5,6 +5,8 @@
 ;;; Copyright © 2014 Eric Bavier <bavier@member.fsf.org>
 ;;; Copyright © 2014 Federico Beffa <beffa@fbengineering.ch>
 ;;; Copyright © 2014 Mathieu Lirzin <mathieu.lirzin@openmailbox.org>
+;;; Copyright © 2015 Ricardo Wurmus <rekado@elephly.net>
+;;; Copyright © 2015 Sou Bunnbu <iyzsong@gmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -27,6 +29,7 @@
   #:use-module ((guix licenses) #:prefix license:)
   #:use-module (guix packages)
   #:use-module (guix download)
+  #:use-module (guix svn-download)
   #:use-module (guix utils)
   #:use-module (guix build-system cmake)
   #:use-module (guix build-system gnu)
@@ -212,6 +215,31 @@ can be imported from spreadsheets, text files and database sources and it can
 be output in text, PostScript, PDF or HTML.")
     (license license:gpl3+)))
 
+(define-public arpack-ng
+  (package
+    (name "arpack-ng")
+    (version "3.2.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "https://github.com/opencollab/arpack-ng/archive/"
+                           version ".tar.gz"))
+       (file-name (string-append name "-" version ".tar.gz"))
+       (sha256
+        (base32
+         "1fwch6vipms1ispzg2djvbzv5wag36f1dmmr3xs3mbp6imfyhvff"))))
+    (build-system gnu-build-system)
+    (home-page "https://github.com/opencollab/arpack-ng")
+    (inputs
+     `(("lapack" ,lapack)
+       ("fortran" ,gfortran-4.8)))
+    (synopsis "Fortran subroutines for solving eigenvalue problems")
+    (description
+     "ARPACK-NG is a collection of Fortran77 subroutines designed to solve
+large scale eigenvalue problems.")
+    (license (license:bsd-style "file://COPYING"
+                                "See COPYING in the distribution."))))
+
 (define-public lapack
   (package
     (name "lapack")
@@ -311,7 +339,7 @@ extremely large and complex data collections.")
 (define-public octave
   (package
     (name "octave")
-    (version "3.8.0")
+    (version "3.8.2")
     (source
      (origin
       (method url-fetch)
@@ -319,7 +347,7 @@ extremely large and complex data collections.")
                          version ".tar.gz"))
       (sha256
        (base32
-       "0ks9pr154syw0vb3jn6xsnrkkrbvf9y7i7gaxa28rz6ngxbxvq9l"))))
+       "05slz8yx8k91fqlnfr1f0vni95iq9qmchz41c7nf4isn3b2fjn7j"))))
     (build-system gnu-build-system)
     (inputs
      `(("lapack" ,lapack)
@@ -387,6 +415,7 @@ files.")
        ("hdf5-include" ,hdf5 "include")
        ("lapack" ,lapack)
        ("mesa" ,mesa)
+       ("glu" ,glu)
        ("libx11" ,libx11)
        ("libxext" ,libxext)))
     (arguments
@@ -937,6 +966,105 @@ point numbers")
     ;; GPLv2 only is therefore the smallest subset.
     (license license:gpl2)))
 
+(define-public muparser
+  (package
+    (name "muparser")
+    (version "2.2.5")
+    (source
+     (origin
+       (method svn-fetch)
+       (uri (svn-reference
+             (url "http://muparser.googlecode.com/svn/trunk/")
+             (revision 34)))
+       (sha256
+        (base32
+         "1d6bdbhx9zj3srwj3m7c9hvr18gnx1fx43h6d25my7q85gicpcwn"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:configure-flags '("--enable-samples=no")
+       #:tests? #f)) ;no "check" target
+    (home-page "http://muparser.beltoforion.de/")
+    (synopsis "Fast parser library for mathematical expressions")
+    (description
+     "muParser is an extensible high performance math parser library.  It is
+based on transforming an expression into a bytecode and precalculating
+constant parts of it.")
+    (license license:expat)))
+
+(define-public openlibm
+  (package
+    (name "openlibm")
+    (version "0.4.1")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "https://github.com/JuliaLang/openlibm/archive/v"
+                           version ".tar.gz"))
+       (file-name (string-append name "-" version ".tar.gz"))
+       (sha256
+        (base32
+         "0cwqqqlblj3kzp9aq1wnpfs1fl0qd1wp1xzm5shb09w06i4rh9nn"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:make-flags
+       (list (string-append "prefix=" (assoc-ref %outputs "out")))
+       #:phases
+       ;; no configure script
+       (alist-delete 'configure %standard-phases)
+       #:tests? #f)) ;the tests are part of the default target
+    (home-page "http://openlibm.org/")
+    (synopsis "Portable C mathematical library (libm)")
+    (description
+     "OpenLibm is an effort to have a high quality, portable, standalone C
+mathematical library (libm).  It can be used standalone in applications and
+programming language implementations.  The project was born out of a need to
+have a good libm for the Julia programming langage that worked consistently
+across compilers and operating systems, and in 32-bit and 64-bit
+environments.")
+    ;; See LICENSE.md for details.
+    (license (list license:expat
+                   license:isc
+                   license:bsd-2
+                   license:public-domain
+                   license:lgpl2.1+))))
+
+(define-public openspecfun
+  (package
+    (name "openspecfun")
+    (version "0.4")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "https://github.com/JuliaLang/openspecfun/archive/v"
+                           version ".tar.gz"))
+       (file-name (string-append name "-" version ".tar.gz"))
+       (sha256
+        (base32
+         "0nsa3jjmlhcqkw5ba5ypbn3n0c8b6lc22zzlxnmxkxi9shhdx65z"))))
+    (build-system gnu-build-system)
+    (arguments
+     '(#:tests? #f  ;no "check" target
+       #:make-flags
+       (list (string-append "prefix=" (assoc-ref %outputs "out")))
+       ;; no configure script
+       #:phases (alist-delete 'configure %standard-phases)))
+    (inputs
+     `(("fortran" ,gfortran-4.8)))
+    (home-page "https://github.com/JuliaLang/openspecfun")
+    (synopsis "Collection of special mathematical functions")
+    (description
+     "Openspecfun provides AMOS and Faddeeva.  AMOS (from Netlib) is a
+portable package for Bessel Functions of a Complex Argument and Nonnegative
+Order; it contains subroutines for computing Bessel functions and Airy
+functions.  Faddeeva allows computing the various error functions of arbitrary
+complex arguments (Faddeeva function, error function, complementary error
+function, scaled complementary error function, imaginary error function, and
+Dawson function); given these, one can also easily compute Voigt functions,
+Fresnel integrals, and similar related functions as well.")
+    ;; Faddeeva is released under the Expat license; AMOS is included as
+    ;; public domain software.
+    (license (list license:expat license:public-domain))))
+
 (define-public atlas
   (package
     (name "atlas")
@@ -953,6 +1081,9 @@ point numbers")
     (inputs `(("gfortran" ,gfortran-4.8)
               ("lapack-tar" ,(package-source lapack))))
     (outputs '("out" "doc"))
+    ;; For the moment we drop support for MIPS at it fails to compile. See
+    ;; https://lists.gnu.org/archive/html/guix-devel/2014-11/msg00516.html
+    (supported-systems (delete "mips64el-linux" %supported-systems))
     (arguments
      `(#:parallel-build? #f
        #:parallel-tests? #f
@@ -979,6 +1110,12 @@ point numbers")
          ;; Disable parallel build as it gives errors: atlas_pthread.h is
          ;; needed to compile C files before it is generated.
          "-Ss" "pmake" "make -j 1"
+         ;; Probe is failing for MIPS.  We therefore define the system
+         ;; architecture explicitly by setting (-A) MACHINETYPE = 49
+         ;; 'MIPSR1xK' and (-V) ISA = 1 'none'.
+         ,,@(if (string-prefix? "mips" (%current-system))
+              (list "-A" "49" "-V" "1")
+              (list))
          ;; Generate shared libraries.
          "--shared"
          ;; Build a full LAPACK library.