diff options
author | Sergey Torokhov <torokhov-s-a@yandex.ru> | 2022-06-07 01:19:56 +0300 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2022-06-07 08:44:04 +0100 |
commit | 5b37420a57390e4fbc7abf0ea78570f0b4204da5 (patch) | |
tree | 2b8888f32a2e9b8ef8ff3d5f15ca2ec71a7489cc /sci-libs/cantera/cantera-2.5.1-r4.ebuild | |
parent | sci-libs/cantera: 2.6.0 fix install for >=dev-python/pip-22.1.1 (diff) | |
download | gentoo-5b37420a57390e4fbc7abf0ea78570f0b4204da5.tar.gz gentoo-5b37420a57390e4fbc7abf0ea78570f0b4204da5.tar.bz2 gentoo-5b37420a57390e4fbc7abf0ea78570f0b4204da5.zip |
sci-libs/cantera: restrict sci-libs/sundials for sci-libs/cantera[lapack]
It seems that >=sci-libs/cantera-2.5.1-r3[lapack] tests are
currently broken if build against >=sci-libs/sundials-5.8.0[lapack].
The cantera-2.5.1_env.patch is updated here to proper check
if >=sundials-5.5 is build with lapack support.
This change doesn't affect cantera-2.5.1-r1 at all
and allow to build cantera-2.5.1-r3 against sundials[lapack]
but in cantera-2.5.1-r4 restriction of sundials is used.
So revbump is assumed to keep stablized.
Signed-off-by: Sergey Torokhov <torokhov-s-a@yandex.ru>
Closes: https://github.com/gentoo/gentoo/pull/25779
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'sci-libs/cantera/cantera-2.5.1-r4.ebuild')
-rw-r--r-- | sci-libs/cantera/cantera-2.5.1-r4.ebuild | 145 |
1 files changed, 145 insertions, 0 deletions
diff --git a/sci-libs/cantera/cantera-2.5.1-r4.ebuild b/sci-libs/cantera/cantera-2.5.1-r4.ebuild new file mode 100644 index 000000000000..cd12713f6574 --- /dev/null +++ b/sci-libs/cantera/cantera-2.5.1-r4.ebuild @@ -0,0 +1,145 @@ +# 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-5.9.0: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}] + ') + ) + test? ( + >=dev-cpp/gtest-1.8.0 + python? ( + $(python_gen_cond_dep ' + dev-python/h5py[${PYTHON_USEDEP}] + dev-python/pandas[${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)" 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 + + # 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 +} |