From 4994795cbb2ccf2e7c80dddf40edd9e3e5cf71e0 Mon Sep 17 00:00:00 2001
From: Kristof Kessler <kristof.kessler@bgr.de>
Date: Wed, 6 Mar 2024 10:24:20 +0000
Subject: [PATCH] added check if --download-f2cblaslapack is already specified
 as petsc arg

---
 ogscm/recipes/ogs.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/ogscm/recipes/ogs.py b/ogscm/recipes/ogs.py
index 92eb230..87f0cce 100644
--- a/ogscm/recipes/ogs.py
+++ b/ogscm/recipes/ogs.py
@@ -529,9 +529,10 @@ if local_args.ogs != "clean":
                 "--CXXFLAGS='-O3'",
                 "--FFLAGS='-O3'",
                 "--with-debugging=no",
-                "--download-f2cblaslapack=1",
             ]
             petsc_configure_opts.extend(petsc_args)
+            if "--download-f2cblaslapack" not in local_args.petsc_configure_args:
+                petsc_configure_opts.extend(["--download-f2cblaslapack=1",])
             Stage0 += generic_autotools(
                 configure_opts=petsc_configure_opts,
                 devel_environment={"CMAKE_PREFIX_PATH": "/usr/local/petsc"},
-- 
GitLab