summary refs log tree commit diff
path: root/gnu/packages/maths.scm
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/packages/maths.scm')
-rw-r--r--gnu/packages/maths.scm133
1 files changed, 67 insertions, 66 deletions
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index 2a3fd60510..47d19eaadf 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -4600,66 +4600,67 @@ parts of it.")
          "0r4sz3rn68fyc2paq0a04pgfi7iszpm95f6ggbzxpvjzx9qxbcql"))))
     (build-system gnu-build-system)
     (arguments
-     `(#:test-target "test"
-       ;; DYNAMIC_ARCH is only supported on x86.  When it is disabled and no
-       ;; TARGET is specified, OpenBLAS will tune itself to the build host, so
-       ;; we need to disable substitutions.
-       #:substitutable?
-        ,(let ((system (or (%current-target-system) (%current-system))))
-           (or (string-prefix? "x86_64" system)
-               (string-prefix? "i686" system)
-               (string-prefix? "mips" system)
-               (string-prefix? "aarch64" system)))
-       #:make-flags
-       (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
-             "SHELL=bash"
-             "MAKE_NB_JOBS=0"           ;use jobserver for submakes
-             "NO_STATIC=1"              ;avoid a 67 MiB static archive
-
-             ;; This is the maximum number of threads OpenBLAS will ever use (that
-             ;; is, if $OPENBLAS_NUM_THREADS is greater than that, then NUM_THREADS
-             ;; is used.)  If we don't set it, the makefile sets it to the number
-             ;; of cores of the build machine, which is obviously wrong.
-             "NUM_THREADS=128"
-
-             ;; Build the library for all supported CPUs.  This allows
-             ;; switching CPU targets at runtime with the environment variable
-             ;; OPENBLAS_CORETYPE=<type>, where "type" is a supported CPU type.
-             ;; Unfortunately, this is not supported on all architectures,
-             ;; where it leads to failed builds.
-             ,@(let ((system (or (%current-target-system) (%current-system))))
-                 (cond
-                  ((or (string-prefix? "x86_64" system)
-                       (string-prefix? "i686" system)
-                       (string-prefix? "powerpc64le" system)
-                       (string-prefix? "aarch64" system))
-                   ;; Dynamic older enables a few extra CPU architectures that
-                   ;; were released before 2010.
-                   '("DYNAMIC_ARCH=1" "DYNAMIC_OLDER=1" "TARGET=GENERIC"))
-                  ;; On some of these architectures the CPU can't be detected.
-                  ;; On MIPS we force the "SICORTEX" TARGET, as for the other
-                  ;; two available MIPS targets special extended instructions
-                  ;; for Loongson cores are used.
-                  ((string-prefix? "mips" system)
-                   '("TARGET=SICORTEX"))
-                  ;; Failed to detect CPU.
-                  ((string-prefix? "armhf" system)
-                   '("TARGET=ARMV7"))
-                  ((string-prefix? "riscv64" system)
-                   '("TARGET=RISCV64_GENERIC"))
-                  (else '()))))
-       ;; no configure script
-       #:phases
-       (modify-phases %standard-phases
-         (delete 'configure)
-         (add-before 'build 'set-extralib
-           (lambda* (#:key inputs #:allow-other-keys)
-             ;; Get libgfortran found when building in utest.
-             (setenv "FEXTRALIB"
-                     (string-append
-                      "-L"
-                      (dirname
-                       (search-input-file inputs "/lib/libgfortran.so")))))))))
+     (list
+      #:test-target "test"
+      ;; DYNAMIC_ARCH is only supported on x86.  When it is disabled and no
+      ;; TARGET is specified, OpenBLAS will tune itself to the build host, so
+      ;; we need to disable substitutions.
+      #:substitutable?
+      (let ((system (or (%current-target-system) (%current-system))))
+        (or (string-prefix? "x86_64" system)
+            (string-prefix? "i686" system)
+            (string-prefix? "mips" system)
+            (string-prefix? "aarch64" system)))
+      #:make-flags
+      #~(list (string-append "PREFIX=" #$output)
+              "SHELL=bash"
+              "MAKE_NB_JOBS=0"          ;use jobserver for submakes
+              "NO_STATIC=1"             ;avoid a 67 MiB static archive
+
+              ;; This is the maximum number of threads OpenBLAS will ever use (that
+              ;; is, if $OPENBLAS_NUM_THREADS is greater than that, then NUM_THREADS
+              ;; is used.)  If we don't set it, the makefile sets it to the number
+              ;; of cores of the build machine, which is obviously wrong.
+              "NUM_THREADS=128"
+
+              ;; Build the library for all supported CPUs.  This allows
+              ;; switching CPU targets at runtime with the environment variable
+              ;; OPENBLAS_CORETYPE=<type>, where "type" is a supported CPU type.
+              ;; Unfortunately, this is not supported on all architectures,
+              ;; where it leads to failed builds.
+              #$@(let ((system (or (%current-target-system) (%current-system))))
+                   (cond
+                    ((or (string-prefix? "x86_64" system)
+                         (string-prefix? "i686" system)
+                         (string-prefix? "powerpc64le" system)
+                         (string-prefix? "aarch64" system))
+                     ;; Dynamic older enables a few extra CPU architectures that
+                     ;; were released before 2010.
+                     '("DYNAMIC_ARCH=1" "DYNAMIC_OLDER=1" "TARGET=GENERIC"))
+                    ;; On some of these architectures the CPU can't be detected.
+                    ;; On MIPS we force the "SICORTEX" TARGET, as for the other
+                    ;; two available MIPS targets special extended instructions
+                    ;; for Loongson cores are used.
+                    ((string-prefix? "mips" system)
+                     '("TARGET=SICORTEX"))
+                    ;; Failed to detect CPU.
+                    ((string-prefix? "armhf" system)
+                     '("TARGET=ARMV7"))
+                    ((string-prefix? "riscv64" system)
+                     '("TARGET=RISCV64_GENERIC"))
+                    (else '()))))
+      ;; no configure script
+      #:phases
+      #~(modify-phases %standard-phases
+          (delete 'configure)
+          (add-before 'build 'set-extralib
+            (lambda* (#:key inputs #:allow-other-keys)
+              ;; Get libgfortran found when building in utest.
+              (setenv "FEXTRALIB"
+                      (string-append
+                       "-L"
+                       (dirname
+                        (search-input-file inputs "/lib/libgfortran.so")))))))))
     (inputs
      (list `(,gfortran "lib")))
     (native-inputs
@@ -4676,9 +4677,9 @@ parts of it.")
     (supported-systems '("x86_64-linux" "aarch64-linux" "mips64el-linux"))
     (arguments
      (substitute-keyword-arguments (package-arguments openblas)
-       ((#:make-flags flags '())
-        `(append (list "INTERFACE64=1" "LIBNAMESUFFIX=ilp64")
-                 ,flags))))
+       ((#:make-flags flags #~'())
+        #~(append (list "INTERFACE64=1" "LIBNAMESUFFIX=ilp64")
+                 #$flags))))
     (synopsis "Optimized BLAS library based on GotoBLAS (ILP64 version)")
     (license license:bsd-3)))
 
@@ -5658,6 +5659,8 @@ set.")
                                      texlive-cm
                                      texlive-courier
                                      texlive-etoolbox
+                                     texlive-fancyhdr
+                                     texlive-fancyvrb
                                      texlive-helvetic
                                      texlive-jknappen
                                      texlive-sectsty
@@ -5669,8 +5672,6 @@ set.")
                                      texlive-latex-cmap
                                      texlive-latex-colortbl
                                      texlive-latex-etoc
-                                     texlive-latex-fancyhdr
-                                     texlive-latex-fancyvrb
                                      texlive-latex-float
                                      texlive-latex-fncychap
                                      texlive-latex-framed
@@ -5684,10 +5685,10 @@ set.")
                                      texlive-latex-parskip
                                      texlive-latex-stackengine
                                      texlive-latex-tabulary
-                                     texlive-latex-titlesec
                                      texlive-latex-tocloft
                                      texlive-latex-upquote
                                      texlive-latex-varwidth
+                                     texlive-titlesec
                                      texlive-ulem
                                      texlive-wasysym
                                      texlive-wrapfig))))