[arch-commits] Commit in lcalc/repos (12 files)

Antonio Rojas arojas at archlinux.org
Mon Jan 5 12:03:10 UTC 2015


    Date: Monday, January 5, 2015 @ 13:03:10
  Author: arojas
Revision: 125408

archrelease: copy trunk to community-i686, community-x86_64

Added:
  lcalc/repos/community-i686/
  lcalc/repos/community-i686/Lcommon.h.patch
    (from rev 125407, lcalc/trunk/Lcommon.h.patch)
  lcalc/repos/community-i686/PKGBUILD
    (from rev 125407, lcalc/trunk/PKGBUILD)
  lcalc/repos/community-i686/gcc-4.9.patch
    (from rev 125407, lcalc/trunk/gcc-4.9.patch)
  lcalc/repos/community-i686/init_stack.patch
    (from rev 125407, lcalc/trunk/init_stack.patch)
  lcalc/repos/community-i686/pari-2.7.patch
    (from rev 125407, lcalc/trunk/pari-2.7.patch)
  lcalc/repos/community-x86_64/
  lcalc/repos/community-x86_64/Lcommon.h.patch
    (from rev 125407, lcalc/trunk/Lcommon.h.patch)
  lcalc/repos/community-x86_64/PKGBUILD
    (from rev 125407, lcalc/trunk/PKGBUILD)
  lcalc/repos/community-x86_64/gcc-4.9.patch
    (from rev 125407, lcalc/trunk/gcc-4.9.patch)
  lcalc/repos/community-x86_64/init_stack.patch
    (from rev 125407, lcalc/trunk/init_stack.patch)
  lcalc/repos/community-x86_64/pari-2.7.patch
    (from rev 125407, lcalc/trunk/pari-2.7.patch)

-----------------------------------+
 community-i686/Lcommon.h.patch    |   23 +++++++++++++++++
 community-i686/PKGBUILD           |   47 ++++++++++++++++++++++++++++++++++++
 community-i686/gcc-4.9.patch      |   24 ++++++++++++++++++
 community-i686/init_stack.patch   |   31 +++++++++++++++++++++++
 community-i686/pari-2.7.patch     |   34 ++++++++++++++++++++++++++
 community-x86_64/Lcommon.h.patch  |   23 +++++++++++++++++
 community-x86_64/PKGBUILD         |   47 ++++++++++++++++++++++++++++++++++++
 community-x86_64/gcc-4.9.patch    |   24 ++++++++++++++++++
 community-x86_64/init_stack.patch |   31 +++++++++++++++++++++++
 community-x86_64/pari-2.7.patch   |   34 ++++++++++++++++++++++++++
 10 files changed, 318 insertions(+)

Copied: lcalc/repos/community-i686/Lcommon.h.patch (from rev 125407, lcalc/trunk/Lcommon.h.patch)
===================================================================
--- community-i686/Lcommon.h.patch	                        (rev 0)
+++ community-i686/Lcommon.h.patch	2015-01-05 12:03:10 UTC (rev 125408)
@@ -0,0 +1,23 @@
+--- L-1.23/include/Lcommon.h.orig	2011-04-09 04:09:25.984121006 -0300
++++ L-1.23/include/Lcommon.h	2011-04-09 04:09:58.750265003 -0300
+@@ -25,6 +25,8 @@ inline double lcalc_to_double(const Doub
+ #ifdef USE_MPFR
+ inline double lcalc_to_double(const double& x) { return x; }
+ #endif
++
++#if 0
+ //inline double lcalc_to_double(const long double& x) { return x; }
+ inline double lcalc_to_double(const int& x) { return x; }
+ inline double lcalc_to_double(const long long& x) { return x; }
+@@ -33,6 +35,10 @@ inline double lcalc_to_double(const char
+ inline double lcalc_to_double(const long int& x) { return x; }
+ inline double lcalc_to_double(const unsigned int& x) { return x; }
+ inline double lcalc_to_double(const long unsigned int& x) { return x; }
++#else
++#  define lcalc_to_double(x)	((double)(x))
++#endif
++
+ #define Int(x) (int)(lcalc_to_double(x))
+ #define Long(x) (Long)(lcalc_to_double(x))
+ #define double(x) (double)(lcalc_to_double(x))
+ 
\ No newline at end of file

Copied: lcalc/repos/community-i686/PKGBUILD (from rev 125407, lcalc/trunk/PKGBUILD)
===================================================================
--- community-i686/PKGBUILD	                        (rev 0)
+++ community-i686/PKGBUILD	2015-01-05 12:03:10 UTC (rev 125408)
@@ -0,0 +1,47 @@
+# Maintainer: Antonio Rojas <arojas at archlinux.org>
+
+pkgname=lcalc
+pkgver=1.23
+pkgrel=4
+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')
+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')
+md5sums=('8262d4495e0bbe0283e5341ef8694c23'
+         '8af1dd6d3118bb785f193283a31305a2'
+         '436dd35b06766dffad0941bcfb511e89'
+         '9829d36d0c68e37f2692f44cbb6df535'
+         'c1de0b9cdfa9991e980c34092a43dddf')
+
+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
+}
+
+build() {
+  cd L-$pkgver/src
+  make PARI_DEFINE="-DINCLUDE_PARI" LOCATION_PARI_H="/usr/include/pari"	LOCATION_PARI_LIBRARY="/usr/lib" all
+}
+
+package() {
+  cd L-$pkgver/src
+  mkdir -p "$pkgdir"/usr/{bin,include,lib}
+  make INSTALL_DIR="$pkgdir"/usr install
+
+# remove leftover files
+  rm "$pkgdir"/usr/include/Lfunction/{Lexplicit_formula.h.swap.crap,.*.swp,.DS*}
+# fix wrong permissions
+  chmod 644 "$pkgdir"/usr/include/Lfunction/Ldokchitser.h
+# fix insecure rpath
+  chrpath -d "$pkgdir"/usr/bin/lcalc
+}
+

Copied: lcalc/repos/community-i686/gcc-4.9.patch (from rev 125407, lcalc/trunk/gcc-4.9.patch)
===================================================================
--- community-i686/gcc-4.9.patch	                        (rev 0)
+++ community-i686/gcc-4.9.patch	2015-01-05 12:03:10 UTC (rev 125408)
@@ -0,0 +1,24 @@
+diff -Naur lcalc-1.23-vanilla/include/Ldirichlet_series.h lcalc-1.23-fixed-gcc.4.9/include/Ldirichlet_series.h
+--- lcalc-1.23-vanilla/include/Ldirichlet_series.h	2012-08-08 23:21:55.000000000 +0200
++++ lcalc-1.23-fixed-gcc.4.9/include/Ldirichlet_series.h	2014-04-21 14:37:59.027464849 +0200
+@@ -43,7 +43,7 @@
+  //XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
+ template <class ttype>
+ Complex L_function <ttype>::
+-dirichlet_series(Complex s, long long N=-1)
++dirichlet_series(Complex s, long long N)
+ {
+     Complex z=0.;
+     long long m,n;
+diff -Naur lcalc-1.23-vanilla/include/L.h lcalc-1.23-fixed-gcc.4.9/include/L.h
+--- lcalc-1.23-vanilla/include/L.h	2012-08-08 23:21:55.000000000 +0200
++++ lcalc-1.23-fixed-gcc.4.9/include/L.h	2014-04-21 14:32:04.003467348 +0200
+@@ -491,7 +491,7 @@
+ 
+     //#include "Ldirichlet_series.h" //for computing Dirichlet series
+     Complex partial_dirichlet_series(Complex s, long long N1, long long N2);
+-    Complex dirichlet_series(Complex s, long long N);
++    Complex dirichlet_series(Complex s, long long N=-1LL);
+ 
+     //#include "Ltaylor_series.h" //for computing taylor series for Dirichlet series
+     //void compute_taylor_series(int N, int K, Complex s_0, Complex *series);

Copied: lcalc/repos/community-i686/init_stack.patch (from rev 125407, lcalc/trunk/init_stack.patch)
===================================================================
--- community-i686/init_stack.patch	                        (rev 0)
+++ community-i686/init_stack.patch	2015-01-05 12:03:10 UTC (rev 125408)
@@ -0,0 +1,31 @@
+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); 
+         }

Copied: lcalc/repos/community-i686/pari-2.7.patch (from rev 125407, lcalc/trunk/pari-2.7.patch)
===================================================================
--- community-i686/pari-2.7.patch	                        (rev 0)
+++ community-i686/pari-2.7.patch	2015-01-05 12:03:10 UTC (rev 125408)
@@ -0,0 +1,34 @@
+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
+@@ -121,11 +121,11 @@
+ 
+ 
+     F = cgetg(6, t_VEC);
+-    F[1] = lgeti(BIGDEFAULTPREC);
+-    F[2] = lgeti(BIGDEFAULTPREC);
+-    F[3] = lgeti(BIGDEFAULTPREC);
+-    F[4] = lgeti(BIGDEFAULTPREC);
+-    F[5] = lgeti(BIGDEFAULTPREC);
++    F[1] = (long)cgeti(BIGDEFAULTPREC);
++    F[2] = (long)cgeti(BIGDEFAULTPREC);
++    F[3] = (long)cgeti(BIGDEFAULTPREC);
++    F[4] = (long)cgeti(BIGDEFAULTPREC);
++    F[5] = (long)cgeti(BIGDEFAULTPREC);
+ 
+     //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]);
+ 
+-    E = initell(F,BIGDEFAULTPREC);
++    E = ellinit(F, NULL, BIGDEFAULTPREC);
+ 
+     C=globalreduction(E);
+ 

Copied: lcalc/repos/community-x86_64/Lcommon.h.patch (from rev 125407, lcalc/trunk/Lcommon.h.patch)
===================================================================
--- community-x86_64/Lcommon.h.patch	                        (rev 0)
+++ community-x86_64/Lcommon.h.patch	2015-01-05 12:03:10 UTC (rev 125408)
@@ -0,0 +1,23 @@
+--- L-1.23/include/Lcommon.h.orig	2011-04-09 04:09:25.984121006 -0300
++++ L-1.23/include/Lcommon.h	2011-04-09 04:09:58.750265003 -0300
+@@ -25,6 +25,8 @@ inline double lcalc_to_double(const Doub
+ #ifdef USE_MPFR
+ inline double lcalc_to_double(const double& x) { return x; }
+ #endif
++
++#if 0
+ //inline double lcalc_to_double(const long double& x) { return x; }
+ inline double lcalc_to_double(const int& x) { return x; }
+ inline double lcalc_to_double(const long long& x) { return x; }
+@@ -33,6 +35,10 @@ inline double lcalc_to_double(const char
+ inline double lcalc_to_double(const long int& x) { return x; }
+ inline double lcalc_to_double(const unsigned int& x) { return x; }
+ inline double lcalc_to_double(const long unsigned int& x) { return x; }
++#else
++#  define lcalc_to_double(x)	((double)(x))
++#endif
++
+ #define Int(x) (int)(lcalc_to_double(x))
+ #define Long(x) (Long)(lcalc_to_double(x))
+ #define double(x) (double)(lcalc_to_double(x))
+ 
\ No newline at end of file

Copied: lcalc/repos/community-x86_64/PKGBUILD (from rev 125407, lcalc/trunk/PKGBUILD)
===================================================================
--- community-x86_64/PKGBUILD	                        (rev 0)
+++ community-x86_64/PKGBUILD	2015-01-05 12:03:10 UTC (rev 125408)
@@ -0,0 +1,47 @@
+# Maintainer: Antonio Rojas <arojas at archlinux.org>
+
+pkgname=lcalc
+pkgver=1.23
+pkgrel=4
+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')
+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')
+md5sums=('8262d4495e0bbe0283e5341ef8694c23'
+         '8af1dd6d3118bb785f193283a31305a2'
+         '436dd35b06766dffad0941bcfb511e89'
+         '9829d36d0c68e37f2692f44cbb6df535'
+         'c1de0b9cdfa9991e980c34092a43dddf')
+
+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
+}
+
+build() {
+  cd L-$pkgver/src
+  make PARI_DEFINE="-DINCLUDE_PARI" LOCATION_PARI_H="/usr/include/pari"	LOCATION_PARI_LIBRARY="/usr/lib" all
+}
+
+package() {
+  cd L-$pkgver/src
+  mkdir -p "$pkgdir"/usr/{bin,include,lib}
+  make INSTALL_DIR="$pkgdir"/usr install
+
+# remove leftover files
+  rm "$pkgdir"/usr/include/Lfunction/{Lexplicit_formula.h.swap.crap,.*.swp,.DS*}
+# fix wrong permissions
+  chmod 644 "$pkgdir"/usr/include/Lfunction/Ldokchitser.h
+# fix insecure rpath
+  chrpath -d "$pkgdir"/usr/bin/lcalc
+}
+

Copied: lcalc/repos/community-x86_64/gcc-4.9.patch (from rev 125407, lcalc/trunk/gcc-4.9.patch)
===================================================================
--- community-x86_64/gcc-4.9.patch	                        (rev 0)
+++ community-x86_64/gcc-4.9.patch	2015-01-05 12:03:10 UTC (rev 125408)
@@ -0,0 +1,24 @@
+diff -Naur lcalc-1.23-vanilla/include/Ldirichlet_series.h lcalc-1.23-fixed-gcc.4.9/include/Ldirichlet_series.h
+--- lcalc-1.23-vanilla/include/Ldirichlet_series.h	2012-08-08 23:21:55.000000000 +0200
++++ lcalc-1.23-fixed-gcc.4.9/include/Ldirichlet_series.h	2014-04-21 14:37:59.027464849 +0200
+@@ -43,7 +43,7 @@
+  //XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
+ template <class ttype>
+ Complex L_function <ttype>::
+-dirichlet_series(Complex s, long long N=-1)
++dirichlet_series(Complex s, long long N)
+ {
+     Complex z=0.;
+     long long m,n;
+diff -Naur lcalc-1.23-vanilla/include/L.h lcalc-1.23-fixed-gcc.4.9/include/L.h
+--- lcalc-1.23-vanilla/include/L.h	2012-08-08 23:21:55.000000000 +0200
++++ lcalc-1.23-fixed-gcc.4.9/include/L.h	2014-04-21 14:32:04.003467348 +0200
+@@ -491,7 +491,7 @@
+ 
+     //#include "Ldirichlet_series.h" //for computing Dirichlet series
+     Complex partial_dirichlet_series(Complex s, long long N1, long long N2);
+-    Complex dirichlet_series(Complex s, long long N);
++    Complex dirichlet_series(Complex s, long long N=-1LL);
+ 
+     //#include "Ltaylor_series.h" //for computing taylor series for Dirichlet series
+     //void compute_taylor_series(int N, int K, Complex s_0, Complex *series);

Copied: lcalc/repos/community-x86_64/init_stack.patch (from rev 125407, lcalc/trunk/init_stack.patch)
===================================================================
--- community-x86_64/init_stack.patch	                        (rev 0)
+++ community-x86_64/init_stack.patch	2015-01-05 12:03:10 UTC (rev 125408)
@@ -0,0 +1,31 @@
+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); 
+         }

Copied: lcalc/repos/community-x86_64/pari-2.7.patch (from rev 125407, lcalc/trunk/pari-2.7.patch)
===================================================================
--- community-x86_64/pari-2.7.patch	                        (rev 0)
+++ community-x86_64/pari-2.7.patch	2015-01-05 12:03:10 UTC (rev 125408)
@@ -0,0 +1,34 @@
+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
+@@ -121,11 +121,11 @@
+ 
+ 
+     F = cgetg(6, t_VEC);
+-    F[1] = lgeti(BIGDEFAULTPREC);
+-    F[2] = lgeti(BIGDEFAULTPREC);
+-    F[3] = lgeti(BIGDEFAULTPREC);
+-    F[4] = lgeti(BIGDEFAULTPREC);
+-    F[5] = lgeti(BIGDEFAULTPREC);
++    F[1] = (long)cgeti(BIGDEFAULTPREC);
++    F[2] = (long)cgeti(BIGDEFAULTPREC);
++    F[3] = (long)cgeti(BIGDEFAULTPREC);
++    F[4] = (long)cgeti(BIGDEFAULTPREC);
++    F[5] = (long)cgeti(BIGDEFAULTPREC);
+ 
+     //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]);
+ 
+-    E = initell(F,BIGDEFAULTPREC);
++    E = ellinit(F, NULL, BIGDEFAULTPREC);
+ 
+     C=globalreduction(E);
+ 



More information about the arch-commits mailing list