summaryrefslogtreecommitdiff
path: root/sci-libs/cantera
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2022-06-29 12:04:12 +0100
committerV3n3RiX <venerix@koprulu.sector>2022-06-29 12:04:12 +0100
commit0f558761aa2dee1017b4751e4017205e015a9560 (patch)
tree037df795519468a25d9362b4e95cdaeb84eb1cf9 /sci-libs/cantera
parent752d6256e5204b958b0ef7905675a940b5e9172f (diff)
gentoo resync : 29.12.2022
Diffstat (limited to 'sci-libs/cantera')
-rw-r--r--sci-libs/cantera/Manifest9
-rw-r--r--sci-libs/cantera/cantera-2.5.1-r1.ebuild4
-rw-r--r--sci-libs/cantera/cantera-2.5.1-r4.ebuild (renamed from sci-libs/cantera/cantera-2.5.1-r3.ebuild)3
-rw-r--r--sci-libs/cantera/cantera-2.6.0-r1.ebuild148
-rw-r--r--sci-libs/cantera/files/cantera-2.5.1_env.patch27
-rw-r--r--sci-libs/cantera/files/cantera-2.6.0_env.patch78
6 files changed, 263 insertions, 6 deletions
diff --git a/sci-libs/cantera/Manifest b/sci-libs/cantera/Manifest
index 1e8d68580574..0584d7e1e33a 100644
--- a/sci-libs/cantera/Manifest
+++ b/sci-libs/cantera/Manifest
@@ -1,5 +1,8 @@
-AUX cantera-2.5.1_env.patch 4600 BLAKE2B ed131f2b3d061102f197d50105176332fd07424ddff81b0af05bdc2eb3e514bcb17da85e285d80dd717d685a10a8eaa0a08769171cbb2df5103d2283519ef311 SHA512 92083e331a1ddd712d21602e50960cf0251ca688a90121f67c35b21b79851c7baa6d9373a67bec1beade53d44e6dfe2e0faf7385305d2c8cfdee2d9698b21c67
+AUX cantera-2.5.1_env.patch 5928 BLAKE2B d6d0792527a5f50c34d4d6a05c651992a82af7ed864b68178023d6a7c44632f124851fe5e79306d0b91fde82336d72f8600bd9a2ccfc9a719b07ad44da63913d SHA512 5a1d0e238cfb5f24731acfb59cd66d1dc564a9e2485405e64771735ae72b529ef64475692394cb06c68f447bffc106d73edb901df26587e4203a8c59efea3dfc
+AUX cantera-2.6.0_env.patch 3119 BLAKE2B 16844230d86a292c764da1aa4043b2eff177f2b8a94ed154c3f6a69c1737e85f6ddc9330d5ba6f26936994306381dcb40ab4e70c7b7b44bdbaf7d920ee1ef902 SHA512 12cdabc7cee106ee17050918b483245b39f927b5a5bb8f92bd6177c1d660cc18cd3a91b2710991fa09c44f58aaac464495b15ceb7ae13bf235d34a6caabe7bc4
DIST cantera-2.5.1.tar.gz 2492422 BLAKE2B b48c5d12fc2b69d309759afd20b55dc2533c23ccba840109cf7a85c4ebb8306eb48d9f007914184a9d409f7bf296814fe09e6e62a29cf8384edd954fdff2af4e SHA512 8cd65f6b86b3009f22ec243cb7cb833e26919c4925fd15fba8fb98aad2180d8c0fe7550e13efeb7cce55abab06d9400230d59c9c43b4d3be6b0575b1164a56bc
-EBUILD cantera-2.5.1-r1.ebuild 3436 BLAKE2B d961413b7a6ccf67f13d8d91d067264af2ddab2b5c351abdb8d41c85a2d013f9ca44ec8a34ddabf71cd9fd06e7a97664f081f03264871a2be811e1b70758656a SHA512 692d7df06f6f659465672f379d10ccab4f9f4f8b574b69636e992d3a8664d6087a7bdd73222ed6f5cdcfe86b000a99f8b1b7c36a79f9078b3beb1f81389caab4
-EBUILD cantera-2.5.1-r3.ebuild 3417 BLAKE2B 9a74774ef3980c8007d952b0eab82522eeaf717d78e9af49022e20f494b3c43b773cd958d9ba381daa4eaff21d1917fe4a0e95640d3cacc85c787c99ccfe1f59 SHA512 167c28e81c8f0f7fa8abb5bb916e8b4c84d5a20083ce00b79de21fef781d3d0bae1bb321ee80f0edf5f91a55fb2881a9cbbeff260cafb944e09621c8a73f49ca
+DIST cantera-2.6.0.tar.gz 2586243 BLAKE2B 3562dc3641c70cdbd5e07062ecee56c0658b098c20bb477c3e741731db01e38fccf624e6769377420b01dd4bac72a0608cf226cce40ac12f13e71081090e06bc SHA512 74e12c89af38236bcc064034f74edcc690895151a9e453e728d130b83f5f527e675750c68a3fe36eea3c6aec6969685aa8828ae740a2e27b5df72a8ccc4d2856
+EBUILD cantera-2.5.1-r1.ebuild 3428 BLAKE2B ea9fdf73fe224d9ccc9c589b46e7ea59389e75bfa2eea8f8ea45d08d9c079b926b607c8a5f6edf469cb348803ae20748722227b96c462d39d34b97fb544684e0 SHA512 59383dbd2b324023d0802c179631d4a6edd925449b0d8195d0d7ae34a1b0c46eb695db54659673d1d23756862301b245244c4ce495fd23945541700030ff6127
+EBUILD cantera-2.5.1-r4.ebuild 3470 BLAKE2B 59c9063460a112368419e013a2c5ad8f2f51616ddf5904b461b08a4fe68369a52e8e5ca1bbc8aa27854ff2949921fef87126441bbfa5af2685a5094c86e19a7e SHA512 80f9ce4775d89c068bcea3c322e0af4ca220efb1335e60be31d6ab9f746637d29da22b89aec98572a6fdc22c98efdacdff2072ff2ec4df313aa82f642eb97996
+EBUILD cantera-2.6.0-r1.ebuild 3543 BLAKE2B 4940c9cafe4015d258ae685c010bd3864cdd82c47ae48f23300b6f83790cca4c976decf44f4feb7290e9cc2b2a6a2ce1804335d60b42bb6bb3930b06f6ba53e1 SHA512 7e077e63cbf0b5a51b395c9d601cdd5f87ed1128d7b506be9af6210f77121b297b365c2bda3e78daf23a8cca6af6752c3a8b860d7418965123fda8e179103bf7
MISC metadata.xml 842 BLAKE2B 85e2a5268aa13a8a92e9f04212c3bcd66252a77c88dd2ddb7d81a34f486754c7faa352998484d4362b16a2bdccb85325337c13cc272a434be463a037eab846a1 SHA512 a9edb0347dc3b1510d3d2b767e7a0e96cd1d6cc50dd4e5c2830d29438dd25a0bdfa41994dbb43bbb7dc70ba3537f783b2d0a143723908dd91d434e1edb11a704
diff --git a/sci-libs/cantera/cantera-2.5.1-r1.ebuild b/sci-libs/cantera/cantera-2.5.1-r1.ebuild
index 659722a8c3cf..ecacad92743b 100644
--- a/sci-libs/cantera/cantera-2.5.1-r1.ebuild
+++ b/sci-libs/cantera/cantera-2.5.1-r1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@@ -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
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-r1.ebuild b/sci-libs/cantera/cantera-2.6.0-r1.ebuild
new file mode 100644
index 000000000000..fb800fb485b5
--- /dev/null
+++ b/sci-libs/cantera/cantera-2.6.0-r1.ebuild
@@ -0,0 +1,148 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{8..10} )
+
+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-5.3.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" )
+
+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="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.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
diff --git a/sci-libs/cantera/files/cantera-2.6.0_env.patch b/sci-libs/cantera/files/cantera-2.6.0_env.patch
new file mode 100644
index 000000000000..15a1e65857e4
--- /dev/null
+++ b/sci-libs/cantera/files/cantera-2.6.0_env.patch
@@ -0,0 +1,78 @@
+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,