summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO2
-rw-r--r--PKGBUILD3
-rw-r--r--sagemath-singular-4.1.1.patch33
3 files changed, 34 insertions, 4 deletions
diff --git a/.SRCINFO b/.SRCINFO
index a1fb7f2e0f98..c16e406e1cc1 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -122,7 +122,7 @@ pkgbase = sagemath-git
sha256sums = a4a6c87b46ff23b89608aca66d00427334502e8bfb5dfe68b94497d19be1c7ae
sha256sums = 71cc42d168545d460bc7f67a30486ff1534093e2b4deeb83deda8ff5bd081e7b
sha256sums = 17397b8e1843b013ef5d2e083369109f0719651edd8ef0c8493cb49e2bc4324a
- sha256sums = 11a68f156647ba9f38cb01b2a5e4f9a6a78f6297f2a5a65fbfdfe32d4be69d0c
+ sha256sums = af22e1834997cb2740818cd4ef8ede0367b0aa237305e89b178614f35bdfcef8
sha256sums = 5114c912f821900e5bfae1e2cfeb7984de946d0b23e1182b0bf15be1d803dfd0
sha256sums = 6917cb74e50ae965ea8d7c39577e5f0a5068e4b6a67b53fc6f219149a7d06584
sha256sums = e24ad879f6b2eb970778fc5e867bcbe0a6d393feca8f11f5cb8d07da1f024be9
diff --git a/PKGBUILD b/PKGBUILD
index 2ecfe4918426..fa84c0dc856b 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -51,7 +51,7 @@ sha256sums=('SKIP'
'a4a6c87b46ff23b89608aca66d00427334502e8bfb5dfe68b94497d19be1c7ae'
'71cc42d168545d460bc7f67a30486ff1534093e2b4deeb83deda8ff5bd081e7b'
'17397b8e1843b013ef5d2e083369109f0719651edd8ef0c8493cb49e2bc4324a'
- '11a68f156647ba9f38cb01b2a5e4f9a6a78f6297f2a5a65fbfdfe32d4be69d0c'
+ 'af22e1834997cb2740818cd4ef8ede0367b0aa237305e89b178614f35bdfcef8'
'5114c912f821900e5bfae1e2cfeb7984de946d0b23e1182b0bf15be1d803dfd0'
'6917cb74e50ae965ea8d7c39577e5f0a5068e4b6a67b53fc6f219149a7d06584'
'e24ad879f6b2eb970778fc5e867bcbe0a6d393feca8f11f5cb8d07da1f024be9')
@@ -108,6 +108,7 @@ prepare(){
build() {
cd sage/src
+ export CC=gcc
export SAGE_ROOT="$PWD"
export SAGE_SRC="$PWD"
diff --git a/sagemath-singular-4.1.1.patch b/sagemath-singular-4.1.1.patch
index 6471d2499acd..ad59bf23a0c7 100644
--- a/sagemath-singular-4.1.1.patch
+++ b/sagemath-singular-4.1.1.patch
@@ -96,13 +96,42 @@ diff --git a/src/sage/rings/polynomial/multi_polynomial_libsingular.pyx b/src/sa
index 809ca72c76..9610ce125d 100644
--- a/src/sage/rings/polynomial/multi_polynomial_libsingular.pyx
+++ b/src/sage/rings/polynomial/multi_polynomial_libsingular.pyx
+@@ -4066,6 +4066,9 @@ cdef class MPolynomial_libsingular(MPolynomial):
+ if r.cf.type == n_Znm or r.cf.type == n_Zn or r.cf.type == n_Z2m :
+ raise NotImplementedError("Division of multivariate polynomials over non fields by non-monomials not implemented.")
+
++ if is_IntegerRing(self._parent._base):
++ return self.change_ring(RationalField()) // right.change_ring(RationalField())
++
+ cdef int count = singular_polynomial_length_bounded(_self._poly,15)
+ if count >= 15: # note that _right._poly must be of shorter length than self._poly for us to care about this call
+ sig_on()
+@@ -4744,6 +4747,9 @@ cdef class MPolynomial_libsingular(MPolynomial):
+ else:
+ _right = <MPolynomial_libsingular>right
+
++ if is_IntegerRing(self._parent._base):
++ return self.change_ring(RationalField()).gcd(right.change_ring(RationalField()), algorithm, **kwds)
++
+ cdef int count = singular_polynomial_length_bounded(self._poly,20) \
+ + singular_polynomial_length_bounded(_right._poly,20)
+ if count >= 20:
+@@ -4814,6 +4822,9 @@ cdef class MPolynomial_libsingular(MPolynomial):
+ if self._parent._base.is_finite() and self._parent._base.characteristic() > 1<<29:
+ raise NotImplementedError("LCM of multivariate polynomials over prime fields with characteristic > 2^29 is not implemented.")
+
++ if is_IntegerRing(self._parent._base):
++ return self.change_ring(RationalField()).lcm(g.change_ring(RationalField()))
++
+ cdef int count = singular_polynomial_length_bounded(self._poly,20) \
+ + singular_polynomial_length_bounded(_g._poly,20)
+ if count >= 20:
@@ -4888,7 +4888,7 @@ cdef class MPolynomial_libsingular(MPolynomial):
if right.is_zero():
raise ZeroDivisionError
-
+
- if not self._parent._base.is_field() and not is_IntegerRing(self._parent._base):
+ if not self._parent._base.is_field():
py_quo = self//right
py_rem = self - right*py_quo
return py_quo, py_rem
-