1 |
commit: 59fa45759474a27495535271cc1dcb5bd5270a97 |
2 |
Author: Sergey Torokhov <torokhov-s-a <AT> yandex <DOT> ru> |
3 |
AuthorDate: Tue Apr 21 12:17:00 2020 +0000 |
4 |
Commit: Matthias Maier <tamiko <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue May 5 16:50:10 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=59fa4575 |
7 |
|
8 |
sci-libs/cantera: fix sci-libs/sundials-5.2.0 compatibility |
9 |
|
10 |
Because of increased rate of releases of SUNDIALS package and |
11 |
as the 5.x branch currently doesn't break the Cantera the |
12 |
"*_sundials4.patch" is changed to allow <sundials-6.0. |
13 |
The restrictions for SUNDIALS 5.x version is now controlled |
14 |
by "cantera-2.4.0-r*.ebuild". |
15 |
|
16 |
The patch changes isn't affected the build process, |
17 |
therefore there is no patch renaming. |
18 |
|
19 |
Signed-off-by: Sergey Torokhov <torokhov-s-a <AT> yandex.ru> |
20 |
Signed-off-by: Matthias Maier <tamiko <AT> gentoo.org> |
21 |
|
22 |
sci-libs/cantera/cantera-2.4.0-r5.ebuild | 2 +- |
23 |
.../cantera/files/cantera_2.4.0_sundials4.patch | 63 ++++++++++++++-------- |
24 |
2 files changed, 41 insertions(+), 24 deletions(-) |
25 |
|
26 |
diff --git a/sci-libs/cantera/cantera-2.4.0-r5.ebuild b/sci-libs/cantera/cantera-2.4.0-r5.ebuild |
27 |
index e4d8b7de2c0..ac2a89b4ddd 100644 |
28 |
--- a/sci-libs/cantera/cantera-2.4.0-r5.ebuild |
29 |
+++ b/sci-libs/cantera/cantera-2.4.0-r5.ebuild |
30 |
@@ -32,7 +32,7 @@ RDEPEND=" |
31 |
dev-python/numpy[${PYTHON_MULTI_USEDEP}] |
32 |
') |
33 |
) |
34 |
- <sci-libs/sundials-5.2.0:0= |
35 |
+ <sci-libs/sundials-5.3.0:0= |
36 |
" |
37 |
|
38 |
DEPEND=" |
39 |
|
40 |
diff --git a/sci-libs/cantera/files/cantera_2.4.0_sundials4.patch b/sci-libs/cantera/files/cantera_2.4.0_sundials4.patch |
41 |
index 8c44228019b..0b4d3abf854 100644 |
42 |
--- a/sci-libs/cantera/files/cantera_2.4.0_sundials4.patch |
43 |
+++ b/sci-libs/cantera/files/cantera_2.4.0_sundials4.patch |
44 |
@@ -1,6 +1,6 @@ |
45 |
-diff -Nur old/SConstruct new/SConstruct |
46 |
---- old/SConstruct 2019-08-14 04:12:50.000000000 +0300 |
47 |
-+++ new/SConstruct 2019-08-14 04:38:55.000000000 +0300 |
48 |
+diff -Naur a/SConstruct b/SConstruct |
49 |
+--- a/SConstruct 2020-04-21 13:55:06.000000000 +0300 |
50 |
++++ b/SConstruct 2020-04-21 13:55:54.000000000 +0300 |
51 |
@@ -1013,23 +1013,29 @@ |
52 |
|
53 |
import SCons.Conftest, SCons.SConf |
54 |
@@ -42,18 +42,35 @@ diff -Nur old/SConstruct new/SConstruct |
55 |
|
56 |
# Checkout Sundials submodule if needed |
57 |
if (env['system_sundials'] == 'n' and |
58 |
-@@ -1066,7 +1072,7 @@ |
59 |
+@@ -1066,13 +1072,14 @@ |
60 |
|
61 |
# Ignore the minor version, e.g. 2.4.x -> 2.4 |
62 |
env['sundials_version'] = '.'.join(sundials_version.split('.')[:2]) |
63 |
- if env['sundials_version'] not in ('2.4','2.5','2.6','2.7','3.0','3.1','3.2'): |
64 |
-+ if env['sundials_version'] not in ('2.4','2.5','2.6','2.7','3.0','3.1','3.2','4.0','4.1','5.0','5.1'): |
65 |
++ sundials_ver = LooseVersion(env['sundials_version']) |
66 |
++ if sundials_ver < LooseVersion('2.4') or sundials_ver >= LooseVersion('6.0'): |
67 |
print("""ERROR: Sundials version %r is not supported.""" % env['sundials_version']) |
68 |
sys.exit(1) |
69 |
print("""INFO: Using system installation of Sundials version %s.""" % sundials_version) |
70 |
-diff -Nur old/include/cantera/numerics/CVodesIntegrator.h new/include/cantera/numerics/CVodesIntegrator.h |
71 |
---- old/include/cantera/numerics/CVodesIntegrator.h 2018-08-24 16:24:45.000000000 +0300 |
72 |
-+++ new/include/cantera/numerics/CVodesIntegrator.h 2019-08-14 04:39:50.000000000 +0300 |
73 |
+ |
74 |
+ #Determine whether or not Sundials was built with BLAS/LAPACK |
75 |
+- if LooseVersion(env['sundials_version']) < LooseVersion('2.6'): |
76 |
++ if sundials_ver < LooseVersion('2.6'): |
77 |
+ # In Sundials 2.4 / 2.5, SUNDIALS_BLAS_LAPACK is either 0 or 1 |
78 |
+ sundials_blas_lapack = get_expression_value(['"sundials/sundials_config.h"'], |
79 |
+ 'SUNDIALS_BLAS_LAPACK') |
80 |
+@@ -1690,7 +1697,7 @@ |
81 |
+ |
82 |
+ if env['system_sundials'] == 'y': |
83 |
+ env['sundials_libs'] = ['sundials_cvodes', 'sundials_ida', 'sundials_nvecserial'] |
84 |
+- if env['use_lapack'] and LooseVersion(env['sundials_version']) >= LooseVersion('3.0'): |
85 |
++ if env['use_lapack'] and sundials_ver >= LooseVersion('3.0'): |
86 |
+ if env.get('has_sundials_lapack'): |
87 |
+ env['sundials_libs'].extend(('sundials_sunlinsollapackdense', |
88 |
+ 'sundials_sunlinsollapackband')) |
89 |
+diff -Naur a/include/cantera/numerics/CVodesIntegrator.h b/include/cantera/numerics/CVodesIntegrator.h |
90 |
+--- a/include/cantera/numerics/CVodesIntegrator.h 2018-08-24 16:24:45.000000000 +0300 |
91 |
++++ b/include/cantera/numerics/CVodesIntegrator.h 2020-04-21 13:55:54.000000000 +0300 |
92 |
@@ -49,7 +49,6 @@ |
93 |
m_maxord = n; |
94 |
} |
95 |
@@ -62,9 +79,9 @@ diff -Nur old/include/cantera/numerics/CVodesIntegrator.h new/include/cantera/nu |
96 |
virtual void setMaxStepSize(double hmax); |
97 |
virtual void setMinStepSize(double hmin); |
98 |
virtual void setMaxSteps(int nmax); |
99 |
-diff -Nur old/include/cantera/numerics/Integrator.h new/include/cantera/numerics/Integrator.h |
100 |
---- old/include/cantera/numerics/Integrator.h 2018-08-24 16:24:45.000000000 +0300 |
101 |
-+++ new/include/cantera/numerics/Integrator.h 2019-08-14 04:44:27.000000000 +0300 |
102 |
+diff -Naur a/include/cantera/numerics/Integrator.h b/include/cantera/numerics/Integrator.h |
103 |
+--- a/include/cantera/numerics/Integrator.h 2018-08-24 16:24:45.000000000 +0300 |
104 |
++++ b/include/cantera/numerics/Integrator.h 2020-04-21 13:55:54.000000000 +0300 |
105 |
@@ -34,17 +34,6 @@ |
106 |
Adams_Method //! Adams |
107 |
}; |
108 |
@@ -95,9 +112,9 @@ diff -Nur old/include/cantera/numerics/Integrator.h new/include/cantera/numerics |
109 |
//! Set the maximum step size |
110 |
virtual void setMaxStepSize(double hmax) { |
111 |
warn("setMaxStepSize"); |
112 |
-diff -Nur old/src/kinetics/ImplicitSurfChem.cpp new/src/kinetics/ImplicitSurfChem.cpp |
113 |
---- old/src/kinetics/ImplicitSurfChem.cpp 2018-08-24 16:24:45.000000000 +0300 |
114 |
-+++ new/src/kinetics/ImplicitSurfChem.cpp 2019-08-14 04:45:57.000000000 +0300 |
115 |
+diff -Naur a/src/kinetics/ImplicitSurfChem.cpp b/src/kinetics/ImplicitSurfChem.cpp |
116 |
+--- a/src/kinetics/ImplicitSurfChem.cpp 2018-08-24 16:24:45.000000000 +0300 |
117 |
++++ b/src/kinetics/ImplicitSurfChem.cpp 2020-04-21 13:55:54.000000000 +0300 |
118 |
@@ -79,7 +79,6 @@ |
119 |
// numerically, and use a Newton linear iterator |
120 |
m_integ->setMethod(BDF_Method); |
121 |
@@ -106,9 +123,9 @@ diff -Nur old/src/kinetics/ImplicitSurfChem.cpp new/src/kinetics/ImplicitSurfChe |
122 |
m_work.resize(ntmax); |
123 |
} |
124 |
|
125 |
-diff -Nur old/src/numerics/CVodesIntegrator.cpp new/src/numerics/CVodesIntegrator.cpp |
126 |
---- old/src/numerics/CVodesIntegrator.cpp 2018-08-24 16:24:45.000000000 +0300 |
127 |
-+++ new/src/numerics/CVodesIntegrator.cpp 2019-08-14 04:49:02.000000000 +0300 |
128 |
+diff -Naur a/src/numerics/CVodesIntegrator.cpp b/src/numerics/CVodesIntegrator.cpp |
129 |
+--- a/src/numerics/CVodesIntegrator.cpp 2018-08-24 16:24:45.000000000 +0300 |
130 |
++++ b/src/numerics/CVodesIntegrator.cpp 2020-04-21 13:55:54.000000000 +0300 |
131 |
@@ -88,7 +88,6 @@ |
132 |
m_type(DENSE+NOJAC), |
133 |
m_itol(CV_SS), |
134 |
@@ -161,9 +178,9 @@ diff -Nur old/src/numerics/CVodesIntegrator.cpp new/src/numerics/CVodesIntegrato |
135 |
#if CT_SUNDIALS_USE_LAPACK |
136 |
m_linsol = SUNLapackBand(m_y, (SUNMatrix) m_linsol_matrix); |
137 |
#else |
138 |
-diff -Nur old/src/numerics/IDA_Solver.cpp new/src/numerics/IDA_Solver.cpp |
139 |
---- old/src/numerics/IDA_Solver.cpp 2018-08-24 16:24:45.000000000 +0300 |
140 |
-+++ new/src/numerics/IDA_Solver.cpp 2019-08-14 04:51:01.000000000 +0300 |
141 |
+diff -Naur a/src/numerics/IDA_Solver.cpp b/src/numerics/IDA_Solver.cpp |
142 |
+--- a/src/numerics/IDA_Solver.cpp 2018-08-24 16:24:45.000000000 +0300 |
143 |
++++ b/src/numerics/IDA_Solver.cpp 2020-04-21 13:55:54.000000000 +0300 |
144 |
@@ -442,7 +442,11 @@ |
145 |
#if CT_SUNDIALS_VERSION >= 30 |
146 |
SUNLinSolFree((SUNLinearSolver) m_linsol); |
147 |
@@ -177,9 +194,9 @@ diff -Nur old/src/numerics/IDA_Solver.cpp new/src/numerics/IDA_Solver.cpp |
148 |
#if CT_SUNDIALS_USE_LAPACK |
149 |
m_linsol = SUNLapackBand(m_y, (SUNMatrix) m_linsol_matrix); |
150 |
#else |
151 |
-diff -Nur old/src/zeroD/ReactorNet.cpp new/src/zeroD/ReactorNet.cpp |
152 |
---- old/src/zeroD/ReactorNet.cpp 2018-08-24 16:24:45.000000000 +0300 |
153 |
-+++ new/src/zeroD/ReactorNet.cpp 2019-08-14 04:51:35.000000000 +0300 |
154 |
+diff -Naur a/src/zeroD/ReactorNet.cpp b/src/zeroD/ReactorNet.cpp |
155 |
+--- a/src/zeroD/ReactorNet.cpp 2018-08-24 16:24:45.000000000 +0300 |
156 |
++++ b/src/zeroD/ReactorNet.cpp 2020-04-21 13:55:54.000000000 +0300 |
157 |
@@ -28,7 +28,6 @@ |
158 |
// numerically, and use a Newton linear iterator |
159 |
m_integ->setMethod(BDF_Method); |