# The (empty) main package is arch, to have the package built and tests run # on all arches, but the actual result package is the noarch -devel subpackge. # Debuginfo packages are disabled to prevent rpmbuild from generating an empty # debuginfo package for the empty main package. %global debug_package %{nil} # FIXME ICE on ppc64le when buildings docs with optflags %ifarch ppc64le %global optflags %{nil} %endif %if 0%{?fedora} >= 33 || 0%{?rhel} >= 9 %global blaslib flexiblas %global cmake_blas_flags -DBLA_VENDOR=FlexiBLAS %else %global blaslib openblas %global blasvar o %global cmake_blas_flags -DBLAS_LIBRARIES=%{_libdir}/lib%{blaslib}%{blasvar}.so %endif %if 0%{?rhel} >= 8 %bcond_with qt %else %bcond_without qt %endif Name: eigen3 Version: 3.3.9 Release: 7%{?dist} Summary: A lightweight C++ template library for vector and matrix math License: MPLv2.0 and LGPLv2+ and BSD and Minpack 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 BuildRequires: gmp-devel BuildRequires: gsl-devel BuildRequires: mpfr-devel BuildRequires: sparsehash-devel BuildRequires: suitesparse-devel BuildRequires: gcc-gfortran BuildRequires: SuperLU-devel %if %{with qt} BuildRequires: qt-devel %endif BuildRequires: scotch-devel BuildRequires: metis-devel BuildRequires: cmake BuildRequires: make BuildRequires: gcc-c++ BuildRequires: doxygen BuildRequires: graphviz BuildRequires: tex(latex) %description %{summary}. %package devel Summary: A lightweight C++ template library for vector and matrix math BuildArch: noarch # -devel subpkg only atm, compat with other distros Provides: %{name} = %{version}-%{release} # not *strictly* a -static pkg, but the results are the same Provides: %{name}-static = %{version}-%{release} %description devel %{summary}. %package doc Summary: Developer documentation for Eigen Requires: %{name}-devel = %{version}-%{release} BuildArch: noarch %description doc Developer documentation for Eigen. %global __cmake_in_source_build 1 %prep %autosetup -p1 -n eigen-%{version} %build mkdir -p build pushd build %cmake .. \ -DINCLUDE_INSTALL_DIR=include/%{name} \ %{cmake_blas_flags} \ -DSUPERLU_INCLUDES=%{_includedir}/SuperLU \ -DSCOTCH_INCLUDES=%{_includedir} -DSCOTCH_LIBRARIES="scotch" \ -DMETIS_INCLUDES=%{_includedir} -DMETIS_LIBRARIES="metis" \ -DCMAKEPACKAGE_INSTALL_DIR=share/cmake/%{name} %cmake_build %cmake_build --target doc rm -f doc/html/installdox rm -f doc/html/unsupported/installdox popd %install pushd build %cmake_install popd %files devel %license COPYING.README COPYING.BSD COPYING.MPL2 COPYING.LGPL COPYING.MINPACK %{_includedir}/%{name} %{_datadir}/cmake/%{name} %{_datadir}/pkgconfig/%{name}.pc %files doc %doc build/doc/html %changelog * Wed Jul 28 2021 Balint Cristian - 3.3.9-20210728 - Rebuild for rhel 8 * Wed Jul 21 2021 Fedora Release Engineering - 3.3.9-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild