[arch-commits] Commit in sagemath-doc/repos (6 files)
Antonio Rojas
arojas at archlinux.org
Tue May 19 09:13:21 UTC 2015
Date: Tuesday, May 19, 2015 @ 11:13:20
Author: arojas
Revision: 133794
archrelease: copy trunk to community-testing-any
Added:
sagemath-doc/repos/community-testing-any/
sagemath-doc/repos/community-testing-any/PKGBUILD
(from rev 133793, sagemath-doc/trunk/PKGBUILD)
sagemath-doc/repos/community-testing-any/fes02.patch
(from rev 133793, sagemath-doc/trunk/fes02.patch)
sagemath-doc/repos/community-testing-any/ntl9.patch
(from rev 133793, sagemath-doc/trunk/ntl9.patch)
sagemath-doc/repos/community-testing-any/package.patch
(from rev 133793, sagemath-doc/trunk/package.patch)
sagemath-doc/repos/community-testing-any/paths.patch
(from rev 133793, sagemath-doc/trunk/paths.patch)
---------------+
PKGBUILD | 91 ++++++++++++++++++++++++++++
fes02.patch | 45 ++++++++++++++
ntl9.patch | 178 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
package.patch | 11 +++
paths.patch | 33 ++++++++++
5 files changed, 358 insertions(+)
Copied: sagemath-doc/repos/community-testing-any/PKGBUILD (from rev 133793, sagemath-doc/trunk/PKGBUILD)
===================================================================
--- community-testing-any/PKGBUILD (rev 0)
+++ community-testing-any/PKGBUILD 2015-05-19 09:13:20 UTC (rev 133794)
@@ -0,0 +1,91 @@
+# $Id$
+# Maintainer: Antonio Rojas <arojas at archlinux.org>
+
+pkgbase=sagemath-doc
+pkgname=(sagemath-doc sagemath-src)
+pkgver=6.7
+pkgrel=1
+arch=(any)
+url="http://www.sagemath.org"
+license=(GPL)
+makedepends=(sagemath sage-notebook python2-sphinx python2-pyzmq python2-pillow)
+source=("$pkgbase-$pkgver.tar.gz::https://github.com/sagemath/sage/archive/$pkgver.tar.gz"
+ 'package.patch' 'paths.patch' 'fes02.patch' 'ntl9.patch')
+md5sums=('df744e882a4b25b42dd8347e202cd497'
+ '0eb5ac1537aac93bd67a2925c0cfd84d'
+ '020bdb34b6fc0f2c9f46341bdb79937a'
+ '506944613082ba7f5b34360939ca90eb'
+ '308abbb1a49db9b8f0e088aff69567ff')
+
+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
+# fix Cremona database detection
+ sed -e "s|is_package_installed('database_cremona_ellcurve')|os.path.exists('/usr/share/sage/cremona/cremona.db')|" \
+ -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
+# find bliss headers
+ sed -e 's|graph.hh|bliss/graph.hh|' -i src/sage/graphs/bliss.pyx
+# Rename class to fix conflicts with NTL
+ sed -e 's|WrappedPtr|SageWrappedPtr|' -i src/sage/libs/polybori/decl.pxd -i src/sage/libs/polybori/pb_wrap.h
+
+# Upstream patches
+# fix build against libfes 0.2 http://trac.sagemath.org/ticket/15209
+ patch -p0 -i "$srcdir"/fes02.patch
+# fix build aginst NTL 9 (Fedora)
+ patch -p0 -i "$srcdir"/ntl9.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
+
+# remove developer interface
+ rm -r src/sage/dev
+}
+
+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-testing-any/fes02.patch (from rev 133793, sagemath-doc/trunk/fes02.patch)
===================================================================
--- community-testing-any/fes02.patch (rev 0)
+++ community-testing-any/fes02.patch 2015-05-19 09:13:20 UTC (rev 133794)
@@ -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-testing-any/ntl9.patch (from rev 133793, sagemath-doc/trunk/ntl9.patch)
===================================================================
--- community-testing-any/ntl9.patch (rev 0)
+++ community-testing-any/ntl9.patch 2015-05-19 09:13:20 UTC (rev 133794)
@@ -0,0 +1,178 @@
+--- ./src/sage/rings/bernmm/bernmm-test.cpp.orig 2015-02-16 17:15:12.000000000 -0700
++++ ./src/sage/rings/bernmm/bernmm-test.cpp 2015-05-07 21:39:58.565251320 -0600
+@@ -70,7 +70,7 @@ void bern_naive(mpq_t* res, long n)
+ */
+ int testcase__bern_modp_powg(long p, long k, mpq_t b)
+ {
+- double pinv = 1 / ((double) p);
++ wide_double pinv = wide_double(1) / wide_double(p);
+
+ // compute B_k mod p using _bern_modp_powg()
+ long x = _bern_modp_powg(p, pinv, k);
+@@ -147,7 +147,7 @@ int test__bern_modp_powg()
+ */
+ int testcase__bern_modp_pow2(long p, long k)
+ {
+- double pinv = 1 / ((double) p);
++ wide_double pinv = wide_double(1) / wide_double(p);
+
+ if (PowerMod(2, k, p, pinv) == 1)
+ return 1;
+--- ./src/sage/rings/bernmm/bern_modp.cpp.orig 2015-02-16 17:15:12.000000000 -0700
++++ ./src/sage/rings/bernmm/bern_modp.cpp 2015-05-07 20:17:37.680381004 -0600
+@@ -43,14 +43,14 @@ namespace bernmm {
+ pinv = 1 / ((double) p)
+ g = a multiplicative generator of GF(p), in [0, p)
+ */
+-long bernsum_powg(long p, double pinv, long k, long g)
++long bernsum_powg(long p, wide_double pinv, long k, long g)
+ {
+ long half_gm1 = (g + ((g & 1) ? 0 : p) - 1) / 2; // (g-1)/2 mod p
+ long g_to_jm1 = 1;
+ long g_to_km1 = PowerMod(g, k-1, p, pinv);
+ long g_to_km1_to_j = g_to_km1;
+ long sum = 0;
+- double g_pinv = ((double) g) / ((double) p);
++ wide_double g_pinv = wide_double(g) / wide_double(p);
+ mulmod_precon_t g_to_km1_pinv = PrepMulModPrecon(g_to_km1, p, pinv);
+
+ for (long j = 1; j <= (p-1)/2; j++)
+@@ -224,7 +224,7 @@ public:
+ #error Number of bits in a long must be divisible by TABLE_LG_SIZE
+ #endif
+
+-long bernsum_pow2(long p, double pinv, long k, long g, long n)
++long bernsum_pow2(long p, wide_double pinv, long k, long g, long n)
+ {
+ // In the main summation loop we accumulate data into the _tables_ array;
+ // tables[y][z] contributes to the final answer with a weight of
+@@ -481,7 +481,7 @@ long PrepRedc(long n)
+ (See bernsum_pow2() for code comments; we only add comments here where
+ something is different from bernsum_pow2())
+ */
+-long bernsum_pow2_redc(long p, double pinv, long k, long g, long n)
++long bernsum_pow2_redc(long p, wide_double pinv, long k, long g, long n)
+ {
+ long pinv2 = PrepRedc(p);
+ long F = (1L << (ULONG_BITS/2)) % p;
+@@ -655,7 +655,7 @@ long bernsum_pow2_redc(long p, double pi
+
+ Algorithm: uses bernsum_powg() to compute the main sum.
+ */
+-long _bern_modp_powg(long p, double pinv, long k)
++long _bern_modp_powg(long p, wide_double pinv, long k)
+ {
+ Factorisation F(p-1);
+ long g = primitive_root(p, pinv, F);
+@@ -685,7 +685,7 @@ long _bern_modp_powg(long p, double pinv
+ Algorithm: uses bernsum_pow2() (or bernsum_pow2_redc() if p is small
+ enough) to compute the main sum.
+ */
+-long _bern_modp_pow2(long p, double pinv, long k)
++long _bern_modp_pow2(long p, wide_double pinv, long k)
+ {
+ Factorisation F(p-1);
+ long g = primitive_root(p, pinv, F);
+@@ -717,7 +717,7 @@ long _bern_modp_pow2(long p, double pinv
+ 2 <= k <= p-3, k even
+ pinv = 1 / ((double) p)
+ */
+-long _bern_modp(long p, double pinv, long k)
++long _bern_modp(long p, wide_double pinv, long k)
+ {
+ if (PowerMod(2, k, p, pinv) != 1)
+ // 2^k != 1 mod p, so we use the faster version
+@@ -765,7 +765,7 @@ long bern_modp(long p, long k)
+ if (m == 0)
+ return -1;
+
+- double pinv = 1 / ((double) p);
++ wide_double pinv = wide_double(1) / wide_double (p);
+ long x = _bern_modp(p, pinv, m); // = B_m/m mod p
+ return MulMod(x, k, p, pinv);
+ }
+--- ./src/sage/rings/bernmm/bern_modp.h.orig 2015-02-16 17:15:12.000000000 -0700
++++ ./src/sage/rings/bernmm/bern_modp.h 2015-05-09 08:06:39.732529882 -0600
+@@ -12,6 +12,7 @@
+ #ifndef BERNMM_BERN_MODP_H
+ #define BERNMM_BERN_MODP_H
+
++#include <NTL/ZZ.h>
+
+ namespace bernmm {
+
+@@ -29,8 +30,8 @@ long bern_modp(long p, long k);
+ /*
+ Exported for testing.
+ */
+-long _bern_modp_powg(long p, double pinv, long k);
+-long _bern_modp_pow2(long p, double pinv, long k);
++long _bern_modp_powg(long p, NTL::wide_double pinv, long k);
++long _bern_modp_pow2(long p, NTL::wide_double pinv, long k);
+
+
+ };
+--- ./src/sage/rings/bernmm/bern_modp_util.cpp.orig 2015-02-16 17:15:12.000000000 -0700
++++ ./src/sage/rings/bernmm/bern_modp_util.cpp 2015-05-07 21:38:06.662182003 -0600
+@@ -20,7 +20,7 @@ NTL_CLIENT;
+ namespace bernmm {
+
+
+-long PowerMod(long a, long ee, long n, double ninv)
++long PowerMod(long a, long ee, long n, wide_double ninv)
+ {
+ long x, y;
+
+@@ -89,7 +89,7 @@ PrimeTable::PrimeTable(long bound)
+ }
+
+
+-long order(long x, long p, double pinv, const Factorisation& F)
++long order(long x, long p, wide_double pinv, const Factorisation& F)
+ {
+ // in the loop below, m is always some multiple of the order of x
+ long m = p - 1;
+@@ -113,7 +113,7 @@ long order(long x, long p, double pinv,
+
+
+
+-long primitive_root(long p, double pinv, const Factorisation& F)
++long primitive_root(long p, wide_double pinv, const Factorisation& F)
+ {
+ if (p == 2)
+ return 1;
+--- ./src/sage/rings/bernmm/bern_modp_util.h.orig 2015-02-16 17:15:12.000000000 -0700
++++ ./src/sage/rings/bernmm/bern_modp_util.h 2015-05-09 08:58:22.618458475 -0600
+@@ -17,6 +17,7 @@
+ #include <vector>
+ #include <cassert>
+ #include <climits>
++#include <NTL/ZZ.h>
+
+
+ #if ULONG_MAX == 4294967295U
+@@ -39,7 +40,7 @@ namespace bernmm {
+
+ (Implementation is adapted from ZZ.c in NTL 5.4.1.)
+ */
+-long PowerMod(long a, long ee, long n, double ninv);
++long PowerMod(long a, long ee, long n, NTL::wide_double ninv);
+
+
+ /*
+@@ -123,13 +124,13 @@ long next_prime(long p);
+ /*
+ Computes order of x mod p, given the factorisation F of p-1.
+ */
+-long order(long x, long p, double pinv, const Factorisation& F);
++long order(long x, long p, NTL::wide_double pinv, const Factorisation& F);
+
+
+ /*
+ Finds the smallest primitive root mod p, given the factorisation F of p-1.
+ */
+-long primitive_root(long p, double pinv, const Factorisation& F);
++long primitive_root(long p, NTL::wide_double pinv, const Factorisation& F);
+
+
+ }; // end namespace
Copied: sagemath-doc/repos/community-testing-any/package.patch (from rev 133793, sagemath-doc/trunk/package.patch)
===================================================================
--- community-testing-any/package.patch (rev 0)
+++ community-testing-any/package.patch 2015-05-19 09:13:20 UTC (rev 133794)
@@ -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-testing-any/paths.patch (from rev 133793, sagemath-doc/trunk/paths.patch)
===================================================================
--- community-testing-any/paths.patch (rev 0)
+++ community-testing-any/paths.patch 2015-05-19 09:13:20 UTC (rev 133794)
@@ -0,0 +1,33 @@
+--- 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'))
+ _add_variable_or_fallback('SAGE_DISTFILES', opj('$SAGE_ROOT', 'upstream'))
+
+ # misc
+
More information about the arch-commits
mailing list