Update to sagemath 5.12

This commit is contained in:
pcpa 2013-10-18 23:22:11 -03:00
parent 4f797f23e1
commit d4a07df7d0
37 changed files with 281 additions and 843 deletions

View file

@ -34,10 +34,6 @@
# but are required to have the "basic" set of coin-or packages
%global have_coin_or_Cbc %{packager_debug}
# https://bugzilla.redhat.com/show_bug.cgi?id=919703
# https://bitbucket.org/vbraun/libgap/issue/1/please-make-tarball-downloads-available
%global have_libgap 0
# https://bugzilla.redhat.com/show_bug.cgi?id=914936
%ifarch %{ix86} x86_64
%global have_fes %{packager_debug}
@ -57,11 +53,9 @@
%global pexpect_pkg pexpect-2.0.p5
%global polytopes_db_pkg polytopes_db-20120220
%global rubiks_pkg rubiks-20070912.p18
%global sagenb_pkg sagenb-0.10.4
%global sagenb_pkg sagenb-0.10.7.2
%global sagetex_pkg sagetex-2.3.4
%global sagemath_share %{_datadir}/%{name}
%global SAGE_ROOT %{_libdir}/sagemath
%global SAGE_LOCAL %{SAGE_ROOT}/local
%global SAGE_SRC %{SAGE_ROOT}/src
@ -73,8 +67,8 @@
Name: sagemath
Group: Applications/Engineering
Summary: A free open-source mathematics software system
Version: 5.10
Release: 5%{?dist}
Version: 5.12
Release: 1%{?dist}
# The file ${SAGE_ROOT}/COPYING.txt is the upstream license breakdown file
# Additionally, every $files section has a comment with the license name
# before files with that license
@ -108,18 +102,13 @@ Patch1: %{name}-gmp.patch
# Set of patches to work with system wide packages
Patch2: %{name}-scripts.patch
# Do not mandate a patched ntl. It was requested to ntl upstream to
# provide an api to match what sagemath expects.
# http://shoup.net/pipermail/ntl_shoup.net/2012-April/000033.html
Patch3: %{name}-unpatched_ntl.patch
# Adapt to ntl 6.0.0.
Patch4: %{name}-ntl6.patch
Patch3: %{name}-ntl6.patch
# remove call to not implemented sagemath "is_package_installed" interfaces
# need to package coin-or solver in fedora
# remove check for non free solvers
Patch5: %{name}-extensions.patch
Patch4: %{name}-extensions.patch
# helper to:
# o respect a DESTDIR environment variable
@ -127,101 +116,82 @@ Patch5: %{name}-extensions.patch
# o minor change to help in incremental builds by avoiding rebuilding
# files
# o do not assume there is an installed sagemath
Patch6: %{name}-rpmbuild.patch
Patch5: %{name}-rpmbuild.patch
# build documentation in buildroot environment
Patch7: %{name}-sagedoc.patch
Patch6: %{name}-sagedoc.patch
# sage notebook rpm and system environment adjustments
Patch8: %{name}-sagenb.patch
Patch7: %{name}-sagenb.patch
# do not attempt to create state files in system directories
Patch9: %{name}-readonly.patch
Patch8: %{name}-readonly.patch
# force coercion of ecl t_string to ecl t_base_string
# this is hackish and only required if ecl is built with unicode support
Patch10: %{name}-ecl-unicode.patch
Patch9: %{name}-ecl-unicode.patch
# do not link explicitly to png12
Patch11: %{name}-png.patch
Patch10: %{name}-png.patch
# work with all maxima-runtime lisp backend packages
Patch12: %{name}-maxima.patch
Patch11: %{name}-maxima.patch
# execute 4ti2 programs in $PATH not in $SAGE_ROOT/local/bin
Patch13: %{name}-4ti2.patch
Patch12: %{name}-4ti2.patch
# http://trac.sagemath.org/sage_trac/ticket/12992
# http://pari.math.u-bordeaux.fr/cgi-bin/bugreport.cgi?bug=1317
Patch14: %{name}-pari.patch
# in fedora 18 it was updated to latest fplll
Patch15: %{name}-fplll.patch
Patch13: %{name}-pari.patch
# Portuguese translations: http://trac.sagemath.org/sage_trac/ticket/12822
Patch16: trac_12502_pt_translation_of_a_tour_of_sage_rebase1.patch
Patch17: trac_12822_pt_translation_of_tutorial.patch
Patch18: trac_12822_pt_translation_of_tutorial_rev1.patch
# wrappers for distros with libmpc 0.9
Patch19: %{name}-libmpc.patch
Patch14: trac_12502_pt_translation_of_a_tour_of_sage_rebase1.patch
Patch15: trac_12822_pt_translation_of_tutorial.patch
Patch16: trac_12822_pt_translation_of_tutorial_rev1.patch
# use jmol itself to export preview images
# FIXME besides not using X and told so, fails if DISPLAY is not set
Patch20: %{name}-jmol.patch
# adapt for maxima 5.29.1 package
Patch21: %{name}-maxima.system.patch
Patch17: %{name}-jmol.patch
# only cremona mini database built and installed
# FIXME add a package with the full cremona database
# FIXME actually it should be already available in pari-elldata
Patch22: %{name}-cremona.patch
Patch18: %{name}-cremona.patch
# lrslib is a requires
Patch23: %{name}-lrslib.patch
Patch19: %{name}-lrslib.patch
# nauty cannot be packaged due to license restrictions
# http://cs.anu.edu.au/~bdm/nauty/
# http://pallini.di.uniroma1.it/
Patch24: %{name}-nauty.patch
Patch20: %{name}-nauty.patch
# gap hap package not (yet) available
# http://www-gap.mcs.st-and.ac.uk/Packages/hap.html
Patch25: %{name}-gap-hap.patch
Patch21: %{name}-gap-hap.patch
# Patch to enable lrcalc once review request is done in Fedora
Patch26: %{name}-lrcalc.patch
Patch22: %{name}-lrcalc.patch
# Patch to enable cbc once review requests are done in Fedora
Patch27: %{name}-cbc.patch
Patch23: %{name}-cbc.patch
# Patch to enable libgap once review request is done in Fedora
Patch28: %{name}-libgap.patch
# Patch to disable libgap because it is not optional by default
Patch29: %{name}-nolibgap.patch
# Use system gap directories
Patch24: %{name}-libgap.patch
# Patch to enable fes once review requests are done in Fedora
Patch30: %{name}-fes.patch
Patch25: %{name}-fes.patch
# Get package to build with known problem if not yet updated to pari 2.6.
Patch31: %{name}-nopari2.6.patch
Patch26: %{name}-nopari2.6.patch
# sagemath 5.8 (optionally) requires cryptominisat 2.9.6 (in rawhide)
# sagemath 5.8 (optionally) requires cryptominisat 2.9.6 (in >= f19)
# and does not work with cryptominisat 2.9.5 (in f18)
Patch32: %{name}-cryptominisat.patch
Patch27: %{name}-cryptominisat.patch
# Adapt to m4rie 20130416
Patch33: %{name}-m4rie.patch
# Until cython is fixed for f18 and f19; just override wrong cython definition
# https://bugzilla.redhat.com/show_bug.cgi?id=961372
Patch34: %{name}-rh_bz_961372.patch
# Required if running python-flask-0.10.1
# sagemath expects python-flask-0.9
Patch35: %{name}-flask.patch
# Side effect of using distro packages
# https://bugzilla.redhat.com/show_bug.cgi?id=974769
Patch28: %{name}-sympy.patch
BuildRequires: 4ti2
BuildRequires: atlas-devel
@ -261,9 +231,7 @@ BuildRequires: iml-devel
BuildRequires: L-function-devel
BuildRequires: libfac-devel
BuildRequires: libfplll-devel
%if %{have_libgap}
BuildRequires: libgap-devel
%endif
BuildRequires: libmpc-devel
BuildRequires: linbox-devel
%if %{have_lrcalc}
@ -345,7 +313,6 @@ Requires: python-ipython
Requires: python-matplotlib
Requires: python-networkx
Requires: python-polybori
Requires: python-sphinx
Requires: python-twisted-web
Requires: python-twisted-web2
Requires: python-ZODB3
@ -369,6 +336,7 @@ Requires: tachyon
Requires: texlive
Requires: vecmath
# Missing build requires on armv7hl
ExclusiveArch: %{ix86} x86_64
%description
@ -643,11 +611,8 @@ popd
%patch0 -p1
%patch1 -p1
%patch2 -p1
%if 0%{?fedora} < 19
%patch3 -p1
%else
%patch4 -p1
%endif
%patch5 -p1
%patch6 -p1
%patch7 -p1
@ -657,73 +622,44 @@ popd
%patch11 -p1
%patch12 -p1
%patch13 -p1
%patch14 -p1
%if 0%{?fedora} >= 18
%patch15 -p1
%endif
pushd spkg/build/sage-%{version}
mkdir -p doc/pt/a_tour_of_sage/
cp -fa doc/en/a_tour_of_sage/*.png doc/pt/a_tour_of_sage/
%patch14 -p1
%patch15 -p1
%patch16 -p1
%patch17 -p1
%patch18 -p1
popd
%if 0%{?fedora} <= 19
%patch17 -p1
%patch18 -p1
%patch19 -p1
%endif
%patch20 -p1
%if 0%{?fedora} >= 18
%if 0%{?fedora} < 20
%patch21 -p1
%endif
%endif
%patch22 -p1
%patch23 -p1
%patch24 -p1
%patch25 -p1
%if %{have_lrcalc}
%patch26 -p1
%patch22 -p1
%endif
# other coin-or packages are build requires or coin-or-Cbc
%if %{have_coin_or_Cbc}
%patch27 -p1
%patch23 -p1
%endif
%if %{have_libgap}
%patch28 -p1
%else
%patch29 -p1
%endif
%patch24 -p1
%if %{have_fes}
%patch30 -p1
%patch25 -p1
%endif
%patch31 -p1
%patch26 -p1
%patch27 -p1
%patch28 -p1
%if 0%{?fedora} >= 19
%patch32 -p1
%endif
%if 0%{?fedora} == 19
%patch33 -p1
%endif
%if 0%{?fedora} <= 19
%patch34 -p1
%endif
%if 0%{?fedora} >= 20
%patch35 -p1
%endif
sed -e 's|@@SAGE_ROOT@@|%{SAGE_ROOT}|' \
-e 's|@@SAGE_DOC@@|%{SAGE_DOC}|' \
-i spkg/build/sage-%{version}/sage/env.py
#------------------------------------------------------------------------
# ensure proper/preferred libatlas is in linker path
@ -738,6 +674,7 @@ rm spkg/build/%{sagenb_pkg}/src/sagenb/sagenb/data/sage3d/lib/sage3d.jar
# remove binary egg
rm -r spkg/build/%{sagenb_pkg}/src/sagenb/sagenb.egg-info
###
########################################################################
%build
@ -745,34 +682,27 @@ export CFLAGS="%{optflags}"
export CXXFLAGS="%{optflags}"
export SAGE_ROOT=%{buildroot}%{SAGE_ROOT}
export SAGE_LOCAL=%{buildroot}%{SAGE_LOCAL}
export SAGE_SRC=%{buildroot}%{SAGE_SRC}
# Avoid buildroot in gcc command line (use _builddir instead)
export SAGE_SRC="$PWD/spkg/build/sage-%{version}"
export SAGE_FORTRAN=%{_bindir}/gfortran
export SAGE_FORTRAN_LIB=`gfortran --print-file-name=libgfortran.so`
%if 0%{?fedora} > 20
export SAGE_BLAS=satlas
%endif
export DESTDIR=%{buildroot}
# Use file in /tmp because there are issues with long pathnames
export DOT_SAGE=/tmp/sage$$
mkdir -p $DOT_SAGE/tmp
# match system packages as sagemath packages
export SAGE_ROOT=%{buildroot}%{SAGE_ROOT}
export SAGE_LOCAL=%{buildroot}%{SAGE_LOCAL}
export SAGE_SRC=%{buildroot}%{SAGE_SRC}
mkdir -p $SAGE_ROOT $SAGE_LOCAL $SAGE_SRC
ln -sf $PWD/spkg/build/sage-%{version}/sage $SAGE_SRC/sage
mkdir -p $SAGE_ROOT $SAGE_LOCAL #%{buildroot}%{SAGE_SRC}
ln -sf %{_libdir} $SAGE_LOCAL/lib
ln -sf %{_includedir} $SAGE_LOCAL/include
ln -sf %{_datadir} $SAGE_LOCAL/share
#ln -sf $SAGE_SRC/sage %{buildroot}%{SAGE_SRC}/sage
export PATH=%{buildroot}%{_bindir}:$PATH
export PYTHONPATH=%{buildroot}%{python_sitearch}:$PYTHONPATH
#------------------------------------------------------------------------
pushd spkg/build/sage-%{version}
sed -e 's|@@libdir@@|%{_libdir}|g' \
-i setup.py
pushd c_lib
# scons ignores most environment variables
# and does not have soname support
@ -1036,11 +966,7 @@ export PATH=$SAGE_LOCAL/bin:\$PATH
export SINGULARPATH=%{_libdir}/Singular/LIB
export SINGULAR_BIN_DIR=%{_libdir}/Singular
##export PYTHONPATH="$SAGE_PYTHONPATH:\$SAGE_LOCAL/bin"
%if 0%{?fedora} > 20
export SAGE_CBLAS=satlas
%else
export SAGE_CBLAS=cblas
%endif
export SAGE_FORTRAN=%{_bindir}/gfortran
export SAGE_FORTRAN_LIB=\`gfortran --print-file-name=libgfortran.so\`
export SYMPOW_DIR="\$DOT_SAGE/sympow"
@ -1186,23 +1112,19 @@ find %{buildroot}%{SAGE_DOC} -name .buildinfo -exec rm {} \;
rm -fr %{buildroot}%{SAGE_DOC}/output/inventory
find %{buildroot}%{SAGE_DOC} -type d -name _sources | xargs rm -fr
rm %{buildroot}%{python_sitearch}/sagenb/data/mathjax/.gitignore \
%{buildroot}%{python_sitearch}/sagenb/data/mathjax/docs/.gitignore
# remove bundles fonts
rm -r %{buildroot}%{python_sitearch}/sagenb/data/mathjax/fonts
# remove .po files
rm %{buildroot}%{python_sitearch}/sagenb/translations/*/LC_MESSAGES/*.po
# remove zero length files
rm %{buildroot}%{python_sitearch}/sage/server/notebook/compress/all.py* \
%{buildroot}%{python_sitearch}/sage/misc/test_cpickle_sage.py*
%if !%{with_sage3d}
rm -r %{buildroot}%{python_sitearch}/sagenb/data/sage3d
%endif
# remove cache files
rm -r %{buildroot}%{python_sitearch}/sagenb/data/.webassets-cache
# last install command
rm -fr $DOT_SAGE
@ -1391,6 +1313,8 @@ exit 0
%{python_sitearch}/sagenb/data/json
# ASL 2.0
%{python_sitearch}/sagenb/data/mathjax
# Empty (do not run doctests flag file)
%{python_sitearch}/sagenb/data/nodoctest.py*
# BSD
%{python_sitearch}/sagenb/data/openid-realselector
# GPLv2+
@ -1401,6 +1325,8 @@ exit 0
%endif
# LGPLv2+
%{python_sitearch}/sagenb/data/tiny_mce
# Auto generated files
%{python_sitearch}/sagenb/data/webassets_generated
# LGPLv2+
%{python_sitearch}/sagenb/data/zorn
# GPLv2+
@ -1449,8 +1375,8 @@ exit 0
########################################################################
%changelog
* Fri Oct 4 2013 pcpa <paulo.cesar.pereira.de.andrade@gmail.com> - 5.10-5
- Rebuild with newer rawhide atlas.
* Wed Oct 16 2013 pcpa <paulo.cesar.pereira.de.andrade@gmail.com> - 5.12-1
- Update to sagemath 5.12.
* Sat Sep 14 2013 pcpa <paulo.cesar.pereira.de.andrade@gmail.com> - 5.10-4
- Do not hardcode SAGE_BROWSER (#967251)