From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id BE5611582EF for ; Mon, 10 Mar 2025 02:54:33 +0000 (UTC) Received: from lists.gentoo.org (bobolink.gentoo.org [140.211.166.189]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) (Authenticated sender: relay-lists.gentoo.org@gentoo.org) by smtp.gentoo.org (Postfix) with ESMTPSA id AAE4134311D for ; Mon, 10 Mar 2025 02:54:33 +0000 (UTC) Received: from bobolink.gentoo.org (localhost [127.0.0.1]) by bobolink.gentoo.org (Postfix) with ESMTP id D336211037D; Mon, 10 Mar 2025 02:54:29 +0000 (UTC) Received: from smtp.gentoo.org (mail.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by bobolink.gentoo.org (Postfix) with ESMTPS id CC4AE11037D for ; Mon, 10 Mar 2025 02:54:29 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 61B61343137 for ; Mon, 10 Mar 2025 02:54:29 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 133A127E6 for ; Mon, 10 Mar 2025 02:54:27 +0000 (UTC) From: "Sam James" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" Message-ID: <1741574861.1f16f351c75f802f35851f5f080fa37238eb9671.sam@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: sci-libs/cantera/files/, sci-libs/cantera/ X-VCS-Repository: repo/gentoo X-VCS-Files: sci-libs/cantera/Manifest sci-libs/cantera/cantera-3.1.0.ebuild sci-libs/cantera/files/cantera-3.1.0_env.patch X-VCS-Directories: sci-libs/cantera/ sci-libs/cantera/files/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: 1f16f351c75f802f35851f5f080fa37238eb9671 X-VCS-Branch: master Date: Mon, 10 Mar 2025 02:54:27 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: c932a2d0-6485-4ac1-b0dd-518b569eae74 X-Archives-Hash: 8bf1a5f8c1cbe78e962846757dd5244e commit: 1f16f351c75f802f35851f5f080fa37238eb9671 Author: Sergey Torokhov yandex ru> AuthorDate: Mon Dec 30 19:58:00 2024 +0000 Commit: Sam James gentoo org> CommitDate: Mon Mar 10 02:47:41 2025 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1f16f351 sci-libs/cantera: 3.1.0 version bump Bug: https://bugs.gentoo.org/945800 Signed-off-by: Sergey Torokhov yandex.ru> Closes: https://github.com/gentoo/gentoo/pull/39910 Signed-off-by: Sam James gentoo.org> sci-libs/cantera/Manifest | 2 + sci-libs/cantera/cantera-3.1.0.ebuild | 155 +++++++++++++++++++++++++ sci-libs/cantera/files/cantera-3.1.0_env.patch | 37 ++++++ 3 files changed, 194 insertions(+) diff --git a/sci-libs/cantera/Manifest b/sci-libs/cantera/Manifest index b36e38ff4cea..2bbade6db634 100644 --- a/sci-libs/cantera/Manifest +++ b/sci-libs/cantera/Manifest @@ -1 +1,3 @@ DIST cantera-3.0.1.tar.gz 2451841 BLAKE2B b05771021a81d5266dfed382e2a6357e5b70653c6d9cfb5f03a6755095f4f8f4e7c0f78b79e0bf131c01fefce46bbc647c790ee412b6457c515cda39d4fc3054 SHA512 fa993b33867c6c0a0ca539f52116c4cdea739dfcd30deb5d2f66042f290f7f2f60112d7a37c38fbd8a38a119e5af00a7a85fd80b6e36388202b666be0ddd7715 +DIST cantera-3.1.0.tar.gz 2605640 BLAKE2B 6912b4e6b96ff71f02484a8fa051f8d34d0fc24c933e08e129531c6fe10e80fea74fcf6a6f7b00736de7b6ed5d4ab483f37a51b532d9bf154646546a8856e2a2 SHA512 0400a01ed0e244e6a34c9c04ffd5174ce6632c713c9bf003ab96e22b6f5a62713ee6a7eb07d7ae614e9f4e303e17df7fd234d66a48e43e46ede0246bb2bac52b +DIST cantera-3.1.0_example_data.tar.gz 244545 BLAKE2B c341a7d530ad2486660b1dfe870f6ddd49280101bc7e98d3a88dea3aaaab0ae6c25383746f688164a04385a462a513f706d0ee248a675806de22df467d4f074f SHA512 a6171a106460f8b7a84bf825db38826444c30f921ba27896a50e1b52177550deaa5f66e11f6f91a2b91c4023e3dfb55b46233d2b6176afa771154dd81f8b34ab diff --git a/sci-libs/cantera/cantera-3.1.0.ebuild b/sci-libs/cantera/cantera-3.1.0.ebuild new file mode 100644 index 000000000000..2f918ec6b1b6 --- /dev/null +++ b/sci-libs/cantera/cantera-3.1.0.ebuild @@ -0,0 +1,155 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{10..13} ) + +FORTRAN_NEEDED=fortran +FORTRAN_STANDARD="77 90" + +inherit flag-o-matic 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/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz + https://github.com/Cantera/cantera-example-data/archive/refs/tags/v${PV}.tar.gz -> ${P}_example_data.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} + dev-cpp/yaml-cpp + hdf5? ( sci-libs/HighFive ) + !lapack? ( sci-libs/sundials:0= ) + lapack? ( + >=sci-libs/sundials-6.5.0:0=[lapack?] + virtual/lapack + ) + python? ( + $(python_gen_cond_dep ' + dev-python/numpy[${PYTHON_USEDEP}] + dev-python/ruamel-yaml[${PYTHON_USEDEP}] + ') + ) +" + +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}/${PN}-3.1.0_env.patch" +) + +src_unpack() { + default + mv -T "${WORKDIR}/${PN}-example-data-${PV}" "${S}"/data/example_data || die +} + +pkg_setup() { + fortran-2_pkg_setup + python-single-r1_pkg_setup +} + +## Full list of configuration options of Cantera is presented here: +## https://cantera.org/3.1/develop/compiling/config-options.html +src_configure() { + # -Werror=odr, -Werror=lto-type-mismatch + # https://github.com/Cantera/cantera/issues/1783 + filter-lto + + scons_vars=( + AR="$(tc-getAR)" + CC="$(tc-getCC)" + CXX="$(tc-getCXX)" + cc_flags="${CXXFLAGS}" + cxx_flags="-std=c++20" + 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="y" python_cmd="${EPYTHON}" ) + else + scons_targets+=( python_package="n" ) + 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.1.0_env.patch b/sci-libs/cantera/files/cantera-3.1.0_env.patch new file mode 100644 index 000000000000..31766f1afb13 --- /dev/null +++ b/sci-libs/cantera/files/cantera-3.1.0_env.patch @@ -0,0 +1,37 @@ +diff '--color=auto' -Naur a/SConstruct b/SConstruct +--- a/SConstruct ++++ b/SConstruct +@@ -170,11 +170,7 @@ + + cantera_git_commit = os.environ.get("CT_GIT_COMMIT") + if not cantera_git_commit: +- try: +- cantera_git_commit = get_command_output("git", "rev-parse", "--short", "HEAD") +- logger.info(f"Building Cantera from git commit {cantera_git_commit!r}") +- except (subprocess.CalledProcessError, FileNotFoundError): +- cantera_git_commit = "unknown" ++ cantera_git_commit = "unknown" + else: + logger.info(f"Building Cantera from git commit {cantera_git_commit!r}") + +@@ -866,7 +862,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) + +diff '--color=auto' -Naur a/src/SConscript b/src/SConscript +--- a/src/SConscript ++++ b/src/SConscript +@@ -90,7 +90,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