From 2ce003ae28d51b5675d8e29b8d7abe71cc460a16 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= Date: Mon, 22 Feb 2021 20:02:13 -0300 Subject: [PATCH 1/3] giac: makedepend on mpfr-devel and pari-devel - mpfr is used for arbitrary precision floats, otherwise they are limited to double precision (53 bits ~ 13 digits) - pari is used for number theory functions 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, make check goes from 12 tests failed to 1 test failed. See #28989. --- common/shlibs | 1 + srcpkgs/giac/patches/pari_2_11.patch | 17 +++++++++++++++++ srcpkgs/giac/template | 4 ++-- 3 files changed, 20 insertions(+), 2 deletions(-) create mode 100644 srcpkgs/giac/patches/pari_2_11.patch diff --git a/common/shlibs b/common/shlibs index a911b3892cbc..25e15aed6306 100644 --- a/common/shlibs +++ b/common/shlibs @@ -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 diff --git a/srcpkgs/giac/patches/pari_2_11.patch b/srcpkgs/giac/patches/pari_2_11.patch new file mode 100644 index 000000000000..7bd12dd1ce7b --- /dev/null +++ b/srcpkgs/giac/patches/pari_2_11.patch @@ -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, diff --git a/srcpkgs/giac/template b/srcpkgs/giac/template index ba2d1a55b739..2eb82c5d62bb 100644 --- a/srcpkgs/giac/template +++ b/srcpkgs/giac/template @@ -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 " From b7b2b850cc58cacf57b8d9b27627cbb2d91da494 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= Date: Tue, 2 Mar 2021 18:25:47 -0300 Subject: [PATCH 2/3] giac: fix stack size issue in musl --- srcpkgs/giac/patches/stacksize.patch | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 srcpkgs/giac/patches/stacksize.patch diff --git a/srcpkgs/giac/patches/stacksize.patch b/srcpkgs/giac/patches/stacksize.patch new file mode 100644 index 000000000000..3f700f6638d0 --- /dev/null +++ b/srcpkgs/giac/patches/stacksize.patch @@ -0,0 +1,11 @@ +--- src/gen.cc.orig 2020-02-10 16:46:44.000000000 -0300 ++++ src/gen.cc 2021-03-02 18:19:23.426972309 -0300 +@@ -11803,7 +11803,7 @@ + return 1; + } + } +-#if !defined(WIN32) && defined(HAVE_PTHREAD_H) ++#if !defined(WIN32) && defined(HAVE_PTHREAD_H) && defined __GLIBC__ + if (contextptr && thread_param_ptr(contextptr)->stackaddr && thread_param_ptr(contextptr)->stacksize/2){ + gen er; + short int err=s.size(); From 1aea2be3c2e951b94366698cf1c309cd8c2fd9a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= Date: Sun, 7 Mar 2021 23:30:16 -0300 Subject: [PATCH 3/3] giac: different fix, increase stacksize in musl --- srcpkgs/giac/patches/stacksize.patch | 11 ----------- srcpkgs/giac/template | 5 +++++ 2 files changed, 5 insertions(+), 11 deletions(-) delete mode 100644 srcpkgs/giac/patches/stacksize.patch diff --git a/srcpkgs/giac/patches/stacksize.patch b/srcpkgs/giac/patches/stacksize.patch deleted file mode 100644 index 3f700f6638d0..000000000000 --- a/srcpkgs/giac/patches/stacksize.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- src/gen.cc.orig 2020-02-10 16:46:44.000000000 -0300 -+++ src/gen.cc 2021-03-02 18:19:23.426972309 -0300 -@@ -11803,7 +11803,7 @@ - return 1; - } - } --#if !defined(WIN32) && defined(HAVE_PTHREAD_H) -+#if !defined(WIN32) && defined(HAVE_PTHREAD_H) && defined __GLIBC__ - if (contextptr && thread_param_ptr(contextptr)->stackaddr && thread_param_ptr(contextptr)->stacksize/2){ - gen er; - short int err=s.size(); diff --git a/srcpkgs/giac/template b/srcpkgs/giac/template index 2eb82c5d62bb..49c386557510 100644 --- a/srcpkgs/giac/template +++ b/srcpkgs/giac/template @@ -14,6 +14,11 @@ 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 +if [ "$XBPS_TARGET_LIBC" = musl ]; then + # need more than 4*65536 stack, see try_parse() in gen.cc line 11812 + LDFLAGS+=" -Wl,-z,stack-size=1048576" +fi + post_install() { # remove duplicates rm -r ${DESTDIR}/usr/share/doc