giac: missing dependencies and fixes

- makedepend on mpfr-devel: used for arbitrary precision floats,
   otherwise they are limited to double precision (53 bits ~ 13 digits)

 - makedepend on pari-devel: used for number theory functions

 - fix one line of test output to match a change in pari

 - fix a bug in invmod which resulted in a test fail (chk_xavier)

 - increase stacksize in musl which is needed for tests to pass

In addition to the two new makedepends, there is a small patch that
fixes one line of test output to match a change in pari.

With this commit, all 12 tests pass in glibc and in musl.

See #28989 for the original issue.
This commit is contained in:
Gonzalo Tornaría 2021-02-22 20:02:13 -03:00 committed by Érico Nogueira Rolim
parent 7dfd097b9e
commit 7bc92c1e6e
4 changed files with 37 additions and 2 deletions

View file

@ -3964,4 +3964,5 @@ libopenaptx.so.0 libopenaptx-0.2.0_1
libsimavr.so.1 simavr-1.6_2
libsimavrparts.so.1 simavr-1.6_2
libsword-1.8.1.so libsword-1.8.1_6
libpari-gmp.so.7 pari-2.13.0_1
libtree-sitter.so.0 tree-sitter-0.19.0_1

View file

@ -0,0 +1,14 @@
--- src/modpoly.cc.orig 2020-02-18 10:07:10.000000000 -0300
+++ src/modpoly.cc 2021-03-08 02:18:09.443740199 -0300
@@ -92,7 +92,10 @@
gen invenv(const gen & g,environment * env){
if (g.type==_USER)
return g._USERptr->inv();
- return invmod(g,env->modulo);
+ if (env->moduloon)
+ return invmod(g,env->modulo);
+ else
+ return gen(1)/g;
}
/*

View file

@ -0,0 +1,17 @@
Change test output for PARI 2.11
See https://trac.sagemath.org/ticket/25567
and https://xcas.univ-grenoble-alpes.fr/forum/viewtopic.php?f=4&t=2102
diff -ru a/check/TP11-sol.cas.out1 b/check/TP11-sol.cas.out1
--- check/TP11-sol.cas.out1 2014-10-21 10:51:48.000000000 +0200
+++ check/TP11-sol.cas.out1 2018-08-07 17:04:12.528052773 +0200
@@ -10,7 +10,7 @@
1073741824000000000000000000061203284109000000000000000000000000008409,
2^3*3*389*733*156904374622257604823879982847602392900751802349981470895277241,
"Done",
-matrix[[2,7,1],[3,2,1],[389,2,1],[733,2,1],[156904374622257604823879982847602392900751802349981470895277241,2,matrix[[2,13,1],[3,3,1],[5,2,1],[7,2,1],[56467,2,1],[6553084925887974620811527,2,matrix[[2,5,1],[19,2,1],[71,2,1],[126823,2,1]]]]]],
+1,
0,
[],
1,

View file

@ -1,11 +1,11 @@
# Template file for 'giac'
pkgname=giac
version=1.5.0.87
revision=3
revision=4
wrksrc="giac-${version%.*}"
build_style=gnu-configure
makedepends="fltk-devel gmp-devel gsl-devel lapack-devel
libjpeg-turbo-devel libpng-devel readline-devel"
libjpeg-turbo-devel libpng-devel readline-devel mpfr-devel pari-devel"
depends="desktop-file-utils hicolor-icon-theme"
short_desc="Free computer algebra system"
maintainer="Orphaned <orphan@voidlinux.org>"
@ -14,6 +14,9 @@ homepage="https://www-fourier.ujf-grenoble.fr/~parisse/giac.html"
distfiles="https://www-fourier.ujf-grenoble.fr/~parisse/debian/dists/stable/main/source/giac_${version%.*}-${version##*.}.tar.gz"
checksum=bbd6f0aafe373de3c9ed53d21878224e847359fdd9a7cdf9e9096e7c960f10b4
# need more than 4*65536 stack, see try_parse() in gen.cc line 11812
LDFLAGS="-Wl,-z,stack-size=2097152"
post_install() {
# remove duplicates
rm -r ${DESTDIR}/usr/share/doc