diff --git a/Make_relative_path_variables_of_type_STRING.patch b/Make_relative_path_variables_of_type_STRING.patch new file mode 100644 index 0000000000000000000000000000000000000000..43e0af6863bbb5705123540bc8e425abfecc10bd --- /dev/null +++ b/Make_relative_path_variables_of_type_STRING.patch @@ -0,0 +1,42 @@ +From 1b080fdcb96455cdfa0f955cc7f24f7e51da0639 Mon Sep 17 00:00:00 2001 +From: Alexander Grund +Date: Mon, 28 Sep 2020 16:39:48 +0000 +Subject: [PATCH] Make relative path variables of type STRING + +When the type is PATH an absolute path is expected and user-defined +values are converted into absolute paths relative to the current directory. + +Fixes #1990 + +(cherry picked from commit a967fadb21c17622c6cdec13ad9c827054624eb4) +--- + CMakeLists.txt | 13 +++++++++---- + 1 file changed, 9 insertions(+), 4 deletions(-) + +--- a/CMakeLists.txt 2021-08-19 04:41:58.000000000 +0800 ++++ b/CMakeLists.txt 2022-06-14 11:24:31.569759300 +0800 +@@ -427,20 +427,20 @@ + + if(EIGEN_INCLUDE_INSTALL_DIR AND NOT INCLUDE_INSTALL_DIR) + set(INCLUDE_INSTALL_DIR ${EIGEN_INCLUDE_INSTALL_DIR} +- CACHE PATH "The directory relative to CMAKE_INSTALL_PREFIX where Eigen header files are installed") ++ CACHE STRING "The directory relative to CMAKE_INSTALL_PREFIX where Eigen header files are installed") + else() + set(INCLUDE_INSTALL_DIR + "${CMAKE_INSTALL_INCLUDEDIR}/eigen3" +- CACHE PATH "The directory relative to CMAKE_INSTALL_PREFIX where Eigen header files are installed" ++ CACHE STRING "The directory relative to CMAKE_INSTALL_PREFIX where Eigen header files are installed" + ) + endif() + set(CMAKEPACKAGE_INSTALL_DIR + "${CMAKE_INSTALL_DATADIR}/eigen3/cmake" +- CACHE PATH "The directory relative to CMAKE_INSTALL_PREFIX where Eigen3Config.cmake is installed" ++ CACHE STRING "The directory relative to CMAKE_INSTALL_PREFIX where Eigen3Config.cmake is installed" + ) + set(PKGCONFIG_INSTALL_DIR + "${CMAKE_INSTALL_DATADIR}/pkgconfig" +- CACHE PATH "The directory relative to CMAKE_INSTALL_PREFIX where eigen3.pc is installed" ++ CACHE STRING "The directory relative to CMAKE_INSTALL_PREFIX where eigen3.pc is installed" + ) + + foreach(var INCLUDE_INSTALL_DIR CMAKEPACKAGE_INSTALL_DIR PKGCONFIG_INSTALL_DIR) diff --git a/eigen-3.4.0.tar.bz2 b/eigen-3.4.0.tar.bz2 new file mode 100644 index 0000000000000000000000000000000000000000..b182c40516f8e83806d718868df1284007a35a6e Binary files /dev/null and b/eigen-3.4.0.tar.bz2 differ diff --git a/eigen3.spec b/eigen3.spec new file mode 100644 index 0000000000000000000000000000000000000000..3b48b47cd510157dc7cf07b001111a98bfcaffc0 --- /dev/null +++ b/eigen3.spec @@ -0,0 +1,107 @@ +# 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} + + +%global blaslib openblas + +Name: eigen3 +Version: 3.4.0 +Release: 1 +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 +Patch01: Make_relative_path_variables_of_type_STRING.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 +BuildRequires: qt-devel +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. + + +%prep +%autosetup -p1 -n eigen-%{version} + + +%build +%cmake \ + -DINCLUDE_INSTALL_DIR=include/%{name} \ + -DBLAS_LIBRARIES="-l%{blaslib}" \ + -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 + + +%install +cd build +%cmake_install + + +%check +export EIGEN_SEED=100 +export EIGEN_REPEAT=1 +ctest -V + +%files devel +%license COPYING.README COPYING.BSD COPYING.MPL2 COPYING.LGPL +%{_includedir}/%{name} +%{_datadir}/cmake/%{name} +%{_datadir}/pkgconfig/%{name}.pc + +%files doc +%doc build/doc/html + + +%changelog +* Wed Jun 15 2022 lvxiaoqian - 3.4.0-1 +- Initial package