From bcfe384ac067ce76e6e209b8f0935844cb3fdc15 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Lorenz=20H=C3=BCdepohl?= <dev@stellardeath.org>
Date: Thu, 28 Oct 2021 11:52:20 +0200
Subject: [PATCH] Remove version suffix (_5_0, etc.) from openmpi flavor

This makes it easier in the spec files, e.g. in conditionals
---
 mpcdf_common.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/mpcdf_common.py b/mpcdf_common.py
index a28a095..ea1467e 100644
--- a/mpcdf_common.py
+++ b/mpcdf_common.py
@@ -810,9 +810,10 @@ Macros:
                     dependencies = ((project, compiler),)
                     if not parent:
                         dependencies = openmpi_flavor_dependencies(of, distribution) + dependencies
+                    flavor_kind = re.sub("(_[0-9]+)*$", "", of)
                     repo(mpi + "_" + compiler + "_" + of, dependencies, mpi=True,
                          mpi_repository=mpi, mpi_module=mpi_module(mpi),
-                         openmpi_flavor=of)
+                         openmpi_flavor=flavor_kind)
 
     for cuda in cudas:
         for compiler in filter(partial(valid_cuda, cuda), compilers):
-- 
GitLab