diff --git a/sagemath-sympy.patch b/sagemath-sympy.patch new file mode 100644 index 0000000..b3b417b --- /dev/null +++ b/sagemath-sympy.patch @@ -0,0 +1,21 @@ +diff -up sage-5.9/spkg/build/sage-5.9/sage/env.py.orig sage-5.9/spkg/build/sage-5.9/sage/env.py +--- sage-5.9/spkg/build/sage-5.9/sage/env.py.orig 2013-08-12 15:44:28.792116267 -0300 ++++ sage-5.9/spkg/build/sage-5.9/sage/env.py 2013-08-12 15:45:35.582118824 -0300 +@@ -34,7 +34,7 @@ SAGE_ENV = { + 'LOCAL_IDENTIFIER' : '$HOSTNAME.%s'%os.getpid(), + + # bunch of sage directories and files +- 'SAGE_ROOT' : None, ++ 'SAGE_ROOT' : '@@SAGE_ROOT@@', + 'SAGE_LOCAL' : opj('$SAGE_ROOT', 'local'), + 'SAGE_SHARE' : opj('$SAGE_LOCAL', 'share'), + # for backwards compatibility we include SAGE_DATA +@@ -43,7 +43,7 @@ SAGE_ENV = { + 'SAGE_PACKAGES' : opj('$SAGE_ROOT', 'spkg'), + 'SAGE_LOGS' : opj('$SAGE_ROOT', 'logs', 'pkgs'), + 'SAGE_SPKG_INST' : opj('$SAGE_ROOT', 'spkg', 'installed'), +- 'SAGE_DOC' : opj('$SAGE_ROOT', 'devel', 'sage', 'doc'), ++ 'SAGE_DOC' : '@@SAGE_DOC@@', + 'DOT_SAGE' : opj(os.environ.get('HOME','$SAGE_ROOT'), '.sage'), + # SAGE_LIB is the site-packages directory if the sage library + # has been installed, otherwise it is the same of SAGE_SRC diff --git a/sagemath.spec b/sagemath.spec index 4ced053..b2aa3f8 100644 --- a/sagemath.spec +++ b/sagemath.spec @@ -60,8 +60,6 @@ %global sagenb_pkg sagenb-0.10.4 %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 @@ -74,7 +72,7 @@ Name: sagemath Group: Applications/Engineering Summary: A free open-source mathematics software system Version: 5.9 -Release: 5%{?dist} +Release: 6%{?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 @@ -219,6 +217,10 @@ Patch33: %{name}-m4rie.patch # https://bugzilla.redhat.com/show_bug.cgi?id=961372 Patch34: %{name}-rh_bz_961372.patch +# Side effect of using distro packages +# https://bugzilla.redhat.com/show_bug.cgi?id=974769 +Patch35: %{name}-sympy.patch + BuildRequires: 4ti2 BuildRequires: atlas-devel BuildRequires: cddlib-tools @@ -707,6 +709,11 @@ popd %patch34 -p1 %endif +%patch35 -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 pushd spkg/build/sage-%{version} @@ -1433,6 +1440,9 @@ exit 0 ######################################################################## %changelog +* Mon Aug 12 2013 pcpa - 5.9-6 +- Correct side effect of using system mpmath (#974769) + * Sun May 12 2013 pcpa - 5.9-5 - Need one extra directory derefence in symlink SAGE_SRC symlink.