diff mbox series

[bug#56729,RFC,v3,23/32] gnu: maxima: Build with ecl.

Message ID ae56b848d4407a373adf9ff70c622241992a8f45.1685391447.git.guix@ikherbers.com
State New
Headers show
Series None | expand

Commit Message

vicvbcun May 29, 2023, 8:38 p.m. UTC
The eventual sagemath package requires maxima.fas, which is only built with
ecl.

* gnu/packages/maths.scm (maxima)[inputs]: Replace sbcl with ecl.
[arguments]<#:configure-flags>: Build with ecl instead.
<#:phases>: Run test with ecl.
* gnu/packages/patches/maxima-test-precision.patch: New file.
* gnu/local.mk (dist_patch_DATA): Add it.
---

Notes:
    The decrease in precision worries me a bit…

 gnu/local.mk                                  |  1 +
 gnu/packages/maths.scm                        | 11 +++----
 .../patches/maxima-test-precision.patch       | 30 +++++++++++++++++++
 3 files changed, 37 insertions(+), 5 deletions(-)
 create mode 100644 gnu/packages/patches/maxima-test-precision.patch
diff mbox series

Patch

diff --git a/gnu/local.mk b/gnu/local.mk
index 683c36c383..1a90c8d2e4 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1551,6 +1551,7 @@  dist_patch_DATA =						\
   %D%/packages/patches/mathjax-no-a11y.patch			\
   %D%/packages/patches/mathjax-3.1.2-no-a11y.patch		\
   %D%/packages/patches/maxima-defsystem-mkdir.patch		\
+  %D%/packages/patches/maxima-test-precision.patch		\
   %D%/packages/patches/maven-generate-component-xml.patch		\
   %D%/packages/patches/maven-generate-javax-inject-named.patch		\
   %D%/packages/patches/mcrl2-fix-1687.patch			\
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index c2d9d07b00..1c98e842de 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -4358,20 +4358,21 @@  (define-public maxima
        (sha256
         (base32
          "01wbm8jj43p7gpdj4h55aij0b44bjydn4bwb7q1wjrfs91mz143k"))
-       (patches (search-patches "maxima-defsystem-mkdir.patch"))))
+       (patches (search-patches "maxima-defsystem-mkdir.patch"
+                                "maxima-test-precision.patch"))))
     (build-system gnu-build-system)
     (inputs
      `(("bash" ,bash-minimal)
        ("gnuplot" ,gnuplot)                       ;for plots
-       ("sbcl" ,sbcl)
+       ("ecl" ,ecl)
        ("sed" ,sed)
        ("tk" ,tk)))                               ;Tcl/Tk is used by 'xmaxima'
     (native-inputs
      (list texinfo perl python))
     (arguments
      `(#:configure-flags
-       ,#~(list "--enable-sbcl"
-                (string-append "--with-sbcl=" #$sbcl "/bin/sbcl")
+       ,#~(list "--enable-ecl"
+                (string-append "--with-ecl=" #$ecl "/bin/ecl")
                 (string-append "--with-posix-shell=" #$bash-minimal "/bin/sh")
                 (string-append "--with-wish=" #$tk "/bin/wish"
                                #$(version-major+minor (package-version tk))))
@@ -4411,7 +4412,7 @@  (define-public maxima
              (invoke "sh" "-c"
                      (string-append
                       "./maxima-local "
-                      "--lisp=sbcl "
+                      "--lisp=ecl "
                       "--batch-string=\"run_testsuite();\" "
                       "| grep -q \"No unexpected errors found\""))))
          ;; Make sure the doc and emacs files are found in the
diff --git a/gnu/packages/patches/maxima-test-precision.patch b/gnu/packages/patches/maxima-test-precision.patch
new file mode 100644
index 0000000000..1990a89d56
--- /dev/null
+++ b/gnu/packages/patches/maxima-test-precision.patch
@@ -0,0 +1,30 @@ 
+https://sourceforge.net/p/maxima/mailman/maxima-bugs/thread/6321ccd9332dab3666181108.bugs%40maxima.p.sourceforge.net/#msg37707276
+
+old and new:
+0.009214957317429523 %i - 0.596914179042388
+0.009214957317428399 %i - 0.59691417904239
+
+old and new
+(- 0.009214957317429523 %i) - 0.596914179042388
+(- 0.009214957317428399 %i) - 0.59691417904239
+
+--- a/tests/rtest_gamma.mac	2023-04-01 11:32:32.998269650 +0200
++++ b/tests/rtest_gamma.mac	2023-04-01 11:34:46.611842977 +0200
+@@ -1843,7 +1843,7 @@
+ relerror(
+   gamma_incomplete(0.5,-2.5*%i),
+   -0.59691417904238855062194720247331 + 0.00921495731742953647951029973386*%i,
+-  2.81e-15);
++  3.08e-15);
+ true;
+ 
+ relerror(
+@@ -1879,7 +1879,7 @@
+ relerror(
+   gamma_incomplete(0.5,2.5*%i),
+   -0.59691417904238855062194720247331 - 0.00921495731742953647951029973386*%i,
+- 2.81e-15);
++ 3.08e-15);
+ true;
+ 
+ relerror(