[lcalc] 01/02: Apply two patches to allow building with PARI 2.9.

Tobias Hansen thansen at moszumanska.debian.org
Sun Oct 23 18:16:30 UTC 2016


This is an automated email from the git hooks/post-receive script.

thansen pushed a commit to branch master
in repository lcalc.

commit 03e50bf878b63958642762e136945cb7550486a2
Author: Tobias Hansen <thansen at broeselmaschine.fc.up.pt>
Date:   Sun Oct 23 19:08:13 2016 +0100

    Apply two patches to allow building with PARI 2.9.
---
 debian/changelog                     |  6 ++++++
 debian/patches/pari-apell.patch      | 39 ++++++++++++++++++++++++++++++++++++
 debian/patches/pari-init-stack.patch | 19 ++++++++++++++++++
 debian/patches/series                |  2 ++
 4 files changed, 66 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index f8f08dc..45cb4ef 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+lcalc (1.23+dfsg-6) UNRELEASED; urgency=medium
+
+  * Apply two patches to allow building with PARI 2.9. (Closes: #841738)
+
+ -- Tobias Hansen <thansen at debian.org>  Sun, 23 Oct 2016 19:07:06 +0100
+
 lcalc (1.23+dfsg-5) unstable; urgency=medium
 
   * Add patch lcalc-1.23_default_parameters_2.patch from Sage to
diff --git a/debian/patches/pari-apell.patch b/debian/patches/pari-apell.patch
new file mode 100644
index 0000000..517958b
--- /dev/null
+++ b/debian/patches/pari-apell.patch
@@ -0,0 +1,39 @@
+Description: This is required in order to build against PARI 2.9.
+Author: Bill Allombert <ballombe at debian.org>
+Bug-Debian: http://bugs.debian.org/841738
+
+--- a/src/Lcommandline_elliptic.cc
++++ b/src/Lcommandline_elliptic.cc
+@@ -133,15 +133,15 @@
+     //gaffsg(a4,(GEN) F[4]);
+     //gaffsg(a6,(GEN) F[5]);
+ 
+-    gaffect(strtoGEN(a1), (GEN) F[1]);
+-    gaffect(strtoGEN(a2), (GEN) F[2]);
+-    gaffect(strtoGEN(a3), (GEN) F[3]);
+-    gaffect(strtoGEN(a4), (GEN) F[4]);
+-    gaffect(strtoGEN(a6), (GEN) F[5]);
++    gaffect(gp_read_str(a1), (GEN) F[1]);
++    gaffect(gp_read_str(a2), (GEN) F[2]);
++    gaffect(gp_read_str(a3), (GEN) F[3]);
++    gaffect(gp_read_str(a4), (GEN) F[4]);
++    gaffect(gp_read_str(a6), (GEN) F[5]);
+ 
+     E = ellinit(F, NULL, BIGDEFAULTPREC);
+ 
+-    C=globalreduction(E);
++    C=ellglobalred(E);
+ 
+     x=gtodouble((GEN) C[1]);
+ 
+@@ -167,8 +167,8 @@
+ 
+             p=n;
+             gaffsg(p,y);
+-            coeff[p] = Double(1.*llrint(gtodouble(apell(E,y))))/sqrt(Double(1.*p));
+-            //coeff[p] = Double(1.*Long(gtodouble(apell(E,y))+.1))/sqrt(Double(1.*p));
++            coeff[p] = Double(1.*llrint(gtodouble(ellap(E,y))))/sqrt(Double(1.*p));
++            //coeff[p] = Double(1.*Long(gtodouble(ellap(E,y))+.1))/sqrt(Double(1.*p));
+ 
+             if(gtolong(gmod((GEN) E[12],(GEN) y))==0) // if p|discriminant, i.e. bad reduction
+             {
diff --git a/debian/patches/pari-init-stack.patch b/debian/patches/pari-init-stack.patch
new file mode 100644
index 0000000..b4ef849
--- /dev/null
+++ b/debian/patches/pari-init-stack.patch
@@ -0,0 +1,19 @@
+Description: Always use pari_init_stack
+ This is required in order to build against PARI 2.9.
+Author: Bill Allombert <ballombe at debian.org>
+Bug-Debian: http://bugs.debian.org/841738
+
+--- a/src/Lcommandline.cc
++++ b/src/Lcommandline.cc
+@@ -473,7 +473,11 @@
+ 
+ #ifdef INCLUDE_PARI
+         if(do_elliptic_curve){
++#if PARI_VERSION_CODE >= PARI_VERSION(2,8,0)
++             paristack_resize((size_t)N_terms*16 + 1000000);
++#else
+              pari_init_stack((size_t)N_terms*16 + 1000000, top-bot); // Allocate bigger PARI stack
++#endif
+              if (my_verbose>0) cout << "Will precompute " << N_terms << " elliptic L-function dirichlet coefficients..." << endl;
+              initialize_new_L(a1,a2,a3,a4,a6,N_terms); 
+         }
diff --git a/debian/patches/series b/debian/patches/series
index d1e6c09..f22617f 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -5,3 +5,5 @@ fix_pari_include.patch
 lcalc-1.23_default_parameters_1.patch
 init_stack.patch
 lcalc-1.23_default_parameters_2.patch
+pari-apell.patch
+pari-init-stack.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/lcalc.git



More information about the debian-science-commits mailing list