From cbf51d37bc416b7a3d6920679eaf493054710757 Mon Sep 17 00:00:00 2001 From: DistroBaker Date: Tue, 19 Jan 2021 12:30:41 +0000 Subject: [PATCH] Merged update from upstream sources This is an automated DistroBaker update from upstream sources. If you do not know what this is about or would like to opt out, contact the OSCI team. Source: https://src.fedoraproject.org/rpms/eigen3.git#c3963e2383405e51d9264c59cefa4fb84bfe7147 --- eigen3.spec | 9 ++++++++- eigen3_logp.patch | 27 +++++++++++++++++++++++++++ 2 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 eigen3_logp.patch diff --git a/eigen3.spec b/eigen3.spec index fab74a7..12ffc0d 100644 --- a/eigen3.spec +++ b/eigen3.spec @@ -18,13 +18,17 @@ Name: eigen3 Version: 3.3.9 -Release: 1%{?dist} +Release: 2%{?dist} Summary: A lightweight C++ template library for vector and matrix math License: MPLv2.0 and LGPLv2+ and BSD URL: http://eigen.tuxfamily.org/index.php?title=Main_Page Source0: https://gitlab.com/libeigen/eigen/-/archive/%{version}/eigen-%{version}.tar.bz2 +# Backport fix for conflicting declarations of log1p +# https://gitlab.com/libeigen/eigen/-/commit/d55d392e7b1136655b4223bea8e99cb2fe0a8afd.patch +Patch0: eigen3_logp.patch + BuildRequires: %{blaslib}-devel BuildRequires: fftw-devel BuildRequires: glew-devel @@ -112,6 +116,9 @@ rm -f %{_vpath_builddir}/doc/html/unsupported/installdox %changelog +* Tue Jan 19 2021 Sandro Mani - 3.3.9-2 +- Backport fix for conflicting declarations of log1p + * Sun Dec 06 2020 Sandro Mani - 3.3.9-1 - Update to 3.3.9 diff --git a/eigen3_logp.patch b/eigen3_logp.patch new file mode 100644 index 0000000..5ebfa20 --- /dev/null +++ b/eigen3_logp.patch @@ -0,0 +1,27 @@ +diff -rupN --no-dereference eigen-3.3.9/Eigen/src/Core/MathFunctions.h eigen-3.3.9-new/Eigen/src/Core/MathFunctions.h +--- eigen-3.3.9/Eigen/src/Core/MathFunctions.h 2020-12-04 22:53:41.000000000 +0100 ++++ eigen-3.3.9-new/Eigen/src/Core/MathFunctions.h 2021-01-19 12:32:05.328624222 +0100 +@@ -485,12 +485,22 @@ struct log1p_impl { + EIGEN_STATIC_ASSERT_NON_INTEGER(Scalar) + #if EIGEN_HAS_CXX11_MATH + using std::log1p; +- #endif ++ #else + using std_fallback::log1p; ++ #endif + return log1p(x); + } + }; + ++// Specialization for complex types that are not supported by std::log1p. ++template ++struct log1p_impl > { ++ EIGEN_DEVICE_FUNC static inline std::complex run( ++ const std::complex& x) { ++ EIGEN_STATIC_ASSERT_NON_INTEGER(RealScalar) ++ return std_fallback::log1p(x); ++ } ++}; + + template + struct log1p_retval