[arch-commits] Commit in lcalc/trunk (PKGBUILD lcalc-c++11.patch)
Antonio Rojas
arojas at archlinux.org
Sun Apr 8 23:11:12 UTC 2018
Date: Sunday, April 8, 2018 @ 23:11:04
Author: arojas
Revision: 315358
Make headers c++11 compliant for compatibility with ntl 11
Added:
lcalc/trunk/lcalc-c++11.patch
Modified:
lcalc/trunk/PKGBUILD
-------------------+
PKGBUILD | 17 ++++++++++-------
lcalc-c++11.patch | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 61 insertions(+), 7 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2018-04-08 22:57:24 UTC (rev 315357)
+++ PKGBUILD 2018-04-08 23:11:04 UTC (rev 315358)
@@ -3,7 +3,7 @@
pkgname=lcalc
pkgver=1.23
-pkgrel=15
+pkgrel=16
pkgdesc="C++ L-function class library and command line interface"
arch=(x86_64)
url="http://oto.math.uwaterloo.ca/~mrubinst/L_function_public/L.html"
@@ -12,22 +12,25 @@
makedepends=(chrpath)
#source=("http://oto.math.uwaterloo.ca/~mrubinst/L_function_public/CODE/L-$pkgver.tar.gz"
source=("http://mirrors.mit.edu/sage/spkg/upstream/lcalc/lcalc-$pkgver.tar.bz2"
- 'Lcommon.h.patch' 'gcc-4.9.patch' 'pari-2.7.patch' 'gcc-5.patch')
+ Lcommon.h.patch gcc-4.9.patch pari-2.7.patch gcc-5.patch lcalc-c++11.patch)
md5sums=('de7dc4e06cff7a89c5d922b4acc2be01'
'8af1dd6d3118bb785f193283a31305a2'
'436dd35b06766dffad0941bcfb511e89'
'187024b6d6f259209645af68ca8787f2'
- '88d8a28a75e0bc143d0898f2797d1c54')
+ '88d8a28a75e0bc143d0898f2797d1c54'
+ 'ad0fcfb066e92fa57b32a78d11f434e1')
prepare() {
cd $pkgname-$pkgver
- patch -p1 -i "$srcdir"/Lcommon.h.patch
- patch -p1 -i "$srcdir"/gcc-4.9.patch
- patch -p1 -i "$srcdir"/gcc-5.patch
+ patch -p1 -i ../Lcommon.h.patch
+ patch -p1 -i ../gcc-4.9.patch
+ patch -p1 -i ../gcc-5.patch
# port to PARI 2.7 API
- patch -p1 -i "$srcdir"/pari-2.7.patch
+ patch -p1 -i ../pari-2.7.patch
# Install headers where Sage expects them
sed -e 's|include/Lfunction|include/libLfunction|g' -i src/Makefile
+# make headers C++11 compliant
+ patch -p1 -i ../lcalc-c++11.patch
}
build() {
Added: lcalc-c++11.patch
===================================================================
--- lcalc-c++11.patch (rev 0)
+++ lcalc-c++11.patch 2018-04-08 23:11:04 UTC (rev 315358)
@@ -0,0 +1,51 @@
+diff --git a/include/Lcommon.h b/include/Lcommon.h
+index 1b3be43..081fcb8 100644
+--- a/include/Lcommon.h
++++ b/include/Lcommon.h
+@@ -48,7 +48,7 @@ const bool outputSeries=true; // Whether to output the coefficients or just th
+
+ // Loop i from m to n
+ // Useful in tidying up most for loops
+-#define loop(i,m,n) for(typeof(m) i=(m); i!=(n); i++)
++#define loop(i,m,n) for(decltype(m) i=(m); i!=(n); i++)
+
+ // A class for calculations involving polynomials of small degree
+ // Not efficient enough for huge polynomials
+@@ -68,8 +68,7 @@ template<class T=Complex> struct smallPoly {
+
+ void resize(int N) {
+ coeffs.resize(N);
+- loop(i,this->N,N)
+- coeffs[i]=zero;
++ loop(i,this->N,N) coeffs[i]=zero;
+ this->N=N;
+ }
+
+diff --git a/include/Lcommon_ld.h b/include/Lcommon_ld.h
+index 86ae4df..3b0cb0d 100644
+--- a/include/Lcommon_ld.h
++++ b/include/Lcommon_ld.h
+@@ -53,7 +53,7 @@ const bool outputSeries=true; // Whether to output the coefficients or just th
+
+ // Loop i from m to n
+ // Useful in tidying up most for loops
+-#define loop(i,m,n) for(typeof(m) i=(m); i!=(n); i++)
++#define loop(i,m,n) for(decltype(m) i=(m); i!=(n); i++)
+
+ // A class for calculations involving polynomials of small degree
+ // Not efficient enough for huge polynomials
+diff --git a/include/Lglobals.h b/include/Lglobals.h
+index 60002e4..ca2606c 100644
+--- a/include/Lglobals.h
++++ b/include/Lglobals.h
+@@ -24,9 +24,9 @@
+ #ifndef Lglobals_H
+ #define Lglobals_H
+
++#include <valarray>
+ using namespace std;
+
+-#include <valarray>
+ #ifdef USE_MPFR
+ #include "Lgmpfrxx.h"
+ typedef mpfr_class Double;
More information about the arch-commits
mailing list