public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Eli Schwartz" <eschwartz@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: sci-libs/cantera/
Date: Tue, 20 Aug 2024 18:14:29 +0000 (UTC)	[thread overview]
Message-ID: <1724177523.6e8c1d5d28effae96bddfa0e27cae00f6659362b.eschwartz@gentoo> (raw)

commit:     6e8c1d5d28effae96bddfa0e27cae00f6659362b
Author:     Sergey Torokhov <torokhov-s-a <AT> yandex <DOT> ru>
AuthorDate: Sun Aug 18 19:08:18 2024 +0000
Commit:     Eli Schwartz <eschwartz <AT> gentoo <DOT> org>
CommitDate: Tue Aug 20 18:12:03 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6e8c1d5d

sci-libs/cantera: 3.0.1; fix build with sundials-7, tests with numpy-2

Closes: https://bugs.gentoo.org/937247
Signed-off-by: Sergey Torokhov <torokhov-s-a <AT> yandex.ru>
Closes: https://github.com/gentoo/gentoo/pull/38188
Signed-off-by: Eli Schwartz <eschwartz <AT> gentoo.org>

 sci-libs/cantera/Manifest             |   1 +
 sci-libs/cantera/cantera-3.0.1.ebuild | 143 ++++++++++++++++++++++++++++++++++
 2 files changed, 144 insertions(+)

diff --git a/sci-libs/cantera/Manifest b/sci-libs/cantera/Manifest
index fe074558539e..0e7764e95f41 100644
--- a/sci-libs/cantera/Manifest
+++ b/sci-libs/cantera/Manifest
@@ -1 +1,2 @@
 DIST cantera-3.0.0.tar.gz 2451103 BLAKE2B 094d7a4f0b8fd0f1a45d9f8c13e1390cf7fc62110e424e1287030e97382c1cdc016a5119adc4d5c7bbc222420a3b447db93fee8350643cb3a0907a838fbc1ddf SHA512 dffd696628210ae5c7b08e394e9a97262cfa6aa07ac2e6faa48591ecfee5bb11e7c2b6928563007fd581a1fd9cae999f7c1414ab5d5a312a823e155573df7aca
+DIST cantera-3.0.1.tar.gz 2451841 BLAKE2B b05771021a81d5266dfed382e2a6357e5b70653c6d9cfb5f03a6755095f4f8f4e7c0f78b79e0bf131c01fefce46bbc647c790ee412b6457c515cda39d4fc3054 SHA512 fa993b33867c6c0a0ca539f52116c4cdea739dfcd30deb5d2f66042f290f7f2f60112d7a37c38fbd8a38a119e5af00a7a85fd80b6e36388202b666be0ddd7715

diff --git a/sci-libs/cantera/cantera-3.0.1.ebuild b/sci-libs/cantera/cantera-3.0.1.ebuild
new file mode 100644
index 000000000000..7de3d3bf06df
--- /dev/null
+++ b/sci-libs/cantera/cantera-3.0.1.ebuild
@@ -0,0 +1,143 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..12} )
+
+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}
+	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.0.0_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."
+}


             reply	other threads:[~2024-08-20 18:14 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-20 18:14 Eli Schwartz [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-08-20 18:14 [gentoo-commits] repo/gentoo:master commit in: sci-libs/cantera/ Eli Schwartz
2024-02-28 14:00 Sam James
2024-02-08  9:18 Joonas Niilola
2023-10-27  2:34 Sam James
2023-08-28 22:57 Sam James
2023-05-14 10:29 Andreas Sturmlechner
2023-03-07 11:42 Sam James
2022-12-26 19:19 Andreas Sturmlechner
2022-11-06 19:06 Sam James
2022-06-07  7:46 Sam James
2022-05-09  9:58 Jakov Smolić
2022-02-27  0:58 Sam James
2022-02-27  0:54 Sam James
2022-01-15  9:31 Joonas Niilola
2021-07-17 18:18 David Seifert
2021-05-24 13:05 Agostino Sarubbo
2021-04-09 12:21 Joonas Niilola
2021-03-01  8:26 Joonas Niilola
2021-02-19 16:04 Sam James
2021-02-19 16:04 Sam James
2021-02-19 16:04 Sam James
2020-10-09 15:23 Agostino Sarubbo
2020-07-21 10:03 Andreas Sturmlechner
2020-05-05 16:54 Matthias Maier
2020-02-09 16:36 Michał Górny
2020-01-14 14:56 Agostino Sarubbo
2019-08-09 14:41 Joonas Niilola
2019-07-19 16:45 Michał Górny
2019-07-19 16:45 Michał Górny
2019-07-19 16:45 Michał Górny
2019-07-19 16:45 Michał Górny
2019-07-19 16:45 Michał Górny

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1724177523.6e8c1d5d28effae96bddfa0e27cae00f6659362b.eschwartz@gentoo \
    --to=eschwartz@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox