Date: Wednesday, February 7, 2018 @ 08:03:50 Author: arojas Revision: 289889
singular 4.1.0.p4 rebuild Added: sagemath/trunk/sagemath-singular-4.1.0.p4.patch Modified: sagemath/trunk/PKGBUILD ----------------------------------+ PKGBUILD | 10 ++- sagemath-singular-4.1.0.p4.patch | 94 +++++++++++++++++++++++++++++++++++++ 2 files changed, 101 insertions(+), 3 deletions(-) Modified: PKGBUILD =================================================================== --- PKGBUILD 2018-02-07 08:02:26 UTC (rev 289888) +++ PKGBUILD 2018-02-07 08:03:50 UTC (rev 289889) @@ -9,7 +9,7 @@ pkgbase=sagemath pkgname=(sagemath sagemath-jupyter) pkgver=8.1 -pkgrel=7 +pkgrel=8 pkgdesc="Open Source Mathematics Software, free alternative to Magma, Maple, Mathematica, and Matlab" arch=(x86_64) url="http://www.sagemath.org" @@ -38,7 +38,8 @@ sagemath-env.patch package.patch latte-count.patch jupyter-path.patch sagemath-python3-notebook.patch test-optional.patch r-no-readline.patch fes02.patch sagemath-threejs.patch pari-stackwarn.patch sagemath-detect-igraph.patch sagemath-networkx2.patch sagemath-linbox-1.5.patch sagemath-pynac-0.7.14.patch - sagemath-matplotlib2.patch sagemath-scipy-1.0.patch sagemath-lrs.patch sagemath-ipython-prompt.patch) + sagemath-matplotlib2.patch sagemath-scipy-1.0.patch sagemath-lrs.patch sagemath-ipython-prompt.patch + sagemath-singular-4.1.0.p4.patch) sha256sums=('a42b55c2c8ac244535dc9b87171b7d4dd7e1d498099518ab253354fbe2eaaa7b' '39b76a189365464998cab9355d177581bc2b15dff10858f316faa85f2efa0426' 'c41ae665499c6cd775d40bbe178f8786830b0931ee26bf11ee02f7d83bcc8107' @@ -57,7 +58,8 @@ 'b9ab2bb5f381ea425e8763b81b8b3a108a3951c594fb1f37f7df921e7c77e26d' '17397b8e1843b013ef5d2e083369109f0719651edd8ef0c8493cb49e2bc4324a' 'c0f65534a845ba802de6196229159fe67fcc3f72f0cb1ce57d4ae5c9fe10282c' - '937a0081e7aea56bda645ef5f0d34b8e356acd62a7dd128a35163f46e7836131') + '937a0081e7aea56bda645ef5f0d34b8e356acd62a7dd128a35163f46e7836131' + 'cc679321c2968d5e74b0ec060979c74019df2995857906bdd1397695b1f24c5c') prepare(){ cd sage-$pkgver @@ -94,6 +96,8 @@ patch -p1 -i ../sagemath-scipy-1.0.patch # fix ipython prompt in pexpect interface patch -p1 -i ../sagemath-ipython-prompt.patch +# fix build with Singular 4.1.0.p4 + patch -p1 -i ../sagemath-singular-4.1.0.p4.patch # Upstream patches # fix build against libfes 0.2 http://trac.sagemath.org/ticket/15209 Added: sagemath-singular-4.1.0.p4.patch =================================================================== --- sagemath-singular-4.1.0.p4.patch (rev 0) +++ sagemath-singular-4.1.0.p4.patch 2018-02-07 08:03:50 UTC (rev 289889) @@ -0,0 +1,94 @@ +diff --git a/src/sage/libs/singular/decl.pxd b/src/sage/libs/singular/decl.pxd +index 676544ab1e..5c8639d362 100644 +--- a/src/sage/libs/singular/decl.pxd ++++ b/src/sage/libs/singular/decl.pxd +@@ -188,7 +188,7 @@ cdef extern from "singular/Singular/libsingular.h": + + int n_NumberOfParameters(const n_Procs_s* r) + +- ctypedef struct poly "polyrec": ++ ctypedef struct poly "spolyrec": + poly *next + number *coef + unsigned long exp[1] +@@ -650,7 +650,7 @@ cdef extern from "singular/Singular/libsingular.h": + + # divide monomial p by monomial q, p,q const + +- poly *pDivide(poly *p,poly *q) ++ poly *pMDivide(poly *p,poly *q) + + # return the i-th power of p; p destroyed, requires global ring + +diff --git a/src/sage/rings/polynomial/multi_polynomial_libsingular.pyx b/src/sage/rings/polynomial/multi_polynomial_libsingular.pyx +index 089524d6b4..ce6d58fc6f 100644 +--- a/src/sage/rings/polynomial/multi_polynomial_libsingular.pyx ++++ b/src/sage/rings/polynomial/multi_polynomial_libsingular.pyx +@@ -188,8 +188,8 @@ from sage.libs.singular.decl cimport ( + n_IsUnit, n_Invers, + p_ISet, rChangeCurrRing, p_Copy, p_Init, p_SetCoeff, p_Setm, p_SetExp, p_Add_q, + p_NSet, p_GetCoeff, p_Delete, p_GetExp, pNext, rRingVar, omAlloc0, omStrDup, +- omFree, pDivide, p_SetCoeff0, n_Init, p_DivisibleBy, pLcm, p_LmDivisibleBy, +- pDivide, p_IsConstant, p_ExpVectorEqual, p_String, p_LmInit, n_Copy, ++ omFree, pMDivide, p_SetCoeff0, n_Init, p_DivisibleBy, pLcm, p_LmDivisibleBy, ++ pMDivide, p_IsConstant, p_ExpVectorEqual, p_String, p_LmInit, n_Copy, + p_IsUnit, p_Series, p_Head, idInit, fast_map_common_subexp, id_Delete, + p_IsHomogeneous, p_Homogen, p_Totaldegree,pLDeg1_Totaldegree, singclap_pdivide, singclap_factorize, + idLift, IDELEMS, On, Off, SW_USE_CHINREM_GCD, SW_USE_EZGCD, +@@ -1690,8 +1695,8 @@ cdef class MPolynomialRing_libsingular(MPolynomialRing_generic): + if not g._poly: + raise ZeroDivisionError + +- if r!=currRing: rChangeCurrRing(r) # pDivide +- res = pDivide(f._poly, g._poly) ++ if r!=currRing: rChangeCurrRing(r) # pMDivide ++ res = pMDivide(f._poly, g._poly) + if coeff: + if r.cf.type == n_unknown or r.cf.cfDivBy(p_GetCoeff(f._poly, r), p_GetCoeff(g._poly, r), r.cf): + n = r.cf.cfDiv( p_GetCoeff(f._poly, r) , p_GetCoeff(g._poly, r), r.cf) +@@ -1850,8 +1855,8 @@ cdef class MPolynomialRing_libsingular(MPolynomialRing_generic): + and (<MPolynomial_libsingular>g) \ + and g.parent() is self \ + and p_LmDivisibleBy((<MPolynomial_libsingular>g)._poly, m, r): +- if r!=currRing: rChangeCurrRing(r) # pDivide +- flt = pDivide(f._poly, (<MPolynomial_libsingular>g)._poly) ++ if r!=currRing: rChangeCurrRing(r) # pMDivide ++ flt = pMDivide(f._poly, (<MPolynomial_libsingular>g)._poly) + #p_SetCoeff(flt, n_Div( p_GetCoeff(f._poly, r) , p_GetCoeff((<MPolynomial_libsingular>g)._poly, r), r), r) + p_SetCoeff(flt, n_Init(1, r), r) + return new_MP(self,flt), g +@@ -4046,10 +4051,10 @@ cdef class MPolynomial_libsingular(MPolynomial): + if _right.is_monomial(): + p = _self._poly + quo = p_ISet(0,r) +- if r != currRing: rChangeCurrRing(r) # pDivide ++ if r != currRing: rChangeCurrRing(r) # pMDivide + while p: + if p_DivisibleBy(_right._poly, p, r): +- temp = pDivide(p, _right._poly) ++ temp = pMDivide(p, _right._poly) + p_SetCoeff0(temp, n_Copy(p_GetCoeff(p, r), r), r) + quo = p_Add_q(quo, temp, r) + p = pNext(p) +diff --git a/src/sage/rings/polynomial/plural.pyx b/src/sage/rings/polynomial/plural.pyx +index 3b45a38419..c0227fd364 100644 +--- a/src/sage/rings/polynomial/plural.pyx ++++ b/src/sage/rings/polynomial/plural.pyx +@@ -999,7 +999,7 @@ cdef class NCPolynomialRing_plural(Ring): + if not g._poly: + raise ZeroDivisionError + +- res = pDivide(f._poly,g._poly) ++ res = pMDivide(f._poly,g._poly) + if coeff: + if (r.cf.type == n_unknown) or r.cf.cfDivBy(p_GetCoeff(f._poly, r), p_GetCoeff(g._poly, r), r.cf): + n = r.cf.cfDiv( p_GetCoeff(f._poly, r) , p_GetCoeff(g._poly, r), r.cf) +@@ -1194,7 +1194,7 @@ cdef class NCPolynomialRing_plural(Ring): + if isinstance(g, NCPolynomial_plural) \ + and (<NCPolynomial_plural>g) \ + and p_LmDivisibleBy((<NCPolynomial_plural>g)._poly, m, r): +- flt = pDivide(f._poly, (<NCPolynomial_plural>g)._poly) ++ flt = pMDivide(f._poly, (<NCPolynomial_plural>g)._poly) + #p_SetCoeff(flt, n_Div( p_GetCoeff(f._poly, r) , p_GetCoeff((<NCPolynomial_plural>g)._poly, r), r), r) + p_SetCoeff(flt, n_Init(1, r), r) + return new_NCP(self,flt), g