diff --git a/sagemath-ntl.patch b/sagemath-ntl.patch new file mode 100644 index 0000000..167be85 --- /dev/null +++ b/sagemath-ntl.patch @@ -0,0 +1,65 @@ +NTL 8.x introduces a new class, NTL::WrappedPtr. Unfortunately, Cython +does not add a namespace identifier to the name of the existing WrappedPtr +class, generated from the patched files below, resulting in ambiguous +references to that name. This patch simply changes the name of the existing +class to avoid the name collision. + +diff -up src/sage/libs/polybori/decl.pxd.orig src/sage/libs/polybori/decl.pxd +--- src/sage/libs/polybori/decl.pxd.orig 2014-11-23 07:58:14.000000000 -0700 ++++ src/sage/libs/polybori/decl.pxd 2015-01-13 20:00:00.000000000 -0700 +@@ -291,10 +291,10 @@ cdef extern from "pb_wrap.h": + int (* size)() + PBPolyEntry (* get "operator[]")(int) + +- ctypedef struct PBFglmStrategy "WrappedPtr": ++ ctypedef struct PBFglmStrategy "WrappedPointer": + PBPolyVector (* main "operator->()->main")() + +- PBFglmStrategy PBFglmStrategy_Constructor "WrappedPtr" \ ++ PBFglmStrategy PBFglmStrategy_Constructor "WrappedPointer" \ + (PBRing from_ring, PBRing to_ring, PBPolyVector vec) + + cdef cppclass PBGBStrategy "GroebnerStrategy": +@@ -349,7 +349,7 @@ cdef extern from "pb_wrap.h": + PBPolyVector (* faugereStepDense)(PBPolyVector v) + bint (* generators_leadingTerms_owns "generators.leadingTerms.owns")(PBMonom term) + +- PBGBStrategy PBGBStrategy_Constructor "WrappedPtr" \ ++ PBGBStrategy PBGBStrategy_Constructor "WrappedPointer" \ + (PBRing r) + + +diff -up src/sage/libs/polybori/pb_wrap.h.orig src/sage/libs/polybori/pb_wrap.h +--- src/sage/libs/polybori/pb_wrap.h.orig 2014-11-23 07:58:14.000000000 -0700 ++++ src/sage/libs/polybori/pb_wrap.h 2015-01-13 20:00:00.000000000 -0700 +@@ -177,23 +177,23 @@ PyObject* preallocated_to_PyString(const + + + template +-class WrappedPtr: ++class WrappedPointer: + public boost::shared_ptr { +- typedef WrappedPtr self; ++ typedef WrappedPointer self; + typedef boost::shared_ptr base; + + public: +- WrappedPtr(): base() {} +- WrappedPtr(const self& rhs): base(rhs) {} ++ WrappedPointer(): base() {} ++ WrappedPointer(const self& rhs): base(rhs) {} + + template +- WrappedPtr(const T1& arg): base(new Type(arg)) {} ++ WrappedPointer(const T1& arg): base(new Type(arg)) {} + + template +- WrappedPtr(const T1& arg1, const T2& arg2): base(new Type(arg1, arg2)) {} ++ WrappedPointer(const T1& arg1, const T2& arg2): base(new Type(arg1, arg2)) {} + + template +- WrappedPtr(const T1& arg1, const T2& arg2, const T3& arg3): ++ WrappedPointer(const T1& arg1, const T2& arg2, const T3& arg3): + base(new Type(arg1, arg2, arg3)) {} + + operator Type&() { return base::operator*();} diff --git a/sagemath.spec b/sagemath.spec index 4768c1f..a5c978f 100644 --- a/sagemath.spec +++ b/sagemath.spec @@ -39,7 +39,7 @@ Name: sagemath Group: Applications/Engineering Summary: A free open-source mathematics software system Version: 6.4.1 -Release: 1%{?dist} +Release: 2%{?dist} # The file ${SAGE_ROOT}/COPYING.txt is the upstream license breakdown file # Additionally, every $files section has a comment with the license name # before files with that license @@ -139,6 +139,9 @@ Patch21: %{name}-cryptominisat.patch # https://bugzilla.redhat.com/show_bug.cgi?id=974769 Patch22: %{name}-sympy.patch +# Fix a name clash with NTL +Patch23: %{name}-ntl.patch + BuildRequires: 4ti2 BuildRequires: atlas-devel BuildRequires: cddlib-tools @@ -159,10 +162,10 @@ BuildRequires: flint-devel >= 2.3 BuildRequires: gmp-ecm-devel BuildRequires: gap BuildRequires: GAPDoc -BuildRequires: gap-character-tables BuildRequires: gap-libs -BuildRequires: gap-sonata -BuildRequires: gap-table-of-marks +BuildRequires: gap-pkg-ctbllib +BuildRequires: gap-pkg-sonata +BuildRequires: gap-pkg-tomlib BuildRequires: gc-devel BuildRequires: gd-devel BuildRequires: gfan @@ -227,10 +230,10 @@ Requires: ecl Requires: firefox Requires: gap Requires: GAPDoc -Requires: gap-character-tables Requires: gap-libs -Requires: gap-sonata -Requires: gap-table-of-marks +Requires: gap-pkg-ctbllib +Requires: gap-pkg-sonata +Requires: gap-pkg-tomlib Requires: genus2reduction Requires: gfan Requires: gmp-ecm @@ -601,6 +604,7 @@ popd %patch21 %patch22 +%patch23 sed -e 's|@@SAGE_ROOT@@|%{SAGE_ROOT}|' \ -e 's|@@SAGE_DOC@@|%{SAGE_DOC}|' \ @@ -1305,6 +1309,10 @@ exit 0 ######################################################################## %changelog +* Thu Jan 15 2015 Jerry James - 6.4.1-2 +- Rebuild for ntl 8.1.0 +- Future-proof the gap package names + * Wed Nov 26 2014 pcpa - 6.4.1-1 - Update to sagemath 6.4.1 (#1095282)