summaryrefslogtreecommitdiff
path: root/sci-libs/cantera
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2020-05-14 11:09:11 +0100
committerV3n3RiX <venerix@redcorelinux.org>2020-05-14 11:09:11 +0100
commitdeba8115d2c2af26df42966b91ef04ff4dd79cde (patch)
tree9a48f42594e1a9e6b2020d5535a784314434d7a7 /sci-libs/cantera
parent38423c67c8a23f6a1bc42038193182e2da3116eb (diff)
gentoo resync : 14.05.2020
Diffstat (limited to 'sci-libs/cantera')
-rw-r--r--sci-libs/cantera/Manifest4
-rw-r--r--sci-libs/cantera/cantera-2.4.0-r5.ebuild131
-rw-r--r--sci-libs/cantera/files/cantera_2.4.0_env_python_install_prefix.patch17
-rw-r--r--sci-libs/cantera/files/cantera_2.4.0_sundials4.patch63
4 files changed, 191 insertions, 24 deletions
diff --git a/sci-libs/cantera/Manifest b/sci-libs/cantera/Manifest
index 9060984e7a0c..b4ee5e8a3304 100644
--- a/sci-libs/cantera/Manifest
+++ b/sci-libs/cantera/Manifest
@@ -1,7 +1,9 @@
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 7504 BLAKE2B 55bfc58edaed97459a40a1adafcba545bc6513219e9ce1bbf4a529007c6c629ad295b4f85b9cac44da9a9399c721ca19547fa75948c0d0d518fc149862eb9b14 SHA512 4ddf7122df491f53bf67f299d8134b072751dc6f56ab0e4d7cfed733f35ad4b1fb7f005584b06f44d68dc2f29abc299bfb6a65b6b0b3daa828fc80fa52fac964
+AUX cantera_2.4.0_env_python_install_prefix.patch 943 BLAKE2B 06bc4ac2cc4aaa212325c3883b9cead668ed294f23a2ac768f28e593916d07f2322e21846b97b40e336dfc742ed45a9b95f8f49531cd82d2055499f810e13c2f SHA512 a7ebfd8f9a6fa406d5a5847ad98e91aa9cbf53d194ec87d8479b88ad322df13308947fae61574ebd6254eeaa1bcb49a4cd3e30db2981cebcbf13241ab8e050d6
+AUX cantera_2.4.0_sundials4.patch 8410 BLAKE2B dbee09305610bb0d74c1569d694782194c0cb3daf06b581fa385021faed9d54d8f900747bdcac64b0322dcc82fee20bc330b71bee1aa90fe9df68efc335427b7 SHA512 ec4b80b761c3d18cc03bb87ec59b7c860b6818c3a5503f3f7c759f0bfde7cc6c5ded3c64294f9844e28a649754f4a1c158738bc5a7c923bd4808a78c6a59c91a
DIST cantera-2.4.0.tar.gz 2321316 BLAKE2B 40750e3864afa3d35817e6f5777a6ac235261e9d134ef749966dbd738a2af5efec2882e6dcc719851f88656b41469e2159d3bff3df32f6abdf57db3b0a2afcae SHA512 8bb0fee34fa5bc9ec78e6f21a100eaa77bdd966bd0b7f0fa27d452e4f122c69e61648beef847178490f5c5d56267a96f6081cac9ccd03cea153c32814e0e84e9
EBUILD cantera-2.4.0-r1.ebuild 2929 BLAKE2B 57eb719f155c1c58024283cea0fd7a667888ce1749be056a644e80f466ac7ed66c854277ae67681a19f6d374ede9a3fb4394f80f4d5802bab77bc28e41807223 SHA512 f1d88be5b54a480735ae55da4a05267c3890abaa80776124234bb5dcb8dd539e6df9d3cf8dd29a1577f9008cc57581e0f6a575b14d1c432599e72f93cbd6967b
EBUILD cantera-2.4.0-r4.ebuild 3028 BLAKE2B cacb43b61a63aba2ae8a55393ff8f0ea93c0bbea9266f182d3ac270e822b09a16865da60076e6ea059bc1c684c9a13e7291f3aed037ca2fa79c48d0844fd5051 SHA512 c3f361945f1d4756f8251fc3122a4b8ba36e5f5723c4d71742f8d089a41614669ecaf5462a8e2d5945b09611eda3a98f4d91736ca253202c44d1a6fd6cb22705
+EBUILD cantera-2.4.0-r5.ebuild 3072 BLAKE2B 44b04260688a25de14ad1bd53bc5831f4f3354bc0b9cda0c857f86456b7d64e644284e7748ac0949cc5a5b50e3c297bedfdd6f162621eeb8c5d32f3570e318d7 SHA512 a4f702e5a7f4e8bf7c1147bd6a96d2bc51ef99a7c60691deb1f24fd07a78ca8cfb6427a0758912611793272c58a8bf87d66dcaa47b888dc0a3204729c0bb8ecf
MISC metadata.xml 794 BLAKE2B 4a92fb553aad7d87d4b7a8d77974dbd67d593b4010783f96324979d9c01067bccc60d2faedf604bd8d44a8ac4316356879301899af8bc08d0fcd548df6d3762d SHA512 a9e6f4e161519d0b3618fe8da7065195bc760ba889fa4356358d4047ea1970eb5fd78bdc5fbeb7c660f1bee48a68ab20ced636514e6f12848e88f6f4dabc9705
diff --git a/sci-libs/cantera/cantera-2.4.0-r5.ebuild b/sci-libs/cantera/cantera-2.4.0-r5.ebuild
new file mode 100644
index 000000000000..ac2a89b4ddd4
--- /dev/null
+++ b/sci-libs/cantera/cantera-2.4.0-r5.ebuild
@@ -0,0 +1,131 @@
+# 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.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/files/cantera_2.4.0_env_python_install_prefix.patch b/sci-libs/cantera/files/cantera_2.4.0_env_python_install_prefix.patch
new file mode 100644
index 000000000000..838907996361
--- /dev/null
+++ b/sci-libs/cantera/files/cantera_2.4.0_env_python_install_prefix.patch
@@ -0,0 +1,17 @@
+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
index 8c44228019b8..0b4d3abf8541 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);