[arch-commits] Commit in sagemath-doc (6 files)

Antonio Rojas arojas at archlinux.org
Wed Apr 15 06:36:21 UTC 2015


    Date: Wednesday, April 15, 2015 @ 08:36:20
  Author: arojas
Revision: 131390

archrelease: copy trunk to community-staging-any

Added:
  sagemath-doc/repos/
  sagemath-doc/repos/community-staging-any/
  sagemath-doc/repos/community-staging-any/PKGBUILD
    (from rev 131389, sagemath-doc/trunk/PKGBUILD)
  sagemath-doc/repos/community-staging-any/fes02.patch
    (from rev 131389, sagemath-doc/trunk/fes02.patch)
  sagemath-doc/repos/community-staging-any/package.patch
    (from rev 131389, sagemath-doc/trunk/package.patch)
  sagemath-doc/repos/community-staging-any/paths.patch
    (from rev 131389, sagemath-doc/trunk/paths.patch)

---------------+
 PKGBUILD      |   79 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 fes02.patch   |   45 +++++++++++++++++++++++++++++++
 package.patch |   11 +++++++
 paths.patch   |   32 ++++++++++++++++++++++
 4 files changed, 167 insertions(+)

Copied: sagemath-doc/repos/community-staging-any/PKGBUILD (from rev 131389, sagemath-doc/trunk/PKGBUILD)
===================================================================
--- repos/community-staging-any/PKGBUILD	                        (rev 0)
+++ repos/community-staging-any/PKGBUILD	2015-04-15 06:36:20 UTC (rev 131390)
@@ -0,0 +1,79 @@
+# $Id$
+# Maintainer: Antonio Rojas <arojas at archlinux.org>
+
+pkgbase=sagemath-doc
+pkgname=(sagemath-doc sagemath-src)
+pkgver=6.6
+pkgrel=1
+arch=(any)
+url="http://www.sagemath.org"
+license=(GPL)
+makedepends=(sagemath sage-notebook python2-sphinx)
+source=("$pkgbase-$pkgver.tar.gz::https://github.com/sagemath/sage/archive/$pkgver.tar.gz" 'package.patch' 'paths.patch' 'fes02.patch')
+md5sums=('91eefd257f535ed2af337eeffab4c9bd'
+         '0eb5ac1537aac93bd67a2925c0cfd84d'
+         'acc25f13728517badafa70d220ab7b8e'
+         '506944613082ba7f5b34360939ca90eb')
+
+prepare() {
+  cd sage-$pkgver
+
+# Arch-specific patches
+# assume all optional packages are installed
+  patch -p0 -i "$srcdir"/package.patch
+# fix paths in python imports
+  patch -p0 -i "$srcdir"/paths.patch
+# fix cython linking
+  sed -e "s| atlas(),||" -i src/sage/misc/cython.py
+# supress warning about GAP install dir
+  sed -e "s|gapdir = os.path.join(SAGE_LOCAL, 'gap', 'latest')|gapdir = '/usr/lib/gap'|" -i src/sage/libs/gap/util.pyx 
+# use small Cremona database
+  sed -e "s|is_package_installed('database_cremona_ellcurve')|False|" -i src/sage/databases/cremona.py
+# fix IPython kernel path
+  sed -e "s|os.path.join(SAGE_ROOT, 'sage')|'/usr/bin/sage'|" -i src/sage/repl/ipython_kernel/install.py
+
+# Upstream patches
+# fix build against libfes 0.2 http://trac.sagemath.org/ticket/15209
+  patch -p0 -i "$srcdir"/fes02.patch
+
+# use python2
+  sed -e 's|cython %s %s|cython2 %s %s|' -e 's|python setup.py|python2 setup.py|' -i src/sage/misc/cython.py
+}
+
+build() {
+  cd sage-$pkgver/src
+
+  export SAGE_LOCAL="/usr"
+  export SAGE_SRC="$PWD"
+  export SAGE_DOC="$SAGE_SRC"/doc
+  export SAGE_DOC_MATHJAX=yes
+  export PYTHONPATH="/usr/lib/sage/site-packages"
+  python2 doc/common/builder.py -k all html
+}
+
+package_sagemath-doc() {
+  pkgdesc="HTML documentation and inline help for SageMath"
+  depends=(sage-notebook python2-sphinx)
+  conflicts=(sage-mathematics-doc)
+  replaces=(sage-mathematics-doc)
+
+  cd sage-$pkgver/src/doc
+ 
+  mkdir -p "$pkgdir"/usr/share/doc/sage
+  cp -r * "$pkgdir"/usr/share/doc/sage
+  rm "$pkgdir"/usr/share/doc/sage/Makefile
+  rm -r "$pkgdir"/usr/share/doc/sage/output/doctrees
+}
+
+package_sagemath-src() {
+  pkgdesc="Source files for SageMath"
+  conflicts=(sage-mathematics-src)
+  replaces=(sage-mathematics-src)
+  
+  mkdir -p "$pkgdir"/usr/share/sage/src
+  cp -r sage-$pkgver/src/{sage,sage_setup} "$pkgdir"/usr/share/sage/src
+  ln -s /usr/share/doc/sage "$pkgdir"/usr/share/sage/src/doc
+
+  mkdir -p "$pkgdir"/usr/include/csage
+  cp -r sage-$pkgver/src/c_lib/include/* "$pkgdir"/usr/include/csage
+}

Copied: sagemath-doc/repos/community-staging-any/fes02.patch (from rev 131389, sagemath-doc/trunk/fes02.patch)
===================================================================
--- repos/community-staging-any/fes02.patch	                        (rev 0)
+++ repos/community-staging-any/fes02.patch	2015-04-15 06:36:20 UTC (rev 131390)
@@ -0,0 +1,45 @@
+diff --git a/src/sage/libs/fes.pyx b/src/sage/libs/fes.pyx
+index 40b9c23..d188cf0 100644
+--- src/sage/libs/fes.pyx
++++ 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)
+ 
+ 
+ include 'sage/ext/interrupt.pxi'  #sig_on(), sig_off()
+@@ -219,7 +221,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

Copied: sagemath-doc/repos/community-staging-any/package.patch (from rev 131389, sagemath-doc/trunk/package.patch)
===================================================================
--- repos/community-staging-any/package.patch	                        (rev 0)
+++ repos/community-staging-any/package.patch	2015-04-15 06:36:20 UTC (rev 131390)
@@ -0,0 +1,11 @@
+--- 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
+@@ -194,7 +194,7 @@
+         sage: is_package_installed('sage')
+         True
+     """
+-    return any(p.startswith(package) for p in install_package())
++    return True
+ 
+ def standard_packages():
+     """

Copied: sagemath-doc/repos/community-staging-any/paths.patch (from rev 131389, sagemath-doc/trunk/paths.patch)
===================================================================
--- repos/community-staging-any/paths.patch	                        (rev 0)
+++ repos/community-staging-any/paths.patch	2015-04-15 06:36:20 UTC (rev 131390)
@@ -0,0 +1,32 @@
+--- src/sage/env.py.orig	2014-06-25 10:47:25.827203554 +1200
++++ src/sage/env.py	2014-06-25 10:49:07.667402821 +1200
+@@ -86,21 +86,18 @@
+ _add_variable_or_fallback('LOCAL_IDENTIFIER','$HOSTNAME.%s'%os.getpid())
+ 
+ # bunch of sage directories and files
+-_add_variable_or_fallback('SAGE_ROOT',       None)
+-_add_variable_or_fallback('SAGE_LOCAL',      opj('$SAGE_ROOT', 'local'))
+-_add_variable_or_fallback('SAGE_ETC',        opj('$SAGE_LOCAL', 'etc'))
+-_add_variable_or_fallback('SAGE_SHARE',      opj('$SAGE_LOCAL', 'share'))
++_add_variable_or_fallback('SAGE_ROOT',       '/usr')
++_add_variable_or_fallback('SAGE_LOCAL',      '/usr')
++_add_variable_or_fallback('SAGE_ETC',        '/etc/sage')
++_add_variable_or_fallback('SAGE_SHARE',      opj('$SAGE_LOCAL', 'share', 'sage'))
+ 
+ _add_variable_or_fallback('SAGE_SRC',        opj('$SAGE_ROOT', 'src'))
+-_add_variable_or_fallback('SITE_PACKAGES',   site.getsitepackages())
++_add_variable_or_fallback('SITE_PACKAGES',   site.getsitepackages()+['/usr/lib/sage/site-packages'])
+ _add_variable_or_fallback('SAGE_LIB',        SITE_PACKAGES[0])
+ 
+-_add_variable_or_fallback('SAGE_EXTCODE',    opj('$SAGE_SHARE', 'sage', 'ext'))
+-_add_variable_or_fallback('SAGE_LOGS',       opj('$SAGE_ROOT', 'logs', 'pkgs'))
+-_add_variable_or_fallback('SAGE_SPKG_INST',  opj('$SAGE_LOCAL', 'var', 'lib', 'sage', 'installed'))
+-_add_variable_or_fallback('SAGE_DOC',        opj('$SAGE_SRC', 'doc'))
+-_add_variable_or_fallback('DOT_SAGE',        opj(os.environ.get('HOME','$SAGE_ROOT'), '.sage'))
+-_add_variable_or_fallback('SAGE_DOT_GIT',    opj('$SAGE_ROOT', '.git'))
++_add_variable_or_fallback('SAGE_EXTCODE',    opj('$SAGE_SHARE', 'ext'))
++_add_variable_or_fallback('SAGE_DOC',        '/usr/share/doc/sage')
++_add_variable_or_fallback('DOT_SAGE',        opj(os.environ.get('HOME'), '.sage'))
+ 
+ # misc
+ _add_variable_or_fallback('SAGE_URL',                'http://sage.math.washington.edu/sage/')



More information about the arch-commits mailing list