From 76448f522dcbbbd8fdba89a75f712b23201f5cd6 Mon Sep 17 00:00:00 2001 From: Yaakov Selkowitz Date: Thu, 15 Jun 2023 11:00:21 -0400 Subject: [PATCH] Avoid extra test dependencies in RHEL builds These extra dependencies are only used to test optional integration with these libraries, and are otherwise unnecessary or unwanted in RHEL. This is based on c9s: https://gitlab.com/redhat/centos-stream/rpms/eigen3/-/commit/8d601598fadacf2b4f1defac4100eb8e311cf9d5 --- eigen3.spec | 36 ++++++++++++++++++++++++++++-------- 1 file changed, 28 insertions(+), 8 deletions(-) diff --git a/eigen3.spec b/eigen3.spec index 34a3670..b6e79fa 100644 --- a/eigen3.spec +++ b/eigen3.spec @@ -13,15 +13,16 @@ %global cmake_blas_flags -DBLAS_LIBRARIES=%{_libdir}/lib%{blaslib}%{blasvar}.so %endif -%if 0%{?rhel} -%bcond_with mingw -%else -%bcond_without mingw -%endif +%bcond mingw %{undefined rhel} +%bcond sparsehash %{undefined rhel} +%bcond suitesparse %{undefined rhel} +%bcond SuperLU %{undefined rhel} +%bcond scotch %{undefined rhel} +%bcond metis %{undefined rhel} Name: eigen3 Version: 3.4.0 -Release: 9%{?dist} +Release: 10%{?dist} Summary: A lightweight C++ template library for vector and matrix math License: MPL-2.0 AND LGPL-2.0-or-later AND BSD-3-Clause AND Minpack @@ -36,12 +37,22 @@ BuildRequires: glew-devel BuildRequires: gmp-devel BuildRequires: gsl-devel BuildRequires: mpfr-devel -BuildRequires: sparsehash-devel -BuildRequires: suitesparse-devel BuildRequires: gcc-gfortran +%if %{with sparsehash} +BuildRequires: sparsehash-devel +%endif +%if %{with suitesparse} +BuildRequires: suitesparse-devel +%endif +%if %{with SuperLU} BuildRequires: SuperLU-devel +%endif +%if %{with scotch} BuildRequires: scotch-devel +%endif +%if %{with metis} BuildRequires: metis-devel +%endif BuildRequires: cmake BuildRequires: make @@ -118,9 +129,15 @@ BuildArch: noarch -DINCLUDE_INSTALL_DIR=%{_includedir}/%{name} \ -DCMAKEPACKAGE_INSTALL_DIR=%{_datadir}/cmake/%{name} \ %{cmake_blas_flags} \ +%if %{with SuperLU} -DSUPERLU_INCLUDES=%{_includedir}/SuperLU \ +%endif +%if %{with scotch} -DSCOTCH_INCLUDES=%{_includedir} -DSCOTCH_LIBRARIES="scotch" \ +%endif +%if %{with metis} -DMETIS_INCLUDES=%{_includedir} -DMETIS_LIBRARIES="metis" \ +%endif -DEIGEN_TEST_CXX11=ON %cmake_build @@ -175,6 +192,9 @@ MINGW64_CMAKE_ARGS="-DINCLUDE_INSTALL_DIR=%{mingw64_includedir}/%{name} -DCMAKEP %changelog +* Thu Jun 15 2023 Yaakov Selkowitz - 3.4.0-10 +- Avoid extra test dependencies in RHEL builds + * Thu Jan 19 2023 Fedora Release Engineering - 3.4.0-9 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild