diff options
author | Thomas Kahle <tomka@gentoo.org> | 2015-11-13 16:58:50 +0100 |
---|---|---|
committer | Thomas Kahle <tomka@gentoo.org> | 2015-11-13 16:59:04 +0100 |
commit | 58275ce7ddf2287f6b1457d0b7912fcd722eb4c3 (patch) | |
tree | 05e6aabadf8d069069ffe744f87daffd565359f4 /sci-mathematics/normaliz | |
parent | dev-python/uhashring: version bump and python3_5 compat (diff) | |
download | gentoo-58275ce7ddf2287f6b1457d0b7912fcd722eb4c3.tar.gz gentoo-58275ce7ddf2287f6b1457d0b7912fcd722eb4c3.tar.bz2 gentoo-58275ce7ddf2287f6b1457d0b7912fcd722eb4c3.zip |
sci-mathematics/normaliz: add gmp-6.1 compatibility
Fixes bug 565366.
Package-Manager: portage-2.2.20.1
Diffstat (limited to 'sci-mathematics/normaliz')
-rw-r--r-- | sci-mathematics/normaliz/files/normaliz-3.0.0-gmp61-compat.patch | 70 | ||||
-rw-r--r-- | sci-mathematics/normaliz/normaliz-3.0.0.ebuild | 1 |
2 files changed, 71 insertions, 0 deletions
diff --git a/sci-mathematics/normaliz/files/normaliz-3.0.0-gmp61-compat.patch b/sci-mathematics/normaliz/files/normaliz-3.0.0-gmp61-compat.patch new file mode 100644 index 000000000000..cf6f81fc363c --- /dev/null +++ b/sci-mathematics/normaliz/files/normaliz-3.0.0-gmp61-compat.patch @@ -0,0 +1,70 @@ +diff --git a/source/libnormaliz/HilbertSeries.cpp b/source/libnormaliz/HilbertSeries.cpp +index 311b839..47a84cd 100644 +--- a/source/libnormaliz/HilbertSeries.cpp ++++ b/source/libnormaliz/HilbertSeries.cpp +@@ -399,7 +399,7 @@ void HilbertSeries::computeHilbertQuasiPolynomial() const { + //divide by gcd //TODO operate directly on vector + Matrix<mpz_class> QP(quasi_poly); + mpz_class g = QP.matrix_gcd(); +- g = gcd(g,quasi_denom); ++ g = libnormaliz::gcd(g,quasi_denom); + quasi_denom /= g; + QP.scalar_division(g); + //we use a normed shift, so that the cylcic shift % period always yields a non-negative integer +diff --git a/source/libnormaliz/matrix.cpp b/source/libnormaliz/matrix.cpp +index d643eca..ae7684c 100644 +--- a/source/libnormaliz/matrix.cpp ++++ b/source/libnormaliz/matrix.cpp +@@ -735,7 +735,7 @@ Integer Matrix<Integer>::matrix_gcd() const{ + Integer g=0,h; + for (size_t i = 0; i <nr; i++) { + h = v_gcd(elem[i]); +- g = gcd<Integer>(g, h); ++ g = libnormaliz::gcd<Integer>(g, h); + if (g==1) return g; + } + return g; +@@ -1766,7 +1766,7 @@ vector<Integer> Matrix<Integer>::solve_rectangular(const vector<Integer>& v, Int + return vector<Integer>(); + } + } +- Integer total_gcd =gcd(denom,v_gcd(Linear_Form)); // extract the gcd of denom and solution ++ Integer total_gcd = libnormaliz::gcd(denom,v_gcd(Linear_Form)); // extract the gcd of denom and solution + denom/=total_gcd; + v_scalar_division(Linear_Form,total_gcd); + return Linear_Form; +diff --git a/source/libnormaliz/sublattice_representation.cpp b/source/libnormaliz/sublattice_representation.cpp +index e3a7c9d..f5bba3e 100644 +--- a/source/libnormaliz/sublattice_representation.cpp ++++ b/source/libnormaliz/sublattice_representation.cpp +@@ -213,7 +213,7 @@ void Sublattice_Representation<Integer>::compose(const Sublattice_Representation + + //check if a factor can be extraced from B //TODO necessary? + Integer g = B.matrix_gcd(); +- g = gcd(g,c); //TODO necessary?? ++ g = libnormaliz::gcd(g,c); //TODO necessary?? + if (g > 1) { + c /= g; + B.scalar_division(g); +diff --git a/source/libnormaliz/vector_operations.cpp b/source/libnormaliz/vector_operations.cpp +index 7c676e9..7103775 100644 +--- a/source/libnormaliz/vector_operations.cpp ++++ b/source/libnormaliz/vector_operations.cpp +@@ -240,7 +240,7 @@ Integer v_gcd(const vector<Integer>& v){ + size_t i, size=v.size(); + Integer g=0; + for (i = 0; i < size; i++) { +- g=gcd(g,v[i]); ++ g = libnormaliz::gcd(g,v[i]); + if (g==1) { + return 1; + } +@@ -255,7 +255,7 @@ Integer v_lcm(const vector<Integer>& v){ + size_t i,size=v.size(); + Integer g=1; + for (i = 0; i < size; i++) { +- g=lcm(g,v[i]); ++ g = libnormaliz::lcm(g,v[i]); + if (g==0) { + return 0; + } diff --git a/sci-mathematics/normaliz/normaliz-3.0.0.ebuild b/sci-mathematics/normaliz/normaliz-3.0.0.ebuild index 749e00671297..834f9903f5c6 100644 --- a/sci-mathematics/normaliz/normaliz-3.0.0.ebuild +++ b/sci-mathematics/normaliz/normaliz-3.0.0.ebuild @@ -27,6 +27,7 @@ DEPEND="${RDEPEND} S=${WORKDIR}/${MYP} src_prepare () { + epatch "${FILESDIR}/${P}-gmp61-compat.patch" epatch "${FILESDIR}/${P}-respect-flags.patch" epatch "${FILESDIR}/${PN}-2.12.2-gcc49.patch" |