Update to work with latest rawhide atlas

This commit is contained in:
pcpa 2013-10-05 03:10:30 -03:00
parent 79a9bb596b
commit 11b0fd500d
2 changed files with 25 additions and 23 deletions

View file

@ -104,7 +104,7 @@ diff -up sage-5.10/spkg/build/sage-5.10/setup.py.orig sage-5.10/spkg/build/sage-
m.extra_compile_args += extra_compile_args m.extra_compile_args += extra_compile_args
m.extra_link_args += extra_link_args m.extra_link_args += extra_link_args
- m.library_dirs += ['%s/lib' % SAGE_LOCAL] - m.library_dirs += ['%s/lib' % SAGE_LOCAL]
+ m.library_dirs += ['c_lib', '%s/lib' % SAGE_LOCAL] + m.library_dirs += ['@@libdir@@/atlas', 'c_lib', '%s/lib' % SAGE_LOCAL]

View file

@ -60,6 +60,8 @@
%global sagenb_pkg sagenb-0.10.4 %global sagenb_pkg sagenb-0.10.4
%global sagetex_pkg sagetex-2.3.4 %global sagetex_pkg sagetex-2.3.4
%global sagemath_share %{_datadir}/%{name}
%global SAGE_ROOT %{_libdir}/sagemath %global SAGE_ROOT %{_libdir}/sagemath
%global SAGE_LOCAL %{SAGE_ROOT}/local %global SAGE_LOCAL %{SAGE_ROOT}/local
%global SAGE_SRC %{SAGE_ROOT}/src %global SAGE_SRC %{SAGE_ROOT}/src
@ -72,7 +74,7 @@ Name: sagemath
Group: Applications/Engineering Group: Applications/Engineering
Summary: A free open-source mathematics software system Summary: A free open-source mathematics software system
Version: 5.10 Version: 5.10
Release: 4%{?dist} Release: 2%{?dist}
# The file ${SAGE_ROOT}/COPYING.txt is the upstream license breakdown file # The file ${SAGE_ROOT}/COPYING.txt is the upstream license breakdown file
# Additionally, every $files section has a comment with the license name # Additionally, every $files section has a comment with the license name
# before files with that license # before files with that license
@ -221,10 +223,6 @@ Patch34: %{name}-rh_bz_961372.patch
# sagemath expects python-flask-0.9 # sagemath expects python-flask-0.9
Patch35: %{name}-flask.patch Patch35: %{name}-flask.patch
# Side effect of using distro packages
# https://bugzilla.redhat.com/show_bug.cgi?id=974769
Patch36: %{name}-sympy.patch
BuildRequires: 4ti2 BuildRequires: 4ti2
BuildRequires: atlas-devel BuildRequires: atlas-devel
BuildRequires: cddlib-tools BuildRequires: cddlib-tools
@ -290,7 +288,6 @@ BuildRequires: python-flask-silk
BuildRequires: python-ipython BuildRequires: python-ipython
BuildRequires: python-matplotlib BuildRequires: python-matplotlib
BuildRequires: python-networkx BuildRequires: python-networkx
BuildRequires: python-sphinx
BuildRequires: python-twisted-web BuildRequires: python-twisted-web
BuildRequires: python-twisted-web2 BuildRequires: python-twisted-web2
BuildRequires: polybori-devel BuildRequires: polybori-devel
@ -311,7 +308,6 @@ BuildRequires: sympow
BuildRequires: sympy BuildRequires: sympy
BuildRequires: symmetrica-devel BuildRequires: symmetrica-devel
BuildRequires: texlive BuildRequires: texlive
BuildRequires: zn_poly-devel
Requires: 4ti2 Requires: 4ti2
Requires: apache-commons-cli Requires: apache-commons-cli
@ -370,7 +366,6 @@ Requires: tachyon
Requires: texlive Requires: texlive
Requires: vecmath Requires: vecmath
# Missing build requires on armv7hl
ExclusiveArch: %{ix86} x86_64 ExclusiveArch: %{ix86} x86_64
%description %description
@ -727,11 +722,6 @@ popd
%patch35 -p1 %patch35 -p1
%endif %endif
%patch36 -p1
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 # ensure proper/preferred libatlas is in linker path
pushd spkg/build/sage-%{version} pushd spkg/build/sage-%{version}
@ -755,6 +745,9 @@ export SAGE_LOCAL=%{buildroot}%{SAGE_LOCAL}
export SAGE_SRC=%{buildroot}%{SAGE_SRC} export SAGE_SRC=%{buildroot}%{SAGE_SRC}
export SAGE_FORTRAN=%{_bindir}/gfortran export SAGE_FORTRAN=%{_bindir}/gfortran
export SAGE_FORTRAN_LIB=`gfortran --print-file-name=libgfortran.so` export SAGE_FORTRAN_LIB=`gfortran --print-file-name=libgfortran.so`
%if 0%{?fedora} > 20
export SAGE_BLAS=satlas
%endif
export DESTDIR=%{buildroot} export DESTDIR=%{buildroot}
# Use file in /tmp because there are issues with long pathnames # Use file in /tmp because there are issues with long pathnames
export DOT_SAGE=/tmp/sage$$ export DOT_SAGE=/tmp/sage$$
@ -775,6 +768,8 @@ export PYTHONPATH=%{buildroot}%{python_sitearch}:$PYTHONPATH
#------------------------------------------------------------------------ #------------------------------------------------------------------------
pushd spkg/build/sage-%{version} pushd spkg/build/sage-%{version}
sed -e 's|@@libdir@@|%{_libdir}|g' \
-i setup.py
pushd c_lib pushd c_lib
# scons ignores most environment variables # scons ignores most environment variables
# and does not have soname support # and does not have soname support
@ -1038,12 +1033,17 @@ export PATH=$SAGE_LOCAL/bin:\$PATH
export SINGULARPATH=%{_libdir}/Singular/LIB export SINGULARPATH=%{_libdir}/Singular/LIB
export SINGULAR_BIN_DIR=%{_libdir}/Singular export SINGULAR_BIN_DIR=%{_libdir}/Singular
##export PYTHONPATH="$SAGE_PYTHONPATH:\$SAGE_LOCAL/bin" ##export PYTHONPATH="$SAGE_PYTHONPATH:\$SAGE_LOCAL/bin"
%if 0%{?fedora} > 20
export SAGE_CBLAS=satlas
%else
export SAGE_CBLAS=cblas export SAGE_CBLAS=cblas
%endif
export SAGE_FORTRAN=%{_bindir}/gfortran export SAGE_FORTRAN=%{_bindir}/gfortran
export SAGE_FORTRAN_LIB=\`gfortran --print-file-name=libgfortran.so\` export SAGE_FORTRAN_LIB=\`gfortran --print-file-name=libgfortran.so\`
export SYMPOW_DIR="\$DOT_SAGE/sympow" export SYMPOW_DIR="\$DOT_SAGE/sympow"
export LC_MESSAGES=C export LC_MESSAGES=C
export LC_NUMERIC=C export LC_NUMERIC=C
export SAGE_BROWSER=firefox
MALLOC_CHECK_=1 $SAGE_LOCAL/bin/sage "\$@" MALLOC_CHECK_=1 $SAGE_LOCAL/bin/sage "\$@"
EOF EOF
#------------------------------------------------------------------------ #------------------------------------------------------------------------
@ -1205,6 +1205,15 @@ rm -r %{buildroot}%{python_sitearch}/sagenb/data/sage3d
rm -fr $DOT_SAGE rm -fr $DOT_SAGE
######################################################################## ########################################################################
%pretrans
# Temporary due to moving directory to symlink
if [ ! -L %{SAGE_ROOT}/devel -a -d %{SAGE_ROOT}/devel ]; then
mkdir %{SAGE_SRC}
mv %{SAGE_ROOT}/devel/* %{SAGE_SRC}
rmdir %{SAGE_ROOT}/devel
ln -s src %{SAGE_ROOT}/devel
fi
%post core %post core
/sbin/ldconfig /sbin/ldconfig
exit 0 exit 0
@ -1447,15 +1456,8 @@ exit 0
######################################################################## ########################################################################
%changelog %changelog
* Sat Sep 14 2013 pcpa <paulo.cesar.pereira.de.andrade@gmail.com> - 5.10-4 * Fri Oct 4 2013 pcpa <paulo.cesar.pereira.de.andrade@gmail.com> - 5.10-2
- Do not hardcode SAGE_BROWSER (#967251) - Rebuild with newer rawhide atlas.
- Remove pre(trans) scriptlet used to upgrade from prototype packages
* Tue Sep 10 2013 Rex Dieter <rdieter@fedoraproject.org> 5.10-3
- pretrans scriplet uses shell commands (#1006230)
* Mon Aug 12 2013 pcpa <paulo.cesar.pereira.de.andrade@gmail.com> - 5.10-2
- Correct side effect of using system mpmath (#974769)
* Mon Aug 5 2013 pcpa <paulo.cesar.pereira.de.andrade@gmail.com> - 5.10-1 * Mon Aug 5 2013 pcpa <paulo.cesar.pereira.de.andrade@gmail.com> - 5.10-1
- Update to sagemath 5.10. - Update to sagemath 5.10.