[arch-commits] Commit in lcalc/trunk (PKGBUILD init_stack.patch pari-2.7.patch)
Antonio Rojas
arojas at archlinux.org
Sun Apr 12 13:42:12 UTC 2015
Date: Sunday, April 12, 2015 @ 15:42:12
Author: arojas
Revision: 131239
Rebuild against pari-git
Modified:
lcalc/trunk/PKGBUILD
lcalc/trunk/pari-2.7.patch
Deleted:
lcalc/trunk/init_stack.patch
------------------+
PKGBUILD | 12 +++--------
init_stack.patch | 31 ----------------------------
pari-2.7.patch | 57 +++++++++++++++++++++++++++++++++++++++++------------
3 files changed, 49 insertions(+), 51 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2015-04-12 13:32:47 UTC (rev 131238)
+++ PKGBUILD 2015-04-12 13:42:12 UTC (rev 131239)
@@ -3,27 +3,23 @@
pkgname=lcalc
pkgver=1.23
-pkgrel=4
+pkgrel=5
pkgdesc="C++ L-function class library and command line interface"
arch=('i686' 'x86_64')
url="http://oto.math.uwaterloo.ca/~mrubinst/L_function_public/L.html"
license=('GPL2')
-depends=('pari')
+depends=('pari-git')
makedepends=('chrpath')
-source=("http://oto.math.uwaterloo.ca/~mrubinst/L_function_public/CODE/L-$pkgver.tar.gz" 'Lcommon.h.patch' 'gcc-4.9.patch' 'pari-2.7.patch'
-'init_stack.patch')
+source=("http://oto.math.uwaterloo.ca/~mrubinst/L_function_public/CODE/L-$pkgver.tar.gz" 'Lcommon.h.patch' 'gcc-4.9.patch' 'pari-2.7.patch')
md5sums=('8262d4495e0bbe0283e5341ef8694c23'
'8af1dd6d3118bb785f193283a31305a2'
'436dd35b06766dffad0941bcfb511e89'
- '9829d36d0c68e37f2692f44cbb6df535'
- 'c1de0b9cdfa9991e980c34092a43dddf')
+ '187024b6d6f259209645af68ca8787f2')
prepare() {
cd L-$pkgver
patch -p1 -i "$srcdir"/Lcommon.h.patch
patch -p1 -i "$srcdir"/gcc-4.9.patch
-# Use pari_init_stack() instead of old allocatemoremem()
- patch -p1 -i "$srcdir"/init_stack.patch
# port to PARI 2.7 API
patch -p1 -i "$srcdir"/pari-2.7.patch
}
Deleted: init_stack.patch
===================================================================
--- init_stack.patch 2015-04-12 13:32:47 UTC (rev 131238)
+++ init_stack.patch 2015-04-12 13:42:12 UTC (rev 131239)
@@ -1,31 +0,0 @@
-diff -ru src/include/Lcommandline.h b/include/Lcommandline.h
---- src/include/Lcommandline.h 2012-08-08 23:21:55.000000000 +0200
-+++ b/include/Lcommandline.h 2014-01-06 14:04:55.981027532 +0100
-@@ -40,12 +40,7 @@
- #include "Lcommandline_globals.h" //command line global variables
- #ifdef INCLUDE_PARI
- #include "pari.h" //for pari's elliptic curve functions
--#undef init //pari has a '#define init pari_init' which
-- //causes trouble with the stream.h init.
-- //pari also causes trouble with things like abs.
-- //we place the pari include first since otherwise it
-- //messes up.
--
-+#include "paripriv.h" //for pari_init_stack()
- #endif //ifdef INCLUDE_PARI
-
-
-diff -ru src/src/Lcommandline.cc b/src/Lcommandline.cc
---- src/src/Lcommandline.cc 2012-08-08 23:21:56.000000000 +0200
-+++ b/src/Lcommandline.cc 2014-01-06 14:02:19.463388366 +0100
-@@ -473,7 +473,9 @@
-
- #ifdef INCLUDE_PARI
- if(do_elliptic_curve){
-- allocatemoremem((int) N_terms*16+1000000); //XXXXXXXXX this should depend on whether we're double or long double or mpfr double
-+ // Reallocate PARI stack
-+ pari_init_stack((size_t)N_terms*16 + 1000000, top-bot); //XXXXXXXXX this should depend on whether we're double or long double or mpfr double
-+
- 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);
- }
Modified: pari-2.7.patch
===================================================================
--- pari-2.7.patch 2015-04-12 13:32:47 UTC (rev 131238)
+++ pari-2.7.patch 2015-04-12 13:42:12 UTC (rev 131239)
@@ -1,11 +1,5 @@
-Description: Port to pari 2.7 API
-Author: Luca Falavigna <dktrkranz at debian.org>
- Tobias Hansen <thansen at debian.org>
-Bug-Debian: http://bugs.debian.org/635506
- http://bugs.debian.org/743327
-
---- a/src/Lcommandline_elliptic.cc
-+++ b/src/Lcommandline_elliptic.cc
+--- src/src/Lcommandline_elliptic.cc 2010-01-31 16:16:45.000000000 +0100
++++ src/src/Lcommandline_elliptic.cc 2011-05-10 17:08:10.000000000 +0200
@@ -121,11 +121,11 @@
@@ -23,12 +17,51 @@
//gaffsg(a1,(GEN) F[1]);
//gaffsg(a2,(GEN) F[2]);
-@@ -139,7 +139,7 @@
- gaffect(strtoGEN(a4), (GEN) F[4]);
- gaffect(strtoGEN(a6), (GEN) F[5]);
+@@ -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 = initell(F,BIGDEFAULTPREC);
+ E = ellinit(F, NULL, BIGDEFAULTPREC);
- C=globalreduction(E);
+- 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 -ru src/src/Lcommandline.cc b/src/Lcommandline.cc
+--- src/src/Lcommandline.cc 2012-08-08 23:21:56.000000000 +0200
++++ b/src/Lcommandline.cc 2014-01-06 14:02:19.463388366 +0100
+@@ -473,7 +473,9 @@
+
+ #ifdef INCLUDE_PARI
+ if(do_elliptic_curve){
+- allocatemoremem((int) N_terms*16+1000000); //XXXXXXXXX this should depend on whether we're double or long double or mpfr double
++ // Reallocate PARI stack
++ paristack_setsize((size_t)N_terms*16 + 1000000, 0); //XXXXXXXXX this should depend on whether we're double or long double or mpfr double
++
+ 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);
+ }
More information about the arch-commits
mailing list