diff --git a/gcc-6-compile.patch b/gcc-6-compile.patch new file mode 100644 index 0000000..bd6c16b --- /dev/null +++ b/gcc-6-compile.patch @@ -0,0 +1,29 @@ +Subject: Fix compilation with gcc 6 + +The compiler emits: +MathStructure.cc: In function 'bool sr_gcd(const MathStructure&, const MathStructure&, MathStructure&, std::vector::const_iterator, const EvaluationOptions&)': +MathStructure.cc:7166:53: error: no matching function for call to 'MathStructure::gcd(MathStructure&, MathStructure&, MathStructure&, const EvaluationOptions&, bool)' + MathStructure::gcd(cont_c, cont_d, gamma, eo, false); + ^ +In file included from MathStructure.cc:14:0: +MathStructure.h:827:15: note: candidate: static bool MathStructure::gcd(const MathStructure&, const MathStructure&, MathStructure&, const EvaluationOptions&, MathStructure*, MathStructure*, bool) + static bool gcd(const MathStructure &m1, const MathStructure &m2, MathStructure &mresult, const EvaluationOptions &eo, MathStructure *ca = NULL, MathStructure *cb = NULL, bool check_args = true); + ^~~ +MathStructure.h:827:15: note: no known conversion for argument 5 from 'bool' to 'MathStructure*' + +Pass down NULL instead of false. + +This is a patch from Fedora. See: +https://bugzilla.redhat.com/show_bug.cgi?id=1307731 + +--- a/libqalculate/MathStructure.cc-orig 2016-02-16 22:36:08.951985517 -0500 ++++ b/libqalculate/MathStructure.cc 2016-02-16 22:36:40.285420886 -0500 +@@ -7163,7 +7163,7 @@ + c.polynomialContent(xvar, cont_c, eo); + d.polynomialContent(xvar, cont_d, eo); + MathStructure gamma; +- MathStructure::gcd(cont_c, cont_d, gamma, eo, false); ++ MathStructure::gcd(cont_c, cont_d, gamma, eo, NULL); + if(ddeg.isZero()) { + mgcd = gamma; + return true; diff --git a/qalculate.changes b/qalculate.changes index 494ba0c..7af0aa0 100644 --- a/qalculate.changes +++ b/qalculate.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Wed May 25 19:38:18 UTC 2016 - jslaby@suse.com + +- add gcc-6-compile.patch: Fix compilation with gcc 6 + ------------------------------------------------------------------- Tue Nov 20 17:23:54 UTC 2012 - nico.kruber@gmail.com diff --git a/qalculate.spec b/qalculate.spec index f18edad..47a1fd0 100644 --- a/qalculate.spec +++ b/qalculate.spec @@ -28,6 +28,8 @@ Version: 0.9.7 Release: 0 Url: http://qalculate.sourceforge.net/ Source0: %{libname}-%{version}.tar.bz2 +# PATCH-FIX-UPSTREAM gcc-6-compile.patch jslaby@suse.com -- Fix compilation with gcc 6 +Patch0: gcc-6-compile.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: cln-devel BuildRequires: gcc-c++ @@ -76,6 +78,7 @@ you will need to install %{libname}-devel. %prep %setup -q -n %{libname}-%{version} +%patch0 -p1 %build %configure --disable-static --disable-rpath