From 173cd60d9a5a1b78159c5e06adcc9fbec18abb7b Mon Sep 17 00:00:00 2001 From: pcpa Date: Sat, 11 May 2013 12:46:42 -0300 Subject: [PATCH] Add patch to workaround cython wrong defs (#961372) --- sagemath-rh_bz_961372.patch | 14 ++++++++++++++ sagemath.spec | 13 ++++++++++++- 2 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 sagemath-rh_bz_961372.patch diff --git a/sagemath-rh_bz_961372.patch b/sagemath-rh_bz_961372.patch new file mode 100644 index 0000000..6bd7238 --- /dev/null +++ b/sagemath-rh_bz_961372.patch @@ -0,0 +1,14 @@ +diff -up sage-5.9/spkg/build/sage-5.9/sage/ext/cdefs.pxi.orig sage-5.9/spkg/build/sage-5.9/sage/ext/cdefs.pxi +--- sage-5.9/spkg/build/sage-5.9/sage/ext/cdefs.pxi.orig 2013-04-25 10:00:51.000000000 -0300 ++++ sage-5.9/spkg/build/sage-5.9/sage/ext/cdefs.pxi 2013-05-11 11:30:58.472438774 -0300 +@@ -7,6 +7,9 @@ include "python.pxi" + from libc.stdio cimport * + from libc.string cimport strlen, strcpy, memset, memcpy + +-from libc.math cimport sqrt, frexp, ldexp ++cdef extern from "math.h": ++ cdef double sqrt "sqrt" (double) ++ cdef double frexp "frexp" (double, int*) ++ cdef double ldexp "ldexp" (double, int) + + from sage.libs.gmp.all cimport * diff --git a/sagemath.spec b/sagemath.spec index 8b5d8f4..95a69e1 100644 --- a/sagemath.spec +++ b/sagemath.spec @@ -74,7 +74,7 @@ Name: sagemath Group: Applications/Engineering Summary: A free open-source mathematics software system Version: 5.9 -Release: 1%{?dist} +Release: 2%{?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 @@ -215,6 +215,10 @@ Patch32: %{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 + BuildRequires: 4ti2 BuildRequires: atlas-devel BuildRequires: cddlib-tools @@ -699,6 +703,10 @@ popd %patch33 -p1 %endif +%if 0%{?fedora} <= 19 +%patch34 -p1 +%endif + #------------------------------------------------------------------------ # ensure proper/preferred libatlas is in linker path pushd spkg/build/sage-%{version} @@ -1415,6 +1423,9 @@ exit 0 ######################################################################## %changelog +* Sat May 11 2013 pcpa - 5.9-2 +- Build in f18 and f18 with workaround to cython wrong defines (#961372) + * Mon May 6 2013 pcpa - 5.9-1 - Update to sagemath 5.9. - Match upstream rename of SAGE_DEVEL to SAGE_SRC.