summaryrefslogtreecommitdiff
path: root/sci-libs/cantera
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2021-04-28 20:21:43 +0100
committerV3n3RiX <venerix@redcorelinux.org>2021-04-28 20:21:43 +0100
commit40aaaa64e86ba6710bbeb31c4615a6ce80e75e11 (patch)
tree758c221bad35c9288d0bd6df9c7dfc226728e52c /sci-libs/cantera
parent8d5dbd847cbc704a6a06405856e94b461011afe3 (diff)
gentoo resync : 28.04.2021
Diffstat (limited to 'sci-libs/cantera')
-rw-r--r--sci-libs/cantera/Manifest2
-rw-r--r--sci-libs/cantera/cantera-2.5.1-r1.ebuild144
-rw-r--r--sci-libs/cantera/files/cantera-2.5.1_env.patch103
3 files changed, 249 insertions, 0 deletions
diff --git a/sci-libs/cantera/Manifest b/sci-libs/cantera/Manifest
index 0ccae71b74ae..91352bc67780 100644
--- a/sci-libs/cantera/Manifest
+++ b/sci-libs/cantera/Manifest
@@ -1,9 +1,11 @@
AUX cantera-2.5.0_env.patch 2218 BLAKE2B b4fa7e25081ba5818163a16b970c8fde8a7faec64495a566b805d593151a48cd67722052e73ce1df70c751852d5e5e58e70d5ff110f0c8e4ef46262ddd951a1d SHA512 7045812de7d8cbcefaa8a22f2caf831bb0811d0c8b73a9f0550462fd2f8778f7f61aeaa8d1f6381a303063fbf7364a7cf22bcd40127bf0e1bc08418b8b10399c
+AUX cantera-2.5.1_env.patch 4600 BLAKE2B ed131f2b3d061102f197d50105176332fd07424ddff81b0af05bdc2eb3e514bcb17da85e285d80dd717d685a10a8eaa0a08769171cbb2df5103d2283519ef311 SHA512 92083e331a1ddd712d21602e50960cf0251ca688a90121f67c35b21b79851c7baa6d9373a67bec1beade53d44e6dfe2e0faf7385305d2c8cfdee2d9698b21c67
AUX cantera_2.4.0_env.patch 3559 BLAKE2B 07af1b751b653b1c92288286b9c82ef230ea0df7d9ea4036d23ac24338a221cc45c8e74f137fcf741bb9bb7148e7f3339f54234e9a92ac939956ba7c0ca8e157 SHA512 f2574c3de42d1666a2b64914c66d97045a2a3598f63678b3b60a701d111d7bfc9bd71031dd665a64e6791c9f311fb9514b1a0462a5713763a1b5f87fcd72e528
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
DIST cantera-2.5.1.tar.gz 2492422 BLAKE2B b48c5d12fc2b69d309759afd20b55dc2533c23ccba840109cf7a85c4ebb8306eb48d9f007914184a9d409f7bf296814fe09e6e62a29cf8384edd954fdff2af4e SHA512 8cd65f6b86b3009f22ec243cb7cb833e26919c4925fd15fba8fb98aad2180d8c0fe7550e13efeb7cce55abab06d9400230d59c9c43b4d3be6b0575b1164a56bc
EBUILD cantera-2.4.0-r5.ebuild 3069 BLAKE2B 39717e82093e45822879a61834b49b64bab571b850d3e2efccc09e8f2667d9729edea788afb15fc056030d1239ff25bff7e6868ebd62000acd7efc72c3c55e4f SHA512 df6942fc36890820efc815873423b63aea4448b180b201c6ce4e85c4ae9cd67e54f21935de4a9351581f8913ae732c7c85bdb6348ed8dfe0da43cc503e1c1537
+EBUILD cantera-2.5.1-r1.ebuild 3469 BLAKE2B d93bb296e10fd82d3f237c05c6de8bfe14bfa6944c5790ded35a546a64cb821c5164910021f0930edc7cfbf968d6d57b17a69517e38f6b700e5e18350abe3647 SHA512 8a96107d237ffa1794c162b1edf5993fec05e25cb12b595251730ace675c45e3fcc91dc65103db4138c32dc028730150f80bd24e777c632d87da52c775161b5e
EBUILD cantera-2.5.1.ebuild 3309 BLAKE2B c2719033675b6e1162ad13ff7499562932933c1ed21839cb3998fa1946697f939357a32a5d5c097ec01c38dbcf3b6ad782ef62d76d0602efbadb935b13cb05f5 SHA512 315c10d38a537fd5fe1166bd7018cd889f187b6f587fda0c8e2be42d14cd9904b2cef6605fa061e6f9df8f8a08042147a09e3bd6e46428e543400beb4eefe99b
MISC metadata.xml 841 BLAKE2B 6e302ea58d1e915a7b8f868c9e9e5f151434a3c1f8bd4583d0a2c3d28bd7cbd2d381b4c04dc9f2a3e63b3123ea566727ee275c9d4a13ada36f5fab34502fbac1 SHA512 59ffb087b063eeeb0446f66de657b745bea260ae96953673696d2780cb0d4ed86de718e0a3eaab6503e3395044c8c7291cc11e193d0bd72e720640f5df3d962a
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 000000000000..6f5345f106d5
--- /dev/null
+++ b/sci-libs/cantera/cantera-2.5.1-r1.ebuild
@@ -0,0 +1,144 @@
+# 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 lapack pch +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_MULTI_USEDEP}]
+ ')
+ )
+ python? (
+ $(python_gen_cond_dep '
+ dev-python/numpy[${PYTHON_MULTI_USEDEP}]
+ ')
+ )
+ dev-cpp/yaml-cpp
+ <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_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 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)" 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 000000000000..576e2de2d577
--- /dev/null
+++ b/sci-libs/cantera/files/cantera-2.5.1_env.patch
@@ -0,0 +1,103 @@
+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/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
+@@ -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,