Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] maxima: fix #34849 and #34861
@ 2022-01-06  1:17 tornaria
  2022-01-06  1:38 ` [PR REVIEW] " abenson
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: tornaria @ 2022-01-06  1:17 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 784 bytes --]

There is a new pull request by tornaria against master on the void-packages repository

https://github.com/tornaria/void-packages maxima
https://github.com/void-linux/void-packages/pull/34887

maxima: fix #34849 and #34861
 - patch maxima-sbcl so it uses gmp for arithmetic (closes #34849)
   also add libgmp to shlib_requires since it won't be detected
 - remove `nopie=yes` to fix #34861, replace by `nopie_files`
 - remove `nostrip=yes`, replace by `nostrip_files`
 - add checks for #34849 and #34861
 - run testsuite only for full check (not in CI)
 - some html and info files are shipped with source: do not rebuild

I based this on top of #34886 so `nostrip_files` works better.

A patch file from https://github.com/void-linux/void-packages/pull/34887.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-maxima-34887.patch --]
[-- Type: text/x-diff, Size: 5343 bytes --]

From 093a1fa78ac0c78ecf4d189d4fecabcdcb516fe1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Wed, 5 Jan 2022 20:59:20 -0300
Subject: [PATCH 1/2] nostrip_files: allow full path

The option `nostrip_files` takes a filename without path, in contrast to
option `nopie_files` which takes only full path.

This commit makes it so that `nostrip_files` can take either the
filename or the full path.
---
 common/hooks/post-install/06-strip-and-debug-pkgs.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/common/hooks/post-install/06-strip-and-debug-pkgs.sh b/common/hooks/post-install/06-strip-and-debug-pkgs.sh
index 2cec68412c50..191c025e552c 100644
--- a/common/hooks/post-install/06-strip-and-debug-pkgs.sh
+++ b/common/hooks/post-install/06-strip-and-debug-pkgs.sh
@@ -72,7 +72,7 @@ hook() {
 
 		fname=${f##*/}
 		for x in ${nostrip_files}; do
-			if [ "$x" = "$fname" ]; then
+			if [ "$x" = "$fname" -o "$x" = "${f#$PKGDESTDIR}" ]; then
 				found=1
 				break
 			fi

From c0bb839cd7c13cb13ffd5f9c7613e2e3ef3b031f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Wed, 5 Jan 2022 16:51:00 -0300
Subject: [PATCH 2/2] maxima: fix #34849 and #34861

 - patch maxima-sbcl so it uses gmp for arithmetic (closes #34849)
   also add libgmp to shlib_requires since it won't be detected
 - remove `nopie=yes` to fix #34861, replace by `nopie_files`
 - remove `nostrip=yes`, replace by `nostrip_files`
 - add checks for #34849 and #34861
 - run testsuite only for full check (not in CI)
 - some html and info files are shipped with source: do not rebuild
---
 .../maxima/patches/maxima-sbcl-with-gmp.patch | 19 +++++++
 srcpkgs/maxima/template                       | 52 ++++++++++++++++---
 2 files changed, 63 insertions(+), 8 deletions(-)
 create mode 100644 srcpkgs/maxima/patches/maxima-sbcl-with-gmp.patch

diff --git a/srcpkgs/maxima/patches/maxima-sbcl-with-gmp.patch b/srcpkgs/maxima/patches/maxima-sbcl-with-gmp.patch
new file mode 100644
index 000000000000..074631ea2ba0
--- /dev/null
+++ b/srcpkgs/maxima/patches/maxima-sbcl-with-gmp.patch
@@ -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*)
diff --git a/srcpkgs/maxima/template b/srcpkgs/maxima/template
index 1a4bec0dba18..69af367ca11d 100644
--- a/srcpkgs/maxima/template
+++ b/srcpkgs/maxima/template
@@ -1,7 +1,7 @@
 # Template file for 'maxima'
 pkgname=maxima
 version=5.45.1
-revision=2
+revision=3
 build_style=gnu-configure
 configure_args="$(vopt_enable clisp) $(vopt_enable sbcl sbcl-exec) $(vopt_enable ecl)"
 hostmakedepends="python3 perl emacs texinfo patchelf"
@@ -15,8 +15,15 @@ homepage="http://maxima.sourceforge.net"
 distfiles="${SOURCEFORGE_SITE}/maxima/maxima-${version}.tar.gz"
 checksum=fe9016276970bef214a1a244348558644514d7fdfaa4fc8b9d0e87afcbb4e7dc
 
-nostrip=yes
-nopie=yes
+# maxima-sbcl is nopie and should NOT be stripped or it won't work
+nostrip_files=/usr/lib/maxima/$version/binary-sbcl/maxima
+nopie_files=/usr/lib/maxima/$version/binary-sbcl/maxima
+
+if [ "$build_option_sbcl" ]; then
+	# binary-sbcl/maxima uses libgmp but this won't show up in objdump
+	shlib_requires=libgmp.so.10
+fi
+
 build_options="clisp sbcl ecl"
 desc_option_clisp="Build with CLISP"
 desc_option_sbcl="Build with SBCL"
@@ -24,6 +31,14 @@ desc_option_ecl="Build with ECL"
 build_options_default="sbcl ecl"
 vopt_conflict clisp sbcl
 
+post_configure() {
+	# do not rebuild these files if they exist
+	touch -c doc/info/*.html
+	touch -c doc/info/maxima.info*
+	touch -c doc/info/maxima_toc.html
+	touch -c interfaces/xmaxima/doc/xmaxima.html
+}
+
 post_build() {
 	if [ "$build_option_ecl" ]; then
 		# everything will go in the same directory, use rpath=$ORIGIN
@@ -38,13 +53,34 @@ post_build() {
 
 do_check() {
 	if [ "$build_option_ecl" ]; then
-		echo "Check that maxima.fas works"
-		ecl --eval "(require 'maxima \"src/binary-ecl/maxima.fas\")" \
-			--eval "(quit)"
+		echo "maxima-ecl: check that maxima.fas works (#34273)"
+		ecl --eval '(require :maxima "src/binary-ecl/maxima.fas")' \
+		    --eval '(quit)'
+		echo PASS
+		echo "maxima-ecl: check that unlimited heap-size works (#34861)"
+		./maxima-local -q -l ecl --batch-string=":lisp \
+			(ext:set-limit 'ext:heap-size 0)
+			showtime : true $
+			a : 10^(10^5) $
+			b : a^600 $
+			c : a^600 $
+			"
+		echo PASS
+	fi
+	if [ "$build_option_sbcl" ]; then
+		echo "maxima-sbcl: check that long arithmetic is fast (#34849)"
+		timeout -v 30s ./maxima-local -q -l sbcl --batch-string="
+			showtime : true $
+			a : 10^(10^5) $
+			b : a^1000 $
+			"
+		echo PASS
 	fi
 
-	# now run the testsuite
-	make ${makejobs} check
+	if [ "$XBPS_CHECK_PKGS" = full ]; then
+		# run the testsuite for all versions enabled
+		make ${makejobs} check
+	fi
 }
 
 post_install() {

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PR REVIEW] maxima: fix #34849 and #34861
  2022-01-06  1:17 [PR PATCH] maxima: fix #34849 and #34861 tornaria
@ 2022-01-06  1:38 ` abenson
  2022-01-06  1:50 ` tornaria
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: abenson @ 2022-01-06  1:38 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 204 bytes --]

New review comment by abenson on void-packages repository

https://github.com/void-linux/void-packages/pull/34887#discussion_r779245745

Comment:
I've not looked, but does this affect any other packages?

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PR REVIEW] maxima: fix #34849 and #34861
  2022-01-06  1:17 [PR PATCH] maxima: fix #34849 and #34861 tornaria
  2022-01-06  1:38 ` [PR REVIEW] " abenson
@ 2022-01-06  1:50 ` tornaria
  2022-01-07 17:44 ` tornaria
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: tornaria @ 2022-01-06  1:50 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 420 bytes --]

New review comment by tornaria on void-packages repository

https://github.com/void-linux/void-packages/pull/34887#discussion_r779249185

Comment:
There are 23 source packages using `nostrip_files`, they all of course use filename without path and that shouldn't be affected by this change. I don't know if there is another package with two files of the same name such that one is nostrip and one isn't -- probably not.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: maxima: fix #34849 and #34861
  2022-01-06  1:17 [PR PATCH] maxima: fix #34849 and #34861 tornaria
  2022-01-06  1:38 ` [PR REVIEW] " abenson
  2022-01-06  1:50 ` tornaria
@ 2022-01-07 17:44 ` tornaria
  2022-01-10 12:14 ` [PR PATCH] [Updated] " tornaria
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: tornaria @ 2022-01-07 17:44 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 326 bytes --]

New comment by tornaria on void-packages repository

https://github.com/void-linux/void-packages/pull/34887#issuecomment-1007602923

Comment:
Just to confirm that this PR fixes the doctest failure we had for sagemath running long tests on i686 (https://github.com/void-linux/void-packages/pull/34030#issuecomment-1005080267).

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PR PATCH] [Updated] maxima: fix #34849 and #34861
  2022-01-06  1:17 [PR PATCH] maxima: fix #34849 and #34861 tornaria
                   ` (2 preceding siblings ...)
  2022-01-07 17:44 ` tornaria
@ 2022-01-10 12:14 ` tornaria
  2022-01-10 12:22 ` tornaria
  2022-01-11 15:55 ` [PR PATCH] [Merged]: " leahneukirchen
  5 siblings, 0 replies; 7+ messages in thread
From: tornaria @ 2022-01-10 12:14 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 789 bytes --]

There is an updated pull request by tornaria against master on the void-packages repository

https://github.com/tornaria/void-packages maxima
https://github.com/void-linux/void-packages/pull/34887

maxima: fix #34849 and #34861
 - patch maxima-sbcl so it uses gmp for arithmetic (closes #34849)
   also add libgmp to shlib_requires since it won't be detected
 - remove `nopie=yes` to fix #34861, replace by `nopie_files`
 - remove `nostrip=yes`, replace by `nostrip_files`
 - add checks for #34849 and #34861
 - run testsuite only for full check (not in CI)
 - some html and info files are shipped with source: do not rebuild

I based this on top of #34886 so `nostrip_files` works better.

A patch file from https://github.com/void-linux/void-packages/pull/34887.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-maxima-34887.patch --]
[-- Type: text/x-diff, Size: 4299 bytes --]

From 6acf130acb8fcd86ec011572d4a061482ea5e9e6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Wed, 5 Jan 2022 16:51:00 -0300
Subject: [PATCH] maxima: fix #34849 and #34861

 - patch maxima-sbcl so it uses gmp for arithmetic (closes #34849)
   also add libgmp to shlib_requires since it won't be detected
 - remove `nopie=yes` to fix #34861, replace by `nopie_files`
 - remove `nostrip=yes`, replace by `nostrip_files`
 - add checks for #34849 and #34861
 - run testsuite only for full check (not in CI)
 - some html and info files are shipped with source: do not rebuild
---
 .../maxima/patches/maxima-sbcl-with-gmp.patch | 19 +++++++
 srcpkgs/maxima/template                       | 52 ++++++++++++++++---
 2 files changed, 63 insertions(+), 8 deletions(-)
 create mode 100644 srcpkgs/maxima/patches/maxima-sbcl-with-gmp.patch

diff --git a/srcpkgs/maxima/patches/maxima-sbcl-with-gmp.patch b/srcpkgs/maxima/patches/maxima-sbcl-with-gmp.patch
new file mode 100644
index 000000000000..074631ea2ba0
--- /dev/null
+++ b/srcpkgs/maxima/patches/maxima-sbcl-with-gmp.patch
@@ -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*)
diff --git a/srcpkgs/maxima/template b/srcpkgs/maxima/template
index 1a4bec0dba18..69af367ca11d 100644
--- a/srcpkgs/maxima/template
+++ b/srcpkgs/maxima/template
@@ -1,7 +1,7 @@
 # Template file for 'maxima'
 pkgname=maxima
 version=5.45.1
-revision=2
+revision=3
 build_style=gnu-configure
 configure_args="$(vopt_enable clisp) $(vopt_enable sbcl sbcl-exec) $(vopt_enable ecl)"
 hostmakedepends="python3 perl emacs texinfo patchelf"
@@ -15,8 +15,15 @@ homepage="http://maxima.sourceforge.net"
 distfiles="${SOURCEFORGE_SITE}/maxima/maxima-${version}.tar.gz"
 checksum=fe9016276970bef214a1a244348558644514d7fdfaa4fc8b9d0e87afcbb4e7dc
 
-nostrip=yes
-nopie=yes
+# maxima-sbcl is nopie and should NOT be stripped or it won't work
+nostrip_files=/usr/lib/maxima/$version/binary-sbcl/maxima
+nopie_files=/usr/lib/maxima/$version/binary-sbcl/maxima
+
+if [ "$build_option_sbcl" ]; then
+	# binary-sbcl/maxima uses libgmp but this won't show up in objdump
+	shlib_requires=libgmp.so.10
+fi
+
 build_options="clisp sbcl ecl"
 desc_option_clisp="Build with CLISP"
 desc_option_sbcl="Build with SBCL"
@@ -24,6 +31,14 @@ desc_option_ecl="Build with ECL"
 build_options_default="sbcl ecl"
 vopt_conflict clisp sbcl
 
+post_configure() {
+	# do not rebuild these files if they exist
+	touch -c doc/info/*.html
+	touch -c doc/info/maxima.info*
+	touch -c doc/info/maxima_toc.html
+	touch -c interfaces/xmaxima/doc/xmaxima.html
+}
+
 post_build() {
 	if [ "$build_option_ecl" ]; then
 		# everything will go in the same directory, use rpath=$ORIGIN
@@ -38,13 +53,34 @@ post_build() {
 
 do_check() {
 	if [ "$build_option_ecl" ]; then
-		echo "Check that maxima.fas works"
-		ecl --eval "(require 'maxima \"src/binary-ecl/maxima.fas\")" \
-			--eval "(quit)"
+		echo "maxima-ecl: check that maxima.fas works (#34273)"
+		ecl --eval '(require :maxima "src/binary-ecl/maxima.fas")' \
+		    --eval '(quit)'
+		echo PASS
+		echo "maxima-ecl: check that unlimited heap-size works (#34861)"
+		./maxima-local -q -l ecl --batch-string=":lisp \
+			(ext:set-limit 'ext:heap-size 0)
+			showtime : true $
+			a : 10^(10^5) $
+			b : a^600 $
+			c : a^600 $
+			"
+		echo PASS
+	fi
+	if [ "$build_option_sbcl" ]; then
+		echo "maxima-sbcl: check that long arithmetic is fast (#34849)"
+		timeout -v 30s ./maxima-local -q -l sbcl --batch-string="
+			showtime : true $
+			a : 10^(10^5) $
+			b : a^1000 $
+			"
+		echo PASS
 	fi
 
-	# now run the testsuite
-	make ${makejobs} check
+	if [ "$XBPS_CHECK_PKGS" = full ]; then
+		# run the testsuite for all versions enabled
+		make ${makejobs} check
+	fi
 }
 
 post_install() {

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: maxima: fix #34849 and #34861
  2022-01-06  1:17 [PR PATCH] maxima: fix #34849 and #34861 tornaria
                   ` (3 preceding siblings ...)
  2022-01-10 12:14 ` [PR PATCH] [Updated] " tornaria
@ 2022-01-10 12:22 ` tornaria
  2022-01-11 15:55 ` [PR PATCH] [Merged]: " leahneukirchen
  5 siblings, 0 replies; 7+ messages in thread
From: tornaria @ 2022-01-10 12:22 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 214 bytes --]

New comment by tornaria on void-packages repository

https://github.com/void-linux/void-packages/pull/34887#issuecomment-1008824041

Comment:
Rebased on top of the sbcl update.

@leahneukirchen can we merge now?

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PR PATCH] [Merged]: maxima: fix #34849 and #34861
  2022-01-06  1:17 [PR PATCH] maxima: fix #34849 and #34861 tornaria
                   ` (4 preceding siblings ...)
  2022-01-10 12:22 ` tornaria
@ 2022-01-11 15:55 ` leahneukirchen
  5 siblings, 0 replies; 7+ messages in thread
From: leahneukirchen @ 2022-01-11 15:55 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 632 bytes --]

There's a merged pull request on the void-packages repository

maxima: fix #34849 and #34861
https://github.com/void-linux/void-packages/pull/34887

Description:
 - patch maxima-sbcl so it uses gmp for arithmetic (closes #34849)
   also add libgmp to shlib_requires since it won't be detected
 - remove `nopie=yes` to fix #34861, replace by `nopie_files`
 - remove `nostrip=yes`, replace by `nostrip_files`
 - add checks for #34849 and #34861
 - run testsuite only for full check (not in CI)
 - some html and info files are shipped with source: do not rebuild

I based this on top of #34886 so `nostrip_files` works better.

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2022-01-11 15:55 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-06  1:17 [PR PATCH] maxima: fix #34849 and #34861 tornaria
2022-01-06  1:38 ` [PR REVIEW] " abenson
2022-01-06  1:50 ` tornaria
2022-01-07 17:44 ` tornaria
2022-01-10 12:14 ` [PR PATCH] [Updated] " tornaria
2022-01-10 12:22 ` tornaria
2022-01-11 15:55 ` [PR PATCH] [Merged]: " leahneukirchen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).