summary refs log tree commit diff
path: root/gnu/packages/algebra.scm
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/packages/algebra.scm')
-rw-r--r--gnu/packages/algebra.scm69
1 files changed, 38 insertions, 31 deletions
diff --git a/gnu/packages/algebra.scm b/gnu/packages/algebra.scm
index 34fb9ee4fd..4df2e96ecd 100644
--- a/gnu/packages/algebra.scm
+++ b/gnu/packages/algebra.scm
@@ -8,8 +8,10 @@
 ;;; Copyright © 2017, 2018, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
 ;;; Copyright © 2017 Marius Bakke <mbakke@fastmail.com>
 ;;; Copyright © 2017, 2019 Eric Bavier <bavier@member.fsf.org>
+;;; Copyright © 2019 Mathieu Othacehe <m.othacehe@gmail.com>
 ;;; Copyright © 2020 Björn Höfling <bjoern.hoefling@bjoernhoefling.de>
 ;;; Copyright © 2020 Jakub Kądziołka <kuba@kadziolka.net>
+;;; Copyright © 2020 Vincent Legoll <vincent.legoll@gmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -406,7 +408,7 @@ precision.")
        ("gsl" ,gsl)
        ("lapack" ,lapack)
        ("libao" ,ao)
-       ("libjpeg" ,libjpeg)
+       ("libjpeg" ,libjpeg-turbo)
        ("libpng" ,libpng)
        ("libsamplerate" ,libsamplerate)
        ("libx11" ,libx11)
@@ -689,15 +691,23 @@ binary.")
              (uri (string-append "mirror://gnu/bc/bc-" version ".tar.gz"))
              (sha256
               (base32
-               "0amh9ik44jfg66csyvf4zz1l878c4755kjndq9j0270akflgrbb2"))))
+               "0amh9ik44jfg66csyvf4zz1l878c4755kjndq9j0270akflgrbb2"))
+             (patches (search-patches "bc-fix-cross-compilation.patch"))))
     (build-system gnu-build-system)
     (native-inputs
-     `(("ed" ,ed)
+     `(("automake" ,automake)
+       ("autoconf" ,autoconf)
+       ("ed" ,ed)
        ("flex" ,flex)
        ("texinfo" ,texinfo)))
     (arguments
      '(#:configure-flags
-       (list "--with-readline")))
+       (list "--with-readline")
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'autogen
+           (lambda _
+             (invoke "autoreconf" "-vif"))))))
     (home-page "https://www.gnu.org/software/bc/")
     (synopsis "Arbitrary precision numeric processing language")
     (description
@@ -913,6 +923,29 @@ Fourier Transform} (DFT), @dfn{Discrete Cosine Transform} (DCT), @dfn{Discrete
 Sine Transform} (DST) and @dfn{Discrete Hartley Transform} (DHT).")
     (license license:bsd-2)))
 
+(define-public lmfit
+  (package
+    (name "lmfit")
+    (version "8.2.2")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://jugit.fz-juelich.de/mlz/lmfit.git")
+                    (commit (string-append "v" version))))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "00bch77a6qgnw6vzsjn2a42n8n683ih3xm0wpr454jxa15hw78vf"))))
+    (build-system cmake-build-system)
+    (native-inputs
+     `(("perl" ,perl)))                   ; for pod2man
+    (home-page "https://jugit.fz-juelich.de/mlz/lmfit")
+    (synopsis "Levenberg-Marquardt minimization and least-squares fitting")
+    (description "lmfit is a C library for Levenberg-Marquardt least-squares
+minimization and curve fitting.  It is mature code, based on decades-old
+algorithms from the FORTRAN library MINPACK.")
+    (license license:bsd-2)))
+
 (define-public eigen
   (package
     (name "eigen")
@@ -1216,15 +1249,6 @@ objects.")
        ("libtool" ,libtool)))
     (propagated-inputs
      `(("gmp" ,gmp))) ; gmp++.h includes gmpxx.h
-    (arguments
-     `(#:phases
-       (modify-phases %standard-phases
-         (add-before 'bootstrap 'setenv
-           ;; Prevent the autogen.sh script to carry out the configure
-           ;; script, which has not yet been patched to replace /bin/sh.
-           (lambda _
-             (setenv "NOCONFIGURE" "yes")
-             #t)))))
     (synopsis "Algebraic computations with exact rings and fields")
     (description
      "Givaro is a C++ library implementing the basic arithmetic of various
@@ -1263,15 +1287,7 @@ compound objects, such as vectors, matrices and univariate polynomials.")
      `(#:configure-flags
        (list (string-append "--with-blas-libs="
                             (assoc-ref %build-inputs "openblas")
-                            "/lib/libopenblas.so"))
-       #:phases
-       (modify-phases %standard-phases
-         (add-before 'bootstrap 'setenv
-           ;; Prevent the autogen.sh script to carry out the configure
-           ;; script, which has not yet been patched to replace /bin/sh.
-           (lambda _
-             (setenv "NOCONFIGURE" "yes")
-             #t)))))
+                            "/lib/libopenblas.so"))))
     (synopsis "C++ library for linear algebra over finite fields")
     (description
      "FFLAS-FFPACK is a C++ template library for basic linear algebra
@@ -1307,15 +1323,6 @@ algebra, such as the row echelon form.")
        ("pkg-config" ,pkg-config)))
     (inputs
      `(("fflas-ffpack" ,fflas-ffpack)))
-    (arguments
-     `(#:phases
-       (modify-phases %standard-phases
-         (add-before 'bootstrap 'setenv
-           ;; Prevent the autogen.sh script to carry out the configure
-           ;; script, which has not yet been patched to replace /bin/sh.
-           (lambda _
-             (setenv "NOCONFIGURE" "yes")
-             #t)))))
     (synopsis "C++ library for linear algebra over exact rings")
     (description
      "LinBox is a C++ template library for exact linear algebra computation