[arch-commits] Commit in sagemath/repos/community-x86_64 (25 files)

Antonio Rojas arojas at archlinux.org
Thu Jul 4 06:17:09 UTC 2019


    Date: Thursday, July 4, 2019 @ 06:17:08
  Author: arojas
Revision: 487421

archrelease: copy trunk to community-x86_64

Added:
  sagemath/repos/community-x86_64/PKGBUILD
    (from rev 487420, sagemath/trunk/PKGBUILD)
  sagemath/repos/community-x86_64/fes02.patch
    (from rev 487420, sagemath/trunk/fes02.patch)
  sagemath/repos/community-x86_64/latte-count.patch
    (from rev 487420, sagemath/trunk/latte-count.patch)
  sagemath/repos/community-x86_64/package.patch
    (from rev 487420, sagemath/trunk/package.patch)
  sagemath/repos/community-x86_64/sagemath-cremona.patch
    (from rev 487420, sagemath/trunk/sagemath-cremona.patch)
  sagemath/repos/community-x86_64/sagemath-ecl-sigfpe.patch
    (from rev 487420, sagemath/trunk/sagemath-ecl-sigfpe.patch)
  sagemath/repos/community-x86_64/sagemath-env.patch
    (from rev 487420, sagemath/trunk/sagemath-env.patch)
  sagemath/repos/community-x86_64/sagemath-linbox-1.6.patch
    (from rev 487420, sagemath/trunk/sagemath-linbox-1.6.patch)
  sagemath/repos/community-x86_64/sagemath-python3-notebook.patch
    (from rev 487420, sagemath/trunk/sagemath-python3-notebook.patch)
  sagemath/repos/community-x86_64/sagemath-singular-4.1.2.patch
    (from rev 487420, sagemath/trunk/sagemath-singular-4.1.2.patch)
  sagemath/repos/community-x86_64/sagemath-threejs-dir-structure.patch
    (from rev 487420, sagemath/trunk/sagemath-threejs-dir-structure.patch)
  sagemath/repos/community-x86_64/sagemath-threejs.patch
    (from rev 487420, sagemath/trunk/sagemath-threejs.patch)
  sagemath/repos/community-x86_64/test-optional.patch
    (from rev 487420, sagemath/trunk/test-optional.patch)
Deleted:
  sagemath/repos/community-x86_64/PKGBUILD
  sagemath/repos/community-x86_64/fes02.patch
  sagemath/repos/community-x86_64/latte-count.patch
  sagemath/repos/community-x86_64/package.patch
  sagemath/repos/community-x86_64/sagemath-cremona.patch
  sagemath/repos/community-x86_64/sagemath-ecl-sigfpe.patch
  sagemath/repos/community-x86_64/sagemath-env.patch
  sagemath/repos/community-x86_64/sagemath-linbox-1.6.patch
  sagemath/repos/community-x86_64/sagemath-python3-notebook.patch
  sagemath/repos/community-x86_64/sagemath-singular-4.1.2.patch
  sagemath/repos/community-x86_64/sagemath-threejs.patch
  sagemath/repos/community-x86_64/test-optional.patch

--------------------------------------+
 PKGBUILD                             |  314 ++++---
 fes02.patch                          |  114 +-
 latte-count.patch                    |  178 ++--
 package.patch                        |   78 -
 sagemath-cremona.patch               |   62 -
 sagemath-ecl-sigfpe.patch            |  294 +++----
 sagemath-env.patch                   |  286 +++----
 sagemath-linbox-1.6.patch            | 1300 ++++++++++++++++-----------------
 sagemath-python3-notebook.patch      |   54 -
 sagemath-singular-4.1.2.patch        |  204 ++---
 sagemath-threejs-dir-structure.patch |   40 +
 sagemath-threejs.patch               |   22 
 test-optional.patch                  |   40 -
 13 files changed, 1515 insertions(+), 1471 deletions(-)

Deleted: PKGBUILD
===================================================================
--- PKGBUILD	2019-07-04 06:16:23 UTC (rev 487420)
+++ PKGBUILD	2019-07-04 06:17:08 UTC (rev 487421)
@@ -1,155 +0,0 @@
-# Maintainer: Antonio Rojas <arojas at archlinux.org>
-# Contributor: Evgeniy Alekseev <arcanis.arch at gmail dot com>
-# Contributor: Daniel Wallace <danielwallace at gtmanfred dot com>
-# Contributor: Thomas Dziedzic <gostrc at gmail dot com>
-# Contributor: Osman Ugus <ugus11 at yahoo dot com>
-# Contributor: Stefan Husmann <stefan-husmann at t-online dot de>
-
-pkgbase=sagemath
-pkgname=(sagemath sagemath-jupyter)
-pkgver=8.8
-pkgrel=1
-pkgdesc="Open Source Mathematics Software, free alternative to Magma, Maple, Mathematica, and Matlab"
-arch=(x86_64)
-url="http://www.sagemath.org"
-license=(GPL)
-depends=(ipython2 palp brial cliquer maxima-ecl gfan sympow nauty python2-rpy2 python2-fpylll python2-psutil python2-cypari2
-  python2-matplotlib python2-scipy python2-sympy python2-networkx python2-pillow python2-pplpy python2-future
-  gap flintqs lcalc lrcalc arb eclib zn_poly gd python2-cvxopt pynac linbox m4rie rubiks pari-galdata pari-seadata-small planarity rankwidth tachyon
-  sage-data-combinatorial_designs sage-data-elliptic_curves sage-data-graphs sage-data-polytopes_db sage-data-conway_polynomials
-  iml libgiac libhomfly libbraiding symmetrica three.js)
-optdepends=('cython2: to compile cython code' 'python2-pkgconfig: to compile cython code'
-  'jmol: 3D plots' 'sage-notebook: Flask notebook interface (deprecated)'
-  'sagemath-doc: Documentation and inline help' 'python2-igraph: igraph backend for graph theory'
-  'coin-or-cbc: COIN backend for numerical computations' 'coin-or-csdp: for computing Lovász theta-function of graphs'
-  'buckygen: for generating fullerene graphs' 'plantri: for generating some classes of graphs' 'benzene: for generating fusenes and benzenoids'
-  'ffmpeg: to export animations to video' 'imagemagick: to show animations'
-  'coxeter: Coxeter groups implementation'
-  'lrs: Algorithms for linear reverse search used in game theory and for computing volume of polytopes'
-  'libfes: exhaustive search of solutions for boolean equations' 'python2-pynormaliz: Normaliz backend for polyhedral computations'
-  'latte-integrale: integral point count in polyhedra' 'python2-jupymake: polymake backend for polyhedral computations'
-  'shared_meataxe: faster matrix arithmetic over finite fields' 'openblas: faster linear algebra'
-  'sirocco: for computing the fundamental group of the complement of a plane curve' 'primecount: faster prime_pi implementation'
-  'dot2tex: for displaying some diagrams' 'cryptominisat5: SAT solver' 'python2-pycosat: picosat SAT solver'
-  'python2-pip: to install optional packages with sage -pip')
-makedepends=(cython2 boost ratpoints python2-jinja coin-or-cbc sirocco
-  mcqd coxeter bliss tdlib python2-pkgconfig shared_meataxe libfes primecount)
-source=("$pkgname-$pkgver.tar.gz::https://github.com/sagemath/sage/archive/$pkgver.tar.gz"
-        sagemath-env.patch
-        package.patch
-        latte-count.patch
-        sagemath-python3-notebook.patch
-        test-optional.patch
-        fes02.patch
-        sagemath-threejs.patch
-        sagemath-cremona.patch
-        sagemath-singular-4.1.2.patch
-        sagemath-ecl-sigfpe.patch
-        sagemath-linbox-1.6.patch)
-sha256sums=('d012ff4f0f34e086fcaf576e25220fc647826116c69b62b887bc0b8ced5c1e9f'
-            '1c2a2d750e81ac65a1dc07094f086ba07f4862288c935a1cd009cdd62bcfc23c'
-            '328e45e78065b5f6527174bda48cfff6828acbf107c2535b0a9a92c3ceb35842'
-            '596d03daf53a76b04029b120619253250b0e58d530d69f14afa169e27e06f446'
-            '7be9f88975079d671eb3cde78e752e74741bcc29ba9b323bab5cddf50ce6dec9'
-            '1f2a34e15bf732ec8687c467a52e897615505dc3ddd792d811e8b6a7e19f1517'
-            '7fcb52e96935dccb0f958d37c2f4e3918392480b9af53e08562f6cba6c68cb94'
-            'a8c1409f4b4f1553b4f7602d4a6f0f3c6297ed258feed079f6560b0ec2dc62c6'
-            '4c6df9e4e5a7b29ecf6189eda3e5a79f69b6e1b4d29c1b9559663149b8c0af96'
-            '961bfb5694b67d425d21240d71490cb71714b5207c23448c89be0966512ff8f9'
-            'a42f3b152b1aedb8abf16bc70971419919d1fe30328574e7fef8305f9d07d938'
-            '81fc39e39e8508f742ccc784efd0492fd04474cee75edf7bd3cbea43edd49b2e')
-
-prepare(){
-  cd sage-$pkgver
-
-# Arch-specific patches
-# assume all optional packages are installed
-  patch -p0 -i ../package.patch
-# set env variables
-  patch -p0 -i ../sagemath-env.patch
-# don't list optional packages when running tests
-  patch -p0 -i ../test-optional.patch
-# use correct latte-count binary name
-  patch -p1 -i ../latte-count.patch
-# make 'sage -notebook=jupyter' work with our python3 jupyter-notebook package
-  patch -p1 -i ../sagemath-python3-notebook.patch
-# use correct online three.js version
-  patch -p1 -i ../sagemath-threejs.patch
-
-# Upstream patches  
-# fix build against libfes 0.2 http://trac.sagemath.org/ticket/15209
-  patch -p1 -i ../fes02.patch
-# use Features to detect Cremona databases https://trac.sagemath.org/ticket/25825
-  patch -p1 -i ../sagemath-cremona.patch
-# Fixes for singular 4.1.2 https://trac.sagemath.org/ticket/25993
-  patch -p1 -i ../sagemath-singular-4.1.2.patch
-# Fix SIGFPE crashes with ecl 16.1.3 https://trac.sagemath.org/ticket/22191
-  patch -p1 -i ../sagemath-ecl-sigfpe.patch
-# fix build with linbox 1.6 https://trac.sagemath.org/ticket/26932
-  patch -p1 -i ../sagemath-linbox-1.6.patch
-
-# use python2
-  sed -e 's|sage-python23|python2|' -e 's|#!/usr/bin/env python\b|#!/usr/bin/env python2|' -i src/bin/*
-  sed -e 's|exec ipython\b|exec ipython2|' -e 's|cygdb|cygdb2|g' -i src/bin/sage
-  sed -e "s|'cython'|'cython2'|" -i src/bin/sage-cython
-}
-
-
-build() {
-  cd sage-$pkgver/src
-
-  export CC=gcc \
-         SAGE_ROOT="$PWD" \
-         SAGE_SRC="$PWD" \
-         SAGE_NUM_THREADS=10
-  python2 setup.py build
-}
-
-package_sagemath() {
-  optdepends+=('sagemath-jupyter: Jupyter kernel')
-
-  cd sage-$pkgver/src
-
-  export SAGE_ROOT="$PWD" \
-         SAGE_LOCAL="/usr" \
-         SAGE_EXTCODE="$PWD"/ext
-  python2 setup.py install --root="$pkgdir" --optimize=1
-
-  mkdir -p "$pkgdir"/usr/bin
-  cp bin/{sage,math-readline} "$pkgdir"/usr/bin
-  for _i in cachegrind callgrind cleaner coverage coverageall cython env eval fixdoctests grep grepdoc inline-fortran ipynb2rst \
-    ipython massif maxima.lisp native-execute notebook num-threads.py omega open preparse python rst2sws rst2txt run \
-    run-cython runtests startuptime.py sws2rst valgrind version.sh
-  do
-    cp bin/sage-$_i "$pkgdir"/usr/bin
-  done
-  
-  mkdir -p "$pkgdir"/usr/share/sage
-  cp -r ext "$pkgdir"/usr/share/sage
-  
-# Remove sage_setup
-  rm -r "$pkgdir"/usr/lib/python2.7/site-packages/sage_setup
-# Install tests
-  cp -r sage/doctest/tests "$pkgdir"/usr/lib/python2.7/site-packages/sage/doctest
-  cp -r sage/tests/books "$pkgdir"/usr/lib/python2.7/site-packages/sage/tests
-
-# Split jupyter kernel
-  rm -r "$pkgdir"/usr/share/jupyter
-}
-
-package_sagemath-jupyter() {
-  pkgdesc='Jupyter kernel for SageMath'
-  depends=(sagemath python2-jupyter_client python2-ipywidgets jsmol)
-  optdepends=('sage-notebook-exporter: convert flask notebooks to Jupyter')
-
-  cd sage-$pkgver/src
-
-  export SAGE_ROOT="$PWD" \
-         SAGE_LOCAL="/usr"
-  python2 -c "from sage.repl.ipython_kernel.install import SageKernelSpec; SageKernelSpec.update(prefix='$pkgdir/usr')"
-# fix symlinks to assets
-  for _i in $(ls ext/notebook-ipython); do
-    rm "$pkgdir"/usr/share/jupyter/kernels/sagemath/$_i
-    ln -s /usr/share/sage/ext/notebook-ipython/$_i "$pkgdir"/usr/share/jupyter/kernels/sagemath/
-  done
-}

Copied: sagemath/repos/community-x86_64/PKGBUILD (from rev 487420, sagemath/trunk/PKGBUILD)
===================================================================
--- PKGBUILD	                        (rev 0)
+++ PKGBUILD	2019-07-04 06:17:08 UTC (rev 487421)
@@ -0,0 +1,159 @@
+# Maintainer: Antonio Rojas <arojas at archlinux.org>
+# Contributor: Evgeniy Alekseev <arcanis.arch at gmail dot com>
+# Contributor: Daniel Wallace <danielwallace at gtmanfred dot com>
+# Contributor: Thomas Dziedzic <gostrc at gmail dot com>
+# Contributor: Osman Ugus <ugus11 at yahoo dot com>
+# Contributor: Stefan Husmann <stefan-husmann at t-online dot de>
+
+pkgbase=sagemath
+pkgname=(sagemath sagemath-jupyter)
+pkgver=8.8
+pkgrel=2
+pkgdesc="Open Source Mathematics Software, free alternative to Magma, Maple, Mathematica, and Matlab"
+arch=(x86_64)
+url="http://www.sagemath.org"
+license=(GPL)
+depends=(ipython2 palp brial cliquer maxima-ecl gfan sympow nauty python2-rpy2 python2-fpylll python2-psutil python2-cypari2
+  python2-matplotlib python2-scipy python2-sympy python2-networkx python2-pillow python2-pplpy python2-future
+  gap flintqs lcalc lrcalc arb eclib zn_poly gd python2-cvxopt pynac linbox m4rie rubiks pari-galdata pari-seadata-small planarity rankwidth tachyon
+  sage-data-combinatorial_designs sage-data-elliptic_curves sage-data-graphs sage-data-polytopes_db sage-data-conway_polynomials
+  iml libgiac libhomfly libbraiding symmetrica three.js)
+optdepends=('cython2: to compile cython code' 'python2-pkgconfig: to compile cython code'
+  'jmol: 3D plots' 'sage-notebook: Flask notebook interface (deprecated)'
+  'sagemath-doc: Documentation and inline help' 'python2-igraph: igraph backend for graph theory'
+  'coin-or-cbc: COIN backend for numerical computations' 'coin-or-csdp: for computing Lovász theta-function of graphs'
+  'buckygen: for generating fullerene graphs' 'plantri: for generating some classes of graphs' 'benzene: for generating fusenes and benzenoids'
+  'ffmpeg: to export animations to video' 'imagemagick: to show animations'
+  'coxeter: Coxeter groups implementation'
+  'lrs: Algorithms for linear reverse search used in game theory and for computing volume of polytopes'
+  'libfes: exhaustive search of solutions for boolean equations' 'python2-pynormaliz: Normaliz backend for polyhedral computations'
+  'latte-integrale: integral point count in polyhedra' 'python2-jupymake: polymake backend for polyhedral computations'
+  'shared_meataxe: faster matrix arithmetic over finite fields' 'openblas: faster linear algebra'
+  'sirocco: for computing the fundamental group of the complement of a plane curve' 'primecount: faster prime_pi implementation'
+  'dot2tex: for displaying some diagrams' 'cryptominisat5: SAT solver' 'python2-pycosat: picosat SAT solver'
+  'python2-pip: to install optional packages with sage -pip')
+makedepends=(cython2 boost ratpoints python2-jinja coin-or-cbc sirocco
+  mcqd coxeter bliss tdlib python2-pkgconfig shared_meataxe libfes primecount)
+source=("$pkgname-$pkgver.tar.gz::https://github.com/sagemath/sage/archive/$pkgver.tar.gz"
+        sagemath-env.patch
+        package.patch
+        latte-count.patch
+        sagemath-python3-notebook.patch
+        test-optional.patch
+        fes02.patch
+        sagemath-threejs.patch
+        sagemath-cremona.patch
+        sagemath-singular-4.1.2.patch
+        sagemath-ecl-sigfpe.patch
+        sagemath-linbox-1.6.patch
+        sagemath-threejs-dir-structure.patch)
+sha256sums=('d012ff4f0f34e086fcaf576e25220fc647826116c69b62b887bc0b8ced5c1e9f'
+            '1c2a2d750e81ac65a1dc07094f086ba07f4862288c935a1cd009cdd62bcfc23c'
+            '328e45e78065b5f6527174bda48cfff6828acbf107c2535b0a9a92c3ceb35842'
+            '596d03daf53a76b04029b120619253250b0e58d530d69f14afa169e27e06f446'
+            '7be9f88975079d671eb3cde78e752e74741bcc29ba9b323bab5cddf50ce6dec9'
+            '1f2a34e15bf732ec8687c467a52e897615505dc3ddd792d811e8b6a7e19f1517'
+            '7fcb52e96935dccb0f958d37c2f4e3918392480b9af53e08562f6cba6c68cb94'
+            'a8c1409f4b4f1553b4f7602d4a6f0f3c6297ed258feed079f6560b0ec2dc62c6'
+            '4c6df9e4e5a7b29ecf6189eda3e5a79f69b6e1b4d29c1b9559663149b8c0af96'
+            '961bfb5694b67d425d21240d71490cb71714b5207c23448c89be0966512ff8f9'
+            'a42f3b152b1aedb8abf16bc70971419919d1fe30328574e7fef8305f9d07d938'
+            '81fc39e39e8508f742ccc784efd0492fd04474cee75edf7bd3cbea43edd49b2e'
+            '779e4107f663307bc9c564e6f800364e7e1926b6cab18ea6674bd62ea7664143')
+
+prepare(){
+  cd sage-$pkgver
+
+# Arch-specific patches
+# assume all optional packages are installed
+  patch -p0 -i ../package.patch
+# set env variables
+  patch -p0 -i ../sagemath-env.patch
+# don't list optional packages when running tests
+  patch -p0 -i ../test-optional.patch
+# use correct latte-count binary name
+  patch -p1 -i ../latte-count.patch
+# make 'sage -notebook=jupyter' work with our python3 jupyter-notebook package
+  patch -p1 -i ../sagemath-python3-notebook.patch
+# use correct online three.js version
+  patch -p1 -i ../sagemath-threejs.patch
+
+# Upstream patches  
+# fix build against libfes 0.2 http://trac.sagemath.org/ticket/15209
+  patch -p1 -i ../fes02.patch
+# use Features to detect Cremona databases https://trac.sagemath.org/ticket/25825
+  patch -p1 -i ../sagemath-cremona.patch
+# Fixes for singular 4.1.2 https://trac.sagemath.org/ticket/25993
+  patch -p1 -i ../sagemath-singular-4.1.2.patch
+# Fix SIGFPE crashes with ecl 16.1.3 https://trac.sagemath.org/ticket/22191
+  patch -p1 -i ../sagemath-ecl-sigfpe.patch
+# fix build with linbox 1.6 https://trac.sagemath.org/ticket/26932
+  patch -p1 -i ../sagemath-linbox-1.6.patch
+# use upstream's three.js directory structure https://trac.sagemath.org/ticket/28007
+  patch -p1 -i ../sagemath-threejs-dir-structure.patch
+
+# use python2
+  sed -e 's|sage-python23|python2|' -e 's|#!/usr/bin/env python\b|#!/usr/bin/env python2|' -i src/bin/*
+  sed -e 's|exec ipython\b|exec ipython2|' -e 's|cygdb|cygdb2|g' -i src/bin/sage
+  sed -e "s|'cython'|'cython2'|" -i src/bin/sage-cython
+}
+
+
+build() {
+  cd sage-$pkgver/src
+
+  export CC=gcc \
+         SAGE_ROOT="$PWD" \
+         SAGE_SRC="$PWD" \
+         SAGE_NUM_THREADS=10
+  python2 setup.py build
+}
+
+package_sagemath() {
+  optdepends+=('sagemath-jupyter: Jupyter kernel')
+
+  cd sage-$pkgver/src
+
+  export SAGE_ROOT="$PWD" \
+         SAGE_LOCAL="/usr" \
+         SAGE_EXTCODE="$PWD"/ext
+  python2 setup.py install --root="$pkgdir" --optimize=1
+
+  mkdir -p "$pkgdir"/usr/bin
+  cp bin/{sage,math-readline} "$pkgdir"/usr/bin
+  for _i in cachegrind callgrind cleaner coverage coverageall cython env eval fixdoctests grep grepdoc inline-fortran ipynb2rst \
+    ipython massif maxima.lisp native-execute notebook num-threads.py omega open preparse python rst2sws rst2txt run \
+    run-cython runtests startuptime.py sws2rst valgrind version.sh
+  do
+    cp bin/sage-$_i "$pkgdir"/usr/bin
+  done
+  
+  mkdir -p "$pkgdir"/usr/share/sage
+  cp -r ext "$pkgdir"/usr/share/sage
+  
+# Remove sage_setup
+  rm -r "$pkgdir"/usr/lib/python2.7/site-packages/sage_setup
+# Install tests
+  cp -r sage/doctest/tests "$pkgdir"/usr/lib/python2.7/site-packages/sage/doctest
+  cp -r sage/tests/books "$pkgdir"/usr/lib/python2.7/site-packages/sage/tests
+
+# Split jupyter kernel
+  rm -r "$pkgdir"/usr/share/jupyter
+}
+
+package_sagemath-jupyter() {
+  pkgdesc='Jupyter kernel for SageMath'
+  depends=(sagemath python2-jupyter_client python2-ipywidgets jsmol)
+  optdepends=('sage-notebook-exporter: convert flask notebooks to Jupyter')
+
+  cd sage-$pkgver/src
+
+  export SAGE_ROOT="$PWD" \
+         SAGE_LOCAL="/usr"
+  python2 -c "from sage.repl.ipython_kernel.install import SageKernelSpec; SageKernelSpec.update(prefix='$pkgdir/usr')"
+# fix symlinks to assets
+  for _i in $(ls ext/notebook-ipython); do
+    rm "$pkgdir"/usr/share/jupyter/kernels/sagemath/$_i
+    ln -s /usr/share/sage/ext/notebook-ipython/$_i "$pkgdir"/usr/share/jupyter/kernels/sagemath/
+  done
+}

Deleted: fes02.patch
===================================================================
--- fes02.patch	2019-07-04 06:16:23 UTC (rev 487420)
+++ fes02.patch	2019-07-04 06:17:08 UTC (rev 487421)
@@ -1,57 +0,0 @@
-From b1f5e3ecc789db674fe17552812f2d0e2ab84be0 Mon Sep 17 00:00:00 2001
-From: Charles Bouillaguet <charles.bouillaguet at lifl.fr>
-Date: Thu, 19 Sep 2013 10:31:11 +0200
-Subject: updating the libFES binding to match a change in the interface
-
----
- src/sage/libs/fes.pyx | 12 +++++++-----
- 1 file changed, 7 insertions(+), 5 deletions(-)
-
-diff --git a/src/sage/libs/fes.pyx b/src/sage/libs/fes.pyx
-index 40b9c23..d188cf0 100644
---- a/src/sage/libs/fes.pyx
-+++ b/src/sage/libs/fes.pyx
-@@ -1,17 +1,19 @@
- """
--Binding for the FES library.
-+Binding for the libFES library.
- 
- Finding solutions of systems of boolean equations by exhaustive
- search, via the fes library. This is usually (much) faster than
- computing a Groebner basis, except in special cases where the latter
- is particularly easy.
- 
--The FES library is presently only able to deal with polynomials in 64
-+More information is available at [http://www.lifl.fr/~bouillag/fes].
-+
-+The libFES library is presently only able to deal with polynomials in 64
- variables. Performing a full exhaustive search over 64 variables will
- take a **long** time. The number of variables can be artificially
- reduced to 64 by specializing some of them.
- 
--Note that the FES library **requires** at least of the equations to be
-+Note that the libFES library **requires** at least of the equations to be
- non-linear.
- 
- AUTHORS:
-@@ -71,7 +73,7 @@ from libc.stdint cimport uint64_t
- cdef extern from "fes_interface.h":
-     ctypedef int (*solution_callback_t)(void *, uint64_t)
- 
--    void exhaustive_search_wrapper(int n, int n_eqs, int degree, int ***coeffs, solution_callback_t callback, void* callback_state, int verbose)
-+    void exhaustive_search_wrapper(int n, int n_eqs, int degree, int ***coeffs, solution_callback_t callback, void* callback_state, int verbose, int T)
- 
- 
- from sage.rings.integer import Integer
-@@ -217,7 +217,7 @@ def exhaustive_search(eqs,  max_sols=Infinity, verbose=False):
- 
-     # ------- runs the library
-     sig_on()
--    exhaustive_search_wrapper(n, len(eqs), degree, coeffs, report_solution, <void *> internal_state, verbose)
-+    exhaustive_search_wrapper(n, len(eqs), degree, coeffs, report_solution, <void *> internal_state, verbose, 0)
-     sig_off()
- 
-     # ------- frees memory occupied by the dense representation of the equations
--- 
-cgit v1.0-1-gd88e
-

Copied: sagemath/repos/community-x86_64/fes02.patch (from rev 487420, sagemath/trunk/fes02.patch)
===================================================================
--- fes02.patch	                        (rev 0)
+++ fes02.patch	2019-07-04 06:17:08 UTC (rev 487421)
@@ -0,0 +1,57 @@
+From b1f5e3ecc789db674fe17552812f2d0e2ab84be0 Mon Sep 17 00:00:00 2001
+From: Charles Bouillaguet <charles.bouillaguet at lifl.fr>
+Date: Thu, 19 Sep 2013 10:31:11 +0200
+Subject: updating the libFES binding to match a change in the interface
+
+---
+ src/sage/libs/fes.pyx | 12 +++++++-----
+ 1 file changed, 7 insertions(+), 5 deletions(-)
+
+diff --git a/src/sage/libs/fes.pyx b/src/sage/libs/fes.pyx
+index 40b9c23..d188cf0 100644
+--- a/src/sage/libs/fes.pyx
++++ b/src/sage/libs/fes.pyx
+@@ -1,17 +1,19 @@
+ """
+-Binding for the FES library.
++Binding for the libFES library.
+ 
+ Finding solutions of systems of boolean equations by exhaustive
+ search, via the fes library. This is usually (much) faster than
+ computing a Groebner basis, except in special cases where the latter
+ is particularly easy.
+ 
+-The FES library is presently only able to deal with polynomials in 64
++More information is available at [http://www.lifl.fr/~bouillag/fes].
++
++The libFES library is presently only able to deal with polynomials in 64
+ variables. Performing a full exhaustive search over 64 variables will
+ take a **long** time. The number of variables can be artificially
+ reduced to 64 by specializing some of them.
+ 
+-Note that the FES library **requires** at least of the equations to be
++Note that the libFES library **requires** at least of the equations to be
+ non-linear.
+ 
+ AUTHORS:
+@@ -71,7 +73,7 @@ from libc.stdint cimport uint64_t
+ cdef extern from "fes_interface.h":
+     ctypedef int (*solution_callback_t)(void *, uint64_t)
+ 
+-    void exhaustive_search_wrapper(int n, int n_eqs, int degree, int ***coeffs, solution_callback_t callback, void* callback_state, int verbose)
++    void exhaustive_search_wrapper(int n, int n_eqs, int degree, int ***coeffs, solution_callback_t callback, void* callback_state, int verbose, int T)
+ 
+ 
+ from sage.rings.integer import Integer
+@@ -217,7 +217,7 @@ def exhaustive_search(eqs,  max_sols=Infinity, verbose=False):
+ 
+     # ------- runs the library
+     sig_on()
+-    exhaustive_search_wrapper(n, len(eqs), degree, coeffs, report_solution, <void *> internal_state, verbose)
++    exhaustive_search_wrapper(n, len(eqs), degree, coeffs, report_solution, <void *> internal_state, verbose, 0)
+     sig_off()
+ 
+     # ------- frees memory occupied by the dense representation of the equations
+-- 
+cgit v1.0-1-gd88e
+

Deleted: latte-count.patch
===================================================================
--- latte-count.patch	2019-07-04 06:16:23 UTC (rev 487420)
+++ latte-count.patch	2019-07-04 06:17:08 UTC (rev 487421)
@@ -1,89 +0,0 @@
-diff --git a/src/sage/geometry/polyhedron/base_ZZ.py b/src/sage/geometry/polyhedron/base_ZZ.py
-index 268af9db0d..70d41dfa30 100644
---- a/src/sage/geometry/polyhedron/base_ZZ.py
-+++ b/src/sage/geometry/polyhedron/base_ZZ.py
-@@ -170,7 +170,7 @@ class Polyhedron_ZZ(Polyhedron_base):
-             sage: p = P.ehrhart_polynomial(maxdet=5, verbose=True)  # optional - latte_int
-             This is LattE integrale ...
-             ...
--            Invocation: count --ehrhart-polynomial '--redundancy-check=none' --cdd '--maxdet=5' /dev/stdin
-+            Invocation: latte-count --ehrhart-polynomial '--redundancy-check=none' --cdd '--maxdet=5' /dev/stdin
-             ...
-             sage: p    # optional - latte_int
-             1/2*t^2 + 3/2*t + 1
-@@ -178,7 +178,7 @@ class Polyhedron_ZZ(Polyhedron_base):
-             sage: p = P.ehrhart_polynomial(dual=True, verbose=True)  # optional - latte_int
-             This is LattE integrale ...
-             ...
--            Invocation: count --ehrhart-polynomial '--redundancy-check=none' --cdd --dual /dev/stdin
-+            Invocation: latte-count --ehrhart-polynomial '--redundancy-check=none' --cdd --dual /dev/stdin
-             ...
-             sage: p   # optional - latte_int
-             1/2*t^2 + 3/2*t + 1
-@@ -186,7 +186,7 @@ class Polyhedron_ZZ(Polyhedron_base):
-             sage: p = P.ehrhart_polynomial(irrational_primal=True, verbose=True)   # optional - latte_int
-             This is LattE integrale ...
-             ...
--            Invocation: count --ehrhart-polynomial '--redundancy-check=none' --cdd --irrational-primal /dev/stdin
-+            Invocation: latte-count --ehrhart-polynomial '--redundancy-check=none' --cdd --irrational-primal /dev/stdin
-             ...
-             sage: p   # optional - latte_int
-             1/2*t^2 + 3/2*t + 1
-@@ -194,7 +194,7 @@ class Polyhedron_ZZ(Polyhedron_base):
-             sage: p = P.ehrhart_polynomial(irrational_all_primal=True, verbose=True)  # optional - latte_int
-             This is LattE integrale ...
-             ...
--            Invocation: count --ehrhart-polynomial '--redundancy-check=none' --cdd --irrational-all-primal /dev/stdin
-+            Invocation: latte-count --ehrhart-polynomial '--redundancy-check=none' --cdd --irrational-all-primal /dev/stdin
-             ...
-             sage: p   # optional - latte_int
-             1/2*t^2 + 3/2*t + 1
-@@ -206,7 +206,7 @@ class Polyhedron_ZZ(Polyhedron_base):
-             ...
-             RuntimeError: LattE integrale program failed (exit code 1):
-             ...
--            Invocation: count --ehrhart-polynomial '--redundancy-check=none' --cdd '--bim-bam-boum=19' /dev/stdin
-+            Invocation: latte-count --ehrhart-polynomial '--redundancy-check=none' --cdd '--bim-bam-boum=19' /dev/stdin
-             Unknown command/option --bim-bam-boum=19
-         """
-         if self.is_empty():
-diff --git a/src/sage/interfaces/latte.py b/src/sage/interfaces/latte.py
-index 066cedd401..302b39910d 100644
---- a/src/sage/interfaces/latte.py
-+++ b/src/sage/interfaces/latte.py
-@@ -94,7 +94,7 @@ def count(arg, ehrhart_polynomial=False, multivariate_generating_function=False,
-         sage: n = count(cddin, cdd=True, verbose=True, raw_output=True)  # optional - latte_int
-         This is LattE integrale ...
-         ...
--        Invocation: count '--redundancy-check=none' --cdd /dev/stdin
-+        Invocation: latte-count '--redundancy-check=none' --cdd /dev/stdin
-         ...
-         Total Unimodular Cones: ...
-         Maximum number of simplicial cones in memory at once: ...
-@@ -113,7 +113,7 @@ def count(arg, ehrhart_polynomial=False, multivariate_generating_function=False,
-     # Check that LattE is present
-     Latte().require()
- 
--    args = ['count']
-+    args = ['latte-count']
-     if ehrhart_polynomial and multivariate_generating_function:
-         raise ValueError
-     if ehrhart_polynomial:
-diff --git a/src/sage/features/latte.py b/src/sage/features/latte.py
-index 63d227fd35..040a5cf1f9 100644
---- a/src/sage/features/latte.py
-+++ b/src/sage/features/latte.py
-@@ -9,10 +9,10 @@ from . import Executable, Feature, FeatureTestResult
- 
- class Latte_count(Executable):
-     r"""
--    Feature for the executable ``count`` from the LattE suite.
-+    Feature for the executable ``latte-count`` from the LattE suite.
-     """
-     def __init__(self):
--        Executable.__init__(self, "count", executable="count",
-+        Executable.__init__(self, "latte-count", executable="count",
-                             spkg="latte_int",
-                             url=LATTE_URL)
- 
-

Copied: sagemath/repos/community-x86_64/latte-count.patch (from rev 487420, sagemath/trunk/latte-count.patch)
===================================================================
--- latte-count.patch	                        (rev 0)
+++ latte-count.patch	2019-07-04 06:17:08 UTC (rev 487421)
@@ -0,0 +1,89 @@
+diff --git a/src/sage/geometry/polyhedron/base_ZZ.py b/src/sage/geometry/polyhedron/base_ZZ.py
+index 268af9db0d..70d41dfa30 100644
+--- a/src/sage/geometry/polyhedron/base_ZZ.py
++++ b/src/sage/geometry/polyhedron/base_ZZ.py
+@@ -170,7 +170,7 @@ class Polyhedron_ZZ(Polyhedron_base):
+             sage: p = P.ehrhart_polynomial(maxdet=5, verbose=True)  # optional - latte_int
+             This is LattE integrale ...
+             ...
+-            Invocation: count --ehrhart-polynomial '--redundancy-check=none' --cdd '--maxdet=5' /dev/stdin
++            Invocation: latte-count --ehrhart-polynomial '--redundancy-check=none' --cdd '--maxdet=5' /dev/stdin
+             ...
+             sage: p    # optional - latte_int
+             1/2*t^2 + 3/2*t + 1
+@@ -178,7 +178,7 @@ class Polyhedron_ZZ(Polyhedron_base):
+             sage: p = P.ehrhart_polynomial(dual=True, verbose=True)  # optional - latte_int
+             This is LattE integrale ...
+             ...
+-            Invocation: count --ehrhart-polynomial '--redundancy-check=none' --cdd --dual /dev/stdin
++            Invocation: latte-count --ehrhart-polynomial '--redundancy-check=none' --cdd --dual /dev/stdin
+             ...
+             sage: p   # optional - latte_int
+             1/2*t^2 + 3/2*t + 1
+@@ -186,7 +186,7 @@ class Polyhedron_ZZ(Polyhedron_base):
+             sage: p = P.ehrhart_polynomial(irrational_primal=True, verbose=True)   # optional - latte_int
+             This is LattE integrale ...
+             ...
+-            Invocation: count --ehrhart-polynomial '--redundancy-check=none' --cdd --irrational-primal /dev/stdin
++            Invocation: latte-count --ehrhart-polynomial '--redundancy-check=none' --cdd --irrational-primal /dev/stdin
+             ...
+             sage: p   # optional - latte_int
+             1/2*t^2 + 3/2*t + 1
+@@ -194,7 +194,7 @@ class Polyhedron_ZZ(Polyhedron_base):
+             sage: p = P.ehrhart_polynomial(irrational_all_primal=True, verbose=True)  # optional - latte_int
+             This is LattE integrale ...
+             ...
+-            Invocation: count --ehrhart-polynomial '--redundancy-check=none' --cdd --irrational-all-primal /dev/stdin
++            Invocation: latte-count --ehrhart-polynomial '--redundancy-check=none' --cdd --irrational-all-primal /dev/stdin
+             ...
+             sage: p   # optional - latte_int
+             1/2*t^2 + 3/2*t + 1
+@@ -206,7 +206,7 @@ class Polyhedron_ZZ(Polyhedron_base):
+             ...
+             RuntimeError: LattE integrale program failed (exit code 1):
+             ...
+-            Invocation: count --ehrhart-polynomial '--redundancy-check=none' --cdd '--bim-bam-boum=19' /dev/stdin
++            Invocation: latte-count --ehrhart-polynomial '--redundancy-check=none' --cdd '--bim-bam-boum=19' /dev/stdin
+             Unknown command/option --bim-bam-boum=19
+         """
+         if self.is_empty():
+diff --git a/src/sage/interfaces/latte.py b/src/sage/interfaces/latte.py
+index 066cedd401..302b39910d 100644
+--- a/src/sage/interfaces/latte.py
++++ b/src/sage/interfaces/latte.py
+@@ -94,7 +94,7 @@ def count(arg, ehrhart_polynomial=False, multivariate_generating_function=False,
+         sage: n = count(cddin, cdd=True, verbose=True, raw_output=True)  # optional - latte_int
+         This is LattE integrale ...
+         ...
+-        Invocation: count '--redundancy-check=none' --cdd /dev/stdin
++        Invocation: latte-count '--redundancy-check=none' --cdd /dev/stdin
+         ...
+         Total Unimodular Cones: ...
+         Maximum number of simplicial cones in memory at once: ...
+@@ -113,7 +113,7 @@ def count(arg, ehrhart_polynomial=False, multivariate_generating_function=False,
+     # Check that LattE is present
+     Latte().require()
+ 
+-    args = ['count']
++    args = ['latte-count']
+     if ehrhart_polynomial and multivariate_generating_function:
+         raise ValueError
+     if ehrhart_polynomial:
+diff --git a/src/sage/features/latte.py b/src/sage/features/latte.py
+index 63d227fd35..040a5cf1f9 100644
+--- a/src/sage/features/latte.py
++++ b/src/sage/features/latte.py
+@@ -9,10 +9,10 @@ from . import Executable, Feature, FeatureTestResult
+ 
+ class Latte_count(Executable):
+     r"""
+-    Feature for the executable ``count`` from the LattE suite.
++    Feature for the executable ``latte-count`` from the LattE suite.
+     """
+     def __init__(self):
+-        Executable.__init__(self, "count", executable="count",
++        Executable.__init__(self, "latte-count", executable="count",
+                             spkg="latte_int",
+                             url=LATTE_URL)
+ 
+

Deleted: package.patch
===================================================================
--- package.patch	2019-07-04 06:16:23 UTC (rev 487420)
+++ package.patch	2019-07-04 06:17:08 UTC (rev 487421)
@@ -1,39 +0,0 @@
---- src/sage/misc/package.py.orig	2014-11-23 15:58:13.000000000 +0100
-+++ src/sage/misc/package.py	2015-01-22 20:32:25.651383902 +0100
-@@ -336,7 +336,7 @@
-         Use the framework provided by :mod:`sage.features` to check
-         whether a library is installed and functional.
-     """
--    return any(p.split('-')[0] == package for p in installed_packages(exclude_pip))
-+    return True
- 
- 
- def package_versions(package_type, local=False):
---- src/sage_setup/optional_extension.py.orig  2016-10-19 18:35:10.092577510 +0000
-+++ src/sage_setup/optional_extension.py       2016-10-19 18:38:13.514765366 +0000
-@@ -21,8 +21,6 @@
- from distutils.extension import Extension
- from sage.misc.package import list_packages
- 
--all_packages = list_packages(local=True)
--
- 
- class CythonizeExtension(Extension):
-     """
-@@ -76,15 +74,7 @@
-         condition = kwds.pop("condition")
-     except KeyError:
-         pkg = kwds.pop("package")
--        from sage.misc.package import is_package_installed
--        try:
--            pkginfo = all_packages[pkg]
--        except KeyError:
--            # Might be an installed old-style package
--            condition = is_package_installed(pkg)
--        else:
--            condition = (pkginfo["installed_version"] == pkginfo["remote_version"])
--
-+        condition = True
-     if condition:
-         return Extension(*args, **kwds)
-     else:

Copied: sagemath/repos/community-x86_64/package.patch (from rev 487420, sagemath/trunk/package.patch)
===================================================================
--- package.patch	                        (rev 0)
+++ package.patch	2019-07-04 06:17:08 UTC (rev 487421)
@@ -0,0 +1,39 @@
+--- src/sage/misc/package.py.orig	2014-11-23 15:58:13.000000000 +0100
++++ src/sage/misc/package.py	2015-01-22 20:32:25.651383902 +0100
+@@ -336,7 +336,7 @@
+         Use the framework provided by :mod:`sage.features` to check
+         whether a library is installed and functional.
+     """
+-    return any(p.split('-')[0] == package for p in installed_packages(exclude_pip))
++    return True
+ 
+ 
+ def package_versions(package_type, local=False):
+--- src/sage_setup/optional_extension.py.orig  2016-10-19 18:35:10.092577510 +0000
++++ src/sage_setup/optional_extension.py       2016-10-19 18:38:13.514765366 +0000
+@@ -21,8 +21,6 @@
+ from distutils.extension import Extension
+ from sage.misc.package import list_packages
+ 
+-all_packages = list_packages(local=True)
+-
+ 
+ class CythonizeExtension(Extension):
+     """
+@@ -76,15 +74,7 @@
+         condition = kwds.pop("condition")
+     except KeyError:
+         pkg = kwds.pop("package")
+-        from sage.misc.package import is_package_installed
+-        try:
+-            pkginfo = all_packages[pkg]
+-        except KeyError:
+-            # Might be an installed old-style package
+-            condition = is_package_installed(pkg)
+-        else:
+-            condition = (pkginfo["installed_version"] == pkginfo["remote_version"])
+-
++        condition = True
+     if condition:
+         return Extension(*args, **kwds)
+     else:

Deleted: sagemath-cremona.patch
===================================================================
--- sagemath-cremona.patch	2019-07-04 06:16:23 UTC (rev 487420)
+++ sagemath-cremona.patch	2019-07-04 06:17:08 UTC (rev 487421)
@@ -1,31 +0,0 @@
-diff --git a/src/sage/databases/cremona.py b/src/sage/databases/cremona.py
-index 3f8dd62..ed5726a 100644
---- a/src/sage/databases/cremona.py
-+++ b/src/sage/databases/cremona.py
-@@ -53,7 +53,7 @@ from sage.misc.prandom import randint
- 
- import sage.schemes.elliptic_curves.constructor as elliptic
- from .sql_db import SQLDatabase, verify_column
--from sage.misc.package import is_package_installed
-+from sage.features.databases import DatabaseCremona
- from sage.env import CREMONA_MINI_DATA_DIR, CREMONA_LARGE_DATA_DIR
- from sage.misc.all import walltime
- 
-@@ -835,7 +835,7 @@ class MiniCremonaDatabase(SQLDatabase):
-             if N < self.largest_conductor():
-                 message = "There is no elliptic curve with label " + label \
-                     + " in the database"
--            elif is_package_installed('database_cremona_ellcurve'):
-+            elif DatabaseCremona().is_present():
-                 message = "There is no elliptic curve with label " + label \
-                     + " in the currently available databases"
-             else:
-@@ -1683,7 +1683,7 @@ def CremonaDatabase(name=None,mini=None,set_global=None):
-     if name is None and not set_global:
-         return _db
-     if set_global and name is None:
--        if is_package_installed('database_cremona_ellcurve'):
-+        if DatabaseCremona().is_present():
-             name = 'cremona'
-         else:
-             name = 'cremona mini'

Copied: sagemath/repos/community-x86_64/sagemath-cremona.patch (from rev 487420, sagemath/trunk/sagemath-cremona.patch)
===================================================================
--- sagemath-cremona.patch	                        (rev 0)
+++ sagemath-cremona.patch	2019-07-04 06:17:08 UTC (rev 487421)
@@ -0,0 +1,31 @@
+diff --git a/src/sage/databases/cremona.py b/src/sage/databases/cremona.py
+index 3f8dd62..ed5726a 100644
+--- a/src/sage/databases/cremona.py
++++ b/src/sage/databases/cremona.py
+@@ -53,7 +53,7 @@ from sage.misc.prandom import randint
+ 
+ import sage.schemes.elliptic_curves.constructor as elliptic
+ from .sql_db import SQLDatabase, verify_column
+-from sage.misc.package import is_package_installed
++from sage.features.databases import DatabaseCremona
+ from sage.env import CREMONA_MINI_DATA_DIR, CREMONA_LARGE_DATA_DIR
+ from sage.misc.all import walltime
+ 
+@@ -835,7 +835,7 @@ class MiniCremonaDatabase(SQLDatabase):
+             if N < self.largest_conductor():
+                 message = "There is no elliptic curve with label " + label \
+                     + " in the database"
+-            elif is_package_installed('database_cremona_ellcurve'):
++            elif DatabaseCremona().is_present():
+                 message = "There is no elliptic curve with label " + label \
+                     + " in the currently available databases"
+             else:
+@@ -1683,7 +1683,7 @@ def CremonaDatabase(name=None,mini=None,set_global=None):
+     if name is None and not set_global:
+         return _db
+     if set_global and name is None:
+-        if is_package_installed('database_cremona_ellcurve'):
++        if DatabaseCremona().is_present():
+             name = 'cremona'
+         else:
+             name = 'cremona mini'

Deleted: sagemath-ecl-sigfpe.patch
===================================================================
--- sagemath-ecl-sigfpe.patch	2019-07-04 06:16:23 UTC (rev 487420)
+++ sagemath-ecl-sigfpe.patch	2019-07-04 06:17:08 UTC (rev 487421)
@@ -1,147 +0,0 @@
-diff --git a/src/sage/libs/ecl.pyx b/src/sage/libs/ecl.pyx
-index e408866..fa24ac0 100644
---- a/src/sage/libs/ecl.pyx
-+++ b/src/sage/libs/ecl.pyx
-@@ -16,7 +16,7 @@ from __future__ import print_function, absolute_import
- #adapted to work with pure Python types.
- 
- from libc.stdlib cimport abort
--from libc.signal cimport SIGINT, SIGBUS, SIGSEGV, SIGCHLD
-+from libc.signal cimport SIGINT, SIGBUS, SIGSEGV, SIGCHLD, SIGFPE
- from libc.signal cimport raise_ as signal_raise
- from posix.signal cimport sigaction, sigaction_t
- cimport cysignals.signals
-@@ -48,9 +48,14 @@ cdef extern from "eclsig.h":
-     void ecl_sig_off()
-     cdef sigaction_t ecl_sigint_handler
-     cdef sigaction_t ecl_sigbus_handler
-+    cdef sigaction_t ecl_sigfpe_handler
-     cdef sigaction_t ecl_sigsegv_handler
-     cdef mpz_t ecl_mpz_from_bignum(cl_object obj)
-     cdef cl_object ecl_bignum_from_mpz(mpz_t num)
-+    cdef int fegetexcept()
-+    cdef int feenableexcept(int)
-+    cdef int fedisableexcept(int)
-+    cdef int ecl_feflags
- 
- cdef cl_object string_to_object(char * s):
-     return ecl_read_from_cstring(s)
-@@ -239,6 +244,7 @@ def init_ecl():
-     global ecl_has_booted
-     cdef char *argv[1]
-     cdef sigaction_t sage_action[32]
-+    cdef int sage_fpes
-     cdef int i
- 
-     if ecl_has_booted:
-@@ -258,6 +264,8 @@ def init_ecl():
-     for i in range(1,32):
-         sigaction(i, NULL, &sage_action[i])
- 
-+    sage_fpes = fegetexcept()
-+
-     #initialize ECL
-     ecl_set_option(ECL_OPT_SIGNAL_HANDLING_THREAD, 0)
-     cl_boot(1, argv)
-@@ -265,8 +273,12 @@ def init_ecl():
-     #save signal handler from ECL
-     sigaction(SIGINT, NULL, &ecl_sigint_handler)
-     sigaction(SIGBUS, NULL, &ecl_sigbus_handler)
-+    sigaction(SIGFPE, NULL, &ecl_sigfpe_handler)
-     sigaction(SIGSEGV, NULL, &ecl_sigsegv_handler)
- 
-+    #save ECL's floating point exception flags
-+    ecl_feflags = fegetexcept()
-+
-     #verify that no SIGCHLD handler was installed
-     cdef sigaction_t sig_test
-     sigaction(SIGCHLD, NULL, &sig_test)
-@@ -277,6 +289,9 @@ def init_ecl():
-     for i in range(1,32):
-         sigaction(i, &sage_action[i], NULL)
- 
-+    fedisableexcept(ecl_feflags)
-+    feenableexcept(sage_fpes)
-+
-     #initialise list of objects and bind to global variable
-     # *SAGE-LIST-OF-OBJECTS* to make it rooted in the reachable tree for the GC
-     list_of_objects=cl_cons(Cnil,cl_cons(Cnil,Cnil))
-@@ -320,7 +335,6 @@ def init_ecl():
-                     (values nil (princ-to-string cnd)))))
-         """))
-     safe_funcall_clobj=cl_eval(string_to_object(b"(symbol-function 'sage-safe-funcall)"))
--
-     ecl_has_booted = 1
- 
- cdef cl_object ecl_safe_eval(cl_object form) except NULL:
-diff --git a/src/sage/libs/eclsig.h b/src/sage/libs/eclsig.h
-index f9f2690..a7e1f40 100644
---- a/src/sage/libs/eclsig.h
-+++ b/src/sage/libs/eclsig.h
-@@ -9,24 +9,66 @@
- 
- 
- #include <signal.h>
-+
-+/* Rummage around to determine how ECL was configured */
-+#define ECL_AVOID_FPE_H  /* Prevent some local includes */
-+#include <ecl/config-internal.h>
-+
-+#ifdef HAVE_FENV_H
-+#include <fenv.h>
-+#ifndef FE_ALL_EXCEPT
-+#define FE_ALL_EXCEPT FE_DIVBYZERO | FE_OVERFLOW | FE_UNDERFLOW | FE_INVALID
-+#endif
-+#else
-+#ifndef FE_ALL_EXCEPT
-+#define FE_ALL_EXCEPT 0
-+#endif
-+#define feclearexcept(flags) do {} while (0)
-+#endif
-+
-+#ifndef HAVE_FEENABLEEXCEPT
-+/* These are GNU extensions */
-+#define fegetexcept() 0
-+#define feenablexcept(flags) do {} while (0)
-+#define fdisableexcept(flags) do {} while (0)
-+#endif
-+
- static struct sigaction ecl_sigint_handler;
- static struct sigaction ecl_sigbus_handler;
-+static struct sigaction ecl_sigfpe_handler;
- static struct sigaction ecl_sigsegv_handler;
- static struct sigaction sage_sigint_handler;
- static struct sigaction sage_sigbus_handler;
-+static struct sigaction sage_sigfpe_handler;
- static struct sigaction sage_sigsegv_handler;
-+static int ecl_feflags;
-+static int sage_feflags;
- 
- static inline void set_ecl_signal_handler(void)
- {
-     sigaction(SIGINT, &ecl_sigint_handler, &sage_sigint_handler);
-     sigaction(SIGBUS, &ecl_sigbus_handler, &sage_sigbus_handler);
-+    sigaction(SIGFPE, &ecl_sigfpe_handler, &sage_sigfpe_handler);
-     sigaction(SIGSEGV, &ecl_sigsegv_handler, &sage_sigsegv_handler);
-+
-+    /* first clear pending floating point exceptions, if any */
-+    feclearexcept(FE_ALL_EXCEPT);
-+
-+    /* sage_feflags should be 0; we don't set them otherwise */
-+    sage_feflags = fedisableexcept(FE_ALL_EXCEPT);
-+    feenableexcept(ecl_feflags);
- }
- 
- static inline void unset_ecl_signal_handler(void)
- {
-+    /* clear pending exceptions and restore previous exception mask */
-+    feclearexcept(FE_ALL_EXCEPT);
-+    ecl_feflags = fedisableexcept(FE_ALL_EXCEPT);
-+    feenableexcept(sage_feflags);
-+
-     sigaction(SIGINT, &sage_sigint_handler, NULL);
-     sigaction(SIGBUS, &sage_sigbus_handler, NULL);
-+    sigaction(SIGFPE, &sage_sigfpe_handler, NULL);
-     sigaction(SIGSEGV, &sage_sigsegv_handler, NULL);
- }
- 

Copied: sagemath/repos/community-x86_64/sagemath-ecl-sigfpe.patch (from rev 487420, sagemath/trunk/sagemath-ecl-sigfpe.patch)
===================================================================
--- sagemath-ecl-sigfpe.patch	                        (rev 0)
+++ sagemath-ecl-sigfpe.patch	2019-07-04 06:17:08 UTC (rev 487421)
@@ -0,0 +1,147 @@
+diff --git a/src/sage/libs/ecl.pyx b/src/sage/libs/ecl.pyx
+index e408866..fa24ac0 100644
+--- a/src/sage/libs/ecl.pyx
++++ b/src/sage/libs/ecl.pyx
+@@ -16,7 +16,7 @@ from __future__ import print_function, absolute_import
+ #adapted to work with pure Python types.
+ 
+ from libc.stdlib cimport abort
+-from libc.signal cimport SIGINT, SIGBUS, SIGSEGV, SIGCHLD
++from libc.signal cimport SIGINT, SIGBUS, SIGSEGV, SIGCHLD, SIGFPE
+ from libc.signal cimport raise_ as signal_raise
+ from posix.signal cimport sigaction, sigaction_t
+ cimport cysignals.signals
+@@ -48,9 +48,14 @@ cdef extern from "eclsig.h":
+     void ecl_sig_off()
+     cdef sigaction_t ecl_sigint_handler
+     cdef sigaction_t ecl_sigbus_handler
++    cdef sigaction_t ecl_sigfpe_handler
+     cdef sigaction_t ecl_sigsegv_handler
+     cdef mpz_t ecl_mpz_from_bignum(cl_object obj)
+     cdef cl_object ecl_bignum_from_mpz(mpz_t num)
++    cdef int fegetexcept()
++    cdef int feenableexcept(int)
++    cdef int fedisableexcept(int)
++    cdef int ecl_feflags
+ 
+ cdef cl_object string_to_object(char * s):
+     return ecl_read_from_cstring(s)
+@@ -239,6 +244,7 @@ def init_ecl():
+     global ecl_has_booted
+     cdef char *argv[1]
+     cdef sigaction_t sage_action[32]
++    cdef int sage_fpes
+     cdef int i
+ 
+     if ecl_has_booted:
+@@ -258,6 +264,8 @@ def init_ecl():
+     for i in range(1,32):
+         sigaction(i, NULL, &sage_action[i])
+ 
++    sage_fpes = fegetexcept()
++
+     #initialize ECL
+     ecl_set_option(ECL_OPT_SIGNAL_HANDLING_THREAD, 0)
+     cl_boot(1, argv)
+@@ -265,8 +273,12 @@ def init_ecl():
+     #save signal handler from ECL
+     sigaction(SIGINT, NULL, &ecl_sigint_handler)
+     sigaction(SIGBUS, NULL, &ecl_sigbus_handler)
++    sigaction(SIGFPE, NULL, &ecl_sigfpe_handler)
+     sigaction(SIGSEGV, NULL, &ecl_sigsegv_handler)
+ 
++    #save ECL's floating point exception flags
++    ecl_feflags = fegetexcept()
++
+     #verify that no SIGCHLD handler was installed
+     cdef sigaction_t sig_test
+     sigaction(SIGCHLD, NULL, &sig_test)
+@@ -277,6 +289,9 @@ def init_ecl():
+     for i in range(1,32):
+         sigaction(i, &sage_action[i], NULL)
+ 
++    fedisableexcept(ecl_feflags)
++    feenableexcept(sage_fpes)
++
+     #initialise list of objects and bind to global variable
+     # *SAGE-LIST-OF-OBJECTS* to make it rooted in the reachable tree for the GC
+     list_of_objects=cl_cons(Cnil,cl_cons(Cnil,Cnil))
+@@ -320,7 +335,6 @@ def init_ecl():
+                     (values nil (princ-to-string cnd)))))
+         """))
+     safe_funcall_clobj=cl_eval(string_to_object(b"(symbol-function 'sage-safe-funcall)"))
+-
+     ecl_has_booted = 1
+ 
+ cdef cl_object ecl_safe_eval(cl_object form) except NULL:
+diff --git a/src/sage/libs/eclsig.h b/src/sage/libs/eclsig.h
+index f9f2690..a7e1f40 100644
+--- a/src/sage/libs/eclsig.h
++++ b/src/sage/libs/eclsig.h
+@@ -9,24 +9,66 @@
+ 
+ 
+ #include <signal.h>
++
++/* Rummage around to determine how ECL was configured */
++#define ECL_AVOID_FPE_H  /* Prevent some local includes */
++#include <ecl/config-internal.h>
++
++#ifdef HAVE_FENV_H
++#include <fenv.h>
++#ifndef FE_ALL_EXCEPT
++#define FE_ALL_EXCEPT FE_DIVBYZERO | FE_OVERFLOW | FE_UNDERFLOW | FE_INVALID
++#endif
++#else
++#ifndef FE_ALL_EXCEPT
++#define FE_ALL_EXCEPT 0
++#endif
++#define feclearexcept(flags) do {} while (0)
++#endif
++
++#ifndef HAVE_FEENABLEEXCEPT
++/* These are GNU extensions */
++#define fegetexcept() 0
++#define feenablexcept(flags) do {} while (0)
++#define fdisableexcept(flags) do {} while (0)
++#endif
++
+ static struct sigaction ecl_sigint_handler;
+ static struct sigaction ecl_sigbus_handler;
++static struct sigaction ecl_sigfpe_handler;
+ static struct sigaction ecl_sigsegv_handler;
+ static struct sigaction sage_sigint_handler;
+ static struct sigaction sage_sigbus_handler;
++static struct sigaction sage_sigfpe_handler;
+ static struct sigaction sage_sigsegv_handler;
++static int ecl_feflags;
++static int sage_feflags;
+ 
+ static inline void set_ecl_signal_handler(void)
+ {
+     sigaction(SIGINT, &ecl_sigint_handler, &sage_sigint_handler);
+     sigaction(SIGBUS, &ecl_sigbus_handler, &sage_sigbus_handler);
++    sigaction(SIGFPE, &ecl_sigfpe_handler, &sage_sigfpe_handler);
+     sigaction(SIGSEGV, &ecl_sigsegv_handler, &sage_sigsegv_handler);
++
++    /* first clear pending floating point exceptions, if any */
++    feclearexcept(FE_ALL_EXCEPT);
++
++    /* sage_feflags should be 0; we don't set them otherwise */
++    sage_feflags = fedisableexcept(FE_ALL_EXCEPT);
++    feenableexcept(ecl_feflags);
+ }
+ 
+ static inline void unset_ecl_signal_handler(void)
+ {
++    /* clear pending exceptions and restore previous exception mask */
++    feclearexcept(FE_ALL_EXCEPT);
++    ecl_feflags = fedisableexcept(FE_ALL_EXCEPT);
++    feenableexcept(sage_feflags);
++
+     sigaction(SIGINT, &sage_sigint_handler, NULL);
+     sigaction(SIGBUS, &sage_sigbus_handler, NULL);
++    sigaction(SIGFPE, &sage_sigfpe_handler, NULL);
+     sigaction(SIGSEGV, &sage_sigsegv_handler, NULL);
+ }
+ 

Deleted: sagemath-env.patch
===================================================================
--- sagemath-env.patch	2019-07-04 06:16:23 UTC (rev 487420)
+++ sagemath-env.patch	2019-07-04 06:17:08 UTC (rev 487421)
@@ -1,143 +0,0 @@
---- src/bin/sage-env.orig	2015-01-06 10:46:04.469687605 +0100
-+++ src/bin/sage-env	2015-01-06 10:49:59.547762019 +0100
-@@ -111,41 +111,6 @@
- }
- 
- 
--# New value for SAGE_ROOT: either SAGE_ROOT (if given)
--# or a guessed value based on pwd.
--if [ -n "$SAGE_ROOT" ]; then
--    NEW_SAGE_ROOT="$SAGE_ROOT"
--elif [ -f sage -a -d build ]; then
--    NEW_SAGE_ROOT="."
--elif [ -f ../../sage -a -d ../../build ]; then
--    NEW_SAGE_ROOT="../.."
--else
--    # No idea what SAGE_ROOT should be...
--    echo >&2 "Error: You must set the SAGE_ROOT environment variable or run this"
--    echo >&2 "script from the SAGE_ROOT or SAGE_ROOT/local/bin/ directory."
--    return 1
--fi
--
--# Make NEW_SAGE_ROOT absolute
--NEW_SAGE_ROOT=`cd "$NEW_SAGE_ROOT" && pwd -P`
--
--# Sanity check NEW_SAGE_ROOT
--if [ -f "$NEW_SAGE_ROOT/sage" -a -d "$NEW_SAGE_ROOT/build" ]; then
--    :
--else
--    echo >&2 "Error: SAGE_ROOT is set to a bad value:"
--    echo >&2 "SAGE_ROOT=$SAGE_ROOT"
--    echo >&2 "You must correct it or erase it and run this script from the SAGE_ROOT"
--    echo >&2 "or SAGE_ROOT/local/bin/ directory."
--    return 1
--fi
--
--# Warn if NEW_SAGE_ROOT does not equal the old SAGE_ROOT
--if [ "$SAGE_ROOT" != "$NEW_SAGE_ROOT" -a -n "$SAGE_ROOT" ]; then
--    echo >&2 "Warning: overwriting SAGE_ROOT environment variable:"
--    echo >&2 "Old SAGE_ROOT=$SAGE_ROOT"
--    echo >&2 "New SAGE_ROOT=$NEW_SAGE_ROOT"
--fi
- 
- 
- # Don't execute the commands more than once for the same version of
-@@ -174,35 +174,9 @@
- export SAGE_ENV_SOURCED=$SAGE_ENV_VERSION
- 
- export SAGE_ROOT="$NEW_SAGE_ROOT"
-+export SAGE_LOCAL='/usr'
-+export SAGE_SCRIPTS_DIR='/usr/bin'
- 
--
--# sage-env must know where the Sage's script files are.
--# Note that SAGE_SCRIPTS_DIR is only used here, so it does not need to
--# be exported.
--if [ -z "$SAGE_SCRIPTS_DIR" ]; then
--    if [ -f "$SAGE_ROOT/src/bin/sage-env-config" ]; then
--        # Prefer src/bin/sage-env-config because that's directly
--        # generated by configure (see Trac #27422)
--        SAGE_SCRIPTS_DIR="$SAGE_ROOT/src/bin"
--    elif [ -n "$SAGE_LOCAL" ] && [ -f "$SAGE_LOCAL/bin/sage-env-config" ]; then
--        SAGE_SCRIPTS_DIR="$SAGE_LOCAL/bin"
--    else
--        echo >&2 "Error: You must set either the SAGE_LOCAL or SAGE_SCRIPTS_DIR environment variable to run this"
--        return 1
--    fi
--elif [ ! -f "$SAGE_SCRIPTS_DIR/sage-env-config" ]; then
--    echo >&2 "Error: SAGE_SCRIPTS_DIR is set to a bad value:"
--    echo >&2 "SAGE_SCRIPTS_DIR=$SAGE_SCRIPTS_DIR"
--    echo >&2 "You must correct it or erase it and rerun this script"
--    return 1
--fi
--
--# Set environment variables (like SAGE_LOCAL) depending on ./configure
--. "$SAGE_SCRIPTS_DIR/sage-env-config"
--if [ $? -ne 0 ]; then
--    echo >&2 "Error: failed to source $SAGE_SCRIPTS_DIR/sage-env-config"
--    return 1
--fi
- 
- # The compilers are set in order of priority by
- # 1) environment variables
-@@ -298,8 +298,8 @@
- export SAGE_SPKG_INST="$SAGE_LOCAL/var/lib/sage/installed"
- export SAGE_SPKG_SCRIPTS="$SAGE_LOCAL/var/lib/sage/scripts"
- export SAGE_LOGS="$SAGE_ROOT/logs/pkgs"
--export SAGE_SRC="$SAGE_ROOT/src"
--export SAGE_DOC_SRC="$SAGE_SRC/doc"
-+export SAGE_SRC="$SAGE_LOCAL/lib/python2.7/site-packages"
-+export SAGE_DOC_SRC="$SAGE_SHARE/doc/sage"
- export SAGE_DOC="$SAGE_SHARE/doc/sage"
- 
- if [ -z "${SAGE_ORIG_PATH_SET}" ]; then
-@@ -411,28 +411,8 @@
-     export SAGE_STARTUP_FILE
- fi
- 
-+export LIBMTX="$DOT_SAGE/meataxe"
-+[[ -d $LIBMTX ]] || mkdir -p $LIBMTX # Create meataxe data dir
--if [ "$PYTHON_EGG_CACHE" = "" ]; then
--    PYTHON_EGG_CACHE="$DOT_SAGE/.python-eggs"
--    export PYTHON_EGG_CACHE
--fi
--
--# Set PYTHONUSERBASE to avoid picking up non-Sage versions of
--# Matplotlib, numpy, etc. See http://trac.sagemath.org/ticket/19612.
--#
--# For more history (it used to be PYTHONNOUSERSITE=yes which killed
--# the ability to do "sage -pip install PACKAGE --user"), see
--# http://trac.sagemath.org/ticket/14243 and
--# http://trac.sagemath.org/ticket/18955.
--
--if [ "$PYTHONUSERBASE" = "" ]; then
--    PYTHONUSERBASE="$DOT_SAGE/local"
--    export PYTHONUSERBASE
--fi
--
--if [ -n "$PYTHONHOME" ]; then
--    >&2 echo "Warning: PYTHONHOME must not be set when running Sage, clearing env..."
--    unset PYTHONHOME
--fi
- 
- LDFLAGS="-L$SAGE_LOCAL/lib -Wl,-rpath,$SAGE_LOCAL/lib $LDFLAGS"
- export LDFLAGS
-@@ -497,8 +497,6 @@
-     fi
- fi
-
--export MAXIMA_PREFIX="$SAGE_LOCAL"
--export MAXIMA_USERDIR="$DOT_SAGE/maxima"
- 
- PERL5LIB="$SAGE_LOCAL/lib/perl5:$PERL5LIB" && export PERL5LIB
- 
-@@ -609,9 +609,6 @@
-     LD_LIBRARY_PATH="$SAGE_LOCAL/bin:$LD_LIBRARY_PATH" && export LD_LIBRARY_PATH
- fi
- 
--# See trac 7186 -- this is needed if ecl is moved
--ECLDIR="$SAGE_LOCAL/lib/ecl/" && export ECLDIR
--
- # Handle parallel building/testing/...
- # See Trac Ticket #12016
- # First, figure out the right values for SAGE_NUM_THREADS (default

Copied: sagemath/repos/community-x86_64/sagemath-env.patch (from rev 487420, sagemath/trunk/sagemath-env.patch)
===================================================================
--- sagemath-env.patch	                        (rev 0)
+++ sagemath-env.patch	2019-07-04 06:17:08 UTC (rev 487421)
@@ -0,0 +1,143 @@
+--- src/bin/sage-env.orig	2015-01-06 10:46:04.469687605 +0100
++++ src/bin/sage-env	2015-01-06 10:49:59.547762019 +0100
+@@ -111,41 +111,6 @@
+ }
+ 
+ 
+-# New value for SAGE_ROOT: either SAGE_ROOT (if given)
+-# or a guessed value based on pwd.
+-if [ -n "$SAGE_ROOT" ]; then
+-    NEW_SAGE_ROOT="$SAGE_ROOT"
+-elif [ -f sage -a -d build ]; then
+-    NEW_SAGE_ROOT="."
+-elif [ -f ../../sage -a -d ../../build ]; then
+-    NEW_SAGE_ROOT="../.."
+-else
+-    # No idea what SAGE_ROOT should be...
+-    echo >&2 "Error: You must set the SAGE_ROOT environment variable or run this"
+-    echo >&2 "script from the SAGE_ROOT or SAGE_ROOT/local/bin/ directory."
+-    return 1
+-fi
+-
+-# Make NEW_SAGE_ROOT absolute
+-NEW_SAGE_ROOT=`cd "$NEW_SAGE_ROOT" && pwd -P`
+-
+-# Sanity check NEW_SAGE_ROOT
+-if [ -f "$NEW_SAGE_ROOT/sage" -a -d "$NEW_SAGE_ROOT/build" ]; then
+-    :
+-else
+-    echo >&2 "Error: SAGE_ROOT is set to a bad value:"
+-    echo >&2 "SAGE_ROOT=$SAGE_ROOT"
+-    echo >&2 "You must correct it or erase it and run this script from the SAGE_ROOT"
+-    echo >&2 "or SAGE_ROOT/local/bin/ directory."
+-    return 1
+-fi
+-
+-# Warn if NEW_SAGE_ROOT does not equal the old SAGE_ROOT
+-if [ "$SAGE_ROOT" != "$NEW_SAGE_ROOT" -a -n "$SAGE_ROOT" ]; then
+-    echo >&2 "Warning: overwriting SAGE_ROOT environment variable:"
+-    echo >&2 "Old SAGE_ROOT=$SAGE_ROOT"
+-    echo >&2 "New SAGE_ROOT=$NEW_SAGE_ROOT"
+-fi
+ 
+ 
+ # Don't execute the commands more than once for the same version of
+@@ -174,35 +174,9 @@
+ export SAGE_ENV_SOURCED=$SAGE_ENV_VERSION
+ 
+ export SAGE_ROOT="$NEW_SAGE_ROOT"
++export SAGE_LOCAL='/usr'
++export SAGE_SCRIPTS_DIR='/usr/bin'
+ 
+-
+-# sage-env must know where the Sage's script files are.
+-# Note that SAGE_SCRIPTS_DIR is only used here, so it does not need to
+-# be exported.
+-if [ -z "$SAGE_SCRIPTS_DIR" ]; then
+-    if [ -f "$SAGE_ROOT/src/bin/sage-env-config" ]; then
+-        # Prefer src/bin/sage-env-config because that's directly
+-        # generated by configure (see Trac #27422)
+-        SAGE_SCRIPTS_DIR="$SAGE_ROOT/src/bin"
+-    elif [ -n "$SAGE_LOCAL" ] && [ -f "$SAGE_LOCAL/bin/sage-env-config" ]; then
+-        SAGE_SCRIPTS_DIR="$SAGE_LOCAL/bin"
+-    else
+-        echo >&2 "Error: You must set either the SAGE_LOCAL or SAGE_SCRIPTS_DIR environment variable to run this"
+-        return 1
+-    fi
+-elif [ ! -f "$SAGE_SCRIPTS_DIR/sage-env-config" ]; then
+-    echo >&2 "Error: SAGE_SCRIPTS_DIR is set to a bad value:"
+-    echo >&2 "SAGE_SCRIPTS_DIR=$SAGE_SCRIPTS_DIR"
+-    echo >&2 "You must correct it or erase it and rerun this script"
+-    return 1
+-fi
+-
+-# Set environment variables (like SAGE_LOCAL) depending on ./configure
+-. "$SAGE_SCRIPTS_DIR/sage-env-config"
+-if [ $? -ne 0 ]; then
+-    echo >&2 "Error: failed to source $SAGE_SCRIPTS_DIR/sage-env-config"
+-    return 1
+-fi
+ 
+ # The compilers are set in order of priority by
+ # 1) environment variables
+@@ -298,8 +298,8 @@
+ export SAGE_SPKG_INST="$SAGE_LOCAL/var/lib/sage/installed"
+ export SAGE_SPKG_SCRIPTS="$SAGE_LOCAL/var/lib/sage/scripts"
+ export SAGE_LOGS="$SAGE_ROOT/logs/pkgs"
+-export SAGE_SRC="$SAGE_ROOT/src"
+-export SAGE_DOC_SRC="$SAGE_SRC/doc"
++export SAGE_SRC="$SAGE_LOCAL/lib/python2.7/site-packages"
++export SAGE_DOC_SRC="$SAGE_SHARE/doc/sage"
+ export SAGE_DOC="$SAGE_SHARE/doc/sage"
+ 
+ if [ -z "${SAGE_ORIG_PATH_SET}" ]; then
+@@ -411,28 +411,8 @@
+     export SAGE_STARTUP_FILE
+ fi
+ 
++export LIBMTX="$DOT_SAGE/meataxe"
++[[ -d $LIBMTX ]] || mkdir -p $LIBMTX # Create meataxe data dir
+-if [ "$PYTHON_EGG_CACHE" = "" ]; then
+-    PYTHON_EGG_CACHE="$DOT_SAGE/.python-eggs"
+-    export PYTHON_EGG_CACHE
+-fi
+-
+-# Set PYTHONUSERBASE to avoid picking up non-Sage versions of
+-# Matplotlib, numpy, etc. See http://trac.sagemath.org/ticket/19612.
+-#
+-# For more history (it used to be PYTHONNOUSERSITE=yes which killed
+-# the ability to do "sage -pip install PACKAGE --user"), see
+-# http://trac.sagemath.org/ticket/14243 and
+-# http://trac.sagemath.org/ticket/18955.
+-
+-if [ "$PYTHONUSERBASE" = "" ]; then
+-    PYTHONUSERBASE="$DOT_SAGE/local"
+-    export PYTHONUSERBASE
+-fi
+-
+-if [ -n "$PYTHONHOME" ]; then
+-    >&2 echo "Warning: PYTHONHOME must not be set when running Sage, clearing env..."
+-    unset PYTHONHOME
+-fi
+ 
+ LDFLAGS="-L$SAGE_LOCAL/lib -Wl,-rpath,$SAGE_LOCAL/lib $LDFLAGS"
+ export LDFLAGS
+@@ -497,8 +497,6 @@
+     fi
+ fi
+
+-export MAXIMA_PREFIX="$SAGE_LOCAL"
+-export MAXIMA_USERDIR="$DOT_SAGE/maxima"
+ 
+ PERL5LIB="$SAGE_LOCAL/lib/perl5:$PERL5LIB" && export PERL5LIB
+ 
+@@ -609,9 +609,6 @@
+     LD_LIBRARY_PATH="$SAGE_LOCAL/bin:$LD_LIBRARY_PATH" && export LD_LIBRARY_PATH
+ fi
+ 
+-# See trac 7186 -- this is needed if ecl is moved
+-ECLDIR="$SAGE_LOCAL/lib/ecl/" && export ECLDIR
+-
+ # Handle parallel building/testing/...
+ # See Trac Ticket #12016
+ # First, figure out the right values for SAGE_NUM_THREADS (default

Deleted: sagemath-linbox-1.6.patch
===================================================================
--- sagemath-linbox-1.6.patch	2019-07-04 06:16:23 UTC (rev 487420)
+++ sagemath-linbox-1.6.patch	2019-07-04 06:17:08 UTC (rev 487421)
@@ -1,650 +0,0 @@
-diff --git a/src/sage/libs/linbox/conversion.pxd b/src/sage/libs/linbox/conversion.pxd
-index 810a197..7794c9e 100644
---- a/src/sage/libs/linbox/conversion.pxd
-+++ b/src/sage/libs/linbox/conversion.pxd
-@@ -45,7 +45,7 @@ from sage.modules.vector_integer_sparse cimport mpz_vector,  mpz_vector_get_entr
- 
- ctypedef enum linbox_specifier:
-     METHOD_DEFAULT              # no specification
--    METHOD_BLAS_ELIMINATION     # BlasElimination
-+    METHOD_DENSE_ELIMINATION     # DenseElimination
-     METHOD_SPARSE_ELIMINATION   # SparseElimination
-     METHOD_BLACKBOX             # Blackbox
-     METHOD_WIEDEMANN            # Wiedeman
-@@ -54,10 +54,10 @@ ctypedef enum linbox_specifier:
- cdef inline linbox_specifier get_method(str algo) except ERROR:
-     if algo is None or algo == "default":
-         return METHOD_DEFAULT
--    elif algo == "blas_elimination" or \
--         algo == "linbox_blas_elimination" or \
--         algo == "LinBox::BlasElimination":
--        return METHOD_BLAS_ELIMINATION
-+    elif algo == "dense_elimination" or \
-+         algo == "linbox_dense_elimination" or \
-+         algo == "LinBox::DenseElimination":
-+        return METHOD_DENSE_ELIMINATION
-     elif algo == "sparse_elimination" or \
-          algo == "linbox_sparse_elimination" or \
-          algo == "LinBox::SparseElimination":
-diff --git a/src/sage/libs/linbox/fflas.pxd b/src/sage/libs/linbox/fflas.pxd
-index f3a7ce3..8bf62f1 100644
---- a/src/sage/libs/linbox/fflas.pxd
-+++ b/src/sage/libs/linbox/fflas.pxd
-@@ -63,8 +63,7 @@ cdef extern from "fflas-ffpack/fflas-ffpack.h" namespace "FFPACK":
-     Modular_double.Element* Invert (Modular_double F, size_t order,
-                                     Modular_double.Element* A, size_t A_stride, int nullity)
- 
--    Modular_double.Element Det (Modular_double F,
--                                size_t nrows, size_t ncols,
-+    Modular_double.Element Det (Modular_double F, Modular_double.Element& d, size_t n,
-                                 Modular_double.Element* A, size_t A_stride)
- 
-     int Rank (Modular_double,
-@@ -97,8 +96,7 @@ cdef extern from "fflas-ffpack/fflas-ffpack.h" namespace "FFPACK":
-     Modular_float.Element* Invert (Modular_float F, size_t order,
-                                    Modular_float.Element* A, size_t A_stride, int nullity)
- 
--    Modular_float.Element Det (Modular_float F,
--                               size_t nrows, size_t ncols,
-+    Modular_float.Element Det (Modular_float F, Modular_float.Element& d, size_t n,
-                                Modular_float.Element* A, size_t A_stride)
- 
-     int Rank (Modular_float,
-diff --git a/src/sage/libs/linbox/linbox.pxd b/src/sage/libs/linbox/linbox.pxd
-index 35a3fa0..fb0e0dc 100644
---- a/src/sage/libs/linbox/linbox.pxd
-+++ b/src/sage/libs/linbox/linbox.pxd
-@@ -10,10 +10,10 @@ from .givaro cimport *
- 
- cdef extern from "linbox/matrix/dense-matrix.h":
-     ## template <class _Field, class _blasRep=typename Vector<_Field>::Dense >
--    ## class BlasMatrix ;
-+    ## class DenseMatrix ;
-     ##
-     ## template <class _Field>
--    ## using DenseMatrix = BlasMatrix<_Field> ;
-+    ## using DenseMatrix = DenseMatrix<_Field> ;
-     cdef cppclass DenseMatrix_integer "LinBox::DenseMatrix<Givaro::ZRing<Givaro::Integer>>":
-         ctypedef ZRing Field
-         ctypedef Integer Element
-@@ -30,6 +30,7 @@ cdef extern from "linbox/matrix/dense-matrix.h":
-         ctypedef Modular_double Field
-         ctypedef double Element
-         DenseMatrix_Modular_double(Field F, size_t m, size_t n)
-+        DenseMatrix_Modular_double(Field F, Element*, size_t m, size_t n)
-         void setEntry(size_t i, size_t j, Element& a)
-         Element &getEntry(size_t i, size_t j)
- 
-@@ -39,6 +40,7 @@ cdef extern from "linbox/matrix/dense-matrix.h":
-         ctypedef Modular_float Field
-         ctypedef float Element
-         DenseMatrix_Modular_float(Field F, size_t m, size_t n)
-+        DenseMatrix_Modular_float(Field F, Element*, size_t m, size_t n)
-         void setEntry(size_t i, size_t j, Element& a)
-         Element &getEntry(size_t i, size_t j)
- 
-@@ -125,7 +127,7 @@ cdef extern from "linbox/solutions/methods.h" namespace "LinBox":
-         pass
-     cdef struct WiedemannTraits:
-         pass
--    cdef struct BlasEliminationTraits:
-+    cdef struct DenseEliminationTraits:
-         pass
-     cdef struct SparseEliminationTraits:
-         pass
-@@ -135,7 +137,7 @@ cdef extern from "linbox/solutions/methods.h" namespace "LinBox":
-         ctypedef BlackboxSpecifier Blackbox
-         ctypedef EliminationSpecifier Elimination
-         ctypedef WiedemannTraits Wiedemann
--        ctypedef BlasEliminationTraits BlasElimination
-+        ctypedef DenseEliminationTraits DenseElimination
-         ctypedef SparseEliminationTraits SparseElimination
- 
- cdef extern from "linbox/solutions/charpoly.h" namespace "LinBox":
-@@ -157,18 +159,24 @@ cdef extern from "linbox/algorithms/gauss.h":
-                                              unsigned long Ni,
-                                              unsigned long Nj)
- 
--cdef extern from "linbox/algorithms/echelon-form.h":
--    ## template<class Field>
--    ## class EchelonFormDomain
--    cdef cppclass EchelonForm_Modular_double "LinBox::EchelonFormDomain<Givaro::Modular<double>>":
--        ctypedef double Element
--        EchelonForm_Modular_double(Modular_double)
--        int rowReducedEchelon(DenseMatrix_Modular_double&, const DenseMatrix_Modular_double&)
--
--    cdef cppclass EchelonForm_Modular_float "LinBox::EchelonFormDomain<Givaro::Modular<float>>":
--        ctypedef float Element
--        EchelonForm_Modular_float(Modular_float)
--        int rowReducedEchelon(DenseMatrix_Modular_float, const DenseMatrix_Modular_float)
-+cdef extern from "linbox/solutions/echelon.h" namespace "LinBox":
-+    size_t rowEchelon (DenseMatrix_Modular_float&, const DenseMatrix_Modular_float&)
-+    size_t rowEchelonize (DenseMatrix_Modular_float&)
-+    size_t reducedRowEchelon (DenseMatrix_Modular_float&, const DenseMatrix_Modular_float&)
-+    size_t reducedRowEchelonize (DenseMatrix_Modular_float&)
-+    size_t colEchelon (DenseMatrix_Modular_float&, const DenseMatrix_Modular_float&)
-+    size_t colEchelonize (DenseMatrix_Modular_float&)
-+    size_t reducedColEchelon (DenseMatrix_Modular_float&, const DenseMatrix_Modular_float&)
-+    size_t reducedColEchelonize (DenseMatrix_Modular_float&)
-+
-+    size_t rowEchelon (DenseMatrix_Modular_double&, const DenseMatrix_Modular_double&)
-+    size_t rowEchelonize (DenseMatrix_Modular_double&)
-+    size_t reducedRowEchelon (DenseMatrix_Modular_double&, const DenseMatrix_Modular_double&)
-+    size_t reducedRowEchelonize (DenseMatrix_Modular_double&)
-+    size_t colEchelon (DenseMatrix_Modular_double&, const DenseMatrix_Modular_double&)
-+    size_t colEchelonize (DenseMatrix_Modular_double&)
-+    size_t reducedColEchelon (DenseMatrix_Modular_double&, const DenseMatrix_Modular_double&)
-+    size_t reducedColEchelonize (DenseMatrix_Modular_double&)
- 
- cdef extern from "linbox/solutions/rank.h" namespace "LinBox":
-     unsigned long & rank (unsigned long&, DenseMatrix_integer)
-@@ -185,7 +193,7 @@ cdef extern from "linbox/solutions/solve.h" namespace "LinBox":
-                                 Integer &,
-                                 SparseMatrix_integer &,
-                                 DenseVector_integer &,
--                                Method.BlasElimination) except +
-+                                Method.DenseElimination) except +
- 
-     DenseVector_integer& solve (DenseVector_integer &,
-                                 Integer &,
-diff --git a/src/sage/matrix/matrix_integer_sparse.pyx b/src/sage/matrix/matrix_integer_sparse.pyx
-index 7fa386e..132140f 100644
---- a/src/sage/matrix/matrix_integer_sparse.pyx
-+++ b/src/sage/matrix/matrix_integer_sparse.pyx
-@@ -42,7 +42,7 @@ from sage.libs.linbox.conversion cimport (
-     new_linbox_vector_integer_dense,
-     new_sage_vector_integer_dense,
-     new_linbox_matrix_integer_sparse,
--    METHOD_DEFAULT, METHOD_BLAS_ELIMINATION,
-+    METHOD_DEFAULT, METHOD_DENSE_ELIMINATION,
-     METHOD_SPARSE_ELIMINATION, METHOD_BLACKBOX,
-     METHOD_WIEDEMANN, get_method)
- 
-@@ -926,7 +926,7 @@ cdef class Matrix_integer_sparse(Matrix_sparse):
-             - ``'linbox'`` or ``'linbox_default'`` - (default) use LinBox
-               and let it chooses the appropriate algorithm
- 
--            -  ``linbox_blas_elimination'`` - use LinBox dense elimination
-+            -  ``linbox_dense_elimination'`` - use LinBox dense elimination
- 
-             - ``'linbox_sparse_elimination'`` - use LinBox sparse elimination
- 
-@@ -993,7 +993,7 @@ cdef class Matrix_integer_sparse(Matrix_sparse):
- 
-         - ``b`` -- a dense integer vector
- 
--        - ``algorithm`` -- (optional) either ``None``, ``'blas_elimination'``,
-+        - ``algorithm`` -- (optional) either ``None``, ``'dense_elimination'``,
-           ``'sparse_elimination'``, ``'wiedemann'`` or ``'blackbox'``.
- 
-         OUTPUT: a pair ``(a, d)`` consisting of
-@@ -1012,7 +1012,7 @@ cdef class Matrix_integer_sparse(Matrix_sparse):
-             sage: b0 = vector((1,1,1,1))
-             sage: m._solve_vector_linbox(b0)
-             ((-1, -7, -3, -1), 1)
--            sage: m._solve_vector_linbox(b0, 'blas_elimination')
-+            sage: m._solve_vector_linbox(b0, 'dense_elimination')
-             ((-1, -7, -3, -1), 1)
-             sage: m._solve_vector_linbox(b0, 'sparse_elimination')
-             ((-1, -7, -3, -1), 1)
-@@ -1024,7 +1024,7 @@ cdef class Matrix_integer_sparse(Matrix_sparse):
-             sage: b1 = vector((1,2,3,4))
-             sage: m._solve_vector_linbox(b1)
-             ((-18, -92, -41, -17), 5)
--            sage: m._solve_vector_linbox(b1, 'blas_elimination')
-+            sage: m._solve_vector_linbox(b1, 'dense_elimination')
-             ((-18, -92, -41, -17), 5)
-             sage: m._solve_vector_linbox(b1, 'sparse_elimination')
-             ((-18, -92, -41, -17), 5)
-@@ -1039,7 +1039,7 @@ cdef class Matrix_integer_sparse(Matrix_sparse):
- 
-         TESTS::
- 
--            sage: algos = ["default", "blas_elimination", "sparse_elimination",
-+            sage: algos = ["default", "dense_elimination", "sparse_elimination",
-             ....:          "blackbox", "wiedemann"]
-             sage: for i in range(20):
-             ....:     dim = randint(1, 30)
-@@ -1080,8 +1080,8 @@ cdef class Matrix_integer_sparse(Matrix_sparse):
-             linbox.solve(res[0], D, A[0], b[0])
-         elif method == METHOD_WIEDEMANN:
-             linbox.solve(res[0], D, A[0], b[0], linbox.Method.Wiedemann())
--        elif method == METHOD_BLAS_ELIMINATION:
--            linbox.solve(res[0], D, A[0], b[0], linbox.Method.BlasElimination())
-+        elif method == METHOD_DENSE_ELIMINATION:
-+            linbox.solve(res[0], D, A[0], b[0], linbox.Method.DenseElimination())
-         elif method == METHOD_SPARSE_ELIMINATION:
-             linbox.solve(res[0], D, A[0], b[0], linbox.Method.SparseElimination())
-         elif method == METHOD_BLACKBOX:
-@@ -1136,7 +1136,7 @@ cdef class Matrix_integer_sparse(Matrix_sparse):
- 
-         TESTS::
- 
--            sage: algos = ["default", "blas_elimination", "sparse_elimination",
-+            sage: algos = ["default", "dense_elimination", "sparse_elimination",
-             ....:          "blackbox", "wiedemann"]
- 
-             sage: for _ in range(10):
-@@ -1191,8 +1191,8 @@ cdef class Matrix_integer_sparse(Matrix_sparse):
-             # solve the current row
-             if algo == METHOD_DEFAULT:
-                 linbox.solve(res[0], D, A[0], b[0])
--            elif algo == METHOD_BLAS_ELIMINATION:
--                linbox.solve(res[0], D, A[0], b[0], linbox.Method.BlasElimination())
-+            elif algo == METHOD_DENSE_ELIMINATION:
-+                linbox.solve(res[0], D, A[0], b[0], linbox.Method.DenseElimination())
-             elif algo == METHOD_SPARSE_ELIMINATION:
-                 linbox.solve(res[0], D, A[0], b[0], linbox.Method.SparseElimination())
-             elif algo == METHOD_BLACKBOX:
-diff --git a/src/sage/matrix/matrix_modn_dense_double.pyx b/src/sage/matrix/matrix_modn_dense_double.pyx
-index c4b1a46..880caec 100644
---- a/src/sage/matrix/matrix_modn_dense_double.pyx
-+++ b/src/sage/matrix/matrix_modn_dense_double.pyx
-@@ -24,8 +24,8 @@ from sage.libs.linbox.givaro cimport \
-     Poly1Dom, Dense
- 
- from sage.libs.linbox.linbox cimport \
--    DenseMatrix_Modular_double as BlasMatrix, \
--    EchelonForm_Modular_double as EchelonFormDomain
-+    reducedRowEchelonize, \
-+    DenseMatrix_Modular_double as DenseMatrix
- 
- from sage.libs.linbox.fflas cimport \
-     fgemm, fgemv, Det, Rank, ReducedRowEchelonForm, applyP, \
-diff --git a/src/sage/matrix/matrix_modn_dense_float.pyx b/src/sage/matrix/matrix_modn_dense_float.pyx
-index 89d1a94..8a468c1 100644
---- a/src/sage/matrix/matrix_modn_dense_float.pyx
-+++ b/src/sage/matrix/matrix_modn_dense_float.pyx
-@@ -23,8 +23,8 @@ from sage.libs.linbox.givaro cimport \
-     Poly1Dom, Dense
- 
- from sage.libs.linbox.linbox cimport \
--    DenseMatrix_Modular_float as BlasMatrix, \
--    EchelonForm_Modular_float as EchelonFormDomain
-+    DenseMatrix_Modular_float as DenseMatrix, \
-+    reducedRowEchelonize
- 
- from sage.libs.linbox.fflas cimport \
-     fgemm, fgemv, Det, Rank, ReducedRowEchelonForm, applyP, \
-diff --git a/src/sage/matrix/matrix_modn_dense_template.pxi b/src/sage/matrix/matrix_modn_dense_template.pxi
-index 6a5e164..230a16e 100644
---- a/src/sage/matrix/matrix_modn_dense_template.pxi
-+++ b/src/sage/matrix/matrix_modn_dense_template.pxi
-@@ -207,21 +207,12 @@ cdef inline linbox_echelonize_efd(celement modulus, celement* entries, Py_ssize_
-         return 0,[]
- 
-     cdef ModField *F = new ModField(<long>modulus)
--    cdef EchelonFormDomain *EF = new EchelonFormDomain(F[0])
--    cdef BlasMatrix *A = new BlasMatrix(F[0], <uint64_t>nrows, <uint64_t>ncols)
--    cdef BlasMatrix *E = new BlasMatrix(F[0], <uint64_t>nrows, <uint64_t>ncols)
--
-+    cdef DenseMatrix *A = new DenseMatrix(F[0], <ModField.Element*>entries,<Py_ssize_t>nrows, <Py_ssize_t>ncols)
-+    cdef Py_ssize_t r = reducedRowEchelonize(A[0])
-     cdef Py_ssize_t i,j
--
--    # TODO: can we avoid this copy?
--    for i in range(nrows):
--        for j in range(ncols):
--            A.setEntry(i, j, <ModField.Element>entries[i*ncols+j])
--
--    cdef int r = EF.rowReducedEchelon(E[0], A[0])
-     for i in range(nrows):
-         for j in range(ncols):
--            entries[i*ncols+j] = <celement>E.getEntry(i,j)
-+            entries[i*ncols+j] = <celement>A.getEntry(i,j)
- 
-     cdef Py_ssize_t ii = 0
-     cdef list pivots = []
-@@ -232,7 +223,7 @@ cdef inline linbox_echelonize_efd(celement modulus, celement* entries, Py_ssize_
-                 ii = j+1
-                 break
- 
--    del F, A, E, EF
-+    del F
-     return r, pivots
- 
- cdef inline celement *linbox_copy(celement modulus, celement *entries,  Py_ssize_t nrows, Py_ssize_t ncols) except? NULL:
-@@ -258,15 +249,16 @@ cdef inline int linbox_rank(celement modulus, celement* entries, Py_ssize_t nrow
-     del F
-     return r
- 
--cdef inline celement linbox_det(celement modulus, celement* entries, Py_ssize_t nrows, Py_ssize_t ncols):
-+cdef inline celement linbox_det(celement modulus, celement* entries, Py_ssize_t n):
-     """
-     Return the determinant of this matrix.
-     """
-     cdef ModField *F = new ModField(<long>modulus)
--    cdef celement *cpy = linbox_copy(modulus, entries, nrows, ncols)
--    if nrows*ncols > 1000: sig_on()
--    d =  <celement>Det(F[0], nrows, ncols, <ModField.Element*>cpy, ncols)
--    if nrows*ncols > 1000: sig_off()
-+    cdef celement *cpy = linbox_copy(modulus, entries, n, n)
-+    if n*n > 1000: sig_on()
-+    cdef celement d
-+    Det(F[0], d, n, <ModField.Element*>cpy, n)
-+    if n*n > 1000: sig_off()
-     sig_free(cpy)
-     del F
-     return d
-@@ -1672,9 +1664,9 @@ cdef class Matrix_modn_dense_template(Matrix_dense):
- 
-         - ``algorithm``
- 
--          - ``linbox`` - uses the LinBox library (``EchelonFormDomain`` implementation, default)
-+          - ``linbox`` - uses the LinBox library (wrapping fflas-ffpack)
- 
--          - ``linbox_noefd`` - uses the LinBox library (FFPACK directly, less memory but slower)
-+          - ``linbox_noefd`` - uses the FFPACK directly, less memory and faster
- 
-           - ``gauss`` - uses a custom slower `O(n^3)` Gauss
-             elimination implemented in Sage.
-@@ -1929,7 +1921,6 @@ cdef class Matrix_modn_dense_template(Matrix_dense):
-         else:
-             r, pivots = linbox_echelonize(self.p, self._entries, self._nrows, self._ncols)
-         verbose('done with echelonize',t)
--
-         self.cache('in_echelon_form',True)
-         self.cache('rank', r)
-         self.cache('pivots', tuple(pivots))
-@@ -2468,7 +2459,7 @@ cdef class Matrix_modn_dense_template(Matrix_dense):
-             x = self.fetch('det')
-             if not x is None:
-                 return x
--            d = linbox_det(self.p, self._entries, self._nrows, self._ncols)
-+            d = linbox_det(self.p, self._entries, self._nrows)
-             d2 = self._coerce_element(d)
-             self.cache('det', d2)
-             return d2
-diff --git a/src/sage/matrix/matrix_modn_sparse.pyx b/src/sage/matrix/matrix_modn_sparse.pyx
-index 241167a..dd3a2f0 100644
---- a/src/sage/matrix/matrix_modn_sparse.pyx
-+++ b/src/sage/matrix/matrix_modn_sparse.pyx
-@@ -882,7 +882,7 @@ cdef class Matrix_modn_sparse(matrix_sparse.Matrix_sparse):
-             - ``'linbox'`` or ``'linbox_default'`` - (default) use LinBox
-               and let it chooses the appropriate algorithm
- 
--            -  ``linbox_blas_elimination'`` - use LinBox dense elimination
-+            -  ``linbox_dense_elimination'`` - use LinBox dense elimination
- 
-             - ``'linbox_sparse_elimination'`` - use LinBox sparse elimination
- 
-@@ -949,7 +949,7 @@ cdef class Matrix_modn_sparse(matrix_sparse.Matrix_sparse):
- 
-         - ``b`` -- a dense integer vector
- 
--        - ``algorithm`` -- (optional) either ``None``, ``'blas_elimination'``,
-+        - ``algorithm`` -- (optional) either ``None``, ``'dense_elimination'``,
-           ``'sparse_elimination'``, ``'wiedemann'`` or ``'blackbox'``.
- 
-         OUTPUT: a pair ``(a, d)`` consisting of
-@@ -968,7 +968,7 @@ cdef class Matrix_modn_sparse(matrix_sparse.Matrix_sparse):
-             sage: b0 = vector((1,1,1,1))
-             sage: m._solve_vector_linbox(b0)
-             ((-1, -7, -3, -1), 1)
--            sage: m._solve_vector_linbox(b0, 'blas_elimination')
-+            sage: m._solve_vector_linbox(b0, 'dense_elimination')
-             ((-1, -7, -3, -1), 1)
-             sage: m._solve_vector_linbox(b0, 'sparse_elimination')
-             ((-1, -7, -3, -1), 1)
-@@ -984,7 +984,7 @@ cdef class Matrix_modn_sparse(matrix_sparse.Matrix_sparse):
- 
-         TESTS::
- 
--            sage: algos = ["default", "blas_elimination", "sparse_elimination",
-+            sage: algos = ["default", "dense_elimination", "sparse_elimination",
-             ....:          "blackbox", "wiedemann"]
-             sage: for i in range(20):
-             ....:     dim = randint(1, 30)
-@@ -1025,8 +1025,8 @@ cdef class Matrix_modn_sparse(matrix_sparse.Matrix_sparse):
-             linbox.solve(res[0], D, A[0], b[0])
-         elif method == METHOD_WIEDEMANN:
-             linbox.solve(res[0], D, A[0], b[0], linbox.Method.Wiedemann())
--        elif method == METHOD_BLAS_ELIMINATION:
--            linbox.solve(res[0], D, A[0], b[0], linbox.Method.BlasElimination())
-+        elif method == METHOD_DENSE_ELIMINATION:
-+            linbox.solve(res[0], D, A[0], b[0], linbox.Method.DenseElimination())
-         elif method == METHOD_SPARSE_ELIMINATION:
-             linbox.solve(res[0], D, A[0], b[0], linbox.Method.SparseElimination())
-         elif method == METHOD_BLACKBOX:
-@@ -1081,7 +1081,7 @@ cdef class Matrix_modn_sparse(matrix_sparse.Matrix_sparse):
- 
-         TESTS::
- 
--            sage: algos = ["default", "blas_elimination", "sparse_elimination",
-+            sage: algos = ["default", "dense_elimination", "sparse_elimination",
-             ....:          "blackbox", "wiedemann"]
- 
-             sage: for _ in range(10):
-@@ -1136,8 +1136,8 @@ cdef class Matrix_modn_sparse(matrix_sparse.Matrix_sparse):
-             # solve the current row
-             if algo == METHOD_DEFAULT:
-                 linbox.solve(res[0], D, A[0], b[0])
--            elif algo == METHOD_BLAS_ELIMINATION:
--                linbox.solve(res[0], D, A[0], b[0], linbox.Method.BlasElimination())
-+            elif algo == METHOD_DENSE_ELIMINATION:
-+                linbox.solve(res[0], D, A[0], b[0], linbox.Method.DenseElimination())
-             elif algo == METHOD_SPARSE_ELIMINATION:
-                 linbox.solve(res[0], D, A[0], b[0], linbox.Method.SparseElimination())
-             elif algo == METHOD_BLACKBOX:
-diff --git a/src/sage/rings/finite_rings/element_givaro.pxd b/src/sage/rings/finite_rings/element_givaro.pxd
-index f0fd7e35..8ae25c5 100644
---- a/src/sage/rings/finite_rings/element_givaro.pxd
-+++ b/src/sage/rings/finite_rings/element_givaro.pxd
-@@ -20,35 +20,35 @@ cdef extern from "givaro/givrandom.h":
-     GivRandom GivRandomSeeded  "Givaro::GivRandom"(unsigned long seed)
- 
- cdef extern from "givaro/gfq.h":
--    ctypedef struct GivaroGfq "Givaro::GFqDom<int>":
-+    cdef cppclass GivaroGfq "Givaro::GFqDom<int>":
-         #attributes
-         unsigned int one
-         unsigned int zero
- 
-         # methods
--        int (* mul)(int r, int a, int b)
--        int (* add)(int r, int a, int b)
--        int (* sub)(int r, int a, int b)
--        int (* div)(int r, int a, int b)
--        int (* inv)(int r, int x)
--        int (* neg)(int r, int x)
--        int (* mulin)(int a, int b)
--        unsigned int (* characteristic)()
--        unsigned int (* cardinality)()
--        int (* exponent)()
--        int (* random)(GivRandom gen, int res)
--        int (* initi "init")(int res, int64_t e)
--        int (* initd "init")(int res, double e)
--        int (* indeterminate)()
--        int (* convert)(int64_t r, int p)
--        int (* read)(int r, int p)
--        int (* axpyin)(int r, int a, int x)
--        int (* axpy)(int r, int a, int b, int c)
--        int (* axmy)(int r, int a, int b, int c)
--        int (* maxpy)(int r, int a, int b, int c)
--        bint (* isZero)(int e)
--        bint (* isOne)(int e)
--        bint (* isunit)(int e)
-+        int mul(int r, int a, int b)
-+        int add(int r, int a, int b)
-+        int sub(int r, int a, int b)
-+        int div(int r, int a, int b)
-+        int inv(int r, int x)
-+        int neg(int r, int x)
-+        int mulin(int a, int b)
-+        unsigned int characteristic()
-+        unsigned int cardinality()
-+        int exponent()
-+        int random(GivRandom gen, int res)
-+        int initi "init"(int& res, int64_t e)
-+        int initd "init"(int& res, double e)
-+        int indeterminate()
-+        int64_t convert(int64_t& r, int p)
-+        int read(int& r, int p)
-+        int axpyin(int r, int a, int x)
-+        int axpy(int r, int a, int b, int c)
-+        int axmy(int r, int a, int b, int c)
-+        int maxpy(int r, int a, int b, int c)
-+        bint isZero(int e)
-+        bint isOne(int e)
-+        bint isunit(int e)
- 
-     GivaroGfq *gfq_factorypk "new Givaro::GFqDom<int>" (unsigned int p, unsigned int k)
-     GivaroGfq *gfq_factorypkp "new Givaro::GFqDom<int>" (unsigned int p, unsigned int k, intvec poly)
-diff --git a/src/sage/rings/finite_rings/element_givaro.pyx b/src/sage/rings/finite_rings/element_givaro.pyx
-index 3739020..a7f9c2f 100644
---- a/src/sage/rings/finite_rings/element_givaro.pyx
-+++ b/src/sage/rings/finite_rings/element_givaro.pyx
-@@ -310,7 +310,7 @@ cdef class Cache_givaro(SageObject):
-         cdef int seed = current_randstate().c_random()
-         cdef int res
-         cdef GivRandom generator = GivRandomSeeded(seed)
--        res = self.objectptr.random(generator,res)
-+        self.objectptr.random(generator,res)
-         return make_FiniteField_givaroElement(self,res)
- 
-     cpdef FiniteField_givaroElement element_from_data(self, e):
-@@ -386,16 +386,16 @@ cdef class Cache_givaro(SageObject):
-              isinstance(e, long) or is_IntegerMod(e):
-             try:
-                 e_int = e % self.characteristic()
--                res = self.objectptr.initi(res, e_int)
-+                self.objectptr.initi(res, e_int)
-             except ArithmeticError:
-                 raise TypeError("unable to coerce from a finite field other than the prime subfield")
-         elif e is None:
-             e_int = 0
--            res = self.objectptr.initi(res, e_int)
-+            self.objectptr.initi(res, e_int)
- 
-         elif isinstance(e, float):
-             e_int = int(e) % self.characteristic()
--            res = self.objectptr.initd(res, e_int)
-+            self.objectptr.initd(res, e_int)
- 
-         elif isinstance(e, str):
-             return self.parent(eval(e.replace("^","**"),self.parent.gens_dict()))
-@@ -406,7 +406,7 @@ cdef class Cache_givaro(SageObject):
-             ret = self._zero_element
-             for i in range(len(e)):
-                 e_int = e[i] % self.characteristic()
--                res = self.objectptr.initi(res, e_int)
-+                self.objectptr.initi(res, e_int)
-                 to_add = make_FiniteField_givaroElement(self, res)
-                 ret = ret + to_add*self.parent.gen()**i
-             return ret
-@@ -446,7 +446,7 @@ cdef class Cache_givaro(SageObject):
-             ret = self._zero_element
-             for i in range(len(e)):
-                 e_int = e[i] % self.characteristic()
--                res = self.objectptr.initi(res, e_int)
-+                self.objectptr.initi(res, e_int)
-                 to_add = make_FiniteField_givaroElement(self, res)
-                 ret = ret + to_add*self.parent.gen()**i
-             return ret
-@@ -475,8 +475,8 @@ cdef class Cache_givaro(SageObject):
- 
-                 for i from 0 <= i <= degpol(t):
-                     c = gtolong(gel(t, i+2))
--                    res = self.objectptr.axpyin(res, self.int_to_log(c), x)
--                    x = self.objectptr.mul(x,x,g)
-+                    self.objectptr.axpyin(res, self.int_to_log(c), x)
-+                    self.objectptr.mulin(x,g)
-                 clear_stack()
-             else:
-                 clear_stack()
-@@ -580,21 +580,10 @@ cdef class Cache_givaro(SageObject):
-             sage: 2^7 + 2^4 + 2^2 + 2 + 1
-             151
-         """
--        cdef GivaroGfq *k = self.objectptr
--        cdef int ret = k.zero
--        cdef int a = k.indeterminate()
--        cdef int at = k.one
--        cdef int ch = k.characteristic()
--        cdef int t, i
--
--        if n<0 or n>k.cardinality():
-+        if n<0 or n>self.order():
-             raise TypeError("n must be between 0 and self.order()")
- 
--        for i from 0 <= i < k.exponent():
--            t = k.initi(t, n % ch)
--            ret = k.axpy(ret, t, at, ret)
--            at = k.mul(at,at,a)
--            n //= ch
-+        cdef int ret = self.int_to_log(n)
-         return make_FiniteField_givaroElement(self, ret)
- 
-     def _element_repr(self, FiniteField_givaroElement e):
-@@ -715,7 +704,7 @@ cdef class Cache_givaro(SageObject):
-         """
-         cdef int r
- 
--        r = self.objectptr.axpy(r, a.element, b.element, c.element)
-+        self.objectptr.axpy(r, a.element, b.element, c.element)
-         return make_FiniteField_givaroElement(self,r)
- 
-     def a_times_b_minus_c(self,FiniteField_givaroElement a, FiniteField_givaroElement b, FiniteField_givaroElement c):
-@@ -734,7 +723,7 @@ cdef class Cache_givaro(SageObject):
-         """
-         cdef int r
- 
--        r = self.objectptr.axmy(r, a.element, b.element, c.element, )
-+        self.objectptr.axmy(r, a.element, b.element, c.element, )
-         return make_FiniteField_givaroElement(self,r)
- 
-     def c_minus_a_times_b(self,FiniteField_givaroElement a,
-@@ -754,7 +743,7 @@ cdef class Cache_givaro(SageObject):
-         """
-         cdef int r
- 
--        r = self.objectptr.maxpy(r , a.element, b.element, c.element, )
-+        self.objectptr.maxpy(r , a.element, b.element, c.element, )
-         return make_FiniteField_givaroElement(self,r)
- 
-     def __reduce__(self):
-@@ -1108,7 +1097,7 @@ cdef class FiniteField_givaroElement(FinitePolyExtElement):
-             2*b^3 + 2*b^2 + 2*b + 1
-         """
-         cdef int r
--        r = self._cache.objectptr.add(r, self.element ,
-+        self._cache.objectptr.add(r, self.element ,
-                                               (<FiniteField_givaroElement>right).element )
-         return make_FiniteField_givaroElement(self._cache,r)
- 
-@@ -1125,7 +1114,7 @@ cdef class FiniteField_givaroElement(FinitePolyExtElement):
-             c^2
-         """
-         cdef int r
--        r = self._cache.objectptr.mul(r, self.element,
-+        self._cache.objectptr.mul(r, self.element,
-                                               (<FiniteField_givaroElement>right).element)
-         return make_FiniteField_givaroElement(self._cache,r)
- 
-@@ -1147,7 +1136,7 @@ cdef class FiniteField_givaroElement(FinitePolyExtElement):
-         cdef int r
-         if (<FiniteField_givaroElement>right).element == 0:
-             raise ZeroDivisionError('division by zero in finite field')
--        r = self._cache.objectptr.div(r, self.element,
-+        self._cache.objectptr.div(r, self.element,
-                                               (<FiniteField_givaroElement>right).element)
-         return make_FiniteField_givaroElement(self._cache,r)
- 
-@@ -1164,7 +1153,7 @@ cdef class FiniteField_givaroElement(FinitePolyExtElement):
-             2*a^2 + 2*a
-         """
-         cdef int r
--        r = self._cache.objectptr.sub(r, self.element,
-+        self._cache.objectptr.sub(r, self.element,
-                                               (<FiniteField_givaroElement>right).element)
-         return make_FiniteField_givaroElement(self._cache,r)
- 
-@@ -1181,7 +1170,7 @@ cdef class FiniteField_givaroElement(FinitePolyExtElement):
-         """
-         cdef int r
- 
--        r = self._cache.objectptr.neg(r, self.element)
-+        self._cache.objectptr.neg(r, self.element)
-         return make_FiniteField_givaroElement(self._cache,r)
- 
-     def __invert__(FiniteField_givaroElement self):

Copied: sagemath/repos/community-x86_64/sagemath-linbox-1.6.patch (from rev 487420, sagemath/trunk/sagemath-linbox-1.6.patch)
===================================================================
--- sagemath-linbox-1.6.patch	                        (rev 0)
+++ sagemath-linbox-1.6.patch	2019-07-04 06:17:08 UTC (rev 487421)
@@ -0,0 +1,650 @@
+diff --git a/src/sage/libs/linbox/conversion.pxd b/src/sage/libs/linbox/conversion.pxd
+index 810a197..7794c9e 100644
+--- a/src/sage/libs/linbox/conversion.pxd
++++ b/src/sage/libs/linbox/conversion.pxd
+@@ -45,7 +45,7 @@ from sage.modules.vector_integer_sparse cimport mpz_vector,  mpz_vector_get_entr
+ 
+ ctypedef enum linbox_specifier:
+     METHOD_DEFAULT              # no specification
+-    METHOD_BLAS_ELIMINATION     # BlasElimination
++    METHOD_DENSE_ELIMINATION     # DenseElimination
+     METHOD_SPARSE_ELIMINATION   # SparseElimination
+     METHOD_BLACKBOX             # Blackbox
+     METHOD_WIEDEMANN            # Wiedeman
+@@ -54,10 +54,10 @@ ctypedef enum linbox_specifier:
+ cdef inline linbox_specifier get_method(str algo) except ERROR:
+     if algo is None or algo == "default":
+         return METHOD_DEFAULT
+-    elif algo == "blas_elimination" or \
+-         algo == "linbox_blas_elimination" or \
+-         algo == "LinBox::BlasElimination":
+-        return METHOD_BLAS_ELIMINATION
++    elif algo == "dense_elimination" or \
++         algo == "linbox_dense_elimination" or \
++         algo == "LinBox::DenseElimination":
++        return METHOD_DENSE_ELIMINATION
+     elif algo == "sparse_elimination" or \
+          algo == "linbox_sparse_elimination" or \
+          algo == "LinBox::SparseElimination":
+diff --git a/src/sage/libs/linbox/fflas.pxd b/src/sage/libs/linbox/fflas.pxd
+index f3a7ce3..8bf62f1 100644
+--- a/src/sage/libs/linbox/fflas.pxd
++++ b/src/sage/libs/linbox/fflas.pxd
+@@ -63,8 +63,7 @@ cdef extern from "fflas-ffpack/fflas-ffpack.h" namespace "FFPACK":
+     Modular_double.Element* Invert (Modular_double F, size_t order,
+                                     Modular_double.Element* A, size_t A_stride, int nullity)
+ 
+-    Modular_double.Element Det (Modular_double F,
+-                                size_t nrows, size_t ncols,
++    Modular_double.Element Det (Modular_double F, Modular_double.Element& d, size_t n,
+                                 Modular_double.Element* A, size_t A_stride)
+ 
+     int Rank (Modular_double,
+@@ -97,8 +96,7 @@ cdef extern from "fflas-ffpack/fflas-ffpack.h" namespace "FFPACK":
+     Modular_float.Element* Invert (Modular_float F, size_t order,
+                                    Modular_float.Element* A, size_t A_stride, int nullity)
+ 
+-    Modular_float.Element Det (Modular_float F,
+-                               size_t nrows, size_t ncols,
++    Modular_float.Element Det (Modular_float F, Modular_float.Element& d, size_t n,
+                                Modular_float.Element* A, size_t A_stride)
+ 
+     int Rank (Modular_float,
+diff --git a/src/sage/libs/linbox/linbox.pxd b/src/sage/libs/linbox/linbox.pxd
+index 35a3fa0..fb0e0dc 100644
+--- a/src/sage/libs/linbox/linbox.pxd
++++ b/src/sage/libs/linbox/linbox.pxd
+@@ -10,10 +10,10 @@ from .givaro cimport *
+ 
+ cdef extern from "linbox/matrix/dense-matrix.h":
+     ## template <class _Field, class _blasRep=typename Vector<_Field>::Dense >
+-    ## class BlasMatrix ;
++    ## class DenseMatrix ;
+     ##
+     ## template <class _Field>
+-    ## using DenseMatrix = BlasMatrix<_Field> ;
++    ## using DenseMatrix = DenseMatrix<_Field> ;
+     cdef cppclass DenseMatrix_integer "LinBox::DenseMatrix<Givaro::ZRing<Givaro::Integer>>":
+         ctypedef ZRing Field
+         ctypedef Integer Element
+@@ -30,6 +30,7 @@ cdef extern from "linbox/matrix/dense-matrix.h":
+         ctypedef Modular_double Field
+         ctypedef double Element
+         DenseMatrix_Modular_double(Field F, size_t m, size_t n)
++        DenseMatrix_Modular_double(Field F, Element*, size_t m, size_t n)
+         void setEntry(size_t i, size_t j, Element& a)
+         Element &getEntry(size_t i, size_t j)
+ 
+@@ -39,6 +40,7 @@ cdef extern from "linbox/matrix/dense-matrix.h":
+         ctypedef Modular_float Field
+         ctypedef float Element
+         DenseMatrix_Modular_float(Field F, size_t m, size_t n)
++        DenseMatrix_Modular_float(Field F, Element*, size_t m, size_t n)
+         void setEntry(size_t i, size_t j, Element& a)
+         Element &getEntry(size_t i, size_t j)
+ 
+@@ -125,7 +127,7 @@ cdef extern from "linbox/solutions/methods.h" namespace "LinBox":
+         pass
+     cdef struct WiedemannTraits:
+         pass
+-    cdef struct BlasEliminationTraits:
++    cdef struct DenseEliminationTraits:
+         pass
+     cdef struct SparseEliminationTraits:
+         pass
+@@ -135,7 +137,7 @@ cdef extern from "linbox/solutions/methods.h" namespace "LinBox":
+         ctypedef BlackboxSpecifier Blackbox
+         ctypedef EliminationSpecifier Elimination
+         ctypedef WiedemannTraits Wiedemann
+-        ctypedef BlasEliminationTraits BlasElimination
++        ctypedef DenseEliminationTraits DenseElimination
+         ctypedef SparseEliminationTraits SparseElimination
+ 
+ cdef extern from "linbox/solutions/charpoly.h" namespace "LinBox":
+@@ -157,18 +159,24 @@ cdef extern from "linbox/algorithms/gauss.h":
+                                              unsigned long Ni,
+                                              unsigned long Nj)
+ 
+-cdef extern from "linbox/algorithms/echelon-form.h":
+-    ## template<class Field>
+-    ## class EchelonFormDomain
+-    cdef cppclass EchelonForm_Modular_double "LinBox::EchelonFormDomain<Givaro::Modular<double>>":
+-        ctypedef double Element
+-        EchelonForm_Modular_double(Modular_double)
+-        int rowReducedEchelon(DenseMatrix_Modular_double&, const DenseMatrix_Modular_double&)
+-
+-    cdef cppclass EchelonForm_Modular_float "LinBox::EchelonFormDomain<Givaro::Modular<float>>":
+-        ctypedef float Element
+-        EchelonForm_Modular_float(Modular_float)
+-        int rowReducedEchelon(DenseMatrix_Modular_float, const DenseMatrix_Modular_float)
++cdef extern from "linbox/solutions/echelon.h" namespace "LinBox":
++    size_t rowEchelon (DenseMatrix_Modular_float&, const DenseMatrix_Modular_float&)
++    size_t rowEchelonize (DenseMatrix_Modular_float&)
++    size_t reducedRowEchelon (DenseMatrix_Modular_float&, const DenseMatrix_Modular_float&)
++    size_t reducedRowEchelonize (DenseMatrix_Modular_float&)
++    size_t colEchelon (DenseMatrix_Modular_float&, const DenseMatrix_Modular_float&)
++    size_t colEchelonize (DenseMatrix_Modular_float&)
++    size_t reducedColEchelon (DenseMatrix_Modular_float&, const DenseMatrix_Modular_float&)
++    size_t reducedColEchelonize (DenseMatrix_Modular_float&)
++
++    size_t rowEchelon (DenseMatrix_Modular_double&, const DenseMatrix_Modular_double&)
++    size_t rowEchelonize (DenseMatrix_Modular_double&)
++    size_t reducedRowEchelon (DenseMatrix_Modular_double&, const DenseMatrix_Modular_double&)
++    size_t reducedRowEchelonize (DenseMatrix_Modular_double&)
++    size_t colEchelon (DenseMatrix_Modular_double&, const DenseMatrix_Modular_double&)
++    size_t colEchelonize (DenseMatrix_Modular_double&)
++    size_t reducedColEchelon (DenseMatrix_Modular_double&, const DenseMatrix_Modular_double&)
++    size_t reducedColEchelonize (DenseMatrix_Modular_double&)
+ 
+ cdef extern from "linbox/solutions/rank.h" namespace "LinBox":
+     unsigned long & rank (unsigned long&, DenseMatrix_integer)
+@@ -185,7 +193,7 @@ cdef extern from "linbox/solutions/solve.h" namespace "LinBox":
+                                 Integer &,
+                                 SparseMatrix_integer &,
+                                 DenseVector_integer &,
+-                                Method.BlasElimination) except +
++                                Method.DenseElimination) except +
+ 
+     DenseVector_integer& solve (DenseVector_integer &,
+                                 Integer &,
+diff --git a/src/sage/matrix/matrix_integer_sparse.pyx b/src/sage/matrix/matrix_integer_sparse.pyx
+index 7fa386e..132140f 100644
+--- a/src/sage/matrix/matrix_integer_sparse.pyx
++++ b/src/sage/matrix/matrix_integer_sparse.pyx
+@@ -42,7 +42,7 @@ from sage.libs.linbox.conversion cimport (
+     new_linbox_vector_integer_dense,
+     new_sage_vector_integer_dense,
+     new_linbox_matrix_integer_sparse,
+-    METHOD_DEFAULT, METHOD_BLAS_ELIMINATION,
++    METHOD_DEFAULT, METHOD_DENSE_ELIMINATION,
+     METHOD_SPARSE_ELIMINATION, METHOD_BLACKBOX,
+     METHOD_WIEDEMANN, get_method)
+ 
+@@ -926,7 +926,7 @@ cdef class Matrix_integer_sparse(Matrix_sparse):
+             - ``'linbox'`` or ``'linbox_default'`` - (default) use LinBox
+               and let it chooses the appropriate algorithm
+ 
+-            -  ``linbox_blas_elimination'`` - use LinBox dense elimination
++            -  ``linbox_dense_elimination'`` - use LinBox dense elimination
+ 
+             - ``'linbox_sparse_elimination'`` - use LinBox sparse elimination
+ 
+@@ -993,7 +993,7 @@ cdef class Matrix_integer_sparse(Matrix_sparse):
+ 
+         - ``b`` -- a dense integer vector
+ 
+-        - ``algorithm`` -- (optional) either ``None``, ``'blas_elimination'``,
++        - ``algorithm`` -- (optional) either ``None``, ``'dense_elimination'``,
+           ``'sparse_elimination'``, ``'wiedemann'`` or ``'blackbox'``.
+ 
+         OUTPUT: a pair ``(a, d)`` consisting of
+@@ -1012,7 +1012,7 @@ cdef class Matrix_integer_sparse(Matrix_sparse):
+             sage: b0 = vector((1,1,1,1))
+             sage: m._solve_vector_linbox(b0)
+             ((-1, -7, -3, -1), 1)
+-            sage: m._solve_vector_linbox(b0, 'blas_elimination')
++            sage: m._solve_vector_linbox(b0, 'dense_elimination')
+             ((-1, -7, -3, -1), 1)
+             sage: m._solve_vector_linbox(b0, 'sparse_elimination')
+             ((-1, -7, -3, -1), 1)
+@@ -1024,7 +1024,7 @@ cdef class Matrix_integer_sparse(Matrix_sparse):
+             sage: b1 = vector((1,2,3,4))
+             sage: m._solve_vector_linbox(b1)
+             ((-18, -92, -41, -17), 5)
+-            sage: m._solve_vector_linbox(b1, 'blas_elimination')
++            sage: m._solve_vector_linbox(b1, 'dense_elimination')
+             ((-18, -92, -41, -17), 5)
+             sage: m._solve_vector_linbox(b1, 'sparse_elimination')
+             ((-18, -92, -41, -17), 5)
+@@ -1039,7 +1039,7 @@ cdef class Matrix_integer_sparse(Matrix_sparse):
+ 
+         TESTS::
+ 
+-            sage: algos = ["default", "blas_elimination", "sparse_elimination",
++            sage: algos = ["default", "dense_elimination", "sparse_elimination",
+             ....:          "blackbox", "wiedemann"]
+             sage: for i in range(20):
+             ....:     dim = randint(1, 30)
+@@ -1080,8 +1080,8 @@ cdef class Matrix_integer_sparse(Matrix_sparse):
+             linbox.solve(res[0], D, A[0], b[0])
+         elif method == METHOD_WIEDEMANN:
+             linbox.solve(res[0], D, A[0], b[0], linbox.Method.Wiedemann())
+-        elif method == METHOD_BLAS_ELIMINATION:
+-            linbox.solve(res[0], D, A[0], b[0], linbox.Method.BlasElimination())
++        elif method == METHOD_DENSE_ELIMINATION:
++            linbox.solve(res[0], D, A[0], b[0], linbox.Method.DenseElimination())
+         elif method == METHOD_SPARSE_ELIMINATION:
+             linbox.solve(res[0], D, A[0], b[0], linbox.Method.SparseElimination())
+         elif method == METHOD_BLACKBOX:
+@@ -1136,7 +1136,7 @@ cdef class Matrix_integer_sparse(Matrix_sparse):
+ 
+         TESTS::
+ 
+-            sage: algos = ["default", "blas_elimination", "sparse_elimination",
++            sage: algos = ["default", "dense_elimination", "sparse_elimination",
+             ....:          "blackbox", "wiedemann"]
+ 
+             sage: for _ in range(10):
+@@ -1191,8 +1191,8 @@ cdef class Matrix_integer_sparse(Matrix_sparse):
+             # solve the current row
+             if algo == METHOD_DEFAULT:
+                 linbox.solve(res[0], D, A[0], b[0])
+-            elif algo == METHOD_BLAS_ELIMINATION:
+-                linbox.solve(res[0], D, A[0], b[0], linbox.Method.BlasElimination())
++            elif algo == METHOD_DENSE_ELIMINATION:
++                linbox.solve(res[0], D, A[0], b[0], linbox.Method.DenseElimination())
+             elif algo == METHOD_SPARSE_ELIMINATION:
+                 linbox.solve(res[0], D, A[0], b[0], linbox.Method.SparseElimination())
+             elif algo == METHOD_BLACKBOX:
+diff --git a/src/sage/matrix/matrix_modn_dense_double.pyx b/src/sage/matrix/matrix_modn_dense_double.pyx
+index c4b1a46..880caec 100644
+--- a/src/sage/matrix/matrix_modn_dense_double.pyx
++++ b/src/sage/matrix/matrix_modn_dense_double.pyx
+@@ -24,8 +24,8 @@ from sage.libs.linbox.givaro cimport \
+     Poly1Dom, Dense
+ 
+ from sage.libs.linbox.linbox cimport \
+-    DenseMatrix_Modular_double as BlasMatrix, \
+-    EchelonForm_Modular_double as EchelonFormDomain
++    reducedRowEchelonize, \
++    DenseMatrix_Modular_double as DenseMatrix
+ 
+ from sage.libs.linbox.fflas cimport \
+     fgemm, fgemv, Det, Rank, ReducedRowEchelonForm, applyP, \
+diff --git a/src/sage/matrix/matrix_modn_dense_float.pyx b/src/sage/matrix/matrix_modn_dense_float.pyx
+index 89d1a94..8a468c1 100644
+--- a/src/sage/matrix/matrix_modn_dense_float.pyx
++++ b/src/sage/matrix/matrix_modn_dense_float.pyx
+@@ -23,8 +23,8 @@ from sage.libs.linbox.givaro cimport \
+     Poly1Dom, Dense
+ 
+ from sage.libs.linbox.linbox cimport \
+-    DenseMatrix_Modular_float as BlasMatrix, \
+-    EchelonForm_Modular_float as EchelonFormDomain
++    DenseMatrix_Modular_float as DenseMatrix, \
++    reducedRowEchelonize
+ 
+ from sage.libs.linbox.fflas cimport \
+     fgemm, fgemv, Det, Rank, ReducedRowEchelonForm, applyP, \
+diff --git a/src/sage/matrix/matrix_modn_dense_template.pxi b/src/sage/matrix/matrix_modn_dense_template.pxi
+index 6a5e164..230a16e 100644
+--- a/src/sage/matrix/matrix_modn_dense_template.pxi
++++ b/src/sage/matrix/matrix_modn_dense_template.pxi
+@@ -207,21 +207,12 @@ cdef inline linbox_echelonize_efd(celement modulus, celement* entries, Py_ssize_
+         return 0,[]
+ 
+     cdef ModField *F = new ModField(<long>modulus)
+-    cdef EchelonFormDomain *EF = new EchelonFormDomain(F[0])
+-    cdef BlasMatrix *A = new BlasMatrix(F[0], <uint64_t>nrows, <uint64_t>ncols)
+-    cdef BlasMatrix *E = new BlasMatrix(F[0], <uint64_t>nrows, <uint64_t>ncols)
+-
++    cdef DenseMatrix *A = new DenseMatrix(F[0], <ModField.Element*>entries,<Py_ssize_t>nrows, <Py_ssize_t>ncols)
++    cdef Py_ssize_t r = reducedRowEchelonize(A[0])
+     cdef Py_ssize_t i,j
+-
+-    # TODO: can we avoid this copy?
+-    for i in range(nrows):
+-        for j in range(ncols):
+-            A.setEntry(i, j, <ModField.Element>entries[i*ncols+j])
+-
+-    cdef int r = EF.rowReducedEchelon(E[0], A[0])
+     for i in range(nrows):
+         for j in range(ncols):
+-            entries[i*ncols+j] = <celement>E.getEntry(i,j)
++            entries[i*ncols+j] = <celement>A.getEntry(i,j)
+ 
+     cdef Py_ssize_t ii = 0
+     cdef list pivots = []
+@@ -232,7 +223,7 @@ cdef inline linbox_echelonize_efd(celement modulus, celement* entries, Py_ssize_
+                 ii = j+1
+                 break
+ 
+-    del F, A, E, EF
++    del F
+     return r, pivots
+ 
+ cdef inline celement *linbox_copy(celement modulus, celement *entries,  Py_ssize_t nrows, Py_ssize_t ncols) except? NULL:
+@@ -258,15 +249,16 @@ cdef inline int linbox_rank(celement modulus, celement* entries, Py_ssize_t nrow
+     del F
+     return r
+ 
+-cdef inline celement linbox_det(celement modulus, celement* entries, Py_ssize_t nrows, Py_ssize_t ncols):
++cdef inline celement linbox_det(celement modulus, celement* entries, Py_ssize_t n):
+     """
+     Return the determinant of this matrix.
+     """
+     cdef ModField *F = new ModField(<long>modulus)
+-    cdef celement *cpy = linbox_copy(modulus, entries, nrows, ncols)
+-    if nrows*ncols > 1000: sig_on()
+-    d =  <celement>Det(F[0], nrows, ncols, <ModField.Element*>cpy, ncols)
+-    if nrows*ncols > 1000: sig_off()
++    cdef celement *cpy = linbox_copy(modulus, entries, n, n)
++    if n*n > 1000: sig_on()
++    cdef celement d
++    Det(F[0], d, n, <ModField.Element*>cpy, n)
++    if n*n > 1000: sig_off()
+     sig_free(cpy)
+     del F
+     return d
+@@ -1672,9 +1664,9 @@ cdef class Matrix_modn_dense_template(Matrix_dense):
+ 
+         - ``algorithm``
+ 
+-          - ``linbox`` - uses the LinBox library (``EchelonFormDomain`` implementation, default)
++          - ``linbox`` - uses the LinBox library (wrapping fflas-ffpack)
+ 
+-          - ``linbox_noefd`` - uses the LinBox library (FFPACK directly, less memory but slower)
++          - ``linbox_noefd`` - uses the FFPACK directly, less memory and faster
+ 
+           - ``gauss`` - uses a custom slower `O(n^3)` Gauss
+             elimination implemented in Sage.
+@@ -1929,7 +1921,6 @@ cdef class Matrix_modn_dense_template(Matrix_dense):
+         else:
+             r, pivots = linbox_echelonize(self.p, self._entries, self._nrows, self._ncols)
+         verbose('done with echelonize',t)
+-
+         self.cache('in_echelon_form',True)
+         self.cache('rank', r)
+         self.cache('pivots', tuple(pivots))
+@@ -2468,7 +2459,7 @@ cdef class Matrix_modn_dense_template(Matrix_dense):
+             x = self.fetch('det')
+             if not x is None:
+                 return x
+-            d = linbox_det(self.p, self._entries, self._nrows, self._ncols)
++            d = linbox_det(self.p, self._entries, self._nrows)
+             d2 = self._coerce_element(d)
+             self.cache('det', d2)
+             return d2
+diff --git a/src/sage/matrix/matrix_modn_sparse.pyx b/src/sage/matrix/matrix_modn_sparse.pyx
+index 241167a..dd3a2f0 100644
+--- a/src/sage/matrix/matrix_modn_sparse.pyx
++++ b/src/sage/matrix/matrix_modn_sparse.pyx
+@@ -882,7 +882,7 @@ cdef class Matrix_modn_sparse(matrix_sparse.Matrix_sparse):
+             - ``'linbox'`` or ``'linbox_default'`` - (default) use LinBox
+               and let it chooses the appropriate algorithm
+ 
+-            -  ``linbox_blas_elimination'`` - use LinBox dense elimination
++            -  ``linbox_dense_elimination'`` - use LinBox dense elimination
+ 
+             - ``'linbox_sparse_elimination'`` - use LinBox sparse elimination
+ 
+@@ -949,7 +949,7 @@ cdef class Matrix_modn_sparse(matrix_sparse.Matrix_sparse):
+ 
+         - ``b`` -- a dense integer vector
+ 
+-        - ``algorithm`` -- (optional) either ``None``, ``'blas_elimination'``,
++        - ``algorithm`` -- (optional) either ``None``, ``'dense_elimination'``,
+           ``'sparse_elimination'``, ``'wiedemann'`` or ``'blackbox'``.
+ 
+         OUTPUT: a pair ``(a, d)`` consisting of
+@@ -968,7 +968,7 @@ cdef class Matrix_modn_sparse(matrix_sparse.Matrix_sparse):
+             sage: b0 = vector((1,1,1,1))
+             sage: m._solve_vector_linbox(b0)
+             ((-1, -7, -3, -1), 1)
+-            sage: m._solve_vector_linbox(b0, 'blas_elimination')
++            sage: m._solve_vector_linbox(b0, 'dense_elimination')
+             ((-1, -7, -3, -1), 1)
+             sage: m._solve_vector_linbox(b0, 'sparse_elimination')
+             ((-1, -7, -3, -1), 1)
+@@ -984,7 +984,7 @@ cdef class Matrix_modn_sparse(matrix_sparse.Matrix_sparse):
+ 
+         TESTS::
+ 
+-            sage: algos = ["default", "blas_elimination", "sparse_elimination",
++            sage: algos = ["default", "dense_elimination", "sparse_elimination",
+             ....:          "blackbox", "wiedemann"]
+             sage: for i in range(20):
+             ....:     dim = randint(1, 30)
+@@ -1025,8 +1025,8 @@ cdef class Matrix_modn_sparse(matrix_sparse.Matrix_sparse):
+             linbox.solve(res[0], D, A[0], b[0])
+         elif method == METHOD_WIEDEMANN:
+             linbox.solve(res[0], D, A[0], b[0], linbox.Method.Wiedemann())
+-        elif method == METHOD_BLAS_ELIMINATION:
+-            linbox.solve(res[0], D, A[0], b[0], linbox.Method.BlasElimination())
++        elif method == METHOD_DENSE_ELIMINATION:
++            linbox.solve(res[0], D, A[0], b[0], linbox.Method.DenseElimination())
+         elif method == METHOD_SPARSE_ELIMINATION:
+             linbox.solve(res[0], D, A[0], b[0], linbox.Method.SparseElimination())
+         elif method == METHOD_BLACKBOX:
+@@ -1081,7 +1081,7 @@ cdef class Matrix_modn_sparse(matrix_sparse.Matrix_sparse):
+ 
+         TESTS::
+ 
+-            sage: algos = ["default", "blas_elimination", "sparse_elimination",
++            sage: algos = ["default", "dense_elimination", "sparse_elimination",
+             ....:          "blackbox", "wiedemann"]
+ 
+             sage: for _ in range(10):
+@@ -1136,8 +1136,8 @@ cdef class Matrix_modn_sparse(matrix_sparse.Matrix_sparse):
+             # solve the current row
+             if algo == METHOD_DEFAULT:
+                 linbox.solve(res[0], D, A[0], b[0])
+-            elif algo == METHOD_BLAS_ELIMINATION:
+-                linbox.solve(res[0], D, A[0], b[0], linbox.Method.BlasElimination())
++            elif algo == METHOD_DENSE_ELIMINATION:
++                linbox.solve(res[0], D, A[0], b[0], linbox.Method.DenseElimination())
+             elif algo == METHOD_SPARSE_ELIMINATION:
+                 linbox.solve(res[0], D, A[0], b[0], linbox.Method.SparseElimination())
+             elif algo == METHOD_BLACKBOX:
+diff --git a/src/sage/rings/finite_rings/element_givaro.pxd b/src/sage/rings/finite_rings/element_givaro.pxd
+index f0fd7e35..8ae25c5 100644
+--- a/src/sage/rings/finite_rings/element_givaro.pxd
++++ b/src/sage/rings/finite_rings/element_givaro.pxd
+@@ -20,35 +20,35 @@ cdef extern from "givaro/givrandom.h":
+     GivRandom GivRandomSeeded  "Givaro::GivRandom"(unsigned long seed)
+ 
+ cdef extern from "givaro/gfq.h":
+-    ctypedef struct GivaroGfq "Givaro::GFqDom<int>":
++    cdef cppclass GivaroGfq "Givaro::GFqDom<int>":
+         #attributes
+         unsigned int one
+         unsigned int zero
+ 
+         # methods
+-        int (* mul)(int r, int a, int b)
+-        int (* add)(int r, int a, int b)
+-        int (* sub)(int r, int a, int b)
+-        int (* div)(int r, int a, int b)
+-        int (* inv)(int r, int x)
+-        int (* neg)(int r, int x)
+-        int (* mulin)(int a, int b)
+-        unsigned int (* characteristic)()
+-        unsigned int (* cardinality)()
+-        int (* exponent)()
+-        int (* random)(GivRandom gen, int res)
+-        int (* initi "init")(int res, int64_t e)
+-        int (* initd "init")(int res, double e)
+-        int (* indeterminate)()
+-        int (* convert)(int64_t r, int p)
+-        int (* read)(int r, int p)
+-        int (* axpyin)(int r, int a, int x)
+-        int (* axpy)(int r, int a, int b, int c)
+-        int (* axmy)(int r, int a, int b, int c)
+-        int (* maxpy)(int r, int a, int b, int c)
+-        bint (* isZero)(int e)
+-        bint (* isOne)(int e)
+-        bint (* isunit)(int e)
++        int mul(int r, int a, int b)
++        int add(int r, int a, int b)
++        int sub(int r, int a, int b)
++        int div(int r, int a, int b)
++        int inv(int r, int x)
++        int neg(int r, int x)
++        int mulin(int a, int b)
++        unsigned int characteristic()
++        unsigned int cardinality()
++        int exponent()
++        int random(GivRandom gen, int res)
++        int initi "init"(int& res, int64_t e)
++        int initd "init"(int& res, double e)
++        int indeterminate()
++        int64_t convert(int64_t& r, int p)
++        int read(int& r, int p)
++        int axpyin(int r, int a, int x)
++        int axpy(int r, int a, int b, int c)
++        int axmy(int r, int a, int b, int c)
++        int maxpy(int r, int a, int b, int c)
++        bint isZero(int e)
++        bint isOne(int e)
++        bint isunit(int e)
+ 
+     GivaroGfq *gfq_factorypk "new Givaro::GFqDom<int>" (unsigned int p, unsigned int k)
+     GivaroGfq *gfq_factorypkp "new Givaro::GFqDom<int>" (unsigned int p, unsigned int k, intvec poly)
+diff --git a/src/sage/rings/finite_rings/element_givaro.pyx b/src/sage/rings/finite_rings/element_givaro.pyx
+index 3739020..a7f9c2f 100644
+--- a/src/sage/rings/finite_rings/element_givaro.pyx
++++ b/src/sage/rings/finite_rings/element_givaro.pyx
+@@ -310,7 +310,7 @@ cdef class Cache_givaro(SageObject):
+         cdef int seed = current_randstate().c_random()
+         cdef int res
+         cdef GivRandom generator = GivRandomSeeded(seed)
+-        res = self.objectptr.random(generator,res)
++        self.objectptr.random(generator,res)
+         return make_FiniteField_givaroElement(self,res)
+ 
+     cpdef FiniteField_givaroElement element_from_data(self, e):
+@@ -386,16 +386,16 @@ cdef class Cache_givaro(SageObject):
+              isinstance(e, long) or is_IntegerMod(e):
+             try:
+                 e_int = e % self.characteristic()
+-                res = self.objectptr.initi(res, e_int)
++                self.objectptr.initi(res, e_int)
+             except ArithmeticError:
+                 raise TypeError("unable to coerce from a finite field other than the prime subfield")
+         elif e is None:
+             e_int = 0
+-            res = self.objectptr.initi(res, e_int)
++            self.objectptr.initi(res, e_int)
+ 
+         elif isinstance(e, float):
+             e_int = int(e) % self.characteristic()
+-            res = self.objectptr.initd(res, e_int)
++            self.objectptr.initd(res, e_int)
+ 
+         elif isinstance(e, str):
+             return self.parent(eval(e.replace("^","**"),self.parent.gens_dict()))
+@@ -406,7 +406,7 @@ cdef class Cache_givaro(SageObject):
+             ret = self._zero_element
+             for i in range(len(e)):
+                 e_int = e[i] % self.characteristic()
+-                res = self.objectptr.initi(res, e_int)
++                self.objectptr.initi(res, e_int)
+                 to_add = make_FiniteField_givaroElement(self, res)
+                 ret = ret + to_add*self.parent.gen()**i
+             return ret
+@@ -446,7 +446,7 @@ cdef class Cache_givaro(SageObject):
+             ret = self._zero_element
+             for i in range(len(e)):
+                 e_int = e[i] % self.characteristic()
+-                res = self.objectptr.initi(res, e_int)
++                self.objectptr.initi(res, e_int)
+                 to_add = make_FiniteField_givaroElement(self, res)
+                 ret = ret + to_add*self.parent.gen()**i
+             return ret
+@@ -475,8 +475,8 @@ cdef class Cache_givaro(SageObject):
+ 
+                 for i from 0 <= i <= degpol(t):
+                     c = gtolong(gel(t, i+2))
+-                    res = self.objectptr.axpyin(res, self.int_to_log(c), x)
+-                    x = self.objectptr.mul(x,x,g)
++                    self.objectptr.axpyin(res, self.int_to_log(c), x)
++                    self.objectptr.mulin(x,g)
+                 clear_stack()
+             else:
+                 clear_stack()
+@@ -580,21 +580,10 @@ cdef class Cache_givaro(SageObject):
+             sage: 2^7 + 2^4 + 2^2 + 2 + 1
+             151
+         """
+-        cdef GivaroGfq *k = self.objectptr
+-        cdef int ret = k.zero
+-        cdef int a = k.indeterminate()
+-        cdef int at = k.one
+-        cdef int ch = k.characteristic()
+-        cdef int t, i
+-
+-        if n<0 or n>k.cardinality():
++        if n<0 or n>self.order():
+             raise TypeError("n must be between 0 and self.order()")
+ 
+-        for i from 0 <= i < k.exponent():
+-            t = k.initi(t, n % ch)
+-            ret = k.axpy(ret, t, at, ret)
+-            at = k.mul(at,at,a)
+-            n //= ch
++        cdef int ret = self.int_to_log(n)
+         return make_FiniteField_givaroElement(self, ret)
+ 
+     def _element_repr(self, FiniteField_givaroElement e):
+@@ -715,7 +704,7 @@ cdef class Cache_givaro(SageObject):
+         """
+         cdef int r
+ 
+-        r = self.objectptr.axpy(r, a.element, b.element, c.element)
++        self.objectptr.axpy(r, a.element, b.element, c.element)
+         return make_FiniteField_givaroElement(self,r)
+ 
+     def a_times_b_minus_c(self,FiniteField_givaroElement a, FiniteField_givaroElement b, FiniteField_givaroElement c):
+@@ -734,7 +723,7 @@ cdef class Cache_givaro(SageObject):
+         """
+         cdef int r
+ 
+-        r = self.objectptr.axmy(r, a.element, b.element, c.element, )
++        self.objectptr.axmy(r, a.element, b.element, c.element, )
+         return make_FiniteField_givaroElement(self,r)
+ 
+     def c_minus_a_times_b(self,FiniteField_givaroElement a,
+@@ -754,7 +743,7 @@ cdef class Cache_givaro(SageObject):
+         """
+         cdef int r
+ 
+-        r = self.objectptr.maxpy(r , a.element, b.element, c.element, )
++        self.objectptr.maxpy(r , a.element, b.element, c.element, )
+         return make_FiniteField_givaroElement(self,r)
+ 
+     def __reduce__(self):
+@@ -1108,7 +1097,7 @@ cdef class FiniteField_givaroElement(FinitePolyExtElement):
+             2*b^3 + 2*b^2 + 2*b + 1
+         """
+         cdef int r
+-        r = self._cache.objectptr.add(r, self.element ,
++        self._cache.objectptr.add(r, self.element ,
+                                               (<FiniteField_givaroElement>right).element )
+         return make_FiniteField_givaroElement(self._cache,r)
+ 
+@@ -1125,7 +1114,7 @@ cdef class FiniteField_givaroElement(FinitePolyExtElement):
+             c^2
+         """
+         cdef int r
+-        r = self._cache.objectptr.mul(r, self.element,
++        self._cache.objectptr.mul(r, self.element,
+                                               (<FiniteField_givaroElement>right).element)
+         return make_FiniteField_givaroElement(self._cache,r)
+ 
+@@ -1147,7 +1136,7 @@ cdef class FiniteField_givaroElement(FinitePolyExtElement):
+         cdef int r
+         if (<FiniteField_givaroElement>right).element == 0:
+             raise ZeroDivisionError('division by zero in finite field')
+-        r = self._cache.objectptr.div(r, self.element,
++        self._cache.objectptr.div(r, self.element,
+                                               (<FiniteField_givaroElement>right).element)
+         return make_FiniteField_givaroElement(self._cache,r)
+ 
+@@ -1164,7 +1153,7 @@ cdef class FiniteField_givaroElement(FinitePolyExtElement):
+             2*a^2 + 2*a
+         """
+         cdef int r
+-        r = self._cache.objectptr.sub(r, self.element,
++        self._cache.objectptr.sub(r, self.element,
+                                               (<FiniteField_givaroElement>right).element)
+         return make_FiniteField_givaroElement(self._cache,r)
+ 
+@@ -1181,7 +1170,7 @@ cdef class FiniteField_givaroElement(FinitePolyExtElement):
+         """
+         cdef int r
+ 
+-        r = self._cache.objectptr.neg(r, self.element)
++        self._cache.objectptr.neg(r, self.element)
+         return make_FiniteField_givaroElement(self._cache,r)
+ 
+     def __invert__(FiniteField_givaroElement self):

Deleted: sagemath-python3-notebook.patch
===================================================================
--- sagemath-python3-notebook.patch	2019-07-04 06:16:23 UTC (rev 487420)
+++ sagemath-python3-notebook.patch	2019-07-04 06:17:08 UTC (rev 487421)
@@ -1,27 +0,0 @@
-diff --git a/src/bin/sage-notebook b/src/bin/sage-notebook
-index 74192da240..0ede281aad 100755
---- a/src/bin/sage-notebook
-+++ b/src/bin/sage-notebook
-@@ -95,8 +95,7 @@ class NotebookJupyter(object):
-         if not have_prerequisites():
-             print(self.PREREQUISITE_ERROR)
-             raise SystemExit(1)
--        from notebook.notebookapp import main
--        main(argv)
-+        os.execvp('jupyter-notebook', ['jupyter-notebook'] + argv)
- 
- 
- class NotebookJupyterlab(object):
-diff --git a/src/sage/repl/ipython_kernel/install.py b/src/sage/repl/ipython_kernel/install.py
-index 3912b8cdf5..bd40cdadda 100644
---- a/src/sage/repl/ipython_kernel/install.py
-+++ b/src/sage/repl/ipython_kernel/install.py
-@@ -304,7 +304,6 @@ def have_prerequisites(debug=True):
-         True
-     """
-     try:
--        from notebook.notebookapp import NotebookApp
-         return True
-     except ImportError:
-         if debug:
-

Copied: sagemath/repos/community-x86_64/sagemath-python3-notebook.patch (from rev 487420, sagemath/trunk/sagemath-python3-notebook.patch)
===================================================================
--- sagemath-python3-notebook.patch	                        (rev 0)
+++ sagemath-python3-notebook.patch	2019-07-04 06:17:08 UTC (rev 487421)
@@ -0,0 +1,27 @@
+diff --git a/src/bin/sage-notebook b/src/bin/sage-notebook
+index 74192da240..0ede281aad 100755
+--- a/src/bin/sage-notebook
++++ b/src/bin/sage-notebook
+@@ -95,8 +95,7 @@ class NotebookJupyter(object):
+         if not have_prerequisites():
+             print(self.PREREQUISITE_ERROR)
+             raise SystemExit(1)
+-        from notebook.notebookapp import main
+-        main(argv)
++        os.execvp('jupyter-notebook', ['jupyter-notebook'] + argv)
+ 
+ 
+ class NotebookJupyterlab(object):
+diff --git a/src/sage/repl/ipython_kernel/install.py b/src/sage/repl/ipython_kernel/install.py
+index 3912b8cdf5..bd40cdadda 100644
+--- a/src/sage/repl/ipython_kernel/install.py
++++ b/src/sage/repl/ipython_kernel/install.py
+@@ -304,7 +304,6 @@ def have_prerequisites(debug=True):
+         True
+     """
+     try:
+-        from notebook.notebookapp import NotebookApp
+         return True
+     except ImportError:
+         if debug:
+

Deleted: sagemath-singular-4.1.2.patch
===================================================================
--- sagemath-singular-4.1.2.patch	2019-07-04 06:16:23 UTC (rev 487420)
+++ sagemath-singular-4.1.2.patch	2019-07-04 06:17:08 UTC (rev 487421)
@@ -1,102 +0,0 @@
-diff --git a/src/sage/libs/singular/function.pyx b/src/sage/libs/singular/function.pyx
-index 87342e8..9a0d37d 100644
---- a/src/sage/libs/singular/function.pyx
-+++ b/src/sage/libs/singular/function.pyx
-@@ -1258,7 +1258,7 @@ cdef class SingularFunction(SageObject):
-             Traceback (most recent call last):
-             ...
-             RuntimeError: error in Singular function call 'size':
--            Wrong number of arguments (got 2 arguments, arity code is 300)
-+            Wrong number of arguments (got 2 arguments, arity code is 302)
-             sage: size('foobar', ring=P)
-             6
- 
-@@ -1667,17 +1667,17 @@ def singular_function(name):
-         Traceback (most recent call last):
-         ...
-         RuntimeError: error in Singular function call 'factorize':
--        Wrong number of arguments (got 0 arguments, arity code is 303)
-+        Wrong number of arguments (got 0 arguments, arity code is 305)
-         sage: factorize(f, 1, 2)
-         Traceback (most recent call last):
-         ...
-         RuntimeError: error in Singular function call 'factorize':
--        Wrong number of arguments (got 3 arguments, arity code is 303)
-+        Wrong number of arguments (got 3 arguments, arity code is 305)
-         sage: factorize(f, 1, 2, 3)
-         Traceback (most recent call last):
-         ...
-         RuntimeError: error in Singular function call 'factorize':
--        Wrong number of arguments (got 4 arguments, arity code is 303)
-+        Wrong number of arguments (got 4 arguments, arity code is 305)
- 
-     The Singular function ``list`` can be called with any number of
-     arguments::
-diff --git a/src/sage/algebras/letterplace/free_algebra_element_letterplace.pyx b/src/sage/algebras/letterplace/free_algebra_element_letterplace.pyx
-index 8f6576b477..deaf0f5769 100644
---- a/src/sage/algebras/letterplace/free_algebra_element_letterplace.pyx
-+++ b/src/sage/algebras/letterplace/free_algebra_element_letterplace.pyx
-@@ -447,7 +447,7 @@ cdef class FreeAlgebraElement_letterplace(AlgebraElement):
-             return True
-         for i from 0 <= i < p_d-s_d:
-             s_poly = singular_system("stest",s_poly,1,
--                                     A._degbound,A.__ngens,ring=P)
-+                                     ring=P)
-             if P.monomial_divides(s_poly,p_poly):
-                 return True
-         return False
-@@ -601,7 +601,7 @@ cdef class FreeAlgebraElement_letterplace(AlgebraElement):
-         # we must put the polynomials into the same ring
-         left._poly = A._current_ring(left._poly)
-         right._poly = A._current_ring(right._poly)
--        rshift = singular_system("stest",right._poly,left._poly.degree(),A._degbound,A.__ngens, ring=A._current_ring)
-+        rshift = singular_system("stest",right._poly,left._poly.degree(), ring=A._current_ring)
-         return FreeAlgebraElement_letterplace(A,left._poly*rshift, check=False)
- 
-     def __pow__(FreeAlgebraElement_letterplace self, int n, k):
-@@ -629,7 +629,7 @@ cdef class FreeAlgebraElement_letterplace(AlgebraElement):
-         q = p = self._poly
-         cdef int i
-         for i from 0<i<n:
--            q = singular_system("stest",q,d,A._degbound,A.__ngens,
-+            q = singular_system("stest",q,d,
-                                      ring=A._current_ring)
-             p *= q
-         return FreeAlgebraElement_letterplace(A, p, check=False)
-diff --git a/src/sage/algebras/letterplace/free_algebra_letterplace.pyx b/src/sage/algebras/letterplace/free_algebra_letterplace.pyx
-index 7a8400052e..b3474fa07c 100644
---- a/src/sage/algebras/letterplace/free_algebra_letterplace.pyx
-+++ b/src/sage/algebras/letterplace/free_algebra_letterplace.pyx
-@@ -683,7 +683,7 @@ cdef class FreeAlgebra_letterplace(Algebra):
-         degbound = self._degbound
-         cdef list G = [C(x._poly) for x in g]
-         for y in G:
--            out.extend([y]+[singular_system("stest",y,n+1,degbound,ngens,ring=C) for n in xrange(d-y.degree())])
-+            out.extend([y]+[singular_system("stest",y,n+1,ring=C) for n in xrange(d-y.degree())])
-         return C.ideal(out)
- 
-     ###########################
-diff --git a/src/sage/algebras/letterplace/letterplace_ideal.pyx b/src/sage/algebras/letterplace/letterplace_ideal.pyx
-index 5776c58cf7..e4ad267bd4 100644
---- a/src/sage/algebras/letterplace/letterplace_ideal.pyx
-+++ b/src/sage/algebras/letterplace/letterplace_ideal.pyx
-@@ -48,7 +48,7 @@ from sage.rings.infinity import Infinity
- #####################
- # Define some singular functions
- lib("freegb.lib")
--singular_system=singular_function("system")
-+singular_std=singular_function("std")
- poly_reduce=singular_function("NF")
- 
- class LetterplaceIdeal(Ideal_nc):
-@@ -276,8 +276,7 @@ class LetterplaceIdeal(Ideal_nc):
-         A.set_degbound(degbound)
-         P = A._current_ring
-         out = [FreeAlgebraElement_letterplace(A,X,check=False) for X in
--               singular_system("freegb",P.ideal([x._poly for x in self.__GB.gens()]),
--                               degbound,A.__ngens, ring = P)]
-+               singular_std(P.ideal([x._poly for x in self.__GB.gens()]), ring = P)]
-         libsingular_options['redTail'] = bck[0]
-         libsingular_options['redSB'] = bck[1]
-         self.__GB = A.ideal(out,side='twosided',coerce=False)
-

Copied: sagemath/repos/community-x86_64/sagemath-singular-4.1.2.patch (from rev 487420, sagemath/trunk/sagemath-singular-4.1.2.patch)
===================================================================
--- sagemath-singular-4.1.2.patch	                        (rev 0)
+++ sagemath-singular-4.1.2.patch	2019-07-04 06:17:08 UTC (rev 487421)
@@ -0,0 +1,102 @@
+diff --git a/src/sage/libs/singular/function.pyx b/src/sage/libs/singular/function.pyx
+index 87342e8..9a0d37d 100644
+--- a/src/sage/libs/singular/function.pyx
++++ b/src/sage/libs/singular/function.pyx
+@@ -1258,7 +1258,7 @@ cdef class SingularFunction(SageObject):
+             Traceback (most recent call last):
+             ...
+             RuntimeError: error in Singular function call 'size':
+-            Wrong number of arguments (got 2 arguments, arity code is 300)
++            Wrong number of arguments (got 2 arguments, arity code is 302)
+             sage: size('foobar', ring=P)
+             6
+ 
+@@ -1667,17 +1667,17 @@ def singular_function(name):
+         Traceback (most recent call last):
+         ...
+         RuntimeError: error in Singular function call 'factorize':
+-        Wrong number of arguments (got 0 arguments, arity code is 303)
++        Wrong number of arguments (got 0 arguments, arity code is 305)
+         sage: factorize(f, 1, 2)
+         Traceback (most recent call last):
+         ...
+         RuntimeError: error in Singular function call 'factorize':
+-        Wrong number of arguments (got 3 arguments, arity code is 303)
++        Wrong number of arguments (got 3 arguments, arity code is 305)
+         sage: factorize(f, 1, 2, 3)
+         Traceback (most recent call last):
+         ...
+         RuntimeError: error in Singular function call 'factorize':
+-        Wrong number of arguments (got 4 arguments, arity code is 303)
++        Wrong number of arguments (got 4 arguments, arity code is 305)
+ 
+     The Singular function ``list`` can be called with any number of
+     arguments::
+diff --git a/src/sage/algebras/letterplace/free_algebra_element_letterplace.pyx b/src/sage/algebras/letterplace/free_algebra_element_letterplace.pyx
+index 8f6576b477..deaf0f5769 100644
+--- a/src/sage/algebras/letterplace/free_algebra_element_letterplace.pyx
++++ b/src/sage/algebras/letterplace/free_algebra_element_letterplace.pyx
+@@ -447,7 +447,7 @@ cdef class FreeAlgebraElement_letterplace(AlgebraElement):
+             return True
+         for i from 0 <= i < p_d-s_d:
+             s_poly = singular_system("stest",s_poly,1,
+-                                     A._degbound,A.__ngens,ring=P)
++                                     ring=P)
+             if P.monomial_divides(s_poly,p_poly):
+                 return True
+         return False
+@@ -601,7 +601,7 @@ cdef class FreeAlgebraElement_letterplace(AlgebraElement):
+         # we must put the polynomials into the same ring
+         left._poly = A._current_ring(left._poly)
+         right._poly = A._current_ring(right._poly)
+-        rshift = singular_system("stest",right._poly,left._poly.degree(),A._degbound,A.__ngens, ring=A._current_ring)
++        rshift = singular_system("stest",right._poly,left._poly.degree(), ring=A._current_ring)
+         return FreeAlgebraElement_letterplace(A,left._poly*rshift, check=False)
+ 
+     def __pow__(FreeAlgebraElement_letterplace self, int n, k):
+@@ -629,7 +629,7 @@ cdef class FreeAlgebraElement_letterplace(AlgebraElement):
+         q = p = self._poly
+         cdef int i
+         for i from 0<i<n:
+-            q = singular_system("stest",q,d,A._degbound,A.__ngens,
++            q = singular_system("stest",q,d,
+                                      ring=A._current_ring)
+             p *= q
+         return FreeAlgebraElement_letterplace(A, p, check=False)
+diff --git a/src/sage/algebras/letterplace/free_algebra_letterplace.pyx b/src/sage/algebras/letterplace/free_algebra_letterplace.pyx
+index 7a8400052e..b3474fa07c 100644
+--- a/src/sage/algebras/letterplace/free_algebra_letterplace.pyx
++++ b/src/sage/algebras/letterplace/free_algebra_letterplace.pyx
+@@ -683,7 +683,7 @@ cdef class FreeAlgebra_letterplace(Algebra):
+         degbound = self._degbound
+         cdef list G = [C(x._poly) for x in g]
+         for y in G:
+-            out.extend([y]+[singular_system("stest",y,n+1,degbound,ngens,ring=C) for n in xrange(d-y.degree())])
++            out.extend([y]+[singular_system("stest",y,n+1,ring=C) for n in xrange(d-y.degree())])
+         return C.ideal(out)
+ 
+     ###########################
+diff --git a/src/sage/algebras/letterplace/letterplace_ideal.pyx b/src/sage/algebras/letterplace/letterplace_ideal.pyx
+index 5776c58cf7..e4ad267bd4 100644
+--- a/src/sage/algebras/letterplace/letterplace_ideal.pyx
++++ b/src/sage/algebras/letterplace/letterplace_ideal.pyx
+@@ -48,7 +48,7 @@ from sage.rings.infinity import Infinity
+ #####################
+ # Define some singular functions
+ lib("freegb.lib")
+-singular_system=singular_function("system")
++singular_std=singular_function("std")
+ poly_reduce=singular_function("NF")
+ 
+ class LetterplaceIdeal(Ideal_nc):
+@@ -276,8 +276,7 @@ class LetterplaceIdeal(Ideal_nc):
+         A.set_degbound(degbound)
+         P = A._current_ring
+         out = [FreeAlgebraElement_letterplace(A,X,check=False) for X in
+-               singular_system("freegb",P.ideal([x._poly for x in self.__GB.gens()]),
+-                               degbound,A.__ngens, ring = P)]
++               singular_std(P.ideal([x._poly for x in self.__GB.gens()]), ring = P)]
+         libsingular_options['redTail'] = bck[0]
+         libsingular_options['redSB'] = bck[1]
+         self.__GB = A.ideal(out,side='twosided',coerce=False)
+

Copied: sagemath/repos/community-x86_64/sagemath-threejs-dir-structure.patch (from rev 487420, sagemath/trunk/sagemath-threejs-dir-structure.patch)
===================================================================
--- sagemath-threejs-dir-structure.patch	                        (rev 0)
+++ sagemath-threejs-dir-structure.patch	2019-07-04 06:17:08 UTC (rev 487421)
@@ -0,0 +1,40 @@
+diff --git a/src/sage/repl/rich_output/backend_ipython.py b/src/sage/repl/rich_output/backend_ipython.py
+index 7c27d48..8bf4861 100644
+--- a/src/sage/repl/rich_output/backend_ipython.py
++++ b/src/sage/repl/rich_output/backend_ipython.py
+@@ -411,10 +411,15 @@ class BackendIPythonCommandline(BackendIPython):
+             sage: backend.threejs_offline_scripts()
+             '...<script ...</script>...'
+         """
+-        from sage.env import SAGE_SHARE
++        from sage.env import THREEJS_DIR
+ 
+-        scripts = [os.path.join(SAGE_SHARE, 'threejs', script)
+-                   for script in ['three.min.js', 'OrbitControls.js']]
++        scripts = [
++            os.path.join(THREEJS_DIR, script)
++            for script in [
++                'build/three.min.js',
++                'examples/js/controls/OrbitControls.js',
++            ]
++        ]
+ 
+         if sys.platform == 'cygwin':
+             import cygwin
+@@ -594,13 +599,13 @@ class BackendIPythonNotebook(BackendIPython):
+             sage: from sage.repl.rich_output.backend_ipython import BackendIPythonNotebook
+             sage: backend = BackendIPythonNotebook()
+             sage: backend.threejs_offline_scripts()
+-            '...<script src="/nbextensions/threejs/three.min...<\\/script>...'
++            '...<script src="/nbextensions/threejs/build/three.min...<\\/script>...'
+         """
+         from sage.repl.rich_output import get_display_manager
+         CDN_scripts = get_display_manager().threejs_scripts(online=True)
+         return """
+-<script src="/nbextensions/threejs/three.min.js"></script>
+-<script src="/nbextensions/threejs/OrbitControls.js"></script>
++<script src="/nbextensions/threejs/build/three.min.js"></script>
++<script src="/nbextensions/threejs/examples/js/controls/OrbitControls.js"></script>
+ <script>
+   if ( !window.THREE ) document.write('{}');
+ </script>

Deleted: sagemath-threejs.patch
===================================================================
--- sagemath-threejs.patch	2019-07-04 06:16:23 UTC (rev 487420)
+++ sagemath-threejs.patch	2019-07-04 06:17:08 UTC (rev 487421)
@@ -1,11 +0,0 @@
---- a/src/sage/repl/rich_output/display_manager.py
-+++ b/src/sage/repl/rich_output/display_manager.py
-@@ -746,7 +746,7 @@ class DisplayManager(SageObject):
-         """
-         if online:
-             from sage.misc.package import installed_packages
--            version = installed_packages()['threejs'].split('.')[0]
-+            version = 'r100'
-             return """
- <script src="https://cdn.jsdelivr.net/gh/mrdoob/three.js@{0}/build/three.min.js"></script>
- <script src="https://cdn.jsdelivr.net/gh/mrdoob/three.js@{0}/examples/js/controls/OrbitControls.js"></script>

Copied: sagemath/repos/community-x86_64/sagemath-threejs.patch (from rev 487420, sagemath/trunk/sagemath-threejs.patch)
===================================================================
--- sagemath-threejs.patch	                        (rev 0)
+++ sagemath-threejs.patch	2019-07-04 06:17:08 UTC (rev 487421)
@@ -0,0 +1,11 @@
+--- a/src/sage/repl/rich_output/display_manager.py
++++ b/src/sage/repl/rich_output/display_manager.py
+@@ -746,7 +746,7 @@ class DisplayManager(SageObject):
+         """
+         if online:
+             from sage.misc.package import installed_packages
+-            version = installed_packages()['threejs'].split('.')[0]
++            version = 'r100'
+             return """
+ <script src="https://cdn.jsdelivr.net/gh/mrdoob/three.js@{0}/build/three.min.js"></script>
+ <script src="https://cdn.jsdelivr.net/gh/mrdoob/three.js@{0}/examples/js/controls/OrbitControls.js"></script>

Deleted: test-optional.patch
===================================================================
--- test-optional.patch	2019-07-04 06:16:23 UTC (rev 487420)
+++ test-optional.patch	2019-07-04 06:17:08 UTC (rev 487421)
@@ -1,20 +0,0 @@
---- src/sage/doctest/control.py.orig       2016-10-20 19:39:53.714618246 +0200
-+++ src/sage/doctest/control.py    2016-10-20 19:40:15.158049920 +0200
-@@ -347,17 +347,6 @@
-                 # Special case to run all optional tests
-                 options.optional = True
-             else:
--                # We replace the 'optional' tag by all optional
--                # packages for which the installed version matches the
--                # latest available version (this implies in particular
--                # that the package is actually installed).
--                if 'optional' in options.optional:
--                    options.optional.discard('optional')
--                    from sage.misc.package import list_packages
--                    for pkg in list_packages('optional', local=True).values():
--                        if pkg['installed_version'] == pkg['remote_version']:
--                            options.optional.add(pkg['name'])
--
-                 # Check that all tags are valid
-                 for o in options.optional:
-                     if not optionaltag_regex.search(o):

Copied: sagemath/repos/community-x86_64/test-optional.patch (from rev 487420, sagemath/trunk/test-optional.patch)
===================================================================
--- test-optional.patch	                        (rev 0)
+++ test-optional.patch	2019-07-04 06:17:08 UTC (rev 487421)
@@ -0,0 +1,20 @@
+--- src/sage/doctest/control.py.orig       2016-10-20 19:39:53.714618246 +0200
++++ src/sage/doctest/control.py    2016-10-20 19:40:15.158049920 +0200
+@@ -347,17 +347,6 @@
+                 # Special case to run all optional tests
+                 options.optional = True
+             else:
+-                # We replace the 'optional' tag by all optional
+-                # packages for which the installed version matches the
+-                # latest available version (this implies in particular
+-                # that the package is actually installed).
+-                if 'optional' in options.optional:
+-                    options.optional.discard('optional')
+-                    from sage.misc.package import list_packages
+-                    for pkg in list_packages('optional', local=True).values():
+-                        if pkg['installed_version'] == pkg['remote_version']:
+-                            options.optional.add(pkg['name'])
+-
+                 # Check that all tags are valid
+                 for o in options.optional:
+                     if not optionaltag_regex.search(o):



More information about the arch-commits mailing list