Rebuild for givaro 4.0.1, fflas-ffpack 2.2.0, and linbox 1.4.0.

Add -givaro patch to adapt to header file changes in those releases.
This commit is contained in:
Jerry James 2016-02-27 14:30:13 -07:00
parent 7ba3de24ee
commit 5829ef49ab
2 changed files with 97 additions and 1 deletions

88
sagemath-givaro.patch Normal file
View file

@ -0,0 +1,88 @@
Some functions were moved from linbox to givaro, and some header files were
renamed in linbox 1.4 and givaro 4.
diff -up src/sage/libs/linbox/echelonform.pxd.orig src/sage/libs/linbox/echelonform.pxd
--- src/sage/libs/linbox/echelonform.pxd.orig 2015-07-26 07:34:43.000000000 -0600
+++ src/sage/libs/linbox/echelonform.pxd 2016-02-27 10:08:25.665593617 -0700
@@ -1,23 +1,23 @@
from sage.libs.linbox.modular cimport ModDoubleField, ModDoubleFieldElement, ModFloatField, ModFloatFieldElement
from libc.stdint cimport uint64_t
-cdef extern from "linbox/matrix/blas-matrix.h" namespace "LinBox":
- cdef cppclass BlasMatrixDouble "LinBox::BlasMatrix<LinBox::Modular<double> >":
+cdef extern from "linbox/matrix/densematrix/blas-matrix.h" namespace "LinBox":
+ cdef cppclass BlasMatrixDouble "LinBox::BlasMatrix<Givaro::Modular<double> >":
BlasMatrixDouble(ModDoubleField F, uint64_t nrows, uint64_t ncols)
void setEntry(size_t i, size_t j, ModDoubleFieldElement t)
ModDoubleFieldElement &getEntry(size_t i, size_t j)
- cdef cppclass BlasMatrixFloat "LinBox::BlasMatrix<LinBox::Modular<float> >":
+ cdef cppclass BlasMatrixFloat "LinBox::BlasMatrix<Givaro::Modular<float> >":
BlasMatrixFloat(ModFloatField F, uint64_t nrows, uint64_t ncols)
void setEntry(size_t i, size_t j, ModFloatFieldElement t)
ModFloatFieldElement &getEntry(size_t i, size_t j)
cdef extern from "linbox/algorithms/echelon-form.h":
- cdef cppclass EchelonFormDomainDouble "LinBox::EchelonFormDomain<LinBox::Modular<double> >":
+ cdef cppclass EchelonFormDomainDouble "LinBox::EchelonFormDomain<Givaro::Modular<double> >":
EchelonFormDomainDouble(ModDoubleField)
int rowReducedEchelon(BlasMatrixDouble, BlasMatrixDouble)
- cdef cppclass EchelonFormDomainFloat "LinBox::EchelonFormDomain<LinBox::Modular<float> >":
+ cdef cppclass EchelonFormDomainFloat "LinBox::EchelonFormDomain<Givaro::Modular<float> >":
EchelonFormDomainFloat(ModFloatField)
int rowReducedEchelon(BlasMatrixFloat, BlasMatrixFloat)
diff -up src/sage/libs/linbox/modular.pxd.orig src/sage/libs/linbox/modular.pxd
--- src/sage/libs/linbox/modular.pxd.orig 2015-07-26 07:34:43.000000000 -0600
+++ src/sage/libs/linbox/modular.pxd 2016-02-26 20:00:09.329004419 -0700
@@ -1,10 +1,10 @@
-cdef extern from "linbox/field/modular.h":
+cdef extern from "givaro/modular-double.h":
# double
- cdef cppclass ModDoubleFieldElement "LinBox::Modular<double>::Element":
+ cdef cppclass ModDoubleFieldElement "Givaro::Modular<double>::Element":
pass
- cdef cppclass ModDoubleField "LinBox::Modular<double>":
+ cdef cppclass ModDoubleField "Givaro::Modular<double>":
ModDoubleField(int modulus)
ModDoubleFieldElement init(ModDoubleFieldElement res, int v)
ModDoubleFieldElement init(ModDoubleFieldElement res, double v)
@@ -19,11 +19,12 @@ cdef extern from "linbox/field/modular.h
bint isZero(ModDoubleFieldElement x)
+cdef extern from "givaro/modular-float.h":
# float
- cdef cppclass ModFloatFieldElement "LinBox::Modular<float>::Element":
+ cdef cppclass ModFloatFieldElement "Givaro::Modular<float>::Element":
pass
- cdef cppclass ModFloatField "LinBox::Modular<float>":
+ cdef cppclass ModFloatField "Givaro::Modular<float>":
ModFloatField(int modulus)
ModFloatFieldElement init(ModFloatFieldElement res, int v)
ModFloatFieldElement init(ModFloatFieldElement res, double v)
diff -up src/sage/rings/finite_rings/element_givaro.pxd.orig src/sage/rings/finite_rings/element_givaro.pxd
--- src/sage/rings/finite_rings/element_givaro.pxd.orig 2015-07-26 07:34:44.000000000 -0600
+++ src/sage/rings/finite_rings/element_givaro.pxd 2016-02-26 17:45:57.983303693 -0700
@@ -13,7 +13,7 @@ cdef extern from "givaro/givrandom.h":
GivRandom GivRandomSeeded "Givaro::GivRandom"(unsigned long seed)
-cdef extern from "givaro/givgfq.h":
+cdef extern from "givaro/gfq.h":
ctypedef struct intvec "std::vector<unsigned int>":
void (* push_back)(int elem)
@@ -21,7 +21,7 @@ cdef extern from "givaro/givgfq.h":
intvec intvec_factory "std::vector<unsigned int>"(int len)
-cdef extern from "givaro/givgfq.h":
+cdef extern from "givaro/gfq.h":
ctypedef struct GivaroGfq "Givaro::GFqDom<int>":
#attributes

View file

@ -52,7 +52,7 @@ Name: sagemath
Group: Applications/Engineering Group: Applications/Engineering
Summary: A free open-source mathematics software system Summary: A free open-source mathematics software system
Version: 6.8 Version: 6.8
Release: 5%{?dist} Release: 6%{?dist}
# The file ${SAGE_ROOT}/COPYING.txt is the upstream license breakdown file # The file ${SAGE_ROOT}/COPYING.txt is the upstream license breakdown file
# Additionally, every $files section has a comment with the license name # Additionally, every $files section has a comment with the license name
# before files with that license # before files with that license
@ -159,6 +159,9 @@ Patch26: %{name}-polybori.patch
# Correct path to arb headers # Correct path to arb headers
Patch27: %{name}-arb.patch Patch27: %{name}-arb.patch
# Adapt to header file changes in givaro 4 and linbox 1.4
Patch28: %{name}-givaro.patch
BuildRequires: 4ti2 BuildRequires: 4ti2
BuildRequires: arb-devel BuildRequires: arb-devel
BuildRequires: atlas-devel BuildRequires: atlas-devel
@ -660,6 +663,7 @@ popd
%patch25 %patch25
%patch26 %patch26
%patch27 %patch27
%patch28
sed -e 's|@@SAGE_ROOT@@|%{SAGE_ROOT}|' \ sed -e 's|@@SAGE_ROOT@@|%{SAGE_ROOT}|' \
-e 's|@@SAGE_DOC@@|%{SAGE_DOC}|' \ -e 's|@@SAGE_DOC@@|%{SAGE_DOC}|' \
@ -1501,6 +1505,10 @@ exit 0
######################################################################## ########################################################################
%changelog %changelog
* Sat Feb 27 2016 Jerry James <loganjerry@gmail.com> - 6.8-6
- Rebuild for givaro 4.0.1, fflas-ffpack 2.2.0, and linbox 1.4.0
- Add -givaro patch to adapt to header file changes in those releases
* Mon Feb 22 2016 Orion Poplawski <orion@cora.nwra.com> - 6.8-5 * Mon Feb 22 2016 Orion Poplawski <orion@cora.nwra.com> - 6.8-5
- Rebuild for gsl 2.1 - Rebuild for gsl 2.1