From 0fcaac21e786bd7911b1e8f436cd885c5e2f6437 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Fri, 27 Oct 2023 08:42:41 +0100 Subject: gentoo auto-resync : 27:10:2023 - 08:42:41 --- sci-libs/cantera/Manifest | 5 +- sci-libs/cantera/cantera-3.0.0.ebuild | 141 +++++++++++++++++++++++++ sci-libs/cantera/files/cantera-3.0.0_env.patch | 37 +++++++ sci-libs/cantera/metadata.xml | 4 +- 4 files changed, 185 insertions(+), 2 deletions(-) create mode 100644 sci-libs/cantera/cantera-3.0.0.ebuild create mode 100644 sci-libs/cantera/files/cantera-3.0.0_env.patch (limited to 'sci-libs/cantera') diff --git a/sci-libs/cantera/Manifest b/sci-libs/cantera/Manifest index 04c556270928..3c374309b6d4 100644 --- a/sci-libs/cantera/Manifest +++ b/sci-libs/cantera/Manifest @@ -1,5 +1,8 @@ AUX cantera-2.6.0_drop_deprecated_open_U_option.patch 1363 BLAKE2B 236dc4ee368d0c172e372d9e263318460a8b7a3c6fca02e97a0d71fb1852a2bef00c8375e72957d9a5fff2091f3aae968bd73a872509e3890ab91871eb90ae81 SHA512 4f9f18874bab308462261e0efdfdbb1c1f7ad35382aed5a594da45190e18d9264ed314ca4f7cab29d16a83b5c30ba8fdc213461a549ec84bd201211848d63f1e AUX cantera-2.6.0_env.patch 3119 BLAKE2B 16844230d86a292c764da1aa4043b2eff177f2b8a94ed154c3f6a69c1737e85f6ddc9330d5ba6f26936994306381dcb40ab4e70c7b7b44bdbaf7d920ee1ef902 SHA512 12cdabc7cee106ee17050918b483245b39f927b5a5bb8f92bd6177c1d660cc18cd3a91b2710991fa09c44f58aaac464495b15ceb7ae13bf235d34a6caabe7bc4 +AUX cantera-3.0.0_env.patch 1439 BLAKE2B 8f4cd901f24f0b526887501ba16a0552acf8572f154f8494d66d3dd8096434621d6f2baaa57f905233919fc1b7872993bada9f373950330663c8315075d507b9 SHA512 065cdbcf620a3036c1bb0bb8b79503f76dbe7e6b2522e9f53fc582c15e5e10f1790f1b40cf0315d64cab4f858764446f4094370124bb9b5c4ee6dbcfd5e61b87 DIST cantera-2.6.0.tar.gz 2586243 BLAKE2B 3562dc3641c70cdbd5e07062ecee56c0658b098c20bb477c3e741731db01e38fccf624e6769377420b01dd4bac72a0608cf226cce40ac12f13e71081090e06bc SHA512 74e12c89af38236bcc064034f74edcc690895151a9e453e728d130b83f5f527e675750c68a3fe36eea3c6aec6969685aa8828ae740a2e27b5df72a8ccc4d2856 +DIST cantera-3.0.0.tar.gz 2451103 BLAKE2B 094d7a4f0b8fd0f1a45d9f8c13e1390cf7fc62110e424e1287030e97382c1cdc016a5119adc4d5c7bbc222420a3b447db93fee8350643cb3a0907a838fbc1ddf SHA512 dffd696628210ae5c7b08e394e9a97262cfa6aa07ac2e6faa48591ecfee5bb11e7c2b6928563007fd581a1fd9cae999f7c1414ab5d5a312a823e155573df7aca EBUILD cantera-2.6.0-r2.ebuild 3633 BLAKE2B 55fedfb2b25df9f0a610a175527821fe4df574030e1658813dff5c2f349bae492340f68a9d3cf7930f8c65c281c0fdaa68cf3fa52fea7b632cad7114b8e88a0e SHA512 ff576dadb10f631a62a91dedf433660477ea2ce12ef6731889be7eb96d4e149d08307b244a113c6bb9768ae7398b73c160bdf9bf9b541e089e3a3b3d100ed7a8 -MISC metadata.xml 842 BLAKE2B 85e2a5268aa13a8a92e9f04212c3bcd66252a77c88dd2ddb7d81a34f486754c7faa352998484d4362b16a2bdccb85325337c13cc272a434be463a037eab846a1 SHA512 a9edb0347dc3b1510d3d2b767e7a0e96cd1d6cc50dd4e5c2830d29438dd25a0bdfa41994dbb43bbb7dc70ba3537f783b2d0a143723908dd91d434e1edb11a704 +EBUILD cantera-3.0.0.ebuild 3296 BLAKE2B ff4a59638214fc933e2c8263ce595e14faa4efc2c32afb281040e8311eb10cc4c5acdb00c477599f779180d0440c42114d0439abe97c1e904b43880ad5fbd3e1 SHA512 040f0504fcb4e419dc52d5f5b233f891dc419f20999b400246ccc9fa4580e6772ef6588d3ba81245b96ab7e3394bc6462806207d1f4a5888bdabb9481f4de63d +MISC metadata.xml 999 BLAKE2B 7df519878d03842a580eecd2730557f3aa607fc965b8551f63164eee3b533a3b9724bd1cc1e5dbda1635d415363041539d67cd5ca854adc5c1fda10b52e682df SHA512 e625b03f70c0c55f9ac4493cb203f96f7f2482fe31852e272e42ce12710da99a284c2f86fe2e2411ad251738fc95f2ab5c7c12051d52671fd0aad3e4a59fb2e2 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..27478930c415 --- /dev/null +++ b/sci-libs/cantera/cantera-3.0.0.ebuild @@ -0,0 +1,141 @@ +# 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 hdf5 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 + hdf5? ( sci-libs/HighFive ) + !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" +) + +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-3.0.0_env.patch b/sci-libs/cantera/files/cantera-3.0.0_env.patch new file mode 100644 index 000000000000..cfc2874250e4 --- /dev/null +++ b/sci-libs/cantera/files/cantera-3.0.0_env.patch @@ -0,0 +1,37 @@ +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 -Naur a/src/SConscript b/src/SConscript +--- a/src/SConscript ++++ b/src/SConscript +@@ -89,7 +89,7 @@ + shim = pyenv.SharedObject("extensions/pythonShim.cpp") + pylibname = f"../lib/cantera_python{pyenv['py_version_short'].replace('.', '_')}" + lib = build(pyenv.SharedLibrary(pylibname, shim, SPAWN=get_spawn(pyenv))) +- install("$inst_shlibdir", lib) ++ install("$inst_shlibdir/cantera", lib) + + + # build the Cantera static library diff --git a/sci-libs/cantera/metadata.xml b/sci-libs/cantera/metadata.xml index 919e8bf0ad40..fbc827be0db4 100644 --- a/sci-libs/cantera/metadata.xml +++ b/sci-libs/cantera/metadata.xml @@ -14,7 +14,9 @@ for problems involving chemical kinetics, thermodynamics, and/or transport processes. - Install CTI tools (ck2cti, ck2yaml, ctml_writer) for conversion of Chemkin files to Cantera format + Install conversion tools (ck2cti, ck2yaml, ctml_writer) from Chemkin to Cantera format + Install Python bindings and conversion tools from Chemkin to Cantera format + Add HDF5 container files support cantera/cantera -- cgit v1.2.3