From f1af93971b7490792d8541bc790e0d8c6d787059 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Fri, 6 Sep 2019 10:28:05 +0100 Subject: gentoo resync : 06.08.2019 --- sci-libs/cantera/Manifest | 3 + sci-libs/cantera/cantera-2.4.0-r2.ebuild | 126 ++++++++++++++ .../files/cantera_2.4.0_env_python_install.patch | 17 ++ .../cantera/files/cantera_2.4.0_sundials4.patch | 190 +++++++++++++++++++++ 4 files changed, 336 insertions(+) create mode 100644 sci-libs/cantera/cantera-2.4.0-r2.ebuild create mode 100644 sci-libs/cantera/files/cantera_2.4.0_env_python_install.patch create mode 100644 sci-libs/cantera/files/cantera_2.4.0_sundials4.patch (limited to 'sci-libs/cantera') diff --git a/sci-libs/cantera/Manifest b/sci-libs/cantera/Manifest index 5d9f62c911d3..ef2a235b6897 100644 --- a/sci-libs/cantera/Manifest +++ b/sci-libs/cantera/Manifest @@ -1,4 +1,7 @@ AUX cantera_2.4.0_env.patch 3559 BLAKE2B 07af1b751b653b1c92288286b9c82ef230ea0df7d9ea4036d23ac24338a221cc45c8e74f137fcf741bb9bb7148e7f3339f54234e9a92ac939956ba7c0ca8e157 SHA512 f2574c3de42d1666a2b64914c66d97045a2a3598f63678b3b60a701d111d7bfc9bd71031dd665a64e6791c9f311fb9514b1a0462a5713763a1b5f87fcd72e528 +AUX cantera_2.4.0_env_python_install.patch 1001 BLAKE2B bfe6e69332117526d8a7c330ae9610e26e72a9e250ce04beda564149fbd21f3262f36982971e5ec0c552e09f12804172b7f978ab03bfb98c0dbe92cd8c7d9401 SHA512 410a81b4ec69eb6eb2a60d55d142b266b836da5a7d4e4ae2fd8844fb87eff0f3544f6e370fc354d334c6cd5a61f8364842c8a9b3bd0dc2290f58ee7392a170f4 +AUX cantera_2.4.0_sundials4.patch 7492 BLAKE2B 995142708ffd02bb3bfdf94b7cad545f269b4c20ffd4c325109637d61e3544d343d0135119388a4b88dc3b037f054854064df83aff381bac6769ec62b12ebf2e SHA512 24afc5d5944966140d191b2250768e2e1331b4db5d53b2dc204b0c1888ff2a328e1dd467b69616d3aced51e6108e38bc1fd2c3a102bf3a02b4c975b677ea73c5 DIST cantera-2.4.0.tar.gz 2321316 BLAKE2B 40750e3864afa3d35817e6f5777a6ac235261e9d134ef749966dbd738a2af5efec2882e6dcc719851f88656b41469e2159d3bff3df32f6abdf57db3b0a2afcae SHA512 8bb0fee34fa5bc9ec78e6f21a100eaa77bdd966bd0b7f0fa27d452e4f122c69e61648beef847178490f5c5d56267a96f6081cac9ccd03cea153c32814e0e84e9 EBUILD cantera-2.4.0-r1.ebuild 2828 BLAKE2B 2b41354065b3ce34ddb7c8535fe8e44d14ddb2bc2afb919f72c91ad92f2915895c9a17461d7575e238a719d0043a826eeb5ebd657edc341e289a669f06a5f3cf SHA512 77fdcddcb93927d08976a11828d82f82c4798b2b85795a230a095af4698c4747d4b2241f89d6933d3c5f6b852edc4626557e5ee67eb2243b0bbf40e24c8a8760 +EBUILD cantera-2.4.0-r2.ebuild 2926 BLAKE2B f39d64f5d3177b85ef5d5e2a12397bc62e2095958536bd7b0e9a385ad4c306e2b30085bf61fe9d547533ffa799d5e51fc1963da54041a1493480b5c5ecd213f9 SHA512 a610ce99c7836d58f28c5906ae5a8ce2641acebaeacb7723d149996d736edd16aa2d31c4fac0d33f6143f11097a37f5aeac42f40f875f034159a57cc21a7bea3 MISC metadata.xml 794 BLAKE2B 4a92fb553aad7d87d4b7a8d77974dbd67d593b4010783f96324979d9c01067bccc60d2faedf604bd8d44a8ac4316356879301899af8bc08d0fcd548df6d3762d SHA512 a9e6f4e161519d0b3618fe8da7065195bc760ba889fa4356358d4047ea1970eb5fd78bdc5fbeb7c660f1bee48a68ab20ced636514e6f12848e88f6f4dabc9705 diff --git a/sci-libs/cantera/cantera-2.4.0-r2.ebuild b/sci-libs/cantera/cantera-2.4.0-r2.ebuild new file mode 100644 index 000000000000..2d69f8d348c6 --- /dev/null +++ b/sci-libs/cantera/cantera-2.4.0-r2.ebuild @@ -0,0 +1,126 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +PYTHON_COMPAT=( python3_{5,6,7} ) + +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" + +REQUIRED_USE=" + python? ( cti ) + ${PYTHON_REQUIRED_USE} + " + +RDEPEND=" + ${PYTHON_DEPS} + python? ( + dev-python/numpy[${PYTHON_USEDEP}] + ) + =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,7 +1072,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','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'): + 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 +@@ -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 -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 +@@ -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 -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 +@@ -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 -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 +@@ -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 -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 +@@ -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 -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 +@@ -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) -- cgit v1.2.3