* [gentoo-commits] repo/gentoo:master commit in: sci-libs/cantera/, sci-libs/cantera/files/
@ 2019-07-19 16:45 Michał Górny
0 siblings, 0 replies; 15+ messages in thread
From: Michał Górny @ 2019-07-19 16:45 UTC (permalink / raw
To: gentoo-commits
commit: a42c6b73ab2089813e77380fe5f5dce4b665eacc
Author: band-a-prend <torokhov-s-a <AT> yandex <DOT> ru>
AuthorDate: Fri Jun 21 22:15:41 2019 +0000
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Fri Jul 19 16:44:53 2019 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a42c6b73
sci-libs/cantera: 2.4.0-r1. Enable build with sci-libs/sundials-3.2.x
This patch moves early applied 'sed' patches from src_prepare() to external
patch-file and allows to build Cantera 2.4.0 with sci-libs/sundials-3.2.x
since this version of Sundials is compatible with Sundials 3.1
and doesn't require to rebuild Cantera after it's upgrade from Sundials 3.1
to Sundials 3.2.
It was tested that Cantera successfuly build with Sundials-3.2.1
(that not in portage tree yet) and internal tests passed after "ebuild compile"
with Sundials 3.1.2 and "ebuild test" phase after intallation
of the Sundials 3.2.1 into system.
Note that Cantera 2.4.0 isn't compatible with Sundials 4.y branch
so there is a restriction for RDEPEND sci-libs/sundials-4.0.0
Signed-off-by: Sergey Torokhov <torokhov_s_a <AT> mail.ru>
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
sci-libs/cantera/cantera-2.4.0-r1.ebuild | 15 ++++--------
sci-libs/cantera/files/cantera_2.4.0_env.patch | 33 ++++++++++++++++++++++++++
2 files changed, 38 insertions(+), 10 deletions(-)
diff --git a/sci-libs/cantera/cantera-2.4.0-r1.ebuild b/sci-libs/cantera/cantera-2.4.0-r1.ebuild
index 235d20b70bf..707f5670106 100644
--- a/sci-libs/cantera/cantera-2.4.0-r1.ebuild
+++ b/sci-libs/cantera/cantera-2.4.0-r1.ebuild
@@ -29,7 +29,7 @@ RDEPEND="
python? (
dev-python/numpy[${PYTHON_USEDEP}]
)
- <sci-libs/sundials-3.2.0:0=
+ <sci-libs/sundials-4.0.0:0=
"
DEPEND="
@@ -45,21 +45,16 @@ DEPEND="
)
"
-PATCHES=( "${FILESDIR}/${PN}_${PV}_libdirname_variable.patch" )
+PATCHES=(
+ "${FILESDIR}/${PN}_${PV}_libdirname_variable.patch"
+ "${FILESDIR}/${PN}_${PV}_env.patch"
+ )
pkg_setup() {
fortran-2_pkg_setup
python-single-r1_pkg_setup
}
-src_prepare() {
- default
- # patch to work 'scons test' properly in case of set up 'renamed_shared_libraries="no"' option
- sed -i "s/, libs=\['cantera_shared'\]//" "${S}"/test_problems/SConscript || die "failed to modify 'test_problems/SConscript'"
- # patch env to pass CCACHE_DIR variable
- sed -i "s/ENV={'PATH': os.environ\['PATH'\]}/ENV={'PATH': os.environ\['PATH'\], 'CCACHE_DIR': os.environ.get('CCACHE_DIR','')}/" "${S}"/SConstruct || die "failed to modify 'SConstruct'"
-}
-
## Full list of configuration options of Cantera is presented here:
## http://cantera.org/docs/sphinx/html/compiling/config-options.html
diff --git a/sci-libs/cantera/files/cantera_2.4.0_env.patch b/sci-libs/cantera/files/cantera_2.4.0_env.patch
new file mode 100644
index 00000000000..1be40dfe044
--- /dev/null
+++ b/sci-libs/cantera/files/cantera_2.4.0_env.patch
@@ -0,0 +1,33 @@
+diff -Nur old/cantera-2.4.0/SConstruct new/cantera-2.4.0/SConstruct
+--- old/SConstruct 2018-08-24 16:24:45.000000000 +0300
++++ new/SConstruct 2019-06-22 00:18:41.000000000 +0300
+@@ -189,7 +189,7 @@
+ toolchain = ['default']
+
+ env = Environment(tools=toolchain+['textfile', 'subst', 'recursiveInstall', 'wix', 'gch'],
+- ENV={'PATH': os.environ['PATH']},
++ ENV={'PATH': os.environ['PATH'], 'CCACHE_DIR': os.environ.get('CCACHE_DIR','')},
+ toolchain=toolchain,
+ **extraEnvArgs)
+
+@@ -1061,7 +1061,7 @@
+
+ # Ignore the minor version, e.g. 2.4.x -> 2.4
+ env['sundials_version'] = '.'.join(sundials_version.split('.')[:2])
+- if env['sundials_version'] not in ('2.4','2.5','2.6','2.7','3.0','3.1'):
++ if env['sundials_version'] not in ('2.4','2.5','2.6','2.7','3.0','3.1','3.2'):
+ print("""ERROR: Sundials version %r is not supported.""" % env['sundials_version'])
+ sys.exit(1)
+ print("""INFO: Using system installation of Sundials version %s.""" % sundials_version)
+diff -Nur old/cantera-2.4.0/test_problems/SConscript new/cantera-2.4.0/test_problems/SConscript
+--- old/test_problems/SConscript 2018-08-24 16:24:45.000000000 +0300
++++ new/test_problems/SConscript 2019-06-22 00:13:29.000000000 +0300
+@@ -282,7 +282,7 @@
+ CompileAndTest('VPsilane_test', 'VPsilane_test', 'VPsilane_test', 'output_blessed.txt')
+
+ CompileAndTest('clib', 'clib_test', 'clib_test', 'output_blessed.txt',
+- extensions=['^clib_test.c'], libs=['cantera_shared'])
++ extensions=['^clib_test.c'])
+
+ # Force explicitly-named tests to run even if SCons thinks they're up to date
+ for command in COMMAND_LINE_TARGETS:
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sci-libs/cantera/, sci-libs/cantera/files/
@ 2020-01-06 15:40 Joonas Niilola
0 siblings, 0 replies; 15+ messages in thread
From: Joonas Niilola @ 2020-01-06 15:40 UTC (permalink / raw
To: gentoo-commits
commit: 1b62211cc285ae25d4ed511b8cef5901c7f07941
Author: band-a-prend <torokhov-s-a <AT> yandex <DOT> ru>
AuthorDate: Thu Dec 26 15:01:30 2019 +0000
Commit: Joonas Niilola <juippis <AT> gentoo <DOT> org>
CommitDate: Mon Jan 6 15:40:08 2020 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1b62211c
sci-libs/cantera: add support sci-libs/sundials-5.0, dev-lang/python-3.8
Simple fix for Sundials-5.0 and Python-3.8 compatibility.
The Sundials-5.0 has the same API as Sundials-4.x for CVODES function.
Signed-off-by: Sergey Torokhov <torokhov-s-a <AT> yandex.ru>
Closes: https://github.com/gentoo/gentoo/pull/14126
Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>
sci-libs/cantera/cantera-2.4.0-r2.ebuild | 4 ++--
sci-libs/cantera/files/cantera_2.4.0_sundials4.patch | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/sci-libs/cantera/cantera-2.4.0-r2.ebuild b/sci-libs/cantera/cantera-2.4.0-r2.ebuild
index 57b64872624..79b1572e51c 100644
--- a/sci-libs/cantera/cantera-2.4.0-r2.ebuild
+++ b/sci-libs/cantera/cantera-2.4.0-r2.ebuild
@@ -3,7 +3,7 @@
EAPI=7
-PYTHON_COMPAT=( python3_{6,7} )
+PYTHON_COMPAT=( python3_{6,7,8} )
FORTRAN_NEEDED=fortran
FORTRAN_STANDARD=90
@@ -30,7 +30,7 @@ RDEPEND="
python? (
dev-python/numpy[${PYTHON_USEDEP}]
)
- <sci-libs/sundials-5.0.0:0=
+ <sci-libs/sundials-5.1.0:0=
"
DEPEND="
diff --git a/sci-libs/cantera/files/cantera_2.4.0_sundials4.patch b/sci-libs/cantera/files/cantera_2.4.0_sundials4.patch
index c745f6b6f7f..0345a98e252 100644
--- a/sci-libs/cantera/files/cantera_2.4.0_sundials4.patch
+++ b/sci-libs/cantera/files/cantera_2.4.0_sundials4.patch
@@ -47,7 +47,7 @@ diff -Nur old/SConstruct new/SConstruct
# Ignore the minor version, e.g. 2.4.x -> 2.4
env['sundials_version'] = '.'.join(sundials_version.split('.')[:2])
- if env['sundials_version'] not in ('2.4','2.5','2.6','2.7','3.0','3.1','3.2'):
-+ if env['sundials_version'] not in ('2.4','2.5','2.6','2.7','3.0','3.1','3.2','4.0','4.1'):
++ 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'):
print("""ERROR: Sundials version %r is not supported.""" % env['sundials_version'])
sys.exit(1)
print("""INFO: Using system installation of Sundials version %s.""" % sundials_version)
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sci-libs/cantera/, sci-libs/cantera/files/
@ 2020-03-05 12:21 Joonas Niilola
0 siblings, 0 replies; 15+ messages in thread
From: Joonas Niilola @ 2020-03-05 12:21 UTC (permalink / raw
To: gentoo-commits
commit: 59999e26785058fcbe8dc9b49455c14b7abda758
Author: Sergey Torokhov <torokhov-s-a <AT> yandex <DOT> ru>
AuthorDate: Fri Feb 28 22:49:41 2020 +0000
Commit: Joonas Niilola <juippis <AT> gentoo <DOT> org>
CommitDate: Thu Mar 5 11:54:37 2020 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=59999e26
sci-libs/cantera: 2.4.0-r4 fix sci-libs/sundials-5.1.0 compatibility
As cantera-2.4.0-r3 was stabilized against sci-libs/sundials-3.2.0
therefore the changes allowing to build cantera agains sundials-5.1.0
don't affect the stability and avoid of dublicate patches
with trivial changes. Revision bump to -r4 saving stabilization.
The Sundials 5.1 has the same CVODES API as Sundials 4.0, 4.1, 5.0
so there is no any additional changes required to to build Cantera
against Sundials 5.1 except allowing in configuration check.
Signed-off-by: Sergey Torokhov <torokhov-s-a <AT> yandex.ru>
Closes: https://github.com/gentoo/gentoo/pull/14801
Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>
sci-libs/cantera/{cantera-2.4.0-r3.ebuild => cantera-2.4.0-r4.ebuild} | 2 +-
sci-libs/cantera/files/cantera_2.4.0_sundials4.patch | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/sci-libs/cantera/cantera-2.4.0-r3.ebuild b/sci-libs/cantera/cantera-2.4.0-r4.ebuild
similarity index 99%
rename from sci-libs/cantera/cantera-2.4.0-r3.ebuild
rename to sci-libs/cantera/cantera-2.4.0-r4.ebuild
index 29345e36058..d3f8fb2e514 100644
--- a/sci-libs/cantera/cantera-2.4.0-r3.ebuild
+++ b/sci-libs/cantera/cantera-2.4.0-r4.ebuild
@@ -32,7 +32,7 @@ RDEPEND="
dev-python/numpy[${PYTHON_MULTI_USEDEP}]
')
)
- <sci-libs/sundials-5.1.0:0=
+ <sci-libs/sundials-5.2.0:0=
"
DEPEND="
diff --git a/sci-libs/cantera/files/cantera_2.4.0_sundials4.patch b/sci-libs/cantera/files/cantera_2.4.0_sundials4.patch
index 0345a98e252..8c44228019b 100644
--- a/sci-libs/cantera/files/cantera_2.4.0_sundials4.patch
+++ b/sci-libs/cantera/files/cantera_2.4.0_sundials4.patch
@@ -47,7 +47,7 @@ diff -Nur old/SConstruct new/SConstruct
# Ignore the minor version, e.g. 2.4.x -> 2.4
env['sundials_version'] = '.'.join(sundials_version.split('.')[:2])
- if env['sundials_version'] not in ('2.4','2.5','2.6','2.7','3.0','3.1','3.2'):
-+ 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'):
++ 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'):
print("""ERROR: Sundials version %r is not supported.""" % env['sundials_version'])
sys.exit(1)
print("""INFO: Using system installation of Sundials version %s.""" % sundials_version)
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sci-libs/cantera/, sci-libs/cantera/files/
@ 2020-05-05 16:54 Matthias Maier
0 siblings, 0 replies; 15+ messages in thread
From: Matthias Maier @ 2020-05-05 16:54 UTC (permalink / raw
To: gentoo-commits
commit: 59fa45759474a27495535271cc1dcb5bd5270a97
Author: Sergey Torokhov <torokhov-s-a <AT> yandex <DOT> ru>
AuthorDate: Tue Apr 21 12:17:00 2020 +0000
Commit: Matthias Maier <tamiko <AT> gentoo <DOT> org>
CommitDate: Tue May 5 16:50:10 2020 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=59fa4575
sci-libs/cantera: fix sci-libs/sundials-5.2.0 compatibility
Because of increased rate of releases of SUNDIALS package and
as the 5.x branch currently doesn't break the Cantera the
"*_sundials4.patch" is changed to allow <sundials-6.0.
The restrictions for SUNDIALS 5.x version is now controlled
by "cantera-2.4.0-r*.ebuild".
The patch changes isn't affected the build process,
therefore there is no patch renaming.
Signed-off-by: Sergey Torokhov <torokhov-s-a <AT> yandex.ru>
Signed-off-by: Matthias Maier <tamiko <AT> gentoo.org>
sci-libs/cantera/cantera-2.4.0-r5.ebuild | 2 +-
.../cantera/files/cantera_2.4.0_sundials4.patch | 63 ++++++++++++++--------
2 files changed, 41 insertions(+), 24 deletions(-)
diff --git a/sci-libs/cantera/cantera-2.4.0-r5.ebuild b/sci-libs/cantera/cantera-2.4.0-r5.ebuild
index e4d8b7de2c0..ac2a89b4ddd 100644
--- a/sci-libs/cantera/cantera-2.4.0-r5.ebuild
+++ b/sci-libs/cantera/cantera-2.4.0-r5.ebuild
@@ -32,7 +32,7 @@ RDEPEND="
dev-python/numpy[${PYTHON_MULTI_USEDEP}]
')
)
- <sci-libs/sundials-5.2.0:0=
+ <sci-libs/sundials-5.3.0:0=
"
DEPEND="
diff --git a/sci-libs/cantera/files/cantera_2.4.0_sundials4.patch b/sci-libs/cantera/files/cantera_2.4.0_sundials4.patch
index 8c44228019b..0b4d3abf854 100644
--- a/sci-libs/cantera/files/cantera_2.4.0_sundials4.patch
+++ b/sci-libs/cantera/files/cantera_2.4.0_sundials4.patch
@@ -1,6 +1,6 @@
-diff -Nur old/SConstruct new/SConstruct
---- old/SConstruct 2019-08-14 04:12:50.000000000 +0300
-+++ new/SConstruct 2019-08-14 04:38:55.000000000 +0300
+diff -Naur a/SConstruct b/SConstruct
+--- a/SConstruct 2020-04-21 13:55:06.000000000 +0300
++++ b/SConstruct 2020-04-21 13:55:54.000000000 +0300
@@ -1013,23 +1013,29 @@
import SCons.Conftest, SCons.SConf
@@ -42,18 +42,35 @@ diff -Nur old/SConstruct new/SConstruct
# Checkout Sundials submodule if needed
if (env['system_sundials'] == 'n' and
-@@ -1066,7 +1072,7 @@
+@@ -1066,13 +1072,14 @@
# Ignore the minor version, e.g. 2.4.x -> 2.4
env['sundials_version'] = '.'.join(sundials_version.split('.')[:2])
- if env['sundials_version'] not in ('2.4','2.5','2.6','2.7','3.0','3.1','3.2'):
-+ 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'):
++ sundials_ver = LooseVersion(env['sundials_version'])
++ if sundials_ver < LooseVersion('2.4') or sundials_ver >= LooseVersion('6.0'):
print("""ERROR: Sundials version %r is not supported.""" % env['sundials_version'])
sys.exit(1)
print("""INFO: Using system installation of Sundials version %s.""" % sundials_version)
-diff -Nur old/include/cantera/numerics/CVodesIntegrator.h new/include/cantera/numerics/CVodesIntegrator.h
---- old/include/cantera/numerics/CVodesIntegrator.h 2018-08-24 16:24:45.000000000 +0300
-+++ new/include/cantera/numerics/CVodesIntegrator.h 2019-08-14 04:39:50.000000000 +0300
+
+ #Determine whether or not Sundials was built with BLAS/LAPACK
+- if LooseVersion(env['sundials_version']) < LooseVersion('2.6'):
++ if sundials_ver < LooseVersion('2.6'):
+ # In Sundials 2.4 / 2.5, SUNDIALS_BLAS_LAPACK is either 0 or 1
+ sundials_blas_lapack = get_expression_value(['"sundials/sundials_config.h"'],
+ 'SUNDIALS_BLAS_LAPACK')
+@@ -1690,7 +1697,7 @@
+
+ if env['system_sundials'] == 'y':
+ env['sundials_libs'] = ['sundials_cvodes', 'sundials_ida', 'sundials_nvecserial']
+- if env['use_lapack'] and LooseVersion(env['sundials_version']) >= LooseVersion('3.0'):
++ if env['use_lapack'] and sundials_ver >= LooseVersion('3.0'):
+ if env.get('has_sundials_lapack'):
+ env['sundials_libs'].extend(('sundials_sunlinsollapackdense',
+ 'sundials_sunlinsollapackband'))
+diff -Naur a/include/cantera/numerics/CVodesIntegrator.h b/include/cantera/numerics/CVodesIntegrator.h
+--- a/include/cantera/numerics/CVodesIntegrator.h 2018-08-24 16:24:45.000000000 +0300
++++ b/include/cantera/numerics/CVodesIntegrator.h 2020-04-21 13:55:54.000000000 +0300
@@ -49,7 +49,6 @@
m_maxord = n;
}
@@ -62,9 +79,9 @@ diff -Nur old/include/cantera/numerics/CVodesIntegrator.h new/include/cantera/nu
virtual void setMaxStepSize(double hmax);
virtual void setMinStepSize(double hmin);
virtual void setMaxSteps(int nmax);
-diff -Nur old/include/cantera/numerics/Integrator.h new/include/cantera/numerics/Integrator.h
---- old/include/cantera/numerics/Integrator.h 2018-08-24 16:24:45.000000000 +0300
-+++ new/include/cantera/numerics/Integrator.h 2019-08-14 04:44:27.000000000 +0300
+diff -Naur a/include/cantera/numerics/Integrator.h b/include/cantera/numerics/Integrator.h
+--- a/include/cantera/numerics/Integrator.h 2018-08-24 16:24:45.000000000 +0300
++++ b/include/cantera/numerics/Integrator.h 2020-04-21 13:55:54.000000000 +0300
@@ -34,17 +34,6 @@
Adams_Method //! Adams
};
@@ -95,9 +112,9 @@ diff -Nur old/include/cantera/numerics/Integrator.h new/include/cantera/numerics
//! Set the maximum step size
virtual void setMaxStepSize(double hmax) {
warn("setMaxStepSize");
-diff -Nur old/src/kinetics/ImplicitSurfChem.cpp new/src/kinetics/ImplicitSurfChem.cpp
---- old/src/kinetics/ImplicitSurfChem.cpp 2018-08-24 16:24:45.000000000 +0300
-+++ new/src/kinetics/ImplicitSurfChem.cpp 2019-08-14 04:45:57.000000000 +0300
+diff -Naur a/src/kinetics/ImplicitSurfChem.cpp b/src/kinetics/ImplicitSurfChem.cpp
+--- a/src/kinetics/ImplicitSurfChem.cpp 2018-08-24 16:24:45.000000000 +0300
++++ b/src/kinetics/ImplicitSurfChem.cpp 2020-04-21 13:55:54.000000000 +0300
@@ -79,7 +79,6 @@
// numerically, and use a Newton linear iterator
m_integ->setMethod(BDF_Method);
@@ -106,9 +123,9 @@ diff -Nur old/src/kinetics/ImplicitSurfChem.cpp new/src/kinetics/ImplicitSurfChe
m_work.resize(ntmax);
}
-diff -Nur old/src/numerics/CVodesIntegrator.cpp new/src/numerics/CVodesIntegrator.cpp
---- old/src/numerics/CVodesIntegrator.cpp 2018-08-24 16:24:45.000000000 +0300
-+++ new/src/numerics/CVodesIntegrator.cpp 2019-08-14 04:49:02.000000000 +0300
+diff -Naur a/src/numerics/CVodesIntegrator.cpp b/src/numerics/CVodesIntegrator.cpp
+--- a/src/numerics/CVodesIntegrator.cpp 2018-08-24 16:24:45.000000000 +0300
++++ b/src/numerics/CVodesIntegrator.cpp 2020-04-21 13:55:54.000000000 +0300
@@ -88,7 +88,6 @@
m_type(DENSE+NOJAC),
m_itol(CV_SS),
@@ -161,9 +178,9 @@ diff -Nur old/src/numerics/CVodesIntegrator.cpp new/src/numerics/CVodesIntegrato
#if CT_SUNDIALS_USE_LAPACK
m_linsol = SUNLapackBand(m_y, (SUNMatrix) m_linsol_matrix);
#else
-diff -Nur old/src/numerics/IDA_Solver.cpp new/src/numerics/IDA_Solver.cpp
---- old/src/numerics/IDA_Solver.cpp 2018-08-24 16:24:45.000000000 +0300
-+++ new/src/numerics/IDA_Solver.cpp 2019-08-14 04:51:01.000000000 +0300
+diff -Naur a/src/numerics/IDA_Solver.cpp b/src/numerics/IDA_Solver.cpp
+--- a/src/numerics/IDA_Solver.cpp 2018-08-24 16:24:45.000000000 +0300
++++ b/src/numerics/IDA_Solver.cpp 2020-04-21 13:55:54.000000000 +0300
@@ -442,7 +442,11 @@
#if CT_SUNDIALS_VERSION >= 30
SUNLinSolFree((SUNLinearSolver) m_linsol);
@@ -177,9 +194,9 @@ diff -Nur old/src/numerics/IDA_Solver.cpp new/src/numerics/IDA_Solver.cpp
#if CT_SUNDIALS_USE_LAPACK
m_linsol = SUNLapackBand(m_y, (SUNMatrix) m_linsol_matrix);
#else
-diff -Nur old/src/zeroD/ReactorNet.cpp new/src/zeroD/ReactorNet.cpp
---- old/src/zeroD/ReactorNet.cpp 2018-08-24 16:24:45.000000000 +0300
-+++ new/src/zeroD/ReactorNet.cpp 2019-08-14 04:51:35.000000000 +0300
+diff -Naur a/src/zeroD/ReactorNet.cpp b/src/zeroD/ReactorNet.cpp
+--- a/src/zeroD/ReactorNet.cpp 2018-08-24 16:24:45.000000000 +0300
++++ b/src/zeroD/ReactorNet.cpp 2020-04-21 13:55:54.000000000 +0300
@@ -28,7 +28,6 @@
// numerically, and use a Newton linear iterator
m_integ->setMethod(BDF_Method);
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sci-libs/cantera/, sci-libs/cantera/files/
@ 2021-01-17 11:52 David Seifert
0 siblings, 0 replies; 15+ messages in thread
From: David Seifert @ 2021-01-17 11:52 UTC (permalink / raw
To: gentoo-commits
commit: 67ddc7ad6e84157ac88fabc1731218f41f8fec3e
Author: Jakov Smolic <jakov.smolic <AT> sartura <DOT> hr>
AuthorDate: Sun Jan 17 11:51:32 2021 +0000
Commit: David Seifert <soap <AT> gentoo <DOT> org>
CommitDate: Sun Jan 17 11:51:32 2021 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=67ddc7ad
sci-libs/cantera: Remove old
Signed-off-by: Jakov Smolic <jakov.smolic <AT> sartura.hr>
Signed-off-by: David Seifert <soap <AT> gentoo.org>
sci-libs/cantera/cantera-2.4.0-r4.ebuild | 131 ---------------------
.../files/cantera_2.4.0_env_python_install.patch | 17 ---
2 files changed, 148 deletions(-)
diff --git a/sci-libs/cantera/cantera-2.4.0-r4.ebuild b/sci-libs/cantera/cantera-2.4.0-r4.ebuild
deleted file mode 100644
index d3f8fb2e514..00000000000
--- a/sci-libs/cantera/cantera-2.4.0-r4.ebuild
+++ /dev/null
@@ -1,131 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_{6,7,8} )
-
-FORTRAN_NEEDED=fortran
-FORTRAN_STANDARD=90
-
-inherit desktop fortran-2 python-single-r1 scons-utils toolchain-funcs
-
-DESCRIPTION="Object-oriented tool suite for chemical kinetics, thermodynamics, and transport"
-HOMEPAGE="https://www.cantera.org"
-SRC_URI="https://github.com/Cantera/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
-
-LICENSE="BSD"
-SLOT="0"
-KEYWORDS="amd64 ~x86"
-IUSE="+cti fortran pch +python test"
-RESTRICT="!test? ( test )"
-
-REQUIRED_USE="
- python? ( cti )
- ${PYTHON_REQUIRED_USE}
- "
-
-RDEPEND="
- ${PYTHON_DEPS}
- python? (
- $(python_gen_cond_dep '
- dev-python/numpy[${PYTHON_MULTI_USEDEP}]
- ')
- )
- <sci-libs/sundials-5.2.0:0=
-"
-
-DEPEND="
- ${RDEPEND}
- dev-cpp/eigen:3
- dev-libs/boost
- dev-libs/libfmt
- python? (
- $(python_gen_cond_dep '
- dev-python/cython[${PYTHON_MULTI_USEDEP}]
- ')
- )
- test? (
- >=dev-cpp/gtest-1.8.0
- )
-"
-
-PATCHES=(
- "${FILESDIR}/${PN}_${PV}_env.patch"
- "${FILESDIR}/${PN}_${PV}_env_python_install.patch"
- "${FILESDIR}/${PN}_${PV}_sundials4.patch"
- )
-
-pkg_setup() {
- fortran-2_pkg_setup
- python-single-r1_pkg_setup
-}
-
-## Full list of configuration options of Cantera is presented here:
-## http://cantera.org/docs/sphinx/html/compiling/config-options.html
-
-src_configure() {
- scons_vars=(
- CC="$(tc-getCC)"
- CXX="$(tc-getCXX)"
- cc_flags="${CXXFLAGS}"
- cxx_flags="-std=c++11"
- debug="no"
- FORTRAN="$(tc-getFC)"
- FORTRANFLAGS="${CXXFLAGS}"
- optimize_flags="-Wno-inline"
- renamed_shared_libraries="no"
- use_pch=$(usex pch)
-## In some cases other order can break the detection of right location of Boost: ##
- system_fmt="y"
- system_sundials="y"
- system_eigen="y"
- env_vars="all"
- extra_inc_dirs="/usr/include/eigen3"
- )
- use test || scons_vars+=( googletest="none" )
-
- scons_targets=(
- f90_interface=$(usex fortran y n)
- python2_package="none"
- )
-
- if use cti ; then
- local scons_python=$(usex python full minimal)
- scons_targets+=( python3_package="${scons_python}" python3_cmd="${EPYTHON}" )
- else
- scons_targets+=( python3_package="none" )
- fi
-}
-
-src_compile() {
- escons build "${scons_vars[@]}" "${scons_targets[@]}" prefix="/usr"
-}
-
-src_test() {
- escons test
-}
-
-src_install() {
- escons install stage_dir="${D}" libdirname="$(get_libdir)"
- if ! use cti ; then
- rm -r "${D}/usr/share/man" || die "Can't remove man files."
- else
- # Run the byte-compile of modules
- python_optimize "${D}/$(python_get_sitedir)/${PN}"
- fi
-}
-
-pkg_postinst() {
- if use cti && ! use python ; then
- elog "Cantera was build without 'python' use-flag therefore the CTI tool 'ck2cti'"
- elog "will convert Chemkin files to Cantera format without verification of kinetic mechanism."
- fi
-
- local post_msg=$(usex fortran "and Fortran " "")
- elog "C++ ${post_msg}samples are installed to '/usr/share/${PN}/samples/' directory."
-
- if use python ; then
- elog "Python examples are installed to '$(python_get_sitedir)/${PN}/examples/' directories."
- fi
-}
diff --git a/sci-libs/cantera/files/cantera_2.4.0_env_python_install.patch b/sci-libs/cantera/files/cantera_2.4.0_env_python_install.patch
deleted file mode 100644
index 2e01fed1fa9..00000000000
--- a/sci-libs/cantera/files/cantera_2.4.0_env_python_install.patch
+++ /dev/null
@@ -1,17 +0,0 @@
-diff -Nur old/interfaces/cython/SConscript new/interfaces/cython/SConscript
---- old/interfaces/cython/SConscript 2018-08-24 16:24:45.000000000 +0300
-+++ new/interfaces/cython/SConscript 2019-08-14 04:28:41.000000000 +0300
-@@ -83,10 +83,10 @@
- extra = ''
- elif localenv['OS'] == 'Darwin':
- extra = localenv.subst(' --prefix=${python%s_prefix}' % major)
-- elif localenv['libdirname'] == 'lib64':
-- # 64-bit RHEL / Fedora
-+ elif localenv['libdirname'] != 'lib':
-+ # 64-bit RHEL / Fedora etc. or e.g. x32 Gentoo profile
- extra = localenv.subst(
-- ' --prefix=${python%s_prefix} --install-lib=${python%s_prefix}/lib64/python%s.%s/site-packages' % (major, major, major, minor))
-+ ' --prefix=${python%s_prefix} --install-lib=${python%s_prefix}/${libdirname}/python%s.%s/site-packages' % (major, major, major, minor))
- else:
- extra = '--user'
- localenv.AppendENVPath(
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sci-libs/cantera/, sci-libs/cantera/files/
@ 2021-02-16 18:39 Sam James
0 siblings, 0 replies; 15+ messages in thread
From: Sam James @ 2021-02-16 18:39 UTC (permalink / raw
To: gentoo-commits
commit: e48d47568a6d300dce1d2980a0f221c53b1295a4
Author: Sergey Torokhov <torokhov-s-a <AT> yandex <DOT> ru>
AuthorDate: Sat Feb 13 12:52:14 2021 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Feb 16 18:39:29 2021 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e48d4756
sci-libs/cantera: 2.5.0 version bump
Cantera now use yaml as input format and thus depends on
'dev-cpp/yaml-cpp' and 'dev-python/ruamel-yaml'.
The following dependences in DEPEND are actually not required to build
and if absence the appropriate 2 tests just will be skipped:
test? (
python? (
$(python_gen_cond_dep '
dev-python/h5py[${PYTHON_MULTI_USEDEP}]
dev-python/pandas[${PYTHON_MULTI_USEDEP}]
')
)
Signed-off-by: Sergey Torokhov <torokhov-s-a <AT> yandex.ru>
Closes: https://github.com/gentoo/gentoo/pull/19448
Signed-off-by: Sam James <sam <AT> gentoo.org>
sci-libs/cantera/Manifest | 1 +
sci-libs/cantera/cantera-2.5.0.ebuild | 134 +++++++++++++++++++++++++
sci-libs/cantera/files/cantera-2.5.0_env.patch | 49 +++++++++
sci-libs/cantera/metadata.xml | 2 +-
4 files changed, 185 insertions(+), 1 deletion(-)
diff --git a/sci-libs/cantera/Manifest b/sci-libs/cantera/Manifest
index a4660bf3bfd..679cdd81f64 100644
--- a/sci-libs/cantera/Manifest
+++ b/sci-libs/cantera/Manifest
@@ -1 +1,2 @@
DIST cantera-2.4.0.tar.gz 2321316 BLAKE2B 40750e3864afa3d35817e6f5777a6ac235261e9d134ef749966dbd738a2af5efec2882e6dcc719851f88656b41469e2159d3bff3df32f6abdf57db3b0a2afcae SHA512 8bb0fee34fa5bc9ec78e6f21a100eaa77bdd966bd0b7f0fa27d452e4f122c69e61648beef847178490f5c5d56267a96f6081cac9ccd03cea153c32814e0e84e9
+DIST cantera-2.5.0.tar.gz 2479888 BLAKE2B be3dd9ae1b0d9b555b9ddd6ad78a2a6a675844903e4c10ef5e4a09c66d5ca01f81f49f35ee195597d71140dcc4da9750e82f71c6553b5f0ef8a122bf63b86cc1 SHA512 4f1763a74a4a938c6d4512ab574bcbbb84ea6e8c9814c612e6ff6cba0bec1209252ef7c21004e0df98a84279cf66bd137220233dad0ebbcfc89e9a273d753478
diff --git a/sci-libs/cantera/cantera-2.5.0.ebuild b/sci-libs/cantera/cantera-2.5.0.ebuild
new file mode 100644
index 00000000000..5f3b8c1280b
--- /dev/null
+++ b/sci-libs/cantera/cantera-2.5.0.ebuild
@@ -0,0 +1,134 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{7,8,9} )
+
+FORTRAN_NEEDED=fortran
+FORTRAN_STANDARD="77 90"
+
+inherit desktop fortran-2 python-single-r1 scons-utils toolchain-funcs
+
+DESCRIPTION="Object-oriented tool suite for chemical kinetics, thermodynamics, and transport"
+HOMEPAGE="https://www.cantera.org"
+SRC_URI="https://github.com/Cantera/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="+cti fortran pch +python test"
+RESTRICT="!test? ( test )"
+
+REQUIRED_USE="
+ python? ( cti )
+ ${PYTHON_REQUIRED_USE}
+"
+
+RDEPEND="
+ ${PYTHON_DEPS}
+ python? (
+ $(python_gen_cond_dep '
+ dev-python/numpy[${PYTHON_MULTI_USEDEP}]
+ dev-python/ruamel-yaml[${PYTHON_MULTI_USEDEP}]
+ ')
+ )
+ dev-cpp/yaml-cpp
+ <sci-libs/sundials-5.3.0:0=
+"
+
+DEPEND="
+ ${RDEPEND}
+ dev-cpp/eigen:3
+ dev-libs/boost
+ dev-libs/libfmt
+ python? (
+ $(python_gen_cond_dep '
+ dev-python/cython[${PYTHON_MULTI_USEDEP}]
+ ')
+ )
+ test? (
+ >=dev-cpp/gtest-1.8.0
+ python? (
+ $(python_gen_cond_dep '
+ dev-python/h5py[${PYTHON_MULTI_USEDEP}]
+ dev-python/pandas[${PYTHON_MULTI_USEDEP}]
+ ')
+ )
+ )
+"
+
+PATCHES=( "${FILESDIR}/${P}_env.patch" )
+
+pkg_setup() {
+ fortran-2_pkg_setup
+ python-single-r1_pkg_setup
+}
+
+## Full list of configuration options of Cantera is presented here:
+## http://cantera.org/docs/sphinx/html/compiling/config-options.html
+src_configure() {
+ scons_vars=(
+ CC="$(tc-getCC)"
+ CXX="$(tc-getCXX)"
+ cc_flags="${CXXFLAGS}"
+ cxx_flags="-std=c++11"
+ debug="no"
+ FORTRAN="$(tc-getFC)"
+ FORTRANFLAGS="${FCFLAGS}"
+ optimize_flags="-Wno-inline"
+ renamed_shared_libraries="no"
+ use_pch=$(usex pch)
+ ## In some cases other order can break the detection of right location of Boost: ##
+ system_fmt="y"
+ system_sundials="y"
+ system_eigen="y"
+ system_yamlcpp="y"
+ env_vars="all"
+ extra_inc_dirs="/usr/include/eigen3"
+ )
+ use test || scons_vars+=( googletest="none" )
+
+ scons_targets=(
+ f90_interface=$(usex fortran y n)
+ )
+
+ if use cti ; then
+ local scons_python=$(usex python full minimal)
+ scons_targets+=( python_package="${scons_python}" python_cmd="${EPYTHON}" )
+ else
+ scons_targets+=( python_package="none" )
+ fi
+}
+
+src_compile() {
+ escons build "${scons_vars[@]}" "${scons_targets[@]}" prefix="/usr"
+}
+
+src_test() {
+ escons test
+}
+
+src_install() {
+ escons install stage_dir="${D}" libdirname="$(get_libdir)" python_prefix="$(python_get_sitedir)"
+ if ! use cti ; then
+ rm -r "${D}/usr/share/man" || die "Can't remove man files."
+ else
+ # Run the byte-compile of modules
+ python_optimize "${D}/$(python_get_sitedir)/${PN}"
+ fi
+}
+
+pkg_postinst() {
+ if use cti && ! use python ; then
+ elog "Cantera was build without 'python' use-flag therefore the CTI tools 'ck2cti' and 'ck2yaml"
+ elog "will convert Chemkin files to Cantera format without verification of kinetic mechanism."
+ fi
+
+ local post_msg=$(usex fortran "and Fortran " "")
+ elog "C++ ${post_msg}samples are installed to '/usr/share/${PN}/samples/' directory."
+
+ if use python ; then
+ elog "Python examples are installed to '$(python_get_sitedir)/${PN}/examples/' directories."
+ fi
+}
diff --git a/sci-libs/cantera/files/cantera-2.5.0_env.patch b/sci-libs/cantera/files/cantera-2.5.0_env.patch
new file mode 100644
index 00000000000..9551d4b4ca1
--- /dev/null
+++ b/sci-libs/cantera/files/cantera-2.5.0_env.patch
@@ -0,0 +1,49 @@
+diff -Naur old/SConstruct new/SConstruct
+--- old/SConstruct 2021-02-13 01:18:43.000000000 +0300
++++ new/SConstruct 2021-02-13 01:27:06.000000000 +0300
+@@ -193,7 +193,7 @@
+ toolchain = ['default']
+
+ env = Environment(tools=toolchain+['textfile', 'subst', 'recursiveInstall', 'wix', 'gch'],
+- ENV={'PATH': os.environ['PATH']},
++ ENV={'PATH': os.environ['PATH'], 'CCACHE_DIR': os.environ.get('CCACHE_DIR','')},
+ toolchain=toolchain,
+ **extraEnvArgs)
+
+@@ -724,10 +724,7 @@
+ env['cantera_pure_version'] = re.match(r'(\d+\.\d+\.\d+)', env['cantera_version']).group(0)
+ env['cantera_short_version'] = re.match(r'(\d+\.\d+)', env['cantera_version']).group(0)
+
+-try:
+- env['git_commit'] = getCommandOutput('git', 'rev-parse', '--short', 'HEAD')
+-except Exception:
+- env['git_commit'] = 'unknown'
++env['git_commit'] = 'unknown'
+
+ # Print values of all build options:
+ print("Configuration variables read from 'cantera.conf' and command line:")
+diff -Naur old/interfaces/cython/SConscript new/interfaces/cython/SConscript
+--- old/interfaces/cython/SConscript 2021-02-13 01:18:43.000000000 +0300
++++ new/interfaces/cython/SConscript 2021-02-13 01:59:29.000000000 +0300
+@@ -108,8 +108,7 @@
+ elif localenv['libdirname'] != 'lib':
+ # 64-bit RHEL / Fedora etc. or e.g. x32 Gentoo profile
+ extra = localenv.subst(
+- ' --prefix=${{python_prefix}}'
+- ' --install-lib=${{python_prefix}}/${{libdirname}}/python{}/site-packages'.format(py_version))
++ ' --prefix=${stage_dir}${prefix} --install-lib=${python_prefix}')
+ else:
+ extra = '--user'
+ localenv.AppendENVPath(
+diff -Naur old/test_problems/SConscript new/test_problems/SConscript
+--- old/test_problems/SConscript 2021-02-13 01:18:43.000000000 +0300
++++ new/test_problems/SConscript 2021-02-13 01:42:19.000000000 +0300
+@@ -222,7 +222,7 @@
+ CompileAndTest('VPsilane_test')
+
+ CompileAndTest('clib', 'clib_test', 'clib_test',
+- extensions=['^clib_test.c'], libs=['cantera_shared'])
++ extensions=['^clib_test.c'])
+
+ # C++ Samples
+ Test('cxx-bvp', 'cxx_samples', '#build/samples/cxx/bvp/blasius', None,
diff --git a/sci-libs/cantera/metadata.xml b/sci-libs/cantera/metadata.xml
index 47bc86a9630..5ee7890c136 100644
--- a/sci-libs/cantera/metadata.xml
+++ b/sci-libs/cantera/metadata.xml
@@ -14,7 +14,7 @@
for problems involving chemical kinetics, thermodynamics, and/or transport processes.
</longdescription>
<use>
- <flag name="cti">Install CTI tools (ck2cti, ctml_writer) for conversion of Chemkin files to Cantera format</flag>
+ <flag name="cti">Install CTI tools (ck2cti, ck2yaml, ctml_writer) for conversion of Chemkin files to Cantera format</flag>
</use>
<upstream>
<remote-id type="github">cantera</remote-id>
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sci-libs/cantera/, sci-libs/cantera/files/
@ 2021-04-09 12:21 Joonas Niilola
0 siblings, 0 replies; 15+ messages in thread
From: Joonas Niilola @ 2021-04-09 12:21 UTC (permalink / raw
To: gentoo-commits
commit: 9e77a48bc44332f6c5a340fc86eb7072b2dd3ebe
Author: Sergey Torokhov <torokhov-s-a <AT> yandex <DOT> ru>
AuthorDate: Mon Mar 22 21:08:22 2021 +0000
Commit: Joonas Niilola <juippis <AT> gentoo <DOT> org>
CommitDate: Fri Apr 9 12:20:56 2021 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9e77a48b
sci-libs/cantera: 2.5.1 rev bump, pass AR env variable
Pass AR env variable to be able to use llvm-ar instead of ar.
Closes: https://bugs.gentoo.org/773541
Signed-off-by: Sergey Torokhov <torokhov-s-a <AT> yandex.ru>
Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>
sci-libs/cantera/cantera-2.5.1-r1.ebuild | 138 +++++++++++++++++++++++++
sci-libs/cantera/files/cantera-2.5.1_env.patch | 59 +++++++++++
2 files changed, 197 insertions(+)
diff --git a/sci-libs/cantera/cantera-2.5.1-r1.ebuild b/sci-libs/cantera/cantera-2.5.1-r1.ebuild
new file mode 100644
index 00000000000..4cf4cc6c3c3
--- /dev/null
+++ b/sci-libs/cantera/cantera-2.5.1-r1.ebuild
@@ -0,0 +1,138 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{7,8,9} )
+
+FORTRAN_NEEDED=fortran
+FORTRAN_STANDARD="77 90"
+
+inherit desktop fortran-2 python-single-r1 scons-utils toolchain-funcs
+
+DESCRIPTION="Object-oriented tool suite for chemical kinetics, thermodynamics, and transport"
+HOMEPAGE="https://www.cantera.org"
+SRC_URI="https://github.com/Cantera/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="+cti fortran pch +python test"
+RESTRICT="!test? ( test )"
+
+REQUIRED_USE="
+ python? ( cti )
+ ${PYTHON_REQUIRED_USE}
+"
+
+RDEPEND="
+ ${PYTHON_DEPS}
+ python? (
+ $(python_gen_cond_dep '
+ dev-python/numpy[${PYTHON_MULTI_USEDEP}]
+ dev-python/ruamel-yaml[${PYTHON_MULTI_USEDEP}]
+ ')
+ )
+ dev-cpp/yaml-cpp
+ <sci-libs/sundials-5.3.0:0=
+"
+
+DEPEND="
+ ${RDEPEND}
+ dev-cpp/eigen:3
+ dev-libs/boost
+ dev-libs/libfmt
+ python? (
+ $(python_gen_cond_dep '
+ dev-python/cython[${PYTHON_MULTI_USEDEP}]
+ ')
+ )
+ test? (
+ >=dev-cpp/gtest-1.8.0
+ python? (
+ $(python_gen_cond_dep '
+ dev-python/h5py[${PYTHON_MULTI_USEDEP}]
+ dev-python/pandas[${PYTHON_MULTI_USEDEP}]
+ ')
+ )
+ )
+"
+
+PATCHES=( "${FILESDIR}/${P}_env.patch" )
+
+pkg_setup() {
+ fortran-2_pkg_setup
+ python-single-r1_pkg_setup
+}
+
+## Full list of configuration options of Cantera is presented here:
+## http://cantera.org/docs/sphinx/html/compiling/config-options.html
+src_configure() {
+ scons_vars=(
+ AR="$(tc-getAR)"
+ CC="$(tc-getCC)"
+ CXX="$(tc-getCXX)"
+ cc_flags="${CXXFLAGS}"
+ cxx_flags="-std=c++11"
+ debug="no"
+ FORTRAN="$(tc-getFC)"
+ FORTRANFLAGS="${FCFLAGS}"
+ optimize_flags="-Wno-inline"
+ renamed_shared_libraries="no"
+ use_pch=$(usex pch)
+ ## In some cases other order can break the detection of right location of Boost: ##
+ system_fmt="y"
+ system_sundials="y"
+ system_eigen="y"
+ system_yamlcpp="y"
+ env_vars="all"
+ extra_inc_dirs="/usr/include/eigen3"
+ )
+ use test || scons_vars+=( googletest="none" )
+
+ scons_targets=(
+ f90_interface=$(usex fortran y n)
+ )
+
+ if use cti ; then
+ local scons_python=$(usex python full minimal)
+ scons_targets+=( python_package="${scons_python}" python_cmd="${EPYTHON}" )
+ else
+ scons_targets+=( python_package="none" )
+ fi
+}
+
+src_compile() {
+ escons build "${scons_vars[@]}" "${scons_targets[@]}" prefix="/usr"
+}
+
+src_test() {
+ escons test
+}
+
+src_install() {
+ escons install stage_dir="${D}" libdirname="$(get_libdir)" python_prefix="$(python_get_sitedir)"
+ if ! use cti ; then
+ rm -r "${D}/usr/share/man" || die "Can't remove man files."
+ else
+ # Run the byte-compile of modules
+ python_optimize "${D}/$(python_get_sitedir)/${PN}"
+ fi
+
+ # We install static libs unconditionally here
+ # See https://github.com/gentoo/gentoo/pull/10017#discussion_r229210565
+}
+
+pkg_postinst() {
+ if use cti && ! use python ; then
+ elog "Cantera was build without 'python' use-flag therefore the CTI tools 'ck2cti' and 'ck2yaml"
+ elog "will convert Chemkin files to Cantera format without verification of kinetic mechanism."
+ fi
+
+ local post_msg=$(usex fortran "and Fortran " "")
+ elog "C++ ${post_msg}samples are installed to '/usr/share/${PN}/samples/' directory."
+
+ if use python ; then
+ elog "Python examples are installed to '$(python_get_sitedir)/${PN}/examples/' directories."
+ fi
+}
diff --git a/sci-libs/cantera/files/cantera-2.5.1_env.patch b/sci-libs/cantera/files/cantera-2.5.1_env.patch
new file mode 100644
index 00000000000..b6b5deaf3fe
--- /dev/null
+++ b/sci-libs/cantera/files/cantera-2.5.1_env.patch
@@ -0,0 +1,59 @@
+diff -Naur old/SConstruct new/SConstruct
+--- old/SConstruct 2021-03-21 01:18:43.000000000 +0300
++++ new/SConstruct 2021-03-21 01:27:06.000000000 +0300
+@@ -193,7 +193,7 @@
+ toolchain = ['default']
+
+ env = Environment(tools=toolchain+['textfile', 'subst', 'recursiveInstall', 'wix', 'gch'],
+- ENV={'PATH': os.environ['PATH']},
++ ENV={'PATH': os.environ['PATH'], 'CCACHE_DIR': os.environ.get('CCACHE_DIR','')},
+ toolchain=toolchain,
+ **extraEnvArgs)
+
+@@ -239,6 +239,9 @@
+ sys.exit(1)
+
+ compiler_options = [
++ ('AR',
++ """The archiver to use.""",
++ env['AR']),
+ ('CXX',
+ """The C++ compiler to use.""",
+ env['CXX']),
+@@ -734,10 +734,7 @@
+ env['cantera_pure_version'] = re.match(r'(\d+\.\d+\.\d+)', env['cantera_version']).group(0)
+ env['cantera_short_version'] = re.match(r'(\d+\.\d+)', env['cantera_version']).group(0)
+
+-try:
+- env['git_commit'] = getCommandOutput('git', 'rev-parse', '--short', 'HEAD')
+-except Exception:
+- env['git_commit'] = 'unknown'
++env['git_commit'] = 'unknown'
+
+ # Print values of all build options:
+ print("Configuration variables read from 'cantera.conf' and command line:")
+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
+@@ -108,8 +108,7 @@
+ elif localenv['libdirname'] != 'lib':
+ # 64-bit RHEL / Fedora etc. or e.g. x32 Gentoo profile
+ extra = localenv.subst(
+- ' --prefix=${{python_prefix}}'
+- ' --install-lib=${{python_prefix}}/${{libdirname}}/python{}/site-packages'.format(py_version))
++ ' --prefix=${stage_dir}${prefix} --install-lib=${python_prefix}')
+ else:
+ extra = '--user'
+ localenv.AppendENVPath(
+diff -Naur old/test_problems/SConscript new/test_problems/SConscript
+--- old/test_problems/SConscript 2021-03-21 01:18:43.000000000 +0300
++++ new/test_problems/SConscript 2021-03-21 01:42:19.000000000 +0300
+@@ -222,7 +222,7 @@
+ CompileAndTest('VPsilane_test')
+
+ CompileAndTest('clib', 'clib_test', 'clib_test',
+- extensions=['^clib_test.c'], libs=['cantera_shared'])
++ extensions=['^clib_test.c'])
+
+ # C++ Samples
+ Test('cxx-bvp', 'cxx_samples', '#build/samples/cxx/bvp/blasius', None,
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sci-libs/cantera/, sci-libs/cantera/files/
@ 2021-04-10 0:09 Sam James
0 siblings, 0 replies; 15+ messages in thread
From: Sam James @ 2021-04-10 0:09 UTC (permalink / raw
To: gentoo-commits
commit: 3edb1ce84c666c8bb84f289e9992020d945788a9
Author: Sergey Torokhov <torokhov-s-a <AT> yandex <DOT> ru>
AuthorDate: Fri Apr 9 21:16:53 2021 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat Apr 10 00:08:57 2021 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3edb1ce8
sci-libs/cantera: 2.5.1 fix USE="cti -python" test and installation
USE="cti -python" provides python_minimal Cantera installation
but thisinterface had no appropriate patch to install
in proper site_packages directory in Gentoo.
Thus installation in this case was broken.
Also 'dev-python/ruamel-yaml' is required as RDEPEND
in this case and as DEPEND for test phase.
Signed-off-by: Sergey Torokhov <torokhov-s-a <AT> yandex.ru>
Closes: https://github.com/gentoo/gentoo/pull/20317
Signed-off-by: Sam James <sam <AT> gentoo.org>
sci-libs/cantera/cantera-2.5.1-r1.ebuild | 6 +++-
sci-libs/cantera/files/cantera-2.5.1_env.patch | 44 ++++++++++++++++++++++++++
2 files changed, 49 insertions(+), 1 deletion(-)
diff --git a/sci-libs/cantera/cantera-2.5.1-r1.ebuild b/sci-libs/cantera/cantera-2.5.1-r1.ebuild
index 2bf3e5d6a74..6f5345f106d 100644
--- a/sci-libs/cantera/cantera-2.5.1-r1.ebuild
+++ b/sci-libs/cantera/cantera-2.5.1-r1.ebuild
@@ -28,10 +28,14 @@ REQUIRED_USE="
RDEPEND="
${PYTHON_DEPS}
lapack? ( virtual/lapack )
+ cti? (
+ $(python_gen_cond_dep '
+ dev-python/ruamel-yaml[${PYTHON_MULTI_USEDEP}]
+ ')
+ )
python? (
$(python_gen_cond_dep '
dev-python/numpy[${PYTHON_MULTI_USEDEP}]
- dev-python/ruamel-yaml[${PYTHON_MULTI_USEDEP}]
')
)
dev-cpp/yaml-cpp
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 b6b5deaf3fe..576e2de2d57 100644
--- a/sci-libs/cantera/files/cantera-2.5.1_env.patch
+++ b/sci-libs/cantera/files/cantera-2.5.1_env.patch
@@ -45,6 +45,50 @@ diff -Naur old/interfaces/cython/SConscript new/interfaces/cython/SConscript
else:
extra = '--user'
localenv.AppendENVPath(
+diff -Naur old/interfaces/python_minimal/SConscript new/interfaces/python_minimal/SConscript
+--- old/interfaces/python_minimal/SConscript 2021-02-13 00:57:15.000000000 +0300
++++ new/interfaces/python_minimal/SConscript 2021-04-09 23:26:28.000000000 +0300
+@@ -8,7 +8,7 @@
+ make_setup = build(localenv.SubstFile('setup.py', 'setup.py.in'))
+
+ # copy scripts from the full Cython module
+-for script in ['ctml_writer', 'ck2cti']:
++for script in ['ctml_writer', 'ck2cti', 'ck2yaml', 'cti2yaml', 'ctml2yaml']:
+ # The actual script
+ s = build(env.Command('cantera/{}.py'.format(script),
+ '#interfaces/cython/cantera/{}.py'.format(script),
+@@ -38,8 +38,7 @@
+ elif localenv['libdirname'] != 'lib':
+ # 64-bit RHEL / Fedora etc. or e.g. x32 Gentoo profile
+ extra = localenv.subst(
+- ' --prefix=${{python_prefix}}'
+- ' --install-lib=${{python_prefix}}/${{libdirname}}/python{}/site-packages'.format(py_version))
++ ' --prefix=${stage_dir}${prefix} --install-lib=${python_prefix}')
+ else:
+ extra = '--user'
+ localenv.AppendENVPath(
+diff -Naur old/interfaces/python_minimal/cantera/__init__.py new/interfaces/python_minimal/cantera/__init__.py
+--- old/interfaces/python_minimal/cantera/__init__.py 2021-02-13 00:57:15.000000000 +0300
++++ new/interfaces/python_minimal/cantera/__init__.py 2021-04-10 00:07:38.000000000 +0300
+@@ -1,2 +1,5 @@
+ from . import ck2cti
+ from . import ctml_writer
++from . import ck2yaml
++from . import cti2yaml
++from . import ctml2yaml
+diff -Naur old/interfaces/python_minimal/setup.py.in new/interfaces/python_minimal/setup.py.in
+--- old/interfaces/python_minimal/setup.py.in 2021-02-13 00:57:15.000000000 +0300
++++ new/interfaces/python_minimal/setup.py.in 2021-04-09 23:32:09.000000000 +0300
+@@ -12,6 +12,9 @@
+ 'console_scripts': [
+ 'ck2cti=cantera.ck2cti:script_entry_point',
+ 'ctml_writer=cantera.ctml_writer:main',
++ 'ck2yaml=cantera.ck2yaml:script_entry_point',
++ 'cti2yaml=cantera.cti2yaml:main',
++ 'ctml2yaml=cantera.ctml2yaml:main',
+ ],
+ },
+ )
diff -Naur old/test_problems/SConscript new/test_problems/SConscript
--- old/test_problems/SConscript 2021-03-21 01:18:43.000000000 +0300
+++ new/test_problems/SConscript 2021-03-21 01:42:19.000000000 +0300
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sci-libs/cantera/, sci-libs/cantera/files/
@ 2021-05-27 21:06 David Seifert
0 siblings, 0 replies; 15+ messages in thread
From: David Seifert @ 2021-05-27 21:06 UTC (permalink / raw
To: gentoo-commits
commit: 8e369f73ed830f38516e689cc57527be94d7cce2
Author: Jakov Smolic <jakov.smolic <AT> sartura <DOT> hr>
AuthorDate: Thu May 27 21:05:23 2021 +0000
Commit: David Seifert <soap <AT> gentoo <DOT> org>
CommitDate: Thu May 27 21:05:23 2021 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8e369f73
sci-libs/cantera: Remove old 2.4.0-r5, 2.5.1
Signed-off-by: Jakov Smolic <jakov.smolic <AT> sartura.hr>
Signed-off-by: David Seifert <soap <AT> gentoo.org>
sci-libs/cantera/Manifest | 1 -
sci-libs/cantera/cantera-2.4.0-r5.ebuild | 131 -------------
sci-libs/cantera/cantera-2.5.1.ebuild | 137 --------------
sci-libs/cantera/files/cantera-2.5.0_env.patch | 49 -----
sci-libs/cantera/files/cantera_2.4.0_env.patch | 73 --------
.../cantera_2.4.0_env_python_install_prefix.patch | 17 --
.../cantera/files/cantera_2.4.0_sundials4.patch | 207 ---------------------
7 files changed, 615 deletions(-)
diff --git a/sci-libs/cantera/Manifest b/sci-libs/cantera/Manifest
index 6a29d4e0855..67533340104 100644
--- a/sci-libs/cantera/Manifest
+++ b/sci-libs/cantera/Manifest
@@ -1,2 +1 @@
-DIST cantera-2.4.0.tar.gz 2321316 BLAKE2B 40750e3864afa3d35817e6f5777a6ac235261e9d134ef749966dbd738a2af5efec2882e6dcc719851f88656b41469e2159d3bff3df32f6abdf57db3b0a2afcae SHA512 8bb0fee34fa5bc9ec78e6f21a100eaa77bdd966bd0b7f0fa27d452e4f122c69e61648beef847178490f5c5d56267a96f6081cac9ccd03cea153c32814e0e84e9
DIST cantera-2.5.1.tar.gz 2492422 BLAKE2B b48c5d12fc2b69d309759afd20b55dc2533c23ccba840109cf7a85c4ebb8306eb48d9f007914184a9d409f7bf296814fe09e6e62a29cf8384edd954fdff2af4e SHA512 8cd65f6b86b3009f22ec243cb7cb833e26919c4925fd15fba8fb98aad2180d8c0fe7550e13efeb7cce55abab06d9400230d59c9c43b4d3be6b0575b1164a56bc
diff --git a/sci-libs/cantera/cantera-2.4.0-r5.ebuild b/sci-libs/cantera/cantera-2.4.0-r5.ebuild
deleted file mode 100644
index 9e953bbc0bc..00000000000
--- a/sci-libs/cantera/cantera-2.4.0-r5.ebuild
+++ /dev/null
@@ -1,131 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_{7,8} )
-
-FORTRAN_NEEDED=fortran
-FORTRAN_STANDARD=90
-
-inherit desktop fortran-2 python-single-r1 scons-utils toolchain-funcs
-
-DESCRIPTION="Object-oriented tool suite for chemical kinetics, thermodynamics, and transport"
-HOMEPAGE="https://www.cantera.org"
-SRC_URI="https://github.com/Cantera/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
-
-LICENSE="BSD"
-SLOT="0"
-KEYWORDS="amd64 ~x86"
-IUSE="+cti fortran pch +python test"
-RESTRICT="!test? ( test )"
-
-REQUIRED_USE="
- python? ( cti )
- ${PYTHON_REQUIRED_USE}
- "
-
-RDEPEND="
- ${PYTHON_DEPS}
- python? (
- $(python_gen_cond_dep '
- dev-python/numpy[${PYTHON_MULTI_USEDEP}]
- ')
- )
- <sci-libs/sundials-5.3.0:0=
-"
-
-DEPEND="
- ${RDEPEND}
- dev-cpp/eigen:3
- dev-libs/boost
- dev-libs/libfmt
- python? (
- $(python_gen_cond_dep '
- dev-python/cython[${PYTHON_MULTI_USEDEP}]
- ')
- )
- test? (
- >=dev-cpp/gtest-1.8.0
- )
-"
-
-PATCHES=(
- "${FILESDIR}/${PN}_${PV}_env.patch"
- "${FILESDIR}/${PN}_${PV}_env_python_install_prefix.patch"
- "${FILESDIR}/${PN}_${PV}_sundials4.patch"
-)
-
-pkg_setup() {
- fortran-2_pkg_setup
- python-single-r1_pkg_setup
-}
-
-## Full list of configuration options of Cantera is presented here:
-## http://cantera.org/docs/sphinx/html/compiling/config-options.html
-
-src_configure() {
- scons_vars=(
- CC="$(tc-getCC)"
- CXX="$(tc-getCXX)"
- cc_flags="${CXXFLAGS}"
- cxx_flags="-std=c++11"
- debug="no"
- FORTRAN="$(tc-getFC)"
- FORTRANFLAGS="${FFLAGS}"
- optimize_flags="-Wno-inline"
- renamed_shared_libraries="no"
- use_pch=$(usex pch)
-## In some cases other order can break the detection of right location of Boost: ##
- system_fmt="y"
- system_sundials="y"
- system_eigen="y"
- env_vars="all"
- extra_inc_dirs="/usr/include/eigen3"
- )
- use test || scons_vars+=( googletest="none" )
-
- scons_targets=(
- f90_interface=$(usex fortran y n)
- python2_package="none"
- )
-
- if use cti ; then
- local scons_python=$(usex python full minimal)
- scons_targets+=( python3_package="${scons_python}" python3_cmd="${EPYTHON}" )
- else
- scons_targets+=( python3_package="none" )
- fi
-}
-
-src_compile() {
- escons build "${scons_vars[@]}" "${scons_targets[@]}" prefix="/usr"
-}
-
-src_test() {
- escons test
-}
-
-src_install() {
- escons install stage_dir="${D}" libdirname="$(get_libdir)" python3_prefix="$(python_get_sitedir)"
- if ! use cti ; then
- rm -r "${D}/usr/share/man" || die "Can't remove man files."
- else
- # Run the byte-compile of modules
- python_optimize "${D}/$(python_get_sitedir)/${PN}"
- fi
-}
-
-pkg_postinst() {
- if use cti && ! use python ; then
- elog "Cantera was build without 'python' use-flag therefore the CTI tool 'ck2cti'"
- elog "will convert Chemkin files to Cantera format without verification of kinetic mechanism."
- fi
-
- local post_msg=$(usex fortran "and Fortran " "")
- elog "C++ ${post_msg}samples are installed to '/usr/share/${PN}/samples/' directory."
-
- if use python ; then
- elog "Python examples are installed to '$(python_get_sitedir)/${PN}/examples/' directories."
- fi
-}
diff --git a/sci-libs/cantera/cantera-2.5.1.ebuild b/sci-libs/cantera/cantera-2.5.1.ebuild
deleted file mode 100644
index 71ba0f78c0f..00000000000
--- a/sci-libs/cantera/cantera-2.5.1.ebuild
+++ /dev/null
@@ -1,137 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_{7,8,9} )
-
-FORTRAN_NEEDED=fortran
-FORTRAN_STANDARD="77 90"
-
-inherit desktop fortran-2 python-single-r1 scons-utils toolchain-funcs
-
-DESCRIPTION="Object-oriented tool suite for chemical kinetics, thermodynamics, and transport"
-HOMEPAGE="https://www.cantera.org"
-SRC_URI="https://github.com/Cantera/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
-
-LICENSE="BSD"
-SLOT="0"
-KEYWORDS="~amd64 ~x86"
-IUSE="+cti fortran pch +python test"
-RESTRICT="!test? ( test )"
-
-REQUIRED_USE="
- python? ( cti )
- ${PYTHON_REQUIRED_USE}
-"
-
-RDEPEND="
- ${PYTHON_DEPS}
- python? (
- $(python_gen_cond_dep '
- dev-python/numpy[${PYTHON_MULTI_USEDEP}]
- dev-python/ruamel-yaml[${PYTHON_MULTI_USEDEP}]
- ')
- )
- dev-cpp/yaml-cpp
- <sci-libs/sundials-5.3.0:0=
-"
-
-DEPEND="
- ${RDEPEND}
- dev-cpp/eigen:3
- dev-libs/boost
- dev-libs/libfmt
- python? (
- $(python_gen_cond_dep '
- dev-python/cython[${PYTHON_MULTI_USEDEP}]
- ')
- )
- test? (
- >=dev-cpp/gtest-1.8.0
- python? (
- $(python_gen_cond_dep '
- dev-python/h5py[${PYTHON_MULTI_USEDEP}]
- dev-python/pandas[${PYTHON_MULTI_USEDEP}]
- ')
- )
- )
-"
-
-PATCHES=( "${FILESDIR}/${PN}-2.5.0_env.patch" )
-
-pkg_setup() {
- fortran-2_pkg_setup
- python-single-r1_pkg_setup
-}
-
-## Full list of configuration options of Cantera is presented here:
-## http://cantera.org/docs/sphinx/html/compiling/config-options.html
-src_configure() {
- scons_vars=(
- CC="$(tc-getCC)"
- CXX="$(tc-getCXX)"
- cc_flags="${CXXFLAGS}"
- cxx_flags="-std=c++11"
- debug="no"
- FORTRAN="$(tc-getFC)"
- FORTRANFLAGS="${FCFLAGS}"
- optimize_flags="-Wno-inline"
- renamed_shared_libraries="no"
- use_pch=$(usex pch)
- ## In some cases other order can break the detection of right location of Boost: ##
- system_fmt="y"
- system_sundials="y"
- system_eigen="y"
- system_yamlcpp="y"
- env_vars="all"
- extra_inc_dirs="/usr/include/eigen3"
- )
- use test || scons_vars+=( googletest="none" )
-
- scons_targets=(
- f90_interface=$(usex fortran y n)
- )
-
- if use cti ; then
- local scons_python=$(usex python full minimal)
- scons_targets+=( python_package="${scons_python}" python_cmd="${EPYTHON}" )
- else
- scons_targets+=( python_package="none" )
- fi
-}
-
-src_compile() {
- escons build "${scons_vars[@]}" "${scons_targets[@]}" prefix="/usr"
-}
-
-src_test() {
- escons test
-}
-
-src_install() {
- escons install stage_dir="${D}" libdirname="$(get_libdir)" python_prefix="$(python_get_sitedir)"
- if ! use cti ; then
- rm -r "${D}/usr/share/man" || die "Can't remove man files."
- else
- # Run the byte-compile of modules
- python_optimize "${D}/$(python_get_sitedir)/${PN}"
- fi
-
- # We install static libs unconditionally here
- # See https://github.com/gentoo/gentoo/pull/10017#discussion_r229210565
-}
-
-pkg_postinst() {
- if use cti && ! use python ; then
- elog "Cantera was build without 'python' use-flag therefore the CTI tools 'ck2cti' and 'ck2yaml"
- elog "will convert Chemkin files to Cantera format without verification of kinetic mechanism."
- fi
-
- local post_msg=$(usex fortran "and Fortran " "")
- elog "C++ ${post_msg}samples are installed to '/usr/share/${PN}/samples/' directory."
-
- if use python ; then
- elog "Python examples are installed to '$(python_get_sitedir)/${PN}/examples/' directories."
- fi
-}
diff --git a/sci-libs/cantera/files/cantera-2.5.0_env.patch b/sci-libs/cantera/files/cantera-2.5.0_env.patch
deleted file mode 100644
index 9551d4b4ca1..00000000000
--- a/sci-libs/cantera/files/cantera-2.5.0_env.patch
+++ /dev/null
@@ -1,49 +0,0 @@
-diff -Naur old/SConstruct new/SConstruct
---- old/SConstruct 2021-02-13 01:18:43.000000000 +0300
-+++ new/SConstruct 2021-02-13 01:27:06.000000000 +0300
-@@ -193,7 +193,7 @@
- toolchain = ['default']
-
- env = Environment(tools=toolchain+['textfile', 'subst', 'recursiveInstall', 'wix', 'gch'],
-- ENV={'PATH': os.environ['PATH']},
-+ ENV={'PATH': os.environ['PATH'], 'CCACHE_DIR': os.environ.get('CCACHE_DIR','')},
- toolchain=toolchain,
- **extraEnvArgs)
-
-@@ -724,10 +724,7 @@
- env['cantera_pure_version'] = re.match(r'(\d+\.\d+\.\d+)', env['cantera_version']).group(0)
- env['cantera_short_version'] = re.match(r'(\d+\.\d+)', env['cantera_version']).group(0)
-
--try:
-- env['git_commit'] = getCommandOutput('git', 'rev-parse', '--short', 'HEAD')
--except Exception:
-- env['git_commit'] = 'unknown'
-+env['git_commit'] = 'unknown'
-
- # Print values of all build options:
- print("Configuration variables read from 'cantera.conf' and command line:")
-diff -Naur old/interfaces/cython/SConscript new/interfaces/cython/SConscript
---- old/interfaces/cython/SConscript 2021-02-13 01:18:43.000000000 +0300
-+++ new/interfaces/cython/SConscript 2021-02-13 01:59:29.000000000 +0300
-@@ -108,8 +108,7 @@
- elif localenv['libdirname'] != 'lib':
- # 64-bit RHEL / Fedora etc. or e.g. x32 Gentoo profile
- extra = localenv.subst(
-- ' --prefix=${{python_prefix}}'
-- ' --install-lib=${{python_prefix}}/${{libdirname}}/python{}/site-packages'.format(py_version))
-+ ' --prefix=${stage_dir}${prefix} --install-lib=${python_prefix}')
- else:
- extra = '--user'
- localenv.AppendENVPath(
-diff -Naur old/test_problems/SConscript new/test_problems/SConscript
---- old/test_problems/SConscript 2021-02-13 01:18:43.000000000 +0300
-+++ new/test_problems/SConscript 2021-02-13 01:42:19.000000000 +0300
-@@ -222,7 +222,7 @@
- CompileAndTest('VPsilane_test')
-
- CompileAndTest('clib', 'clib_test', 'clib_test',
-- extensions=['^clib_test.c'], libs=['cantera_shared'])
-+ extensions=['^clib_test.c'])
-
- # C++ Samples
- Test('cxx-bvp', 'cxx_samples', '#build/samples/cxx/bvp/blasius', None,
diff --git a/sci-libs/cantera/files/cantera_2.4.0_env.patch b/sci-libs/cantera/files/cantera_2.4.0_env.patch
deleted file mode 100644
index 8b0926f7b91..00000000000
--- a/sci-libs/cantera/files/cantera_2.4.0_env.patch
+++ /dev/null
@@ -1,73 +0,0 @@
-diff -Nur old/cantera-2.4.0/SConstruct new/cantera-2.4.0/SConstruct
---- old/SConstruct 2018-08-24 16:24:45.000000000 +0300
-+++ new/SConstruct 2019-07-17 15:50:06.000000000 +0300
-@@ -189,7 +189,7 @@
- toolchain = ['default']
-
- env = Environment(tools=toolchain+['textfile', 'subst', 'recursiveInstall', 'wix', 'gch'],
-- ENV={'PATH': os.environ['PATH']},
-+ ENV={'PATH': os.environ['PATH'], 'CCACHE_DIR': os.environ.get('CCACHE_DIR','')},
- toolchain=toolchain,
- **extraEnvArgs)
-
-@@ -327,6 +327,14 @@
- 'prefix',
- 'Set this to the directory where Cantera should be installed.',
- defaults.prefix, PathVariable.PathAccept),
-+ PathVariable(
-+ 'libdirname',
-+ """Set this to the directory where Cantera libraries should be installed.
-+ Some distributions (e.g. Fedora/RHEL) use 'lib64' instead of 'lib' on 64-bit systems
-+ or could use some other library directory name instead of 'lib' depends
-+ on architecture and profile (e.g. Gentoo 'libx32' on x32 profile).
-+ If user didn't set 'libdirname' configuration variable set it to default value 'lib'""",
-+ 'lib', PathVariable.PathAccept),
- EnumVariable(
- 'python_package',
- """If you plan to work in Python, then you need the ``full`` Cantera Python
-@@ -723,10 +731,7 @@
- env['cantera_pure_version'] = '.'.join(str(x) for x in ctversion.version)
- env['cantera_short_version'] = '.'.join(str(x) for x in ctversion.version[:2])
-
--try:
-- env['git_commit'] = getCommandOutput('git', 'rev-parse', '--short', 'HEAD')
--except Exception:
-- env['git_commit'] = 'unknown'
-+env['git_commit'] = 'unknown'
-
- # Print values of all build options:
- print("Configuration variables read from 'cantera.conf' and command line:")
-@@ -1061,7 +1066,7 @@
-
- # Ignore the minor version, e.g. 2.4.x -> 2.4
- env['sundials_version'] = '.'.join(sundials_version.split('.')[:2])
-- if env['sundials_version'] not in ('2.4','2.5','2.6','2.7','3.0','3.1'):
-+ if env['sundials_version'] not in ('2.4','2.5','2.6','2.7','3.0','3.1','3.2'):
- print("""ERROR: Sundials version %r is not supported.""" % env['sundials_version'])
- sys.exit(1)
- print("""INFO: Using system installation of Sundials version %s.""" % sundials_version)
-@@ -1465,12 +1470,6 @@
- # *** Set additional configuration variables ***
- # **********************************************
-
--# Some distributions (e.g. Fedora/RHEL) use 'lib64' instead of 'lib' on 64-bit systems
--if any(name.startswith('/usr/lib64/python') for name in sys.path):
-- env['libdirname'] = 'lib64'
--else:
-- env['libdirname'] = 'lib'
--
- # On Debian-based systems, need to special-case installation to
- # /usr/local because of dist-packages vs site-packages
- env['debian'] = any(name.endswith('dist-packages') for name in sys.path)
-diff -Nur old/cantera-2.4.0/test_problems/SConscript new/cantera-2.4.0/test_problems/SConscript
---- old/test_problems/SConscript 2018-08-24 16:24:45.000000000 +0300
-+++ new/test_problems/SConscript 2019-07-17 15:41:35.000000000 +0300
-@@ -282,7 +282,7 @@
- CompileAndTest('VPsilane_test', 'VPsilane_test', 'VPsilane_test', 'output_blessed.txt')
-
- CompileAndTest('clib', 'clib_test', 'clib_test', 'output_blessed.txt',
-- extensions=['^clib_test.c'], libs=['cantera_shared'])
-+ extensions=['^clib_test.c'])
-
- # Force explicitly-named tests to run even if SCons thinks they're up to date
- for command in COMMAND_LINE_TARGETS:
diff --git a/sci-libs/cantera/files/cantera_2.4.0_env_python_install_prefix.patch b/sci-libs/cantera/files/cantera_2.4.0_env_python_install_prefix.patch
deleted file mode 100644
index 83890799636..00000000000
--- a/sci-libs/cantera/files/cantera_2.4.0_env_python_install_prefix.patch
+++ /dev/null
@@ -1,17 +0,0 @@
-diff -Nur old/interfaces/cython/SConscript new/interfaces/cython/SConscript
---- old/interfaces/cython/SConscript 2018-08-24 16:24:45.000000000 +0300
-+++ new/interfaces/cython/SConscript 2019-08-14 04:28:41.000000000 +0300
-@@ -83,10 +83,10 @@
- extra = ''
- elif localenv['OS'] == 'Darwin':
- extra = localenv.subst(' --prefix=${python%s_prefix}' % major)
-- elif localenv['libdirname'] == 'lib64':
-- # 64-bit RHEL / Fedora
-+ elif localenv['libdirname'] != 'lib':
-+ # 64-bit RHEL / Fedora etc. or e.g. x32 Gentoo profile
- extra = localenv.subst(
-- ' --prefix=${python%s_prefix} --install-lib=${python%s_prefix}/lib64/python%s.%s/site-packages' % (major, major, major, minor))
-+ ' --prefix=${stage_dir}${prefix} --install-lib=${python%s_prefix}' % (major))
- else:
- extra = '--user'
- localenv.AppendENVPath(
diff --git a/sci-libs/cantera/files/cantera_2.4.0_sundials4.patch b/sci-libs/cantera/files/cantera_2.4.0_sundials4.patch
deleted file mode 100644
index 0b4d3abf854..00000000000
--- a/sci-libs/cantera/files/cantera_2.4.0_sundials4.patch
+++ /dev/null
@@ -1,207 +0,0 @@
-diff -Naur a/SConstruct b/SConstruct
---- a/SConstruct 2020-04-21 13:55:06.000000000 +0300
-+++ b/SConstruct 2020-04-21 13:55:54.000000000 +0300
-@@ -1013,23 +1013,29 @@
-
- import SCons.Conftest, SCons.SConf
- context = SCons.SConf.CheckContext(conf)
--ret = SCons.Conftest.CheckLib(context,
-- ['sundials_cvodes'],
-- header='#include "cvodes/cvodes.h"',
-- language='C++',
-- call='CVodeCreate(CV_BDF, CV_NEWTON);',
-- autoadd=False,
-- extra_libs=env['blas_lapack_libs'])
--if ret:
-+
-+# Check initially for Sundials<=3.2 and then for Sundials>=4.0
-+for cvode_call in ['CVodeCreate(CV_BDF, CV_NEWTON);','CVodeCreate(CV_BDF);']:
-+ ret = SCons.Conftest.CheckLib(context,
-+ ['sundials_cvodes'],
-+ header='#include "cvodes/cvodes.h"',
-+ language='C++',
-+ call=cvode_call,
-+ autoadd=False,
-+ extra_libs=env['blas_lapack_libs'])
- # CheckLib returns False to indicate success
-+ if not ret:
-+ if env['system_sundials'] == 'default':
-+ env['system_sundials'] = 'y'
-+ break
-+
-+# Execute if the cycle ends without 'break'
-+else:
- if env['system_sundials'] == 'default':
- env['system_sundials'] = 'n'
- elif env['system_sundials'] == 'y':
- config_error('Expected system installation of Sundials, but it could '
- 'not be found.')
--elif env['system_sundials'] == 'default':
-- env['system_sundials'] = 'y'
--
-
- # Checkout Sundials submodule if needed
- if (env['system_sundials'] == 'n' and
-@@ -1066,13 +1072,14 @@
-
- # Ignore the minor version, e.g. 2.4.x -> 2.4
- env['sundials_version'] = '.'.join(sundials_version.split('.')[:2])
-- if env['sundials_version'] not in ('2.4','2.5','2.6','2.7','3.0','3.1','3.2'):
-+ sundials_ver = LooseVersion(env['sundials_version'])
-+ if sundials_ver < LooseVersion('2.4') or sundials_ver >= LooseVersion('6.0'):
- print("""ERROR: Sundials version %r is not supported.""" % env['sundials_version'])
- sys.exit(1)
- print("""INFO: Using system installation of Sundials version %s.""" % sundials_version)
-
- #Determine whether or not Sundials was built with BLAS/LAPACK
-- if LooseVersion(env['sundials_version']) < LooseVersion('2.6'):
-+ if sundials_ver < LooseVersion('2.6'):
- # In Sundials 2.4 / 2.5, SUNDIALS_BLAS_LAPACK is either 0 or 1
- sundials_blas_lapack = get_expression_value(['"sundials/sundials_config.h"'],
- 'SUNDIALS_BLAS_LAPACK')
-@@ -1690,7 +1697,7 @@
-
- if env['system_sundials'] == 'y':
- env['sundials_libs'] = ['sundials_cvodes', 'sundials_ida', 'sundials_nvecserial']
-- if env['use_lapack'] and LooseVersion(env['sundials_version']) >= LooseVersion('3.0'):
-+ if env['use_lapack'] and sundials_ver >= LooseVersion('3.0'):
- if env.get('has_sundials_lapack'):
- env['sundials_libs'].extend(('sundials_sunlinsollapackdense',
- 'sundials_sunlinsollapackband'))
-diff -Naur a/include/cantera/numerics/CVodesIntegrator.h b/include/cantera/numerics/CVodesIntegrator.h
---- a/include/cantera/numerics/CVodesIntegrator.h 2018-08-24 16:24:45.000000000 +0300
-+++ b/include/cantera/numerics/CVodesIntegrator.h 2020-04-21 13:55:54.000000000 +0300
-@@ -49,7 +49,6 @@
- m_maxord = n;
- }
- virtual void setMethod(MethodType t);
-- virtual void setIterator(IterType t);
- virtual void setMaxStepSize(double hmax);
- virtual void setMinStepSize(double hmin);
- virtual void setMaxSteps(int nmax);
-diff -Naur a/include/cantera/numerics/Integrator.h b/include/cantera/numerics/Integrator.h
---- a/include/cantera/numerics/Integrator.h 2018-08-24 16:24:45.000000000 +0300
-+++ b/include/cantera/numerics/Integrator.h 2020-04-21 13:55:54.000000000 +0300
-@@ -34,17 +34,6 @@
- Adams_Method //! Adams
- };
-
--//! Specifies the method used for iteration.
--/*!
-- * Not all methods are supported by all integrators.
-- */
--enum IterType {
-- //! Newton Iteration
-- Newton_Iter,
-- //! Functional Iteration
-- Functional_Iter
--};
--
- //! Abstract base class for ODE system integrators.
- /*!
- * @ingroup odeGroup
-@@ -163,11 +152,6 @@
- warn("setMethodType");
- }
-
-- //! Set the linear iterator.
-- virtual void setIterator(IterType t) {
-- warn("setInterator");
-- }
--
- //! Set the maximum step size
- virtual void setMaxStepSize(double hmax) {
- warn("setMaxStepSize");
-diff -Naur a/src/kinetics/ImplicitSurfChem.cpp b/src/kinetics/ImplicitSurfChem.cpp
---- a/src/kinetics/ImplicitSurfChem.cpp 2018-08-24 16:24:45.000000000 +0300
-+++ b/src/kinetics/ImplicitSurfChem.cpp 2020-04-21 13:55:54.000000000 +0300
-@@ -79,7 +79,6 @@
- // numerically, and use a Newton linear iterator
- m_integ->setMethod(BDF_Method);
- m_integ->setProblemType(DENSE + NOJAC);
-- m_integ->setIterator(Newton_Iter);
- m_work.resize(ntmax);
- }
-
-diff -Naur a/src/numerics/CVodesIntegrator.cpp b/src/numerics/CVodesIntegrator.cpp
---- a/src/numerics/CVodesIntegrator.cpp 2018-08-24 16:24:45.000000000 +0300
-+++ b/src/numerics/CVodesIntegrator.cpp 2020-04-21 13:55:54.000000000 +0300
-@@ -88,7 +88,6 @@
- m_type(DENSE+NOJAC),
- m_itol(CV_SS),
- m_method(CV_BDF),
-- m_iter(CV_NEWTON),
- m_maxord(0),
- m_reltol(1.e-9),
- m_abstols(1.e-15),
-@@ -218,17 +217,6 @@
- }
- }
-
--void CVodesIntegrator::setIterator(IterType t)
--{
-- if (t == Newton_Iter) {
-- m_iter = CV_NEWTON;
-- } else if (t == Functional_Iter) {
-- m_iter = CV_FUNCTIONAL;
-- } else {
-- throw CanteraError("CVodesIntegrator::setIterator", "unknown iterator");
-- }
--}
--
- void CVodesIntegrator::sensInit(double t0, FuncEval& func)
- {
- m_np = func.nparams();
-@@ -284,7 +272,11 @@
- //! Specify the method and the iteration type. Cantera Defaults:
- //! CV_BDF - Use BDF methods
- //! CV_NEWTON - use Newton's method
-- m_cvode_mem = CVodeCreate(m_method, m_iter);
-+ #if CT_SUNDIALS_VERSION < 40
-+ m_cvode_mem = CVodeCreate(m_method, CV_NEWTON);
-+ #else
-+ m_cvode_mem = CVodeCreate(m_method);
-+ #endif
- if (!m_cvode_mem) {
- throw CanteraError("CVodesIntegrator::initialize",
- "CVodeCreate failed.");
-@@ -394,7 +386,11 @@
- #if CT_SUNDIALS_VERSION >= 30
- SUNLinSolFree((SUNLinearSolver) m_linsol);
- SUNMatDestroy((SUNMatrix) m_linsol_matrix);
-- m_linsol_matrix = SUNBandMatrix(N, nu, nl, nu+nl);
-+ #if CT_SUNDIALS_VERSION < 40
-+ m_linsol_matrix = SUNBandMatrix(N, nu, nl, nu+nl);
-+ #else
-+ m_linsol_matrix = SUNBandMatrix(N, nu, nl);
-+ #endif
- #if CT_SUNDIALS_USE_LAPACK
- m_linsol = SUNLapackBand(m_y, (SUNMatrix) m_linsol_matrix);
- #else
-diff -Naur a/src/numerics/IDA_Solver.cpp b/src/numerics/IDA_Solver.cpp
---- a/src/numerics/IDA_Solver.cpp 2018-08-24 16:24:45.000000000 +0300
-+++ b/src/numerics/IDA_Solver.cpp 2020-04-21 13:55:54.000000000 +0300
-@@ -442,7 +442,11 @@
- #if CT_SUNDIALS_VERSION >= 30
- SUNLinSolFree((SUNLinearSolver) m_linsol);
- SUNMatDestroy((SUNMatrix) m_linsol_matrix);
-- m_linsol_matrix = SUNBandMatrix(N, nu, nl, nu+nl);
-+ #if CT_SUNDIALS_VERSION < 40
-+ m_linsol_matrix = SUNBandMatrix(N, nu, nl, nu+nl);
-+ #else
-+ m_linsol_matrix = SUNBandMatrix(N, nu, nl);
-+ #endif
- #if CT_SUNDIALS_USE_LAPACK
- m_linsol = SUNLapackBand(m_y, (SUNMatrix) m_linsol_matrix);
- #else
-diff -Naur a/src/zeroD/ReactorNet.cpp b/src/zeroD/ReactorNet.cpp
---- a/src/zeroD/ReactorNet.cpp 2018-08-24 16:24:45.000000000 +0300
-+++ b/src/zeroD/ReactorNet.cpp 2020-04-21 13:55:54.000000000 +0300
-@@ -28,7 +28,6 @@
- // numerically, and use a Newton linear iterator
- m_integ->setMethod(BDF_Method);
- m_integ->setProblemType(DENSE + NOJAC);
-- m_integ->setIterator(Newton_Iter);
- }
-
- void ReactorNet::setInitialTime(double time)
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sci-libs/cantera/, sci-libs/cantera/files/
@ 2022-06-07 7:45 Sam James
0 siblings, 0 replies; 15+ messages in thread
From: Sam James @ 2022-06-07 7:45 UTC (permalink / raw
To: gentoo-commits
commit: 5b37420a57390e4fbc7abf0ea78570f0b4204da5
Author: Sergey Torokhov <torokhov-s-a <AT> yandex <DOT> ru>
AuthorDate: Mon Jun 6 22:19:56 2022 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Jun 7 07:44:04 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5b37420a
sci-libs/cantera: restrict sci-libs/sundials for sci-libs/cantera[lapack]
It seems that >=sci-libs/cantera-2.5.1-r3[lapack] tests are
currently broken if build against >=sci-libs/sundials-5.8.0[lapack].
The cantera-2.5.1_env.patch is updated here to proper check
if >=sundials-5.5 is build with lapack support.
This change doesn't affect cantera-2.5.1-r1 at all
and allow to build cantera-2.5.1-r3 against sundials[lapack]
but in cantera-2.5.1-r4 restriction of sundials is used.
So revbump is assumed to keep stablized.
Signed-off-by: Sergey Torokhov <torokhov-s-a <AT> yandex.ru>
Closes: https://github.com/gentoo/gentoo/pull/25779
Signed-off-by: Sam James <sam <AT> gentoo.org>
sci-libs/cantera/cantera-2.5.1-r1.ebuild | 2 +-
...era-2.5.1-r3.ebuild => cantera-2.5.1-r4.ebuild} | 3 ++-
...antera-2.6.0.ebuild => cantera-2.6.0-r1.ebuild} | 3 ++-
sci-libs/cantera/files/cantera-2.5.1_env.patch | 27 ++++++++++++++++++++++
4 files changed, 32 insertions(+), 3 deletions(-)
diff --git a/sci-libs/cantera/cantera-2.5.1-r1.ebuild b/sci-libs/cantera/cantera-2.5.1-r1.ebuild
index 659722a8c3cf..5deadec53ca2 100644
--- a/sci-libs/cantera/cantera-2.5.1-r1.ebuild
+++ b/sci-libs/cantera/cantera-2.5.1-r1.ebuild
@@ -8,7 +8,7 @@ PYTHON_COMPAT=( python3_{8,9} )
FORTRAN_NEEDED=fortran
FORTRAN_STANDARD="77 90"
-inherit desktop fortran-2 python-single-r1 scons-utils toolchain-funcs
+inherit fortran-2 python-single-r1 scons-utils toolchain-funcs
DESCRIPTION="Object-oriented tool suite for chemical kinetics, thermodynamics, and transport"
HOMEPAGE="https://www.cantera.org"
diff --git a/sci-libs/cantera/cantera-2.5.1-r3.ebuild b/sci-libs/cantera/cantera-2.5.1-r4.ebuild
similarity index 97%
rename from sci-libs/cantera/cantera-2.5.1-r3.ebuild
rename to sci-libs/cantera/cantera-2.5.1-r4.ebuild
index dad4dddb283b..cd12713f6574 100644
--- a/sci-libs/cantera/cantera-2.5.1-r3.ebuild
+++ b/sci-libs/cantera/cantera-2.5.1-r4.ebuild
@@ -39,7 +39,8 @@ RDEPEND="
')
)
dev-cpp/yaml-cpp
- <sci-libs/sundials-5.9.0:0=[lapack?]
+ !lapack? ( <sci-libs/sundials-5.9.0:0= )
+ lapack? ( <sci-libs/sundials-5.3.0:0=[lapack] )
"
DEPEND="
diff --git a/sci-libs/cantera/cantera-2.6.0.ebuild b/sci-libs/cantera/cantera-2.6.0-r1.ebuild
similarity index 97%
rename from sci-libs/cantera/cantera-2.6.0.ebuild
rename to sci-libs/cantera/cantera-2.6.0-r1.ebuild
index 35884d896367..fb800fb485b5 100644
--- a/sci-libs/cantera/cantera-2.6.0.ebuild
+++ b/sci-libs/cantera/cantera-2.6.0-r1.ebuild
@@ -39,7 +39,8 @@ RDEPEND="
')
)
dev-cpp/yaml-cpp
- <sci-libs/sundials-5.9.0:0=[lapack?]
+ !lapack? ( sci-libs/sundials:0= )
+ lapack? ( <sci-libs/sundials-5.3.0:0=[lapack?] )
"
DEPEND="
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
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sci-libs/cantera/, sci-libs/cantera/files/
@ 2023-01-30 10:35 Andrew Ammerlaan
0 siblings, 0 replies; 15+ messages in thread
From: Andrew Ammerlaan @ 2023-01-30 10:35 UTC (permalink / raw
To: gentoo-commits
commit: bfc20ea17c60b59183334f78da824b39077ebcae
Author: Sergey Torokhov <torokhov-s-a <AT> yandex <DOT> ru>
AuthorDate: Tue Dec 27 21:32:46 2022 +0000
Commit: Andrew Ammerlaan <andrewammerlaan <AT> gentoo <DOT> org>
CommitDate: Mon Jan 30 09:59:56 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bfc20ea1
sci-libs/cantera: 2.6.0-r2 revision bump
1. EAPI8 bump
2. Add Python 3.11 compat, rm deprecated open U option (upstream patch)
3. Rectrict USE=lapack with >=sci-libs/sundials-6.5.0[lapack?]
4. Set std=c++14 to avoid build fail with upcoming dev-libs/boost-1.82
and sci-libs/sundials-6.5.0 detection (the last is strange).
Bug: https://bugs.gentoo.org/888667
Closes: https://bugs.gentoo.org/888527
Closes: https://bugs.gentoo.org/890427
Signed-off-by: Sergey Torokhov <torokhov-s-a <AT> yandex.ru>
Signed-off-by: Andrew Ammerlaan <andrewammerlaan <AT> gentoo.org>
sci-libs/cantera/cantera-2.6.0-r2.ebuild | 151 +++++++++++++++++++++
...ntera-2.6.0_drop_deprecated_open_U_option.patch | 49 +++++++
2 files changed, 200 insertions(+)
diff --git a/sci-libs/cantera/cantera-2.6.0-r2.ebuild b/sci-libs/cantera/cantera-2.6.0-r2.ebuild
new file mode 100644
index 000000000000..31d393df1c40
--- /dev/null
+++ b/sci-libs/cantera/cantera-2.6.0-r2.ebuild
@@ -0,0 +1,151 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{9..11} )
+
+FORTRAN_NEEDED=fortran
+FORTRAN_STANDARD="77 90"
+
+inherit fortran-2 python-single-r1 scons-utils toolchain-funcs
+
+DESCRIPTION="Object-oriented tool suite for chemical kinetics, thermodynamics, and transport"
+HOMEPAGE="https://www.cantera.org"
+SRC_URI="https://github.com/Cantera/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="+cti fortran lapack +python test"
+RESTRICT="!test? ( test )"
+
+REQUIRED_USE="
+ python? ( cti )
+ ${PYTHON_REQUIRED_USE}
+"
+
+RDEPEND="
+ ${PYTHON_DEPS}
+ lapack? ( virtual/lapack )
+ cti? (
+ $(python_gen_cond_dep '
+ dev-python/ruamel-yaml[${PYTHON_USEDEP}]
+ ')
+ )
+ python? (
+ $(python_gen_cond_dep '
+ dev-python/numpy[${PYTHON_USEDEP}]
+ ')
+ )
+ dev-cpp/yaml-cpp
+ !lapack? ( sci-libs/sundials:0= )
+ lapack? ( >=sci-libs/sundials-6.5.0:0=[lapack?] )
+"
+
+DEPEND="
+ ${RDEPEND}
+ dev-cpp/eigen:3
+ dev-libs/boost:=
+ dev-libs/libfmt
+ python? (
+ $(python_gen_cond_dep '
+ dev-python/cython[${PYTHON_USEDEP}]
+ dev-python/pip[${PYTHON_USEDEP}]
+ ')
+ )
+ test? (
+ >=dev-cpp/gtest-1.11.0
+ python? (
+ $(python_gen_cond_dep '
+ dev-python/h5py[${PYTHON_USEDEP}]
+ dev-python/pandas[${PYTHON_USEDEP}]
+ dev-python/pytest[${PYTHON_USEDEP}]
+ dev-python/scipy[${PYTHON_USEDEP}]
+ ')
+ )
+ )
+"
+
+PATCHES=(
+ "${FILESDIR}/${P}_env.patch"
+ "${FILESDIR}/${P}_drop_deprecated_open_U_option.patch"
+)
+
+pkg_setup() {
+ fortran-2_pkg_setup
+ python-single-r1_pkg_setup
+}
+
+## Full list of configuration options of Cantera is presented here:
+## http://cantera.org/docs/sphinx/html/compiling/config-options.html
+src_configure() {
+ scons_vars=(
+ AR="$(tc-getAR)"
+ CC="$(tc-getCC)"
+ CXX="$(tc-getCXX)"
+ cc_flags="${CXXFLAGS}"
+ cxx_flags="-std=c++14"
+ debug="no"
+ FORTRAN="$(tc-getFC)"
+ FORTRANFLAGS="${FCFLAGS}"
+ optimize_flags="-Wno-inline"
+ renamed_shared_libraries="no"
+ use_pch="no"
+ ## In some cases other order can break the detection of right location of Boost: ##
+ system_fmt="y"
+ system_sundials="y"
+ system_eigen="y"
+ system_yamlcpp="y"
+ env_vars="all"
+ extra_inc_dirs="/usr/include/eigen3"
+ )
+ use lapack && scons_vars+=( blas_lapack_libs="lapack,blas" )
+ use test || scons_vars+=( googletest="none" )
+
+ scons_targets=(
+ f90_interface=$(usex fortran y n)
+ )
+
+ if use cti ; then
+ local scons_python=$(usex python full minimal)
+ scons_targets+=( python_package="${scons_python}" python_cmd="${EPYTHON}" )
+ else
+ scons_targets+=( python_package="none" )
+ fi
+}
+
+src_compile() {
+ escons build "${scons_vars[@]}" "${scons_targets[@]}" prefix="/usr"
+}
+
+src_test() {
+ escons test
+}
+
+src_install() {
+ escons install stage_dir="${D}" libdirname="$(get_libdir)"
+ if ! use cti ; then
+ rm -r "${D}/usr/share/man" || die "Can't remove man files."
+ else
+ # Run the byte-compile of modules
+ python_optimize "${D}$(python_get_sitedir)/${PN}"
+ fi
+
+ # User could remove this line if require static libs for development purpose
+ find "${ED}" -name '*.a' -delete || die
+}
+
+pkg_postinst() {
+ if use cti && ! use python ; then
+ elog "Cantera was build without 'python' use-flag therefore the CTI tools 'ck2cti' and 'ck2yaml"
+ elog "will convert Chemkin files to Cantera format without verification of kinetic mechanism."
+ fi
+
+ local post_msg=$(usex fortran "and Fortran " "")
+ elog "C++ ${post_msg}samples are installed to '/usr/share/${PN}/samples/' directory."
+
+ if use python ; then
+ elog "Python examples are installed to '$(python_get_sitedir)/${PN}/examples/' directories."
+ fi
+}
diff --git a/sci-libs/cantera/files/cantera-2.6.0_drop_deprecated_open_U_option.patch b/sci-libs/cantera/files/cantera-2.6.0_drop_deprecated_open_U_option.patch
new file mode 100644
index 000000000000..41243da82f68
--- /dev/null
+++ b/sci-libs/cantera/files/cantera-2.6.0_drop_deprecated_open_U_option.patch
@@ -0,0 +1,49 @@
+From 0b407e11fe0bae4707286ab3cbf6a7a72a906817 Mon Sep 17 00:00:00 2001
+From: "Mark E. Fuller" <mark.e.fuller@gmx.de>
+Date: Thu, 23 Jun 2022 00:04:22 +0300
+Subject: [PATCH] drop deprecated 'U' open option
+
+---
+ site_scons/site_tools/subst.py | 15 +++------------
+ 1 file changed, 3 insertions(+), 12 deletions(-)
+
+diff --git a/site_scons/site_tools/subst.py b/site_scons/site_tools/subst.py
+index 3a1c4f6fb8..05d520491b 100644
+--- a/site_scons/site_tools/subst.py
++++ b/site_scons/site_tools/subst.py
+@@ -12,7 +12,7 @@
+
+ from SCons.Script import *
+ import SCons.Errors
+-
++from pathlib import Path
+
+ # Helper/core functions
+ ##############################################################################
+@@ -20,12 +20,7 @@
+ # Do the substitution
+ def _subst_file(target, source, env, pattern, replace):
+ # Read file
+- #print 'CALLING SUBST_FILE'
+- f = open(source, "rU")
+- try:
+- contents = f.read()
+- finally:
+- f.close()
++ contents = Path(source).read_text()
+
+ # Substitute, make sure result is a string
+ def subfn(mo):
+@@ -46,11 +41,7 @@ def subfn(mo):
+ # Determine which keys are used
+ def _subst_keys(source, pattern):
+ # Read file
+- f = open(source, "rU")
+- try:
+- contents = f.read()
+- finally:
+- f.close()
++ contents = Path(source).read_text()
+
+ # Determine keys
+ keys = []
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sci-libs/cantera/, sci-libs/cantera/files/
@ 2023-10-27 2:34 Sam James
0 siblings, 0 replies; 15+ messages in thread
From: Sam James @ 2023-10-27 2:34 UTC (permalink / raw
To: gentoo-commits
commit: 406802a99084b8c9bf57e9b5f7bad816e86ad821
Author: Sergey Torokhov <torokhov-s-a <AT> yandex <DOT> ru>
AuthorDate: Sun Sep 3 20:43:37 2023 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Oct 27 02:30:38 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=406802a9
sci-libs/cantera: 3.0.0 version bump
New release is compatible with cython-3.
The USE="cti" is dropped due to supplied converters have restricted
functionality or doesn't work (yaml2ck) without full python support.
Python examples aren't provided within tarball since this release.
USE="lapack" support is still restricted using >=sundials-6.5.0.
Closes: https://bugs.gentoo.org/913141
Bug: https://bugs.gentoo.org/888667
Signed-off-by: Sergey Torokhov <torokhov-s-a <AT> yandex.ru>
Signed-off-by: Sam James <sam <AT> gentoo.org>
sci-libs/cantera/Manifest | 1 +
sci-libs/cantera/cantera-3.0.0.ebuild | 139 +++++++++++++++++++++++++
sci-libs/cantera/files/cantera-3.0.0_env.patch | 25 +++++
sci-libs/cantera/metadata.xml | 3 +-
4 files changed, 167 insertions(+), 1 deletion(-)
diff --git a/sci-libs/cantera/Manifest b/sci-libs/cantera/Manifest
index 6b5da97bd886..782522d16b9c 100644
--- a/sci-libs/cantera/Manifest
+++ b/sci-libs/cantera/Manifest
@@ -1 +1,2 @@
DIST cantera-2.6.0.tar.gz 2586243 BLAKE2B 3562dc3641c70cdbd5e07062ecee56c0658b098c20bb477c3e741731db01e38fccf624e6769377420b01dd4bac72a0608cf226cce40ac12f13e71081090e06bc SHA512 74e12c89af38236bcc064034f74edcc690895151a9e453e728d130b83f5f527e675750c68a3fe36eea3c6aec6969685aa8828ae740a2e27b5df72a8ccc4d2856
+DIST cantera-3.0.0.tar.gz 2451103 BLAKE2B 094d7a4f0b8fd0f1a45d9f8c13e1390cf7fc62110e424e1287030e97382c1cdc016a5119adc4d5c7bbc222420a3b447db93fee8350643cb3a0907a838fbc1ddf SHA512 dffd696628210ae5c7b08e394e9a97262cfa6aa07ac2e6faa48591ecfee5bb11e7c2b6928563007fd581a1fd9cae999f7c1414ab5d5a312a823e155573df7aca
diff --git a/sci-libs/cantera/cantera-3.0.0.ebuild b/sci-libs/cantera/cantera-3.0.0.ebuild
new file mode 100644
index 000000000000..da1bd0e4e645
--- /dev/null
+++ b/sci-libs/cantera/cantera-3.0.0.ebuild
@@ -0,0 +1,139 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..11} )
+
+FORTRAN_NEEDED=fortran
+FORTRAN_STANDARD="77 90"
+
+inherit fortran-2 python-single-r1 scons-utils toolchain-funcs
+
+DESCRIPTION="Object-oriented tool suite for chemical kinetics, thermodynamics, and transport"
+HOMEPAGE="https://www.cantera.org"
+SRC_URI="https://github.com/Cantera/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="fortran lapack +python test"
+RESTRICT="!test? ( test )"
+
+REQUIRED_USE="
+ ${PYTHON_REQUIRED_USE}
+"
+
+RDEPEND="
+ ${PYTHON_DEPS}
+ lapack? ( virtual/lapack )
+ python? (
+ $(python_gen_cond_dep '
+ dev-python/numpy[${PYTHON_USEDEP}]
+ dev-python/ruamel-yaml[${PYTHON_USEDEP}]
+ ')
+ )
+ dev-cpp/yaml-cpp
+ !lapack? ( sci-libs/sundials:0= )
+ lapack? ( >=sci-libs/sundials-6.5.0:0=[lapack?] )
+"
+
+DEPEND="
+ ${RDEPEND}
+ dev-cpp/eigen:3
+ dev-libs/boost:=
+ dev-libs/libfmt
+ python? (
+ $(python_gen_cond_dep '
+ dev-python/cython[${PYTHON_USEDEP}]
+ dev-python/pip[${PYTHON_USEDEP}]
+ ')
+ )
+ test? (
+ >=dev-cpp/gtest-1.11.0
+ python? (
+ $(python_gen_cond_dep '
+ dev-python/h5py[${PYTHON_USEDEP}]
+ dev-python/pandas[${PYTHON_USEDEP}]
+ dev-python/pytest[${PYTHON_USEDEP}]
+ dev-python/scipy[${PYTHON_USEDEP}]
+ ')
+ )
+ )
+"
+
+QA_SONAME="usr/lib.*/libcantera_python3.*.so" # intended for dlopen()
+
+PATCHES=(
+ "${FILESDIR}/${P}_env.patch"
+)
+
+pkg_setup() {
+ fortran-2_pkg_setup
+ python-single-r1_pkg_setup
+}
+
+## Full list of configuration options of Cantera is presented here:
+## http://cantera.org/docs/sphinx/html/compiling/config-options.html
+src_configure() {
+ scons_vars=(
+ AR="$(tc-getAR)"
+ CC="$(tc-getCC)"
+ CXX="$(tc-getCXX)"
+ cc_flags="${CXXFLAGS}"
+ cxx_flags="-std=c++17"
+ debug="no"
+ FORTRAN="$(tc-getFC)"
+ FORTRANFLAGS="${FCFLAGS}"
+ optimize_flags="-Wno-inline"
+ renamed_shared_libraries="no"
+ use_pch="no"
+ ## In some cases other order can break the detection of right location of Boost: ##
+ system_fmt="y"
+ system_sundials="y"
+ system_eigen="y"
+ system_yamlcpp="y"
+ hdf_support="n"
+ system_blas_lapack=$(usex lapack y n)
+ env_vars="all"
+ extra_inc_dirs="/usr/include/eigen3"
+ )
+ use lapack && scons_vars+=( blas_lapack_libs="lapack,blas" )
+ use test || scons_vars+=( googletest="none" )
+
+ scons_targets=(
+ f90_interface=$(usex fortran y n)
+ )
+
+ if use python ; then
+ scons_targets+=( python_package="full" python_cmd="${EPYTHON}" )
+ else
+ scons_targets+=( python_package="none" )
+ fi
+}
+
+src_compile() {
+ escons build "${scons_vars[@]}" "${scons_targets[@]}" prefix="/usr"
+}
+
+src_test() {
+ escons test
+}
+
+src_install() {
+ escons install stage_dir="${D}" libdirname="$(get_libdir)"
+ if ! use python ; then
+ rm -r "${D}/usr/share/man" || die "Can't remove man files."
+ else
+ # Run the byte-compile of modules
+ python_optimize "${D}$(python_get_sitedir)/${PN}"
+ fi
+
+ # User could remove this line if require static libs for development purpose
+ find "${ED}" -name '*.a' -delete || die
+}
+
+pkg_postinst() {
+ local post_msg=$(usex fortran "and Fortran " "")
+ elog "C++ ${post_msg}samples are installed to '/usr/share/${PN}/samples/' directory."
+}
diff --git a/sci-libs/cantera/files/cantera-3.0.0_env.patch b/sci-libs/cantera/files/cantera-3.0.0_env.patch
new file mode 100644
index 000000000000..786df7140632
--- /dev/null
+++ b/sci-libs/cantera/files/cantera-3.0.0_env.patch
@@ -0,0 +1,25 @@
+diff -Naur a/SConstruct b/SConstruct
+--- a/SConstruct
++++ b/SConstruct
+@@ -819,7 +819,7 @@
+ toolchain = ["default"]
+
+ env = Environment(tools=toolchain+["textfile", "subst", "recursiveInstall", "UnitsInterfaceBuilder", "wix", "gch"],
+- ENV={"PATH": os.environ["PATH"]},
++ ENV={'PATH': os.environ['PATH'], 'CCACHE_DIR': os.environ.get('CCACHE_DIR','')},
+ toolchain=toolchain,
+ **extraEnvArgs)
+
+@@ -970,11 +974,7 @@
+ env["CPU"] = get_processor_name()
+ logger.info(f"Compiling on {env['CPU']!r}")
+
+-try:
+- env["git_commit"] = get_command_output("git", "rev-parse", "--short", "HEAD")
+- logger.info(f"Building Cantera from git commit {env['git_commit']!r}")
+-except (subprocess.CalledProcessError, FileNotFoundError):
+- env["git_commit"] = "unknown"
++env["git_commit"] = "unknown"
+
+ # Print values of all build options:
+ # the (updated) "cantera.conf" combines all options that were specified by the user
diff --git a/sci-libs/cantera/metadata.xml b/sci-libs/cantera/metadata.xml
index 919e8bf0ad40..81f17579d02a 100644
--- a/sci-libs/cantera/metadata.xml
+++ b/sci-libs/cantera/metadata.xml
@@ -14,7 +14,8 @@
for problems involving chemical kinetics, thermodynamics, and/or transport processes.
</longdescription>
<use>
- <flag name="cti">Install CTI tools (ck2cti, ck2yaml, ctml_writer) for conversion of Chemkin files to Cantera format</flag>
+ <flag name="cti">Install conversion tools (ck2cti, ck2yaml, ctml_writer) from Chemkin to Cantera format</flag>
+ <flag name="python">Install Python bindings and conversion tools from Chemkin to Cantera format</flag>
</use>
<upstream>
<remote-id type="github">cantera/cantera</remote-id>
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sci-libs/cantera/, sci-libs/cantera/files/
@ 2024-02-28 16:48 Michał Górny
0 siblings, 0 replies; 15+ messages in thread
From: Michał Górny @ 2024-02-28 16:48 UTC (permalink / raw
To: gentoo-commits
commit: 5648e4e5dbd9ebf5d74e7e4c8766dba800b42a68
Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Wed Feb 28 14:18:18 2024 +0000
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Wed Feb 28 16:48:44 2024 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5648e4e5
sci-libs/cantera: Remove old
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
sci-libs/cantera/Manifest | 1 -
sci-libs/cantera/cantera-2.6.0-r2.ebuild | 154 ---------------------
sci-libs/cantera/cantera-3.0.0.ebuild | 143 -------------------
...ntera-2.6.0_drop_deprecated_open_U_option.patch | 49 -------
sci-libs/cantera/files/cantera-2.6.0_env.patch | 78 -----------
sci-libs/cantera/metadata.xml | 1 -
6 files changed, 426 deletions(-)
diff --git a/sci-libs/cantera/Manifest b/sci-libs/cantera/Manifest
index 782522d16b9c..fe074558539e 100644
--- a/sci-libs/cantera/Manifest
+++ b/sci-libs/cantera/Manifest
@@ -1,2 +1 @@
-DIST cantera-2.6.0.tar.gz 2586243 BLAKE2B 3562dc3641c70cdbd5e07062ecee56c0658b098c20bb477c3e741731db01e38fccf624e6769377420b01dd4bac72a0608cf226cce40ac12f13e71081090e06bc SHA512 74e12c89af38236bcc064034f74edcc690895151a9e453e728d130b83f5f527e675750c68a3fe36eea3c6aec6969685aa8828ae740a2e27b5df72a8ccc4d2856
DIST cantera-3.0.0.tar.gz 2451103 BLAKE2B 094d7a4f0b8fd0f1a45d9f8c13e1390cf7fc62110e424e1287030e97382c1cdc016a5119adc4d5c7bbc222420a3b447db93fee8350643cb3a0907a838fbc1ddf SHA512 dffd696628210ae5c7b08e394e9a97262cfa6aa07ac2e6faa48591ecfee5bb11e7c2b6928563007fd581a1fd9cae999f7c1414ab5d5a312a823e155573df7aca
diff --git a/sci-libs/cantera/cantera-2.6.0-r2.ebuild b/sci-libs/cantera/cantera-2.6.0-r2.ebuild
deleted file mode 100644
index d024ceeacfc7..000000000000
--- a/sci-libs/cantera/cantera-2.6.0-r2.ebuild
+++ /dev/null
@@ -1,154 +0,0 @@
-# Copyright 1999-2024 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-PYTHON_COMPAT=( python3_{9..11} )
-
-FORTRAN_NEEDED=fortran
-FORTRAN_STANDARD="77 90"
-
-inherit fortran-2 python-single-r1 scons-utils toolchain-funcs
-
-DESCRIPTION="Object-oriented tool suite for chemical kinetics, thermodynamics, and transport"
-HOMEPAGE="https://www.cantera.org"
-SRC_URI="https://github.com/Cantera/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
-
-LICENSE="BSD"
-SLOT="0"
-KEYWORDS="amd64 ~x86"
-IUSE="+cti fortran lapack +python test"
-RESTRICT="!test? ( test )"
-
-REQUIRED_USE="
- python? ( cti )
- ${PYTHON_REQUIRED_USE}
-"
-
-RDEPEND="
- ${PYTHON_DEPS}
- dev-cpp/yaml-cpp
- cti? (
- $(python_gen_cond_dep '
- dev-python/ruamel-yaml[${PYTHON_USEDEP}]
- ')
- )
- !lapack? ( sci-libs/sundials:0= )
- lapack? (
- >=sci-libs/sundials-6.5.0:0=[lapack?]
- virtual/lapack
- )
- python? (
- $(python_gen_cond_dep '
- dev-python/numpy[${PYTHON_USEDEP}]
- ')
- )
-"
-
-# <cython-3 for bug #913141
-DEPEND="
- ${RDEPEND}
- dev-cpp/eigen:3
- dev-libs/boost:=
- dev-libs/libfmt
- python? (
- $(python_gen_cond_dep '
- <dev-python/cython-3[${PYTHON_USEDEP}]
- dev-python/pip[${PYTHON_USEDEP}]
- ')
- )
- test? (
- >=dev-cpp/gtest-1.11.0
- python? (
- $(python_gen_cond_dep '
- dev-python/h5py[${PYTHON_USEDEP}]
- dev-python/pandas[${PYTHON_USEDEP}]
- dev-python/pytest[${PYTHON_USEDEP}]
- dev-python/scipy[${PYTHON_USEDEP}]
- ')
- )
- )
-"
-
-PATCHES=(
- "${FILESDIR}/${P}_env.patch"
- "${FILESDIR}/${P}_drop_deprecated_open_U_option.patch"
-)
-
-pkg_setup() {
- fortran-2_pkg_setup
- python-single-r1_pkg_setup
-}
-
-## Full list of configuration options of Cantera is presented here:
-## http://cantera.org/docs/sphinx/html/compiling/config-options.html
-src_configure() {
- scons_vars=(
- AR="$(tc-getAR)"
- CC="$(tc-getCC)"
- CXX="$(tc-getCXX)"
- cc_flags="${CXXFLAGS}"
- cxx_flags="-std=c++14"
- debug="no"
- FORTRAN="$(tc-getFC)"
- FORTRANFLAGS="${FCFLAGS}"
- optimize_flags="-Wno-inline"
- renamed_shared_libraries="no"
- use_pch="no"
- ## In some cases other order can break the detection of right location of Boost: ##
- system_fmt="y"
- system_sundials="y"
- system_eigen="y"
- system_yamlcpp="y"
- env_vars="all"
- extra_inc_dirs="/usr/include/eigen3"
- )
- use lapack && scons_vars+=( blas_lapack_libs="lapack,blas" )
- use test || scons_vars+=( googletest="none" )
-
- scons_targets=(
- f90_interface=$(usex fortran y n)
- )
-
- if use cti ; then
- local scons_python=$(usex python full minimal)
- scons_targets+=( python_package="${scons_python}" python_cmd="${EPYTHON}" )
- else
- scons_targets+=( python_package="none" )
- fi
-}
-
-src_compile() {
- escons build "${scons_vars[@]}" "${scons_targets[@]}" prefix="/usr"
-}
-
-src_test() {
- escons test
-}
-
-src_install() {
- escons install stage_dir="${D}" libdirname="$(get_libdir)"
- if ! use cti ; then
- rm -r "${D}/usr/share/man" || die "Can't remove man files."
- else
- # Run the byte-compile of modules
- python_optimize "${D}$(python_get_sitedir)/${PN}"
- fi
-
- # User could remove this line if require static libs for development purpose
- find "${ED}" -name '*.a' -delete || die
-}
-
-pkg_postinst() {
- if use cti && ! use python ; then
- elog "Cantera was build without 'python' use-flag therefore the CTI tools 'ck2cti' and 'ck2yaml"
- elog "will convert Chemkin files to Cantera format without verification of kinetic mechanism."
- fi
-
- local post_msg=$(usex fortran "and Fortran " "")
- elog "C++ ${post_msg}samples are installed to '/usr/share/${PN}/samples/' directory."
-
- if use python ; then
- elog "Python examples are installed to '$(python_get_sitedir)/${PN}/examples/' directories."
- fi
-}
diff --git a/sci-libs/cantera/cantera-3.0.0.ebuild b/sci-libs/cantera/cantera-3.0.0.ebuild
deleted file mode 100644
index d53ba2538180..000000000000
--- a/sci-libs/cantera/cantera-3.0.0.ebuild
+++ /dev/null
@@ -1,143 +0,0 @@
-# Copyright 1999-2024 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-PYTHON_COMPAT=( python3_{10..11} )
-
-FORTRAN_NEEDED=fortran
-FORTRAN_STANDARD="77 90"
-
-inherit fortran-2 python-single-r1 scons-utils toolchain-funcs
-
-DESCRIPTION="Object-oriented tool suite for chemical kinetics, thermodynamics, and transport"
-HOMEPAGE="https://www.cantera.org"
-SRC_URI="https://github.com/Cantera/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
-
-LICENSE="BSD"
-SLOT="0"
-KEYWORDS="~amd64 ~x86"
-IUSE="fortran hdf5 lapack +python test"
-RESTRICT="!test? ( test )"
-
-REQUIRED_USE="
- ${PYTHON_REQUIRED_USE}
-"
-
-RDEPEND="
- ${PYTHON_DEPS}
- dev-cpp/yaml-cpp
- hdf5? ( sci-libs/HighFive )
- !lapack? ( sci-libs/sundials:0= )
- lapack? (
- >=sci-libs/sundials-6.5.0:0=[lapack?]
- virtual/lapack
- )
- python? (
- $(python_gen_cond_dep '
- dev-python/numpy[${PYTHON_USEDEP}]
- dev-python/ruamel-yaml[${PYTHON_USEDEP}]
- ')
- )
-"
-
-DEPEND="
- ${RDEPEND}
- dev-cpp/eigen:3
- dev-libs/boost:=
- dev-libs/libfmt
- python? (
- $(python_gen_cond_dep '
- dev-python/cython[${PYTHON_USEDEP}]
- dev-python/pip[${PYTHON_USEDEP}]
- ')
- )
- test? (
- >=dev-cpp/gtest-1.11.0
- python? (
- $(python_gen_cond_dep '
- dev-python/h5py[${PYTHON_USEDEP}]
- dev-python/pandas[${PYTHON_USEDEP}]
- dev-python/pytest[${PYTHON_USEDEP}]
- dev-python/scipy[${PYTHON_USEDEP}]
- ')
- )
- )
-"
-
-PATCHES=(
- "${FILESDIR}/${P}_env.patch"
-)
-
-pkg_setup() {
- fortran-2_pkg_setup
- python-single-r1_pkg_setup
-}
-
-## Full list of configuration options of Cantera is presented here:
-## http://cantera.org/docs/sphinx/html/compiling/config-options.html
-src_configure() {
- scons_vars=(
- AR="$(tc-getAR)"
- CC="$(tc-getCC)"
- CXX="$(tc-getCXX)"
- cc_flags="${CXXFLAGS}"
- cxx_flags="-std=c++17"
- debug="no"
- FORTRAN="$(tc-getFC)"
- FORTRANFLAGS="${FCFLAGS}"
- optimize_flags="-Wno-inline"
- renamed_shared_libraries="no"
- use_pch="no"
- ## In some cases other order can break the detection of right location of Boost: ##
- system_fmt="y"
- system_sundials="y"
- system_eigen="y"
- system_yamlcpp="y"
- hdf_support=$(usex hdf5 y n)
- system_blas_lapack=$(usex lapack y n)
- env_vars="all"
- extra_inc_dirs="/usr/include/eigen3"
- use_rpath_linkage="yes"
- extra_lib_dirs="/usr/$(get_libdir)/${PN}"
- )
- use hdf5 && scons_vars+=( system_highfive="y" )
- use lapack && scons_vars+=( blas_lapack_libs="lapack,blas" )
- use test || scons_vars+=( googletest="none" )
-
- scons_targets=(
- f90_interface=$(usex fortran y n)
- )
-
- if use python ; then
- scons_targets+=( python_package="full" python_cmd="${EPYTHON}" )
- else
- scons_targets+=( python_package="none" )
- fi
-}
-
-src_compile() {
- escons build "${scons_vars[@]}" "${scons_targets[@]}" prefix="/usr"
-}
-
-src_test() {
- escons test
-}
-
-src_install() {
- escons install stage_dir="${D}" libdirname="$(get_libdir)"
- if ! use python ; then
- rm -r "${D}/usr/share/man" || die "Can't remove man files."
- else
- # Run the byte-compile of modules
- python_optimize "${D}$(python_get_sitedir)/${PN}"
- fi
-
- # User could remove this line if require static libs for development purpose
- find "${ED}" -name '*.a' -delete || die
-}
-
-pkg_postinst() {
- local post_msg=$(usex fortran "and Fortran " "")
- elog "C++ ${post_msg}samples are installed to '/usr/share/${PN}/samples/' directory."
-}
diff --git a/sci-libs/cantera/files/cantera-2.6.0_drop_deprecated_open_U_option.patch b/sci-libs/cantera/files/cantera-2.6.0_drop_deprecated_open_U_option.patch
deleted file mode 100644
index 41243da82f68..000000000000
--- a/sci-libs/cantera/files/cantera-2.6.0_drop_deprecated_open_U_option.patch
+++ /dev/null
@@ -1,49 +0,0 @@
-From 0b407e11fe0bae4707286ab3cbf6a7a72a906817 Mon Sep 17 00:00:00 2001
-From: "Mark E. Fuller" <mark.e.fuller@gmx.de>
-Date: Thu, 23 Jun 2022 00:04:22 +0300
-Subject: [PATCH] drop deprecated 'U' open option
-
----
- site_scons/site_tools/subst.py | 15 +++------------
- 1 file changed, 3 insertions(+), 12 deletions(-)
-
-diff --git a/site_scons/site_tools/subst.py b/site_scons/site_tools/subst.py
-index 3a1c4f6fb8..05d520491b 100644
---- a/site_scons/site_tools/subst.py
-+++ b/site_scons/site_tools/subst.py
-@@ -12,7 +12,7 @@
-
- from SCons.Script import *
- import SCons.Errors
--
-+from pathlib import Path
-
- # Helper/core functions
- ##############################################################################
-@@ -20,12 +20,7 @@
- # Do the substitution
- def _subst_file(target, source, env, pattern, replace):
- # Read file
-- #print 'CALLING SUBST_FILE'
-- f = open(source, "rU")
-- try:
-- contents = f.read()
-- finally:
-- f.close()
-+ contents = Path(source).read_text()
-
- # Substitute, make sure result is a string
- def subfn(mo):
-@@ -46,11 +41,7 @@ def subfn(mo):
- # Determine which keys are used
- def _subst_keys(source, pattern):
- # Read file
-- f = open(source, "rU")
-- try:
-- contents = f.read()
-- finally:
-- f.close()
-+ contents = Path(source).read_text()
-
- # Determine keys
- keys = []
diff --git a/sci-libs/cantera/files/cantera-2.6.0_env.patch b/sci-libs/cantera/files/cantera-2.6.0_env.patch
deleted file mode 100644
index 15a1e65857e4..000000000000
--- a/sci-libs/cantera/files/cantera-2.6.0_env.patch
+++ /dev/null
@@ -1,78 +0,0 @@
-diff -Naur old/SConstruct new/SConstruct
---- old/SConstruct
-+++ new/SConstruct
-@@ -178,6 +178,10 @@
-
- config_options = [
- Option(
-+ "AR",
-+ "The archiver to use.",
-+ "${AR}"),
-+ Option(
- "CXX",
- "The C++ compiler to use.",
- "${CXX}"),
-@@ -740,7 +744,7 @@
- toolchain = ["default"]
-
- env = Environment(tools=toolchain+["textfile", "subst", "recursiveInstall", "wix", "gch"],
-- ENV={"PATH": os.environ["PATH"]},
-+ ENV={'PATH': os.environ['PATH'], 'CCACHE_DIR': os.environ.get('CCACHE_DIR','')},
- toolchain=toolchain,
- **extraEnvArgs)
-
-@@ -775,7 +779,7 @@
-
- add_RegressionTest(env)
-
--opts.AddVariables(*config.to_scons(["CC", "CXX"], env=env))
-+opts.AddVariables(*config.to_scons(["AR", "CC", "CXX"], env=env))
- opts.Update(env)
-
- # Check if this is actually Apple's clang on macOS
-@@ -861,11 +865,7 @@
- env['cantera_pure_version'] = re.match(r'(\d+\.\d+\.\d+)', env['cantera_version']).group(0)
- env['cantera_short_version'] = re.match(r'(\d+\.\d+)', env['cantera_version']).group(0)
-
--try:
-- env["git_commit"] = get_command_output("git", "rev-parse", "--short", "HEAD")
-- logger.info(f"Building Cantera from git commit '{env['git_commit']}'")
--except (subprocess.CalledProcessError, FileNotFoundError):
-- env["git_commit"] = "unknown"
-+env["git_commit"] = "unknown"
-
- # Print values of all build options:
- # the (updated) "cantera.conf" combines all options that were specified by the user
-diff -Naur old/interfaces/cython/SConscript new/interfaces/cython/SConscript
---- old/interfaces/cython/SConscript
-+++ new/interfaces/cython/SConscript
-@@ -107,7 +107,7 @@
- obj, LIBPREFIX="", SHLIBSUFFIX=module_ext,
- SHLIBPREFIX="", LIBSUFFIXES=[module_ext])
-
--build_cmd = ("$python_cmd_esc -m pip wheel -v --no-build-isolation --use-feature=in-tree-build --no-deps "
-+build_cmd = ("$python_cmd_esc -m pip wheel -v --no-build-isolation --no-deps "
- "--wheel-dir=build/python/dist build/python")
- plat = info['plat'].replace('-', '_').replace('.', '_')
- wheel_name = (f"Cantera-{env['cantera_version']}-cp{py_version_nodot}"
-@@ -172,7 +172,7 @@
-
- install_cmd.append(f"--root={stage_dir.resolve()}")
-
--install_cmd.extend(("--no-build-isolation", "--use-feature=in-tree-build", "--no-deps", "-v", "--force-reinstall",
-+install_cmd.extend(("--no-build-isolation", "--no-deps", "-v", "--force-reinstall",
- "build/python"))
- if localenv['PYTHON_INSTALLER'] == 'direct':
- mod_inst = install(localenv.Command, 'dummy', mod,
-diff -Naur old/test_problems/SConscript new/test_problems/SConscript
---- old/test_problems/SConscript
-+++ new/test_problems/SConscript
-@@ -233,7 +233,7 @@
- artifacts=['vcs_equilibrate_res.csv'])
-
- CompileAndTest('clib', 'clib_test', 'clib_test',
-- extensions=['^clib_test.c'], libs=localenv['cantera_shared_libs'])
-+ extensions=['^clib_test.c'])
-
- # C++ Samples
- Test('cxx-bvp', 'cxx_samples', '#build/samples/cxx/bvp/blasius', None,
diff --git a/sci-libs/cantera/metadata.xml b/sci-libs/cantera/metadata.xml
index fbc827be0db4..d3c6628839c0 100644
--- a/sci-libs/cantera/metadata.xml
+++ b/sci-libs/cantera/metadata.xml
@@ -14,7 +14,6 @@
for problems involving chemical kinetics, thermodynamics, and/or transport processes.
</longdescription>
<use>
- <flag name="cti">Install conversion tools (ck2cti, ck2yaml, ctml_writer) from Chemkin to Cantera format</flag>
<flag name="python">Install Python bindings and conversion tools from Chemkin to Cantera format</flag>
<flag name="hdf5">Add HDF5 container files support</flag>
</use>
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sci-libs/cantera/, sci-libs/cantera/files/
@ 2024-12-10 8:37 Petr Vaněk
0 siblings, 0 replies; 15+ messages in thread
From: Petr Vaněk @ 2024-12-10 8:37 UTC (permalink / raw
To: gentoo-commits
commit: bc01402b312ede7b9609225e18c6cc5ada6601d9
Author: Sergey Torokhov <torokhov-s-a <AT> yandex <DOT> ru>
AuthorDate: Sun Dec 8 18:22:25 2024 +0000
Commit: Petr Vaněk <arkamar <AT> gentoo <DOT> org>
CommitDate: Tue Dec 10 08:36:33 2024 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bc01402b
sci-libs/cantera: 3.0.1-r2, fix build against fmt11
Closes: https://bugs.gentoo.org/945800
Signed-off-by: Sergey Torokhov <torokhov-s-a <AT> yandex.ru>
Closes: https://github.com/gentoo/gentoo/pull/39638
Signed-off-by: Petr Vaněk <arkamar <AT> gentoo.org>
sci-libs/cantera/cantera-3.0.1-r2.ebuild | 3 +-
.../files/cantera-3.0.1_add_fmt11_support.patch | 46 ++++++++++++++++++++++
2 files changed, 48 insertions(+), 1 deletion(-)
diff --git a/sci-libs/cantera/cantera-3.0.1-r2.ebuild b/sci-libs/cantera/cantera-3.0.1-r2.ebuild
index 9a7d0ecd45b5..ffa880c04646 100644
--- a/sci-libs/cantera/cantera-3.0.1-r2.ebuild
+++ b/sci-libs/cantera/cantera-3.0.1-r2.ebuild
@@ -45,7 +45,7 @@ DEPEND="
${RDEPEND}
dev-cpp/eigen:3
dev-libs/boost:=
- <dev-libs/libfmt-11
+ dev-libs/libfmt
python? (
$(python_gen_cond_dep '
dev-python/cython[${PYTHON_USEDEP}]
@@ -68,6 +68,7 @@ DEPEND="
PATCHES=(
"${FILESDIR}/${PN}-3.0.0_env.patch"
"${FILESDIR}/${P}_fix_fmt_with_c++20.patch"
+ "${FILESDIR}/${P}_add_fmt11_support.patch"
)
pkg_setup() {
diff --git a/sci-libs/cantera/files/cantera-3.0.1_add_fmt11_support.patch b/sci-libs/cantera/files/cantera-3.0.1_add_fmt11_support.patch
new file mode 100644
index 000000000000..7e0d5333a105
--- /dev/null
+++ b/sci-libs/cantera/files/cantera-3.0.1_add_fmt11_support.patch
@@ -0,0 +1,46 @@
+This is upstream patch with removed changes for "doc/sphinx/develop/compiling/dependencies.md" file
+Upstream issue: https://github.com/Cantera/cantera/issues/1735
+Gentoo issue: https://bugs.gentoo.org/945800
+
+From c8f190928fd7a074944f0f4c58661f84a282a35e Mon Sep 17 00:00:00 2001
+From: Ray Speth <speth@mit.edu>
+Date: Wed, 24 Jul 2024 20:12:18 -0400
+Subject: [PATCH] Add support for fmt 11.0
+
+Resolves #1735
+---
+ SConstruct | 2 +-
+ doc/sphinx/develop/compiling/dependencies.md | 2 +-
+ include/cantera/base/fmt.h | 8 ++++++++
+ 3 files changed, 10 insertions(+), 2 deletions(-)
+
+diff --git a/SConstruct b/SConstruct
+index 3863fe3a32..0b607ac891 100644
+--- a/SConstruct
++++ b/SConstruct
+@@ -216,7 +216,7 @@ config_options = [
+ options with spaces, for example, "cxx_flags='-g -Wextra -O3 --std=c++14'"
+ """,
+ {
+- "cl": "/EHsc /std:c++17",
++ "cl": "/EHsc /std:c++17 /utf-8",
+ "default": "-std=c++17"
+ }),
+ Option(
+diff --git a/include/cantera/base/fmt.h b/include/cantera/base/fmt.h
+index 1e0b3a0423..6b4d734fe3 100644
+--- a/include/cantera/base/fmt.h
++++ b/include/cantera/base/fmt.h
+@@ -42,4 +42,12 @@ void fmt_append(fmt::memory_buffer& b, const std::string& tmpl, Args... args) {
+ }
+ #endif
+
++#if FMT_VERSION > 100000
++ #if CT_USE_SYSTEM_FMT
++ #include <fmt/ranges.h>
++ #else
++ #include <fmt/join.h>
++ #endif
++#endif
++
+ #endif
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sci-libs/cantera/, sci-libs/cantera/files/
@ 2024-12-10 8:37 Petr Vaněk
0 siblings, 0 replies; 15+ messages in thread
From: Petr Vaněk @ 2024-12-10 8:37 UTC (permalink / raw
To: gentoo-commits
commit: 071b50bd6da022a0bdd476d59b18a3eb3bfcb3bc
Author: Sergey Torokhov <torokhov-s-a <AT> yandex <DOT> ru>
AuthorDate: Sun Dec 8 18:20:23 2024 +0000
Commit: Petr Vaněk <arkamar <AT> gentoo <DOT> org>
CommitDate: Tue Dec 10 08:36:31 2024 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=071b50bd
sci-libs/cantera: 3.0.1-r2, fix fmt with c++20
Signed-off-by: Sergey Torokhov <torokhov-s-a <AT> yandex.ru>
Bug: https://bugs.gentoo.org/945800
Signed-off-by: Petr Vaněk <arkamar <AT> gentoo.org>
sci-libs/cantera/cantera-3.0.1-r2.ebuild | 148 ++++++++++
.../files/cantera-3.0.1_fix_fmt_with_c++20.patch | 323 +++++++++++++++++++++
2 files changed, 471 insertions(+)
diff --git a/sci-libs/cantera/cantera-3.0.1-r2.ebuild b/sci-libs/cantera/cantera-3.0.1-r2.ebuild
new file mode 100644
index 000000000000..9a7d0ecd45b5
--- /dev/null
+++ b/sci-libs/cantera/cantera-3.0.1-r2.ebuild
@@ -0,0 +1,148 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..13} )
+
+FORTRAN_NEEDED=fortran
+FORTRAN_STANDARD="77 90"
+
+inherit flag-o-matic fortran-2 python-single-r1 scons-utils toolchain-funcs
+
+DESCRIPTION="Object-oriented tool suite for chemical kinetics, thermodynamics, and transport"
+HOMEPAGE="https://www.cantera.org"
+SRC_URI="https://github.com/Cantera/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="fortran hdf5 lapack +python test"
+RESTRICT="!test? ( test )"
+
+REQUIRED_USE="
+ ${PYTHON_REQUIRED_USE}
+"
+
+RDEPEND="
+ ${PYTHON_DEPS}
+ dev-cpp/yaml-cpp
+ hdf5? ( sci-libs/HighFive )
+ !lapack? ( sci-libs/sundials:0= )
+ lapack? (
+ >=sci-libs/sundials-6.5.0:0=[lapack?]
+ virtual/lapack
+ )
+ python? (
+ $(python_gen_cond_dep '
+ dev-python/numpy[${PYTHON_USEDEP}]
+ dev-python/ruamel-yaml[${PYTHON_USEDEP}]
+ ')
+ )
+"
+
+DEPEND="
+ ${RDEPEND}
+ dev-cpp/eigen:3
+ dev-libs/boost:=
+ <dev-libs/libfmt-11
+ python? (
+ $(python_gen_cond_dep '
+ dev-python/cython[${PYTHON_USEDEP}]
+ dev-python/pip[${PYTHON_USEDEP}]
+ ')
+ )
+ test? (
+ >=dev-cpp/gtest-1.11.0
+ python? (
+ $(python_gen_cond_dep '
+ dev-python/h5py[${PYTHON_USEDEP}]
+ dev-python/pandas[${PYTHON_USEDEP}]
+ dev-python/pytest[${PYTHON_USEDEP}]
+ dev-python/scipy[${PYTHON_USEDEP}]
+ ')
+ )
+ )
+"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-3.0.0_env.patch"
+ "${FILESDIR}/${P}_fix_fmt_with_c++20.patch"
+)
+
+pkg_setup() {
+ fortran-2_pkg_setup
+ python-single-r1_pkg_setup
+}
+
+## Full list of configuration options of Cantera is presented here:
+## http://cantera.org/docs/sphinx/html/compiling/config-options.html
+src_configure() {
+ # -Werror=odr, -Werror=lto-type-mismatch
+ # https://github.com/Cantera/cantera/issues/1783
+ filter-lto
+
+ scons_vars=(
+ AR="$(tc-getAR)"
+ CC="$(tc-getCC)"
+ CXX="$(tc-getCXX)"
+ cc_flags="${CXXFLAGS}"
+ cxx_flags="-std=c++20"
+ debug="no"
+ FORTRAN="$(tc-getFC)"
+ FORTRANFLAGS="${FCFLAGS}"
+ optimize_flags="-Wno-inline"
+ renamed_shared_libraries="no"
+ use_pch="no"
+ ## In some cases other order can break the detection of right location of Boost: ##
+ system_fmt="y"
+ system_sundials="y"
+ system_eigen="y"
+ system_yamlcpp="y"
+ hdf_support=$(usex hdf5 y n)
+ system_blas_lapack=$(usex lapack y n)
+ env_vars="all"
+ extra_inc_dirs="/usr/include/eigen3"
+ use_rpath_linkage="yes"
+ extra_lib_dirs="/usr/$(get_libdir)/${PN}"
+ )
+ use hdf5 && scons_vars+=( system_highfive="y" )
+ use lapack && scons_vars+=( blas_lapack_libs="lapack,blas" )
+ use test || scons_vars+=( googletest="none" )
+
+ scons_targets=(
+ f90_interface=$(usex fortran y n)
+ )
+
+ if use python ; then
+ scons_targets+=( python_package="full" python_cmd="${EPYTHON}" )
+ else
+ scons_targets+=( python_package="none" )
+ fi
+}
+
+src_compile() {
+ escons build "${scons_vars[@]}" "${scons_targets[@]}" prefix="/usr"
+}
+
+src_test() {
+ escons test
+}
+
+src_install() {
+ escons install stage_dir="${D}" libdirname="$(get_libdir)"
+ if ! use python ; then
+ rm -r "${D}/usr/share/man" || die "Can't remove man files."
+ else
+ # Run the byte-compile of modules
+ python_optimize "${D}$(python_get_sitedir)/${PN}"
+ fi
+
+ # User could remove this line if require static libs for development purpose
+ find "${ED}" -name '*.a' -delete || die
+}
+
+pkg_postinst() {
+ local post_msg=$(usex fortran "and Fortran " "")
+ elog "C++ ${post_msg}samples are installed to '/usr/share/${PN}/samples/' directory."
+}
diff --git a/sci-libs/cantera/files/cantera-3.0.1_fix_fmt_with_c++20.patch b/sci-libs/cantera/files/cantera-3.0.1_fix_fmt_with_c++20.patch
new file mode 100644
index 000000000000..3b6b3da50a53
--- /dev/null
+++ b/sci-libs/cantera/files/cantera-3.0.1_fix_fmt_with_c++20.patch
@@ -0,0 +1,323 @@
+This is upstream patch.
+Upstream issue: https://github.com/Cantera/cantera/issues/1711
+
+From edc8243577020b7dd6cd0fd85285cc8ca043b5ea Mon Sep 17 00:00:00 2001
+From: Ray Speth <speth@mit.edu>
+Date: Wed, 19 Jun 2024 00:09:02 -0400
+Subject: [PATCH] Fix usage of fmt when compiling in C++20 mode
+
+Resolves #1711
+---
+ include/cantera/base/AnyMap.h | 6 ++--
+ include/cantera/base/ctexceptions.h | 2 +-
+ include/cantera/base/fmt.h | 8 ++---
+ include/cantera/base/global.h | 8 ++---
+ src/base/AnyMap.cpp | 4 +--
+ src/base/SolutionArray.cpp | 51 ++++++++++++++++-------------
+ src/thermo/PureFluidPhase.cpp | 2 +-
+ src/thermo/ThermoPhase.cpp | 2 +-
+ 8 files changed, 46 insertions(+), 37 deletions(-)
+
+diff --git a/include/cantera/base/AnyMap.h b/include/cantera/base/AnyMap.h
+index 81ac0071a7..b1f0747f33 100644
+--- a/include/cantera/base/AnyMap.h
++++ b/include/cantera/base/AnyMap.h
+@@ -746,7 +746,8 @@ class InputFileError : public CanteraError
+ : CanteraError(
+ procedure,
+ formatError(
+- (sizeof...(args) == 0) ? message : fmt::format(message, args...),
++ (sizeof...(args) == 0) ? message
++ : fmt::format(fmt::runtime(message), args...),
+ node.m_line, node.m_column, node.m_metadata))
+ {
+ }
+@@ -761,7 +762,8 @@ class InputFileError : public CanteraError
+ : CanteraError(
+ procedure,
+ formatError2(
+- (sizeof...(args) == 0) ? message : fmt::format(message, args...),
++ (sizeof...(args) == 0) ? message
++ : fmt::format(fmt::runtime(message), args...),
+ node1.m_line, node1.m_column, node1.m_metadata,
+ node2.m_line, node2.m_column, node2.m_metadata))
+ {
+diff --git a/include/cantera/base/ctexceptions.h b/include/cantera/base/ctexceptions.h
+index fb21d3ef22..476e16bf46 100644
+--- a/include/cantera/base/ctexceptions.h
++++ b/include/cantera/base/ctexceptions.h
+@@ -86,7 +86,7 @@ class CanteraError : public std::exception
+ if (sizeof...(args) == 0) {
+ msg_ = msg;
+ } else {
+- msg_ = fmt::format(msg, args...);
++ msg_ = fmt::format(fmt::runtime(msg), args...);
+ }
+ }
+
+diff --git a/include/cantera/base/fmt.h b/include/cantera/base/fmt.h
+index 8341be115e..f613e17b31 100644
+--- a/include/cantera/base/fmt.h
++++ b/include/cantera/base/fmt.h
+@@ -26,13 +26,13 @@
+
+ #if FMT_VERSION < 80000
+ template <typename... Args>
+-void fmt_append(fmt::memory_buffer& b, Args... args) {
+- format_to(b, args...);
++void fmt_append(fmt::memory_buffer& b, const std::string& tmpl, Args... args) {
++ format_to(b, tmpl, args...);
+ }
+ #else
+ template <typename... Args>
+-void fmt_append(fmt::memory_buffer& b, Args... args) {
+- format_to(fmt::appender(b), args...);
++void fmt_append(fmt::memory_buffer& b, const std::string& tmpl, Args... args) {
++ format_to(fmt::appender(b), fmt::runtime(tmpl), args...);
+ }
+ #endif
+
+diff --git a/include/cantera/base/global.h b/include/cantera/base/global.h
+index c0092c43ee..aa0f636754 100644
+--- a/include/cantera/base/global.h
++++ b/include/cantera/base/global.h
+@@ -176,7 +176,7 @@ void writelog(const string& fmt, const Args&... args) {
+ if (sizeof...(args) == 0) {
+ writelog_direct(fmt);
+ } else {
+- writelog_direct(fmt::format(fmt, args...));
++ writelog_direct(fmt::format(fmt::runtime(fmt), args...));
+ }
+ }
+
+@@ -228,7 +228,7 @@ void warn_deprecated(const string& method, const string& msg, const Args&... arg
+ if (sizeof...(args) == 0) {
+ _warn_deprecated(method, msg);
+ } else {
+- _warn_deprecated(method, fmt::format(msg, args...));
++ _warn_deprecated(method, fmt::format(fmt::runtime(msg), args...));
+ }
+ }
+
+@@ -253,7 +253,7 @@ void warn(const string& warning, const string& method,
+ if (sizeof...(args) == 0) {
+ _warn(warning, method, msg);
+ } else {
+- _warn(warning, method, fmt::format(msg, args...));
++ _warn(warning, method, fmt::format(fmt::runtime(msg), args...));
+ }
+ }
+
+@@ -268,7 +268,7 @@ void warn_user(const string& method, const string& msg, const Args&... args) {
+ if (sizeof...(args) == 0) {
+ _warn("Cantera", method, msg);
+ } else {
+- _warn("Cantera", method, fmt::format(msg, args...));
++ _warn("Cantera", method, fmt::format(fmt::runtime(msg), args...));
+ }
+ }
+
+diff --git a/src/base/AnyMap.cpp b/src/base/AnyMap.cpp
+index 84d74c1358..b35aabb8c3 100644
+--- a/src/base/AnyMap.cpp
++++ b/src/base/AnyMap.cpp
+@@ -164,7 +164,7 @@ string formatDouble(double x, long int precision)
+ size_t last;
+ string s0;
+ if (useExp) {
+- s0 = fmt::format(fmt::format("{:.{}e}", x, precision));
++ s0 = fmt::format(fmt::runtime(fmt::format("{:.{}e}", x, precision)));
+ // last digit of significand
+ last = s0.size() - 5;
+ if (s0[last + 1] == 'e') {
+@@ -195,7 +195,7 @@ string formatDouble(double x, long int precision)
+ if (s0[last - 1] == '0') {
+ s1 = s0; // Recycle original string
+ } else if (useExp) {
+- s1 = fmt::format(fmt::format("{:.{}e}", x, precision - 2));
++ s1 = fmt::format(fmt::runtime(fmt::format("{:.{}e}", x, precision - 2)));
+ } else {
+ s1 = fmt::format("{:.{}f}", x, precision - log10x - 2);
+ }
+diff --git a/src/base/SolutionArray.cpp b/src/base/SolutionArray.cpp
+index 4819aaa756..986c3e2373 100644
+--- a/src/base/SolutionArray.cpp
++++ b/src/base/SolutionArray.cpp
+@@ -232,17 +232,19 @@ vector<string> doubleColumn(string name, const vector<double>& comp,
+ if (csize <= rows) {
+ for (const auto& val : comp) {
+ data.push_back(val);
+- raw.push_back(boost::trim_copy(fmt::format(notation, val)));
++ raw.push_back(boost::trim_copy(fmt::format(fmt::runtime(notation), val)));
+ }
+ } else {
+ dots = (rows + 1) / 2;
+ for (int row = 0; row < dots; row++) {
+ data.push_back(comp[row]);
+- raw.push_back(boost::trim_copy(fmt::format(notation, comp[row])));
++ raw.push_back(boost::trim_copy(
++ fmt::format(fmt::runtime(notation), comp[row])));
+ }
+ for (int row = csize - rows / 2; row < csize; row++) {
+ data.push_back(comp[row]);
+- raw.push_back(boost::trim_copy(fmt::format(notation, comp[row])));
++ raw.push_back(boost::trim_copy(
++ fmt::format(fmt::runtime(notation), comp[row])));
+ }
+ }
+
+@@ -292,17 +294,17 @@ vector<string> doubleColumn(string name, const vector<double>& comp,
+ // all entries are integers
+ notation = fmt::format(" {{:>{}.0f}}", over + maxLen);
+ }
+- maxLen = fmt::format(notation, 0.).size();
++ maxLen = fmt::format(fmt::runtime(notation), 0.).size();
+
+ // assemble output
+ string section = fmt::format("{{:>{}}}", maxLen);
+- vector<string> col = {fmt::format(section, name)};
++ vector<string> col = {fmt::format(fmt::runtime(section), name)};
+ int count = 0;
+ for (const auto& val : data) {
+- col.push_back(fmt::format(notation, val));
++ col.push_back(fmt::format(fmt::runtime(notation), val));
+ count++;
+ if (count == dots) {
+- col.push_back(fmt::format(section, "..."));
++ col.push_back(fmt::format(fmt::runtime(section), "..."));
+ }
+ }
+ return col;
+@@ -320,7 +322,8 @@ vector<string> integerColumn(string name, const vector<long int>& comp,
+ if (csize <= rows) {
+ for (const auto& val : comp) {
+ data.push_back(val);
+- string formatted = boost::trim_copy(fmt::format(notation, val));
++ string formatted = boost::trim_copy(
++ fmt::format(fmt::runtime(notation), val));
+ if (formatted[0] == '-') {
+ formatted = formatted.substr(1);
+ }
+@@ -330,7 +333,8 @@ vector<string> integerColumn(string name, const vector<long int>& comp,
+ dots = (rows + 1) / 2;
+ for (int row = 0; row < dots; row++) {
+ data.push_back(comp[row]);
+- string formatted = boost::trim_copy(fmt::format(notation, comp[row]));
++ string formatted = boost::trim_copy(
++ fmt::format(fmt::runtime(notation), comp[row]));
+ if (formatted[0] == '-') {
+ formatted = formatted.substr(1);
+ }
+@@ -338,7 +342,8 @@ vector<string> integerColumn(string name, const vector<long int>& comp,
+ }
+ for (int row = csize - rows / 2; row < csize; row++) {
+ data.push_back(comp[row]);
+- string formatted = boost::trim_copy(fmt::format(notation, comp[row]));
++ string formatted = boost::trim_copy(
++ fmt::format(fmt::runtime(notation), comp[row]));
+ if (formatted[0] == '-') {
+ formatted = formatted.substr(1);
+ }
+@@ -356,13 +361,13 @@ vector<string> integerColumn(string name, const vector<long int>& comp,
+ }
+
+ // assemble output
+- vector<string> col = {fmt::format(notation, name)};
++ vector<string> col = {fmt::format(fmt::runtime(notation), name)};
+ int count = 0;
+ for (const auto& val : data) {
+- col.push_back(fmt::format(notation, val));
++ col.push_back(fmt::format(fmt::runtime(notation), val));
+ count++;
+ if (count == dots) {
+- col.push_back(fmt::format(notation, ".."));
++ col.push_back(fmt::format(fmt::runtime(notation), ".."));
+ }
+ }
+ return col;
+@@ -381,31 +386,33 @@ vector<string> stringColumn(string name, const vector<string>& comp,
+ for (const auto& val : comp) {
+ data.push_back(val);
+ maxLen = std::max(maxLen,
+- boost::trim_copy(fmt::format(notation, val)).size());
++ boost::trim_copy(fmt::format(fmt::runtime(notation), val)).size());
+ }
+ } else {
+ dots = (rows + 1) / 2;
+ for (int row = 0; row < dots; row++) {
+ data.push_back(comp[row]);
+ maxLen = std::max(maxLen,
+- boost::trim_copy(fmt::format(notation, comp[row])).size());
++ boost::trim_copy(
++ fmt::format(fmt::runtime(notation), comp[row])).size());
+ }
+ for (int row = csize - rows / 2; row < csize; row++) {
+ data.push_back(comp[row]);
+ maxLen = std::max(maxLen,
+- boost::trim_copy(fmt::format(notation, comp[row])).size());
++ boost::trim_copy(
++ fmt::format(fmt::runtime(notation), comp[row])).size());
+ }
+ }
+
+ // assemble output
+ notation = fmt::format(" {{:>{}}}", maxLen);
+- vector<string> col = {fmt::format(notation, name)};
++ vector<string> col = {fmt::format(fmt::runtime(notation), name)};
+ int count = 0;
+ for (const auto& val : data) {
+- col.push_back(fmt::format(notation, val));
++ col.push_back(fmt::format(fmt::runtime(notation), val));
+ count++;
+ if (count == dots) {
+- col.push_back(fmt::format(notation, "..."));
++ col.push_back(fmt::format(fmt::runtime(notation), "..."));
+ }
+ }
+ return col;
+@@ -443,8 +450,8 @@ vector<string> formatColumn(string name, const AnyValue& comp, int rows, int wid
+
+ // assemble output
+ string notation = fmt::format(" {{:>{}}}", maxLen);
+- repr = fmt::format(notation, repr);
+- vector<string> col = {fmt::format(notation, name)};
++ repr = fmt::format(fmt::runtime(notation), repr);
++ vector<string> col = {fmt::format(fmt::runtime(notation), name)};
+ if (size <= rows) {
+ for (int row = 0; row < size; row++) {
+ col.push_back(repr);
+@@ -454,7 +461,7 @@ vector<string> formatColumn(string name, const AnyValue& comp, int rows, int wid
+ for (int row = 0; row < dots; row++) {
+ col.push_back(repr);
+ }
+- col.push_back(fmt::format(notation, "..."));
++ col.push_back(fmt::format(fmt::runtime(notation), "..."));
+ for (int row = size - rows / 2; row < size; row++) {
+ col.push_back(repr);
+ }
+diff --git a/src/thermo/PureFluidPhase.cpp b/src/thermo/PureFluidPhase.cpp
+index 65e27c52d7..3e45009422 100644
+--- a/src/thermo/PureFluidPhase.cpp
++++ b/src/thermo/PureFluidPhase.cpp
+@@ -393,7 +393,7 @@ string PureFluidPhase::report(bool show_thermo, double threshold) const
+
+ string one_property = fmt::format("{{:>{}}} {{:<.5g}} {{}}\n", name_width);
+
+- string two_prop_header = "{} {:^15} {:^15}\n";
++ constexpr auto two_prop_header = "{} {:^15} {:^15}\n";
+ string kg_kmol_header = fmt::format(
+ two_prop_header, blank_leader, "1 kg", "1 kmol"
+ );
+diff --git a/src/thermo/ThermoPhase.cpp b/src/thermo/ThermoPhase.cpp
+index 31b2c0ee9f..2b3993be35 100644
+--- a/src/thermo/ThermoPhase.cpp
++++ b/src/thermo/ThermoPhase.cpp
+@@ -1291,7 +1291,7 @@ string ThermoPhase::report(bool show_thermo, double threshold) const
+
+ string one_property = fmt::format("{{:>{}}} {{:<.5g}} {{}}\n", name_width);
+
+- string two_prop_header = "{} {:^15} {:^15}\n";
++ constexpr auto two_prop_header = "{} {:^15} {:^15}\n";
+ string kg_kmol_header = fmt::format(
+ two_prop_header, blank_leader, "1 kg", "1 kmol"
+ );
^ permalink raw reply related [flat|nested] 15+ messages in thread
end of thread, other threads:[~2024-12-10 8:37 UTC | newest]
Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-10 8:37 [gentoo-commits] repo/gentoo:master commit in: sci-libs/cantera/, sci-libs/cantera/files/ Petr Vaněk
-- strict thread matches above, loose matches on Subject: below --
2024-12-10 8:37 Petr Vaněk
2024-02-28 16:48 Michał Górny
2023-10-27 2:34 Sam James
2023-01-30 10:35 Andrew Ammerlaan
2022-06-07 7:45 Sam James
2021-05-27 21:06 David Seifert
2021-04-10 0:09 Sam James
2021-04-09 12:21 Joonas Niilola
2021-02-16 18:39 Sam James
2021-01-17 11:52 David Seifert
2020-05-05 16:54 Matthias Maier
2020-03-05 12:21 Joonas Niilola
2020-01-06 15:40 Joonas Niilola
2019-07-19 16:45 Michał Górny
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox