[arch-commits] Commit in maxima/repos/extra-x86_64 (5 files)

Antonio Rojas arojas at gemini.archlinux.org
Fri Apr 1 07:01:47 UTC 2022


    Date: Friday, April 1, 2022 @ 07:01:47
  Author: arojas
Revision: 441071

archrelease: copy trunk to extra-x86_64

Added:
  maxima/repos/extra-x86_64/PKGBUILD
    (from rev 441070, maxima/trunk/PKGBUILD)
  maxima/repos/extra-x86_64/build-fasl.patch
    (from rev 441070, maxima/trunk/build-fasl.patch)
  maxima/repos/extra-x86_64/matrixexp.patch
    (from rev 441070, maxima/trunk/matrixexp.patch)
  maxima/repos/extra-x86_64/maxima-sbcl-gmp.patch
    (from rev 441070, maxima/trunk/maxima-sbcl-gmp.patch)
Deleted:
  maxima/repos/extra-x86_64/PKGBUILD

-----------------------+
 PKGBUILD              |  106 ++++++++++++++++++++++++++++++------------------
 build-fasl.patch      |   23 ++++++++++
 matrixexp.patch       |   13 +++++
 maxima-sbcl-gmp.patch |   19 ++++++++
 4 files changed, 122 insertions(+), 39 deletions(-)

Deleted: PKGBUILD
===================================================================
--- PKGBUILD	2022-04-01 07:01:16 UTC (rev 441070)
+++ PKGBUILD	2022-04-01 07:01:47 UTC (rev 441071)
@@ -1,39 +0,0 @@
-# Maintainer: Ronald van Haren <ronald.archlinux.org>
-# Contributor: Damir Perisa <damir at archlinux.org>
-
-pkgname=maxima
-pkgver=5.45.1
-pkgrel=8
-pkgdesc="A sophisticated computer algebra system"
-arch=('x86_64')
-license=('GPL')
-url="http://maxima.sourceforge.net"
-depends=('sbcl=2.2.2' 'texinfo' 'sh' 'shared-mime-info')
-makedepends=('python' 'emacs')
-optdepends=('gnuplot: plotting capabilities' 'rlwrap: readline support via /usr/bin/rmaxima' 'tk: graphical xmaxima interface')
-# needs rebuild when bash changes version
-# needs a rebuild when sbcl changes version
-options=('!makeflags' '!zipman') # don't zip info pages or they won't work inside maxima
-source=("https://downloads.sourceforge.net/sourceforge/$pkgname/$pkgname-$pkgver.tar.gz")
-sha1sums=('a259f53b0362b77e6a642cf5b5d55aa35c0a483a')
-
-build() {
-  cd ${pkgname}-${pkgver}
-
-  ./configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info \
-	--libexecdir=/usr/lib --enable-sbcl --with-default-lisp=sbcl
-
-  # help avoid (re)running makeinfo/tex
-  touch doc/info/maxima.info
-  make
-}
-
-#check() {  # test 23&129 fail from rtest_taylor
-#  cd ${pkgname}-${pkgver}
-#  make check
-#}
-
-package() {
-  cd ${pkgname}-${pkgver}
-  make DESTDIR="${pkgdir}" emacsdir=/usr/share/emacs/site-lisp/maxima install
-}

Copied: maxima/repos/extra-x86_64/PKGBUILD (from rev 441070, maxima/trunk/PKGBUILD)
===================================================================
--- PKGBUILD	                        (rev 0)
+++ PKGBUILD	2022-04-01 07:01:47 UTC (rev 441071)
@@ -0,0 +1,67 @@
+# Maintainer: Antonio Rojas <arojas at archlinux.org>
+# Contributor: Ronald van Haren <ronald.archlinux.org>
+# Contributor: Damir Perisa <damir at archlinux.org>
+
+pkgname=maxima
+pkgver=5.45.1
+_sbclver=2.2.2
+_eclver=21.2.1
+pkgrel=8
+pkgdesc='A sophisticated computer algebra system'
+arch=(x86_64)
+license=(GPL)
+url='http://maxima.sourceforge.net'
+depends=(sbcl=$_sbclver texinfo shared-mime-info)
+makedepends=(python emacs ecl)
+optdepends=('gnuplot: plotting capabilities'
+            'rlwrap: readline support via /usr/bin/rmaxima'
+            'tk: graphical xmaxima interface' 
+            'ecl=$_eclver: ECL lisp backend')
+provides=(maxima-ecl)
+replaces=(maxima-ecl)
+# needs rebuild when bash changes version
+# needs a rebuild when sbcl changes version
+options=(!zipman) # don't zip info pages or they won't work inside maxima
+source=(https://downloads.sourceforge.net/sourceforge/$pkgname/$pkgname-$pkgver.tar.gz
+        build-fasl.patch
+        matrixexp.patch
+        maxima-sbcl-gmp.patch)
+sha256sums=('fe9016276970bef214a1a244348558644514d7fdfaa4fc8b9d0e87afcbb4e7dc'
+            '90ced3b33361fa24c2b417e0aeba8956892f0965b4a22d57d0c04115f2a3274b'
+            'ef1bc6a15fc982ff8c6aa1800bbbd3284d9e060ca27abf9d8c1266632c0c2619'
+            '7e85da0b6672b096d7aefac861573a57323dfe805e08d033781448f7ca6ed856')
+
+prepare() {
+  patch -d $pkgname-$pkgver -p1 < build-fasl.patch # build maxima ecl library
+  patch -d $pkgname-$pkgver -p1 < matrixexp.patch # fix matrix exponentiation
+  patch -d $pkgname-$pkgver -p1 < maxima-sbcl-gmp.patch # Use GMP arithmetic with sbcl (Void Linux)
+}
+
+build() {
+  cd $pkgname-$pkgver
+  ./configure \
+    --prefix=/usr \
+    --mandir=/usr/share/man \
+    --infodir=/usr/share/info \
+    --libexecdir=/usr/lib \
+    --enable-sbcl \
+    --enable-ecl \
+    --with-default-lisp=sbcl
+
+  # help avoid (re)running makeinfo/tex
+  touch doc/info/maxima.info
+  make
+}
+
+#check() {  # test 23&129 fail from rtest_taylor
+#  cd $pkgname-$pkgver
+#  make check
+#}
+
+package() {
+  cd $pkgname-$pkgver
+  make DESTDIR="$pkgdir" emacsdir=/usr/share/emacs/site-lisp/maxima install
+
+# Install FAS module for sagemath
+  install -Dm644 src/binary-ecl/maxima.fas -t "$pkgdir"/usr/lib/ecl-$_eclver
+}

Copied: maxima/repos/extra-x86_64/build-fasl.patch (from rev 441070, maxima/trunk/build-fasl.patch)
===================================================================
--- build-fasl.patch	                        (rev 0)
+++ build-fasl.patch	2022-04-01 07:01:47 UTC (rev 441071)
@@ -0,0 +1,23 @@
+Build a fasl library for ecl in addition to an executable program.
+
+References:
+* http://trac.sagemath.org/ticket/16178
+* https://github.com/cschwan/sage-on-gentoo/issues/226
+* https://bugs.gentoo.org/show_bug.cgi?id=499634
+
+Index: maxima-5.29.1/src/maxima.system
+===================================================================
+--- maxima-5.29.1.orig/src/maxima.system
++++ maxima-5.29.1/src/maxima.system
+@@ -75,6 +75,11 @@
+ 			     ;; Convert dir/foo.fas to dir/foo.o
+ 			     (make-pathname :type "o" :defaults p))
+ 			 files)))
++	(c::build-fasl "binary-ecl/maxima" :lisp-files obj
++			  :ld-flags
++			  (let ((x (symbol-value (find-symbol "*AUTOCONF-LD-FLAGS*"
++							      (find-package "MAXIMA")))))
++			    (if (and x (not (string= x ""))) (list x))))
+ 	(c::build-program "binary-ecl/maxima" :lisp-files obj
+ 			  :ld-flags
+ 			  (let ((x (symbol-value (find-symbol "*AUTOCONF-LD-FLAGS*"

Copied: maxima/repos/extra-x86_64/matrixexp.patch (from rev 441070, maxima/trunk/matrixexp.patch)
===================================================================
--- matrixexp.patch	                        (rev 0)
+++ matrixexp.patch	2022-04-01 07:01:47 UTC (rev 441071)
@@ -0,0 +1,13 @@
+--- a/share/linearalgebra/matrixexp.lisp
++++ b/share/linearalgebra/matrixexp.lisp
+@@ -138,8 +138,8 @@
+ 	   (print `(ratvars = ,$ratvars gcd = '$gcd algebraic = ,$algebraic))
+ 	   (print `(ratfac = ,$ratfac))
+ 	   (merror "Unable to find the spectrum")))
+-   
+-    (setq res ($fullratsimp (ncpower (sub (mult z ($ident n)) mat) -1) z))
++
++    (setq res ($fullratsimp ($invert_by_lu (sub (mult z ($ident n)) mat) '$crering) z))
+     (setq m (length sp))
+     (dotimes (i m)
+       (setq zi (nth i sp))

Copied: maxima/repos/extra-x86_64/maxima-sbcl-gmp.patch (from rev 441070, maxima/trunk/maxima-sbcl-gmp.patch)
===================================================================
--- maxima-sbcl-gmp.patch	                        (rev 0)
+++ maxima-sbcl-gmp.patch	2022-04-01 07:01:47 UTC (rev 441071)
@@ -0,0 +1,19 @@
+Patch maxima initialization for sbcl so it uses gmp for arithmetic
+
+
+--- a/src/init-cl.lisp	2021-05-15 20:20:53.000000000 -0300
++++ b/src/init-cl.lisp	2022-01-04 17:45:03.838273626 -0300
+@@ -574,8 +574,13 @@
+ 			 (delete-file file)))))
+ 	   *temp-files-list*))
+ 
++#+sbcl
++(eval-when (:compile-toplevel :load-toplevel :execute)
++  (require 'sb-gmp))
++
+ (defun cl-user::run ()
+   "Run Maxima in its own package."
++  #+sbcl (sb-gmp:install-gmp-funs)
+   (in-package :maxima)
+   (initialize-runtime-globals)
+   (let ((input-stream *standard-input*)



More information about the arch-commits mailing list