Merge commit 'cd0b7cec80' into f22

- Update to sagemath 6.5
- Add new Catalan and Hungarian doc subpackages
- Add customizations to not need a patched pari
- Add "with docs" test build option
- Convert build conditionals to use bcond
- Correct deprecated warning when loading sagenb
- Rebuild for NTL 9.1.0
This commit is contained in:
Jerry James 2015-05-14 06:40:34 -06:00
commit fab1283aaa
23 changed files with 346 additions and 203 deletions

View file

@ -1,30 +1,33 @@
%global __provides_exclude_from .*/site-packages/.*\\.so
# for faster full rpm test builds
%bcond_without docs
# not functional due to missing jar dependencies
%global with_sage3d 0
%bcond_with sage3d
# use an workaround to match upstream sagemath patched sphinx
%global with_sphinx_hack 1
%bcond_without sphinx_hack
%ifarch x86_64
%global have_fes 1
%bcond_without fes
%else
%global have_fes 0
%bcond_with fes
%endif
# set to run sage -testall in %%install
%global with_check 0
%bcond_with check
%global SAGE_TIMEOUT 60
%global SAGE_TIMEOUT_LONG 180
%global conway_polynomials_pkg conway_polynomials-0.4
%global elliptic_curves_pkg elliptic_curves-0.7
%global flintqs_pkg flintqs-20070817
%global graphs_pkg graphs-20120404
%global graphs_pkg graphs-20130920
%global pexpect_pkg pexpect-2.0
%global polytopes_db_pkg polytopes_db-20120220
%global rubiks_pkg rubiks-20070912
%global sagenb_pkg sagenb-0.11.1
%global sagenb_pkg sagenb-0.11.4
%global sagetex_pkg sagetex-2.3.4
%global SAGE_ROOT %{_libdir}/sagemath
@ -38,8 +41,8 @@
Name: sagemath
Group: Applications/Engineering
Summary: A free open-source mathematics software system
Version: 6.4.1
Release: 5%{?dist}
Version: 6.5
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
@ -142,6 +145,9 @@ Patch22: %{name}-sympy.patch
# Fix a name clash with NTL
Patch23: %{name}-ntl.patch
# Temporary patch: http://trac.sagemath.org/ticket/17657
Patch24: %{name}-parallel.patch
BuildRequires: 4ti2
BuildRequires: atlas-devel
BuildRequires: cddlib-tools
@ -155,7 +161,7 @@ BuildRequires: dvipng
BuildRequires: ecl
BuildRequires: eclib-devel
BuildRequires: factory-devel
%if %{have_fes}
%if %{with fes}
BuildRequires: fes-devel
%endif
BuildRequires: flint-devel >= 2.3
@ -208,16 +214,10 @@ BuildRequires: polybori-devel
BuildRequires: R
BuildRequires: ratpoints-devel
BuildRequires: readline-devel
%if 0%{?fedora} > 18
BuildRequires: rpy
%endif
BuildRequires: scons
BuildRequires: Singular-devel
%if 0%{?fedora} >= 18
BuildRequires: stix-math-fonts
%else
BuildRequires: stix-fonts
%endif
BuildRequires: sympow
BuildRequires: sympy
BuildRequires: symmetrica-devel
@ -273,11 +273,7 @@ Requires: %{name}-notebook
Requires: %{name}-rubiks
Requires: %{name}-sagetex
Requires: Singular
%if 0%{?fedora} >= 18
Requires: stix-math-fonts
%else
Requires: stix-fonts
%endif
Requires: sympow
Requires: sympy
Requires: tachyon
@ -387,6 +383,7 @@ Requires: %{name}%{?_isa} = %{version}-%{release}
This package contains the header files and development documentation
for %{name}.
%if %{with docs}
#------------------------------------------------------------------------
%package doc
Summary: Documentation infrastructure files for %{name}
@ -396,6 +393,16 @@ BuildArch: noarch
%description doc
This package contains the documentation infrastructure for %{name}.
#------------------------------------------------------------------------
%package doc-ca
Summary: Catalan documentation files for %{name}
Group: Documentation
Requires: %{name}-doc = %{version}-%{release}
BuildArch: noarch
%description doc-ca
This package contains the Catalan %{name} documentation.
#------------------------------------------------------------------------
%package doc-de
Summary: German documentation files for %{name}
@ -426,6 +433,16 @@ BuildArch: noarch
%description doc-fr
This package contains the French %{name} documentation.
#------------------------------------------------------------------------
%package doc-hu
Summary: Hungarian documentation files for %{name}
Group: Documentation
Requires: %{name}-doc = %{version}-%{release}
BuildArch: noarch
%description doc-hu
This package contains the Hungarian %{name} documentation.
#------------------------------------------------------------------------
%package doc-it
Summary: Italian documentation files for %{name}
@ -465,6 +482,8 @@ BuildArch: noarch
%description doc-tr
This package contains the Turkish %{name} documentation.
# with docs
%endif
#------------------------------------------------------------------------
%package notebook
@ -587,6 +606,7 @@ popd
%patch5
%patch6
%patch7
%patch8
%patch9
%patch10
@ -600,13 +620,14 @@ popd
%patch18
%patch19
%if %{have_fes}
%if %{with fes}
%patch20
%endif
%patch21
%patch22
%patch23
%patch24
sed -e 's|@@SAGE_ROOT@@|%{SAGE_ROOT}|' \
-e 's|@@SAGE_DOC@@|%{SAGE_DOC}|' \
@ -697,6 +718,14 @@ pushd build/pkgs/rubiks/src
make %{?_smp_mflags} CC="gcc -fPIC" CXX="g++ -fPIC" CFLAGS="%{optflags}" CXXFLAGS="%{optflags}"
popd
# Remove buildroot reference from cython comments
perl -pi -e 's|%{buildroot}||g;' `find src/build/cythonized -type f`
# Try hard to remove buildroot from binaries
rm -f `grep -lr "%{buildroot}" src/build/lib.linux-*/`
pushd src
python ./setup.py build
popd
# last build command
rm -fr $DOT_SAGE
@ -734,9 +763,11 @@ pushd src
python setup.py install --root=%{buildroot}
cp -fa c_lib/libcsage.so.0 %{buildroot}%{_libdir}
ln -sf libcsage.so.0 %{buildroot}%{_libdir}/libcsage.so
%if %{with docs}
# install documentation sources
rm -fr $SAGE_DOC/{common,en,fr}
cp -far doc/{common,de,en,fr,pt,ru,tr} $SAGE_DOC
cp -far doc/{common,ca,de,en,fr,hu,it,pt,ru,tr} $SAGE_DOC
%endif
popd
#------------------------------------------------------------------------
@ -747,7 +778,7 @@ pushd build/pkgs/sagenb/src/%{sagenb_pkg}
ln -sf %{_jsdir}/jsmol $SAGE_SHARE/jsmol
# sage3d
rm -f %{buildroot}%{_bindir}/sage3d
%if %{with_sage3d}
%if %{with sage3d}
ln -sf %{SAGE_LOCAL}/bin/sage3d %{buildroot}%{python_sitearch}/sagenb/data/sage3d/sage3d
%endif
ln -sf %{python_sitearch}/sagenb %{buildroot}%{SAGE_SRC}/sagenb
@ -928,7 +959,7 @@ EOF
chmod +x %{buildroot}%{_bindir}/sage
#------------------------------------------------------------------------
%if %{with_sage3d}
%if %{with sage3d}
cat > %{buildroot}%{SAGE_LOCAL}/bin/sage3d << EOF
#!/bin/sh
@ -953,6 +984,7 @@ pushd src
touch %{buildroot}%{python_sitearch}/sage/libs/gmp/__init__.py
popd
%if %{with docs}
#------------------------------------------------------------------------
cp -f $SAGE_PYTHONPATH/{ANSI,FSM,pexpect,pxssh,screen}.py %{buildroot}%{python_sitearch}
@ -965,7 +997,7 @@ pushd src/doc
export LD_LIBRARY_PATH=%{buildroot}%{_libdir}:%{_libdir}/atlas:$LD_LIBRARY_PATH
export PYTHONPATH=%{buildroot}%{python_sitearch}:$SAGE_PYTHONPATH:$SAGE_DOC
%if %{with_sphinx_hack}
%if %{with sphinx_hack}
cp -far %{python_sitelib}/sphinx %{buildroot}%{python_sitearch}
sed -i "s|\(source.startswith('>>>')\)|\1 or source.startswith('sage: ')|" \
%{buildroot}%{python_sitearch}/sphinx/highlighting.py
@ -981,7 +1013,7 @@ pushd src/doc
rm -fr $SAGE_DOC/output/doctrees
popd
%if %{with_check}
%if %{with check}
export SAGE_TIMEOUT=%{SAGE_TIMEOUT}
export SAGE_TIMEOUT_LONG=%{SAGE_TIMEOUT_LONG}
sage -testall --verbose || :
@ -992,17 +1024,19 @@ sed -i 's|%{buildroot}||g' $SAGE_DOC/test.log
rm -f %{buildroot}%{python_sitearch}/{ANSI,FSM,pexpect,pxssh,screen}.py{,c}
%if %{with_sphinx_hack}
%if %{with sphinx_hack}
rm -fr %{buildroot}%{python_sitearch}/sphinx
%endif
# Script was used to build documentation
perl -pi -e 's|%{buildroot}||g;s|^##||g;' %{buildroot}%{_bindir}/sage
# More wrong buildroot references
perl -pi -e 's|%{buildroot}||g;' \
-e "s|$PWD/src/doc|%{SAGE_DOC}|g;" \
%{buildroot}%{SAGE_DOC}/output/html/en/reference/todolist.html
# with docs
%endif
# Script was used to build documentation
perl -pi -e 's|%{buildroot}||g;s|^##||g;' %{buildroot}%{_bindir}/sage
#------------------------------------------------------------------------
# Fix links
@ -1044,12 +1078,15 @@ for file in `find %{buildroot} -name \*.py`; do
chmod +x $file
fi
done
%if %{with docs}
chmod -x %{buildroot}%{SAGE_DOC}/en/prep/media/Rplot001.png
# Documentation is not rebuilt (also corrects rpmlint warning of hidden file)
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
%endif
# remove bundles fonts
rm -r %{buildroot}%{python_sitearch}/sagenb/data/mathjax/fonts
@ -1057,7 +1094,7 @@ rm -r %{buildroot}%{python_sitearch}/sagenb/data/mathjax/fonts
# remove .po files
rm %{buildroot}%{python_sitearch}/sagenb/translations/*/LC_MESSAGES/*.po
%if !%{with_sage3d}
%if %{without sage3d}
rm -r %{buildroot}%{python_sitearch}/sagenb/data/sage3d
%endif
@ -1165,6 +1202,7 @@ exit 0
%{_includedir}/csage
%{_libdir}/libcsage.so
%if %{with docs}
#------------------------------------------------------------------------
%files doc
# GPLv2+
@ -1173,6 +1211,12 @@ exit 0
%dir %{SAGE_DOC}/output
%dir %{SAGE_DOC}/output/html
#------------------------------------------------------------------------
%files doc-ca
# GPLv2+
%{SAGE_DOC}/ca
%{SAGE_DOC}/output/html/ca
#------------------------------------------------------------------------
%files doc-de
# GPLv2+
@ -1191,9 +1235,16 @@ exit 0
%{SAGE_DOC}/fr
%{SAGE_DOC}/output/html/fr
#------------------------------------------------------------------------
%files doc-hu
# GPLv2+
%{SAGE_DOC}/hu
%{SAGE_DOC}/output/html/hu
#------------------------------------------------------------------------
%files doc-it
# GPLv2+
%{SAGE_DOC}/it
%{SAGE_DOC}/output/html/it
#------------------------------------------------------------------------
@ -1213,6 +1264,8 @@ exit 0
# GPLv2+
%{SAGE_DOC}/tr
%{SAGE_DOC}/output/html/tr
# with docs
%endif
#------------------------------------------------------------------------
%files notebook
@ -1244,7 +1297,7 @@ exit 0
%{python_sitearch}/sagenb/data/openid-realselector
# GPLv2+
%{python_sitearch}/sagenb/data/sage
%if %{with_sage3d}
%if %{with sage3d}
# GPLv2+
%{python_sitearch}/sagenb/data/sage3d
%endif
@ -1301,6 +1354,14 @@ exit 0
########################################################################
%changelog
* Thu May 14 2015 pcpa <paulo.cesar.pereira.de.andrade@gmail.com> - 6.5-1
- Update to sagemath 6.5
- Add new Catalan and Hungarian doc subpackages
- Add customizations to not need a patched pari
- Add "with docs" test build option
- Convert build conditionals to use bcond
- Correct deprecated warning when loading sagenb
* Tue May 5 2015 Peter Robinson <pbrobinson@fedoraproject.org> 6.4.1-5
- Build on ARMv7 (deps now provided)