From 570c35d3326370f098c2d85348420617d98fbf84 Mon Sep 17 00:00:00 2001 From: David Abdurachmanov Date: Fri, 1 Dec 2023 17:46:56 +0200 Subject: [PATCH] Properly check for valgrind support Signed-off-by: David Abdurachmanov --- petsc.spec | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/petsc.spec b/petsc.spec index f7c7d1c..dc8f5b4 100644 --- a/petsc.spec +++ b/petsc.spec @@ -186,8 +186,10 @@ --with-sundials-include=%{_includedir} \\\ --with-sundials-lib="-lsundials_nvecserial -lsundials_cvode" \\\ %endif \ - --with-pthread=1 \\\ - --with-valgrind=1 + %ifarch %{valgrind_arches} \ + --with-valgrind=1 \\\ + %endif \ + --with-pthread=1 %global petsc_mpibuild_options \\\ %if %{with debug} \ @@ -285,8 +287,10 @@ --with-fftw-include= \\\ --with-fftw-lib="-L$MPI_LIB -lfftw3_mpi -lfftw3" \\\ %endif \ - --with-pthread=1 \\\ - --with-valgrind=1 + %ifarch %{valgrind_arches} \ + --with-valgrind=1 \\\ + %endif \ + --with-pthread=1 %global mpichversion %(rpm -qi mpich | awk -F': ' '/Version/ {print $2}') %global openmpiversion %(rpm -qi openmpi | awk -F': ' '/Version/ {print $2}') @@ -296,7 +300,7 @@ Name: petsc Summary: Portable Extensible Toolkit for Scientific Computation Version: %{releasever}.1 -Release: %autorelease +Release: %autorelease -e 0.riscv64 License: BSD URL: https://petsc.org/ Source0: https://ftp.mcs.anl.gov/pub/petsc/release-snapshots/petsc-with-docs-%{version}.tar.gz @@ -356,7 +360,9 @@ BuildRequires: tcsh BuildRequires: tetgen-devel %endif BuildRequires: xorg-x11-server-Xvfb +%ifarch %{valgrind_arches} BuildRequires: valgrind-devel +%endif %description PETSc, pronounced PET-see (the S is silent), is a suite of data structures