summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'sci-libs/cantera/files/cantera-2.5.1_env.patch')
-rw-r--r--sci-libs/cantera/files/cantera-2.5.1_env.patch27
1 files changed, 27 insertions, 0 deletions
diff --git a/sci-libs/cantera/files/cantera-2.5.1_env.patch b/sci-libs/cantera/files/cantera-2.5.1_env.patch
index 576e2de2d577..77004803b127 100644
--- a/sci-libs/cantera/files/cantera-2.5.1_env.patch
+++ b/sci-libs/cantera/files/cantera-2.5.1_env.patch
@@ -32,6 +32,33 @@ diff -Naur old/SConstruct new/SConstruct
# Print values of all build options:
print("Configuration variables read from 'cantera.conf' and command line:")
+@@ -1149,10 +1149,24 @@
+ if retcode == 0:
+ config_error("Failed to determine Sundials BLAS/LAPACK.")
+ env['has_sundials_lapack'] = int(has_sundials_lapack.strip())
+- else:
+- # In Sundials 2.6, SUNDIALS_BLAS_LAPACK is either defined or undefined
++ elif sundials_ver < parse_version('5.5'):
++ # In Sundials 2.6-5.5, SUNDIALS_BLAS_LAPACK is either defined or undefined
+ env['has_sundials_lapack'] = conf.CheckDeclaration('SUNDIALS_BLAS_LAPACK',
+ '#include "sundials/sundials_config.h"', 'C++')
++ else:
++ # In Sundials 5.5 and higher, two defines are included specific to the
++ # SUNLINSOL packages indicating whether SUNDIALS has been built with LAPACK
++ lapackband = conf.CheckDeclaration(
++ "SUNDIALS_SUNLINSOL_LAPACKBAND",
++ '#include "sundials/sundials_config.h"',
++ "C++",
++ )
++ lapackdense = conf.CheckDeclaration(
++ "SUNDIALS_SUNLINSOL_LAPACKDENSE",
++ '#include "sundials/sundials_config.h"',
++ "C++",
++ )
++ env["has_sundials_lapack"] = lapackband and lapackdense
+
+ # In the case where a user is trying to link Cantera to an external BLAS/LAPACK
+ # library, but Sundials was configured without this support, print a Warning.
diff -Naur old/interfaces/cython/SConscript new/interfaces/cython/SConscript
--- old/interfaces/cython/SConscript 2021-03-21 01:18:43.000000000 +0300
+++ new/interfaces/cython/SConscript 2021-03-21 01:59:29.000000000 +0300