summaryrefslogtreecommitdiff
path: root/sci-libs/cantera
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2021-02-17 10:35:54 +0000
committerV3n3RiX <venerix@redcorelinux.org>2021-02-17 10:35:54 +0000
commit463397cf1e064185110fe57c568d73f99a06f5d1 (patch)
tree9aa75eefc5154eaf0e3c33658b830fc54dc68052 /sci-libs/cantera
parentc8d60dada2ec8eb48b2d2b290cd6683ccec40e39 (diff)
gentoo resync : 17.02.2021
Diffstat (limited to 'sci-libs/cantera')
-rw-r--r--sci-libs/cantera/Manifest5
-rw-r--r--sci-libs/cantera/cantera-2.5.0.ebuild134
-rw-r--r--sci-libs/cantera/files/cantera-2.5.0_env.patch49
-rw-r--r--sci-libs/cantera/metadata.xml2
4 files changed, 188 insertions, 2 deletions
diff --git a/sci-libs/cantera/Manifest b/sci-libs/cantera/Manifest
index f084c1546374..bc2cfebe21ad 100644
--- a/sci-libs/cantera/Manifest
+++ b/sci-libs/cantera/Manifest
@@ -1,6 +1,9 @@
+AUX cantera-2.5.0_env.patch 2218 BLAKE2B b4fa7e25081ba5818163a16b970c8fde8a7faec64495a566b805d593151a48cd67722052e73ce1df70c751852d5e5e58e70d5ff110f0c8e4ef46262ddd951a1d SHA512 7045812de7d8cbcefaa8a22f2caf831bb0811d0c8b73a9f0550462fd2f8778f7f61aeaa8d1f6381a303063fbf7364a7cf22bcd40127bf0e1bc08418b8b10399c
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.0.tar.gz 2479888 BLAKE2B be3dd9ae1b0d9b555b9ddd6ad78a2a6a675844903e4c10ef5e4a09c66d5ca01f81f49f35ee195597d71140dcc4da9750e82f71c6553b5f0ef8a122bf63b86cc1 SHA512 4f1763a74a4a938c6d4512ab574bcbbb84ea6e8c9814c612e6ff6cba0bec1209252ef7c21004e0df98a84279cf66bd137220233dad0ebbcfc89e9a273d753478
EBUILD cantera-2.4.0-r5.ebuild 3069 BLAKE2B 39717e82093e45822879a61834b49b64bab571b850d3e2efccc09e8f2667d9729edea788afb15fc056030d1239ff25bff7e6868ebd62000acd7efc72c3c55e4f SHA512 df6942fc36890820efc815873423b63aea4448b180b201c6ce4e85c4ae9cd67e54f21935de4a9351581f8913ae732c7c85bdb6348ed8dfe0da43cc503e1c1537
-MISC metadata.xml 794 BLAKE2B 4a92fb553aad7d87d4b7a8d77974dbd67d593b4010783f96324979d9c01067bccc60d2faedf604bd8d44a8ac4316356879301899af8bc08d0fcd548df6d3762d SHA512 a9e6f4e161519d0b3618fe8da7065195bc760ba889fa4356358d4047ea1970eb5fd78bdc5fbeb7c660f1bee48a68ab20ced636514e6f12848e88f6f4dabc9705
+EBUILD cantera-2.5.0.ebuild 3181 BLAKE2B ec3cecba3ad0e08452d05ea6fb4d9177ecd28cd7a659c9eeabd6581610337f420a3901f53aebca3e5f02281e56180ee718faeed838554bf9914578641db78efd SHA512 99cc3da4810d27094a1f3a996caebfaed47033945d03d0e10ceade5654690d49989d7b082112873ef1ebefe597f4c5cd7c7f74577aae83e2d3d3769f15e2cd4a
+MISC metadata.xml 803 BLAKE2B c0444a2aa286283ff4f6e391482b338b64bf369691113a140c3bd5b391498a343c57987be260f4a4f72c9ed3013b2b7ee461f2e5771dc8a7fdfb88e4e64771c5 SHA512 2601b121f8e7ee11f1228c0b2fdbe90657a1cd944a2a6e385a1b73448d4d1f4da3f4d17c6afbb078feab1a26c2dbf4fd7d1901916e32e02fb0c397abf6852653
diff --git a/sci-libs/cantera/cantera-2.5.0.ebuild b/sci-libs/cantera/cantera-2.5.0.ebuild
new file mode 100644
index 000000000000..5f3b8c1280bd
--- /dev/null
+++ b/sci-libs/cantera/cantera-2.5.0.ebuild
@@ -0,0 +1,134 @@
+# 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 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}]
+ dev-python/ruamel-yaml[${PYTHON_MULTI_USEDEP}]
+ ')
+ )
+ dev-cpp/yaml-cpp
+ <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
+ 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=(
+ 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 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
+}
+
+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.0_env.patch b/sci-libs/cantera/files/cantera-2.5.0_env.patch
new file mode 100644
index 000000000000..9551d4b4ca1c
--- /dev/null
+++ b/sci-libs/cantera/files/cantera-2.5.0_env.patch
@@ -0,0 +1,49 @@
+diff -Naur old/SConstruct new/SConstruct
+--- old/SConstruct 2021-02-13 01:18:43.000000000 +0300
++++ new/SConstruct 2021-02-13 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)
+
+@@ -724,10 +724,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-02-13 01:18:43.000000000 +0300
++++ new/interfaces/cython/SConscript 2021-02-13 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/test_problems/SConscript new/test_problems/SConscript
+--- old/test_problems/SConscript 2021-02-13 01:18:43.000000000 +0300
++++ new/test_problems/SConscript 2021-02-13 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,
diff --git a/sci-libs/cantera/metadata.xml b/sci-libs/cantera/metadata.xml
index 47bc86a96301..5ee7890c1369 100644
--- a/sci-libs/cantera/metadata.xml
+++ b/sci-libs/cantera/metadata.xml
@@ -14,7 +14,7 @@
for problems involving chemical kinetics, thermodynamics, and/or transport processes.
</longdescription>
<use>
- <flag name="cti">Install CTI tools (ck2cti, ctml_writer) for conversion of Chemkin files to Cantera format</flag>
+ <flag name="cti">Install CTI tools (ck2cti, ck2yaml, ctml_writer) for conversion of Chemkin files to Cantera format</flag>
</use>
<upstream>
<remote-id type="github">cantera</remote-id>