public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: sci-libs/cantera/files/, sci-libs/cantera/
@ 2018-11-28 10:52 Michał Górny
  0 siblings, 0 replies; 9+ messages in thread
From: Michał Górny @ 2018-11-28 10:52 UTC (permalink / raw
  To: gentoo-commits

commit:     b7177d1c59ecb2b173ae8222ccaff546d67c97db
Author:     band-a-prend <torokhov-s-a <AT> yandex <DOT> ru>
AuthorDate: Sat Sep 29 20:29:26 2018 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Wed Nov 28 10:30:09 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b7177d1c

sci-libs/cantera: New package

This commit add new package 'sci-libs/cantera' of version 2.4.0
(cantera-2.4.0.ebuild):

Description:
Cantera is an open-source suite of object-oriented software tools
for problems involving chemical kinetics, thermodynamics,
and/or transport processes.

Homepage and documentation: http://cantera.org
GitHub page: https://github.com/Cantera/cantera

Closes: https://bugs.gentoo.org/200425

Signed-off-by: Sergey Torokhov <torokhov_s_a <AT> mail.ru>
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 sci-libs/cantera/Manifest                          |   1 +
 sci-libs/cantera/cantera-2.4.0.ebuild              | 129 +++++++++++++++++++++
 .../files/cantera_2.4.0_libdirname_variable.patch  |  28 +++++
 sci-libs/cantera/metadata.xml                      |  22 ++++
 4 files changed, 180 insertions(+)

diff --git a/sci-libs/cantera/Manifest b/sci-libs/cantera/Manifest
new file mode 100644
index 00000000000..a4660bf3bfd
--- /dev/null
+++ b/sci-libs/cantera/Manifest
@@ -0,0 +1 @@
+DIST cantera-2.4.0.tar.gz 2321316 BLAKE2B 40750e3864afa3d35817e6f5777a6ac235261e9d134ef749966dbd738a2af5efec2882e6dcc719851f88656b41469e2159d3bff3df32f6abdf57db3b0a2afcae SHA512 8bb0fee34fa5bc9ec78e6f21a100eaa77bdd966bd0b7f0fa27d452e4f122c69e61648beef847178490f5c5d56267a96f6081cac9ccd03cea153c32814e0e84e9

diff --git a/sci-libs/cantera/cantera-2.4.0.ebuild b/sci-libs/cantera/cantera-2.4.0.ebuild
new file mode 100644
index 00000000000..3b43b50033f
--- /dev/null
+++ b/sci-libs/cantera/cantera-2.4.0.ebuild
@@ -0,0 +1,129 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python3_{4,5,6} )
+
+FORTRAN_NEEDED=fortran
+FORTRAN_STANDARD=90
+
+inherit desktop fortran-2 python-single-r1 scons-utils toolchain-funcs
+
+DESCRIPTION="Object-oriented tool suite for chemical kinetics, thermodynamics, and transport"
+HOMEPAGE="http://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"
+
+REQUIRED_USE="
+	cti? ( ${PYTHON_REQUIRED_USE} )
+	python? ( cti )
+	${PYTHON_REQUIRED_USE}
+	"
+
+RDEPEND="
+	python? (
+		dev-python/numpy[${PYTHON_USEDEP}]
+	)
+	sci-libs/sundials:0=
+"
+
+DEPEND="
+	${RDEPEND}
+	dev-cpp/eigen
+	dev-libs/boost
+	dev-libs/libfmt
+	python? (
+		dev-python/cython[${PYTHON_USEDEP}]
+	)
+	test? (
+		>=dev-cpp/gtest-1.8.0
+	)
+"
+
+PATCHES=( "${FILESDIR}/${PN}_${PV}_libdirname_variable.patch" )
+
+pkg_setup() {
+	fortran-2_pkg_setup
+	python-single-r1_pkg_setup
+}
+
+src_prepare() {
+	default
+	# patch to work 'scons test' properly in case of set up 'renamed_shared_libraries="no"' option
+	sed -i "s/, libs=\['cantera_shared'\]//" "${S}"/test_problems/SConscript || die "failed to modify 'test_problems/SConscript'"
+	# patch env to pass CCACHE_DIR variable
+	sed -i "s/ENV={'PATH': os.environ\['PATH'\]}/ENV={'PATH': os.environ\['PATH'\], 'CCACHE_DIR': os.environ.get('CCACHE_DIR','')}/" "${S}"/SConstruct || die "failed to modify 'SConstruct'"
+}
+
+## 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="${CXXFLAGS}"
+		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"
+		env_vars="all"
+		extra_inc_dirs="/usr/include/eigen3"
+	)
+	use test || scons_vars+=( googletest="none" )
+
+	scons_targets=(
+		f90_interface=$(usex fortran y n)
+		python2_package="none"
+	)
+
+	if use cti ; then
+		local scons_python=$(usex python full minimal)
+		scons_targets+=( python3_package="${scons_python}" python3_cmd="${EPYTHON}" )
+	else
+		scons_targets+=( python3_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 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 tool 'ck2cti'"
+		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.4.0_libdirname_variable.patch b/sci-libs/cantera/files/cantera_2.4.0_libdirname_variable.patch
new file mode 100644
index 00000000000..a16f5670b55
--- /dev/null
+++ b/sci-libs/cantera/files/cantera_2.4.0_libdirname_variable.patch
@@ -0,0 +1,28 @@
+diff -Naur old/SConstruct new/SConstruct
+--- old/SConstruct	2018-08-24 16:24:45.000000000 +0300
++++ new/SConstruct	2018-11-05 03:07:07.000000000 +0300
+@@ -327,6 +327,10 @@
+         'prefix',
+         'Set this to the directory where Cantera should be installed.',
+         defaults.prefix, PathVariable.PathAccept),
++    PathVariable(
++        'libdirname',
++        'Set this to the directory where Cantera libraries should be installed.',
++        '', PathVariable.PathAccept),
+     EnumVariable(
+         'python_package',
+         """If you plan to work in Python, then you need the ``full`` Cantera Python
+@@ -1465,10 +1469,9 @@
+ # *** Set additional configuration variables ***
+ # **********************************************
+ 
+-# Some distributions (e.g. Fedora/RHEL) use 'lib64' instead of 'lib' on 64-bit systems
+-if any(name.startswith('/usr/lib64/python') for name in sys.path):
+-    env['libdirname'] = 'lib64'
+-else:
++# Some distributions use 'lib64' (e.g. Fedora/RHEL) or something else instead of 'lib' on 64-bit systems.
++# If user didn't set 'libdirname' configuration variable set it to default value 'lib'
++if not env['libdirname']:
+     env['libdirname'] = 'lib'
+ 
+ # On Debian-based systems, need to special-case installation to

diff --git a/sci-libs/cantera/metadata.xml b/sci-libs/cantera/metadata.xml
new file mode 100644
index 00000000000..a57df7829d2
--- /dev/null
+++ b/sci-libs/cantera/metadata.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+  <maintainer type="person">
+    <email>torokhov_s_a@mail.ru</email>
+    <name>Sergey Torokhov</name>
+  </maintainer>
+  <maintainer type="project">
+    <email>proxy-maint@gentoo.org</email>
+    <name>Proxy Maintainers</name>
+  </maintainer>
+  <longdescription>
+    Cantera is an open-source suite of object-oriented software tools
+    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>
+  </use>
+  <upstream>
+    <remote-id type="github">cantera</remote-id>
+  </upstream>
+</pkgmetadata>


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sci-libs/cantera/files/, sci-libs/cantera/
@ 2019-07-19 16:45 Michał Górny
  0 siblings, 0 replies; 9+ messages in thread
From: Michał Górny @ 2019-07-19 16:45 UTC (permalink / raw
  To: gentoo-commits

commit:     d7620aa06cd8ca88c9f82a0212e637b4efba46e4
Author:     band-a-prend <torokhov-s-a <AT> yandex <DOT> ru>
AuthorDate: Wed Jul 17 15:46:08 2019 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Fri Jul 19 16:44:57 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d7620aa0

sci-libs/cantera: 2.4.0-r1. Update/merge cantera_* patches

Update "libdirname" patch with upstream [1] and merge it with "env" patch.

[1] https://github.com/Cantera/cantera/pull/661

Signed-off-by: Sergey Torokhov <torokhov_s_a <AT> mail.ru>
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 sci-libs/cantera/cantera-2.4.0-r1.ebuild       |  1 -
 sci-libs/cantera/files/cantera_2.4.0_env.patch | 37 ++++++++++++++++++++++----
 2 files changed, 32 insertions(+), 6 deletions(-)

diff --git a/sci-libs/cantera/cantera-2.4.0-r1.ebuild b/sci-libs/cantera/cantera-2.4.0-r1.ebuild
index cd7dafba1b5..99d4566ae1e 100644
--- a/sci-libs/cantera/cantera-2.4.0-r1.ebuild
+++ b/sci-libs/cantera/cantera-2.4.0-r1.ebuild
@@ -46,7 +46,6 @@ DEPEND="
 "
 
 PATCHES=(
-	"${FILESDIR}/${PN}_${PV}_libdirname_variable.patch"
 	"${FILESDIR}/${PN}_${PV}_env.patch"
 	)
 

diff --git a/sci-libs/cantera/files/cantera_2.4.0_env.patch b/sci-libs/cantera/files/cantera_2.4.0_env.patch
index bc018a53f89..8b0926f7b91 100644
--- a/sci-libs/cantera/files/cantera_2.4.0_env.patch
+++ b/sci-libs/cantera/files/cantera_2.4.0_env.patch
@@ -1,6 +1,6 @@
 diff -Nur old/cantera-2.4.0/SConstruct new/cantera-2.4.0/SConstruct
 --- old/SConstruct	2018-08-24 16:24:45.000000000 +0300
-+++ new/SConstruct	2019-06-22 00:18:41.000000000 +0300
++++ new/SConstruct	2019-07-17 15:50:06.000000000 +0300
 @@ -189,7 +189,7 @@
      toolchain = ['default']
  
@@ -10,7 +10,22 @@ diff -Nur old/cantera-2.4.0/SConstruct new/cantera-2.4.0/SConstruct
                    toolchain=toolchain,
                    **extraEnvArgs)
  
-@@ -727,11 +727,8 @@
+@@ -327,6 +327,14 @@
+         'prefix',
+         'Set this to the directory where Cantera should be installed.',
+         defaults.prefix, PathVariable.PathAccept),
++    PathVariable(
++        'libdirname',
++        """Set this to the directory where Cantera libraries should be installed.
++           Some distributions (e.g. Fedora/RHEL) use 'lib64' instead of 'lib' on 64-bit systems
++           or could use some other library directory name instead of 'lib' depends
++           on architecture and profile (e.g. Gentoo 'libx32' on x32 profile).
++           If user didn't set 'libdirname' configuration variable set it to default value 'lib'""",
++        'lib', PathVariable.PathAccept),
+     EnumVariable(
+         'python_package',
+         """If you plan to work in Python, then you need the ``full`` Cantera Python
+@@ -723,10 +731,7 @@
  env['cantera_pure_version'] = '.'.join(str(x) for x in ctversion.version)
  env['cantera_short_version'] = '.'.join(str(x) for x in ctversion.version[:2])
  
@@ -22,8 +37,7 @@ diff -Nur old/cantera-2.4.0/SConstruct new/cantera-2.4.0/SConstruct
  
  # Print values of all build options:
  print("Configuration variables read from 'cantera.conf' and command line:")
- for line in open('cantera.conf'):
-@@ -1062,7 +1062,7 @@
+@@ -1061,7 +1066,7 @@
  
      # Ignore the minor version, e.g. 2.4.x -> 2.4
      env['sundials_version'] = '.'.join(sundials_version.split('.')[:2])
@@ -32,9 +46,22 @@ diff -Nur old/cantera-2.4.0/SConstruct new/cantera-2.4.0/SConstruct
          print("""ERROR: Sundials version %r is not supported.""" % env['sundials_version'])
          sys.exit(1)
      print("""INFO: Using system installation of Sundials version %s.""" % sundials_version)
+@@ -1465,12 +1470,6 @@
+ # *** Set additional configuration variables ***
+ # **********************************************
+ 
+-# Some distributions (e.g. Fedora/RHEL) use 'lib64' instead of 'lib' on 64-bit systems
+-if any(name.startswith('/usr/lib64/python') for name in sys.path):
+-    env['libdirname'] = 'lib64'
+-else:
+-    env['libdirname'] = 'lib'
+-
+ # On Debian-based systems, need to special-case installation to
+ # /usr/local because of dist-packages vs site-packages
+ env['debian'] = any(name.endswith('dist-packages') for name in sys.path)
 diff -Nur old/cantera-2.4.0/test_problems/SConscript new/cantera-2.4.0/test_problems/SConscript
 --- old/test_problems/SConscript	2018-08-24 16:24:45.000000000 +0300
-+++ new/test_problems/SConscript	2019-06-22 00:13:29.000000000 +0300
++++ new/test_problems/SConscript	2019-07-17 15:41:35.000000000 +0300
 @@ -282,7 +282,7 @@
  CompileAndTest('VPsilane_test', 'VPsilane_test', 'VPsilane_test', 'output_blessed.txt')
  


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sci-libs/cantera/files/, sci-libs/cantera/
@ 2019-07-30 15:25 Matthias Maier
  0 siblings, 0 replies; 9+ messages in thread
From: Matthias Maier @ 2019-07-30 15:25 UTC (permalink / raw
  To: gentoo-commits

commit:     3a7cceb642afa4fcb78d5dadc6d2ad8982db1913
Author:     Matthias Maier <tamiko <AT> gentoo <DOT> org>
AuthorDate: Tue Jul 30 15:24:23 2019 +0000
Commit:     Matthias Maier <tamiko <AT> gentoo <DOT> org>
CommitDate: Tue Jul 30 15:24:52 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3a7cceb6

sci-libs/cantera: remove 2.4.0-r0 as request by proxy-maintainer

Package-Manager: Portage-2.3.69, Repoman-2.3.16
Signed-off-by: Matthias Maier <tamiko <AT> gentoo.org>

 sci-libs/cantera/cantera-2.4.0.ebuild              | 129 ---------------------
 .../files/cantera_2.4.0_libdirname_variable.patch  |  28 -----
 2 files changed, 157 deletions(-)

diff --git a/sci-libs/cantera/cantera-2.4.0.ebuild b/sci-libs/cantera/cantera-2.4.0.ebuild
deleted file mode 100644
index 6e83a5c6988..00000000000
--- a/sci-libs/cantera/cantera-2.4.0.ebuild
+++ /dev/null
@@ -1,129 +0,0 @@
-# Copyright 1999-2019 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-PYTHON_COMPAT=( python3_{5,6} )
-
-FORTRAN_NEEDED=fortran
-FORTRAN_STANDARD=90
-
-inherit desktop fortran-2 python-single-r1 scons-utils toolchain-funcs
-
-DESCRIPTION="Object-oriented tool suite for chemical kinetics, thermodynamics, and transport"
-HOMEPAGE="http://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"
-
-REQUIRED_USE="
-	cti? ( ${PYTHON_REQUIRED_USE} )
-	python? ( cti )
-	${PYTHON_REQUIRED_USE}
-	"
-
-RDEPEND="
-	python? (
-		dev-python/numpy[${PYTHON_USEDEP}]
-	)
-	sci-libs/sundials:0=
-"
-
-DEPEND="
-	${RDEPEND}
-	dev-cpp/eigen
-	dev-libs/boost
-	dev-libs/libfmt
-	python? (
-		dev-python/cython[${PYTHON_USEDEP}]
-	)
-	test? (
-		>=dev-cpp/gtest-1.8.0
-	)
-"
-
-PATCHES=( "${FILESDIR}/${PN}_${PV}_libdirname_variable.patch" )
-
-pkg_setup() {
-	fortran-2_pkg_setup
-	python-single-r1_pkg_setup
-}
-
-src_prepare() {
-	default
-	# patch to work 'scons test' properly in case of set up 'renamed_shared_libraries="no"' option
-	sed -i "s/, libs=\['cantera_shared'\]//" "${S}"/test_problems/SConscript || die "failed to modify 'test_problems/SConscript'"
-	# patch env to pass CCACHE_DIR variable
-	sed -i "s/ENV={'PATH': os.environ\['PATH'\]}/ENV={'PATH': os.environ\['PATH'\], 'CCACHE_DIR': os.environ.get('CCACHE_DIR','')}/" "${S}"/SConstruct || die "failed to modify 'SConstruct'"
-}
-
-## 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="${CXXFLAGS}"
-		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"
-		env_vars="all"
-		extra_inc_dirs="/usr/include/eigen3"
-	)
-	use test || scons_vars+=( googletest="none" )
-
-	scons_targets=(
-		f90_interface=$(usex fortran y n)
-		python2_package="none"
-	)
-
-	if use cti ; then
-		local scons_python=$(usex python full minimal)
-		scons_targets+=( python3_package="${scons_python}" python3_cmd="${EPYTHON}" )
-	else
-		scons_targets+=( python3_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 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 tool 'ck2cti'"
-		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.4.0_libdirname_variable.patch b/sci-libs/cantera/files/cantera_2.4.0_libdirname_variable.patch
deleted file mode 100644
index a16f5670b55..00000000000
--- a/sci-libs/cantera/files/cantera_2.4.0_libdirname_variable.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-diff -Naur old/SConstruct new/SConstruct
---- old/SConstruct	2018-08-24 16:24:45.000000000 +0300
-+++ new/SConstruct	2018-11-05 03:07:07.000000000 +0300
-@@ -327,6 +327,10 @@
-         'prefix',
-         'Set this to the directory where Cantera should be installed.',
-         defaults.prefix, PathVariable.PathAccept),
-+    PathVariable(
-+        'libdirname',
-+        'Set this to the directory where Cantera libraries should be installed.',
-+        '', PathVariable.PathAccept),
-     EnumVariable(
-         'python_package',
-         """If you plan to work in Python, then you need the ``full`` Cantera Python
-@@ -1465,10 +1469,9 @@
- # *** Set additional configuration variables ***
- # **********************************************
- 
--# Some distributions (e.g. Fedora/RHEL) use 'lib64' instead of 'lib' on 64-bit systems
--if any(name.startswith('/usr/lib64/python') for name in sys.path):
--    env['libdirname'] = 'lib64'
--else:
-+# Some distributions use 'lib64' (e.g. Fedora/RHEL) or something else instead of 'lib' on 64-bit systems.
-+# If user didn't set 'libdirname' configuration variable set it to default value 'lib'
-+if not env['libdirname']:
-     env['libdirname'] = 'lib'
- 
- # On Debian-based systems, need to special-case installation to


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sci-libs/cantera/files/, sci-libs/cantera/
@ 2019-09-06  3:04 Joonas Niilola
  0 siblings, 0 replies; 9+ messages in thread
From: Joonas Niilola @ 2019-09-06  3:04 UTC (permalink / raw
  To: gentoo-commits

commit:     386771016f5534e7a99133e0e13eb4b6e001461a
Author:     band-a-prend <torokhov-s-a <AT> yandex <DOT> ru>
AuthorDate: Wed Aug 14 03:02:03 2019 +0000
Commit:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
CommitDate: Fri Sep  6 03:04:00 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=38677101

sci-libs/cantera: revision bump (r2) with fix python installation path

Fix python installation path using 'libdirname' env variable.
This patch is backport of upstream patch [1].

[1] https://github.com/Cantera/cantera/pull/674

This patch is backport of upstream patch [1] but with removing of
'setIterator' function instead of it's deprecation.

[1] https://github.com/Cantera/cantera/pull/672

Closes: https://github.com/gentoo/gentoo/pull/12701
Signed-off-by: Sergey Torokhov <torokhov_s_a <AT> mail.ru>
Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>

 sci-libs/cantera/cantera-2.4.0-r2.ebuild           | 126 ++++++++++++++
 .../files/cantera_2.4.0_env_python_install.patch   |  17 ++
 .../cantera/files/cantera_2.4.0_sundials4.patch    | 190 +++++++++++++++++++++
 3 files changed, 333 insertions(+)

diff --git a/sci-libs/cantera/cantera-2.4.0-r2.ebuild b/sci-libs/cantera/cantera-2.4.0-r2.ebuild
new file mode 100644
index 00000000000..2d69f8d348c
--- /dev/null
+++ b/sci-libs/cantera/cantera-2.4.0-r2.ebuild
@@ -0,0 +1,126 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{5,6,7} )
+
+FORTRAN_NEEDED=fortran
+FORTRAN_STANDARD=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"
+
+REQUIRED_USE="
+	python? ( cti )
+	${PYTHON_REQUIRED_USE}
+	"
+
+RDEPEND="
+	${PYTHON_DEPS}
+	python? (
+		dev-python/numpy[${PYTHON_USEDEP}]
+	)
+	<sci-libs/sundials-5.0.0:0=
+"
+
+DEPEND="
+	${RDEPEND}
+	dev-cpp/eigen:3
+	dev-libs/boost
+	dev-libs/libfmt
+	python? (
+		dev-python/cython[${PYTHON_USEDEP}]
+	)
+	test? (
+		>=dev-cpp/gtest-1.8.0
+	)
+"
+
+PATCHES=(
+	"${FILESDIR}/${PN}_${PV}_env.patch"
+	"${FILESDIR}/${PN}_${PV}_env_python_install.patch"
+	"${FILESDIR}/${PN}_${PV}_sundials4.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="${CXXFLAGS}"
+		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"
+		env_vars="all"
+		extra_inc_dirs="/usr/include/eigen3"
+	)
+	use test || scons_vars+=( googletest="none" )
+
+	scons_targets=(
+		f90_interface=$(usex fortran y n)
+		python2_package="none"
+	)
+
+	if use cti ; then
+		local scons_python=$(usex python full minimal)
+		scons_targets+=( python3_package="${scons_python}" python3_cmd="${EPYTHON}" )
+	else
+		scons_targets+=( python3_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 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 tool 'ck2cti'"
+		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.4.0_env_python_install.patch b/sci-libs/cantera/files/cantera_2.4.0_env_python_install.patch
new file mode 100644
index 00000000000..2e01fed1fa9
--- /dev/null
+++ b/sci-libs/cantera/files/cantera_2.4.0_env_python_install.patch
@@ -0,0 +1,17 @@
+diff -Nur old/interfaces/cython/SConscript new/interfaces/cython/SConscript
+--- old/interfaces/cython/SConscript	2018-08-24 16:24:45.000000000 +0300
++++ new/interfaces/cython/SConscript	2019-08-14 04:28:41.000000000 +0300
+@@ -83,10 +83,10 @@
+             extra = ''
+         elif localenv['OS'] == 'Darwin':
+             extra = localenv.subst(' --prefix=${python%s_prefix}' % major)
+-        elif localenv['libdirname'] == 'lib64':
+-            # 64-bit RHEL / Fedora
++        elif localenv['libdirname'] != 'lib':
++            # 64-bit RHEL / Fedora etc. or e.g. x32 Gentoo profile
+             extra = localenv.subst(
+-                ' --prefix=${python%s_prefix} --install-lib=${python%s_prefix}/lib64/python%s.%s/site-packages' % (major, major, major, minor))
++                ' --prefix=${python%s_prefix} --install-lib=${python%s_prefix}/${libdirname}/python%s.%s/site-packages' % (major, major, major, minor))
+         else:
+             extra = '--user'
+             localenv.AppendENVPath(

diff --git a/sci-libs/cantera/files/cantera_2.4.0_sundials4.patch b/sci-libs/cantera/files/cantera_2.4.0_sundials4.patch
new file mode 100644
index 00000000000..c745f6b6f7f
--- /dev/null
+++ b/sci-libs/cantera/files/cantera_2.4.0_sundials4.patch
@@ -0,0 +1,190 @@
+diff -Nur old/SConstruct new/SConstruct
+--- old/SConstruct	2019-08-14 04:12:50.000000000 +0300
++++ new/SConstruct	2019-08-14 04:38:55.000000000 +0300
+@@ -1013,23 +1013,29 @@
+ 
+ import SCons.Conftest, SCons.SConf
+ context = SCons.SConf.CheckContext(conf)
+-ret = SCons.Conftest.CheckLib(context,
+-                              ['sundials_cvodes'],
+-                              header='#include "cvodes/cvodes.h"',
+-                              language='C++',
+-                              call='CVodeCreate(CV_BDF, CV_NEWTON);',
+-                              autoadd=False,
+-                              extra_libs=env['blas_lapack_libs'])
+-if ret:
++
++# Check initially for Sundials<=3.2 and then for Sundials>=4.0
++for cvode_call in ['CVodeCreate(CV_BDF, CV_NEWTON);','CVodeCreate(CV_BDF);']:
++    ret = SCons.Conftest.CheckLib(context,
++                                  ['sundials_cvodes'],
++                                  header='#include "cvodes/cvodes.h"',
++                                  language='C++',
++                                  call=cvode_call,
++                                  autoadd=False,
++                                  extra_libs=env['blas_lapack_libs'])
+     # CheckLib returns False to indicate success
++    if not ret:
++        if env['system_sundials'] == 'default':
++            env['system_sundials'] = 'y'
++        break
++
++# Execute if the cycle ends without 'break'
++else:
+     if env['system_sundials'] == 'default':
+         env['system_sundials'] = 'n'
+     elif env['system_sundials'] == 'y':
+         config_error('Expected system installation of Sundials, but it could '
+                      'not be found.')
+-elif env['system_sundials'] == 'default':
+-    env['system_sundials'] = 'y'
+-
+ 
+ # Checkout Sundials submodule if needed
+ if (env['system_sundials'] == 'n' and
+@@ -1066,7 +1072,7 @@
+ 
+     # Ignore the minor version, e.g. 2.4.x -> 2.4
+     env['sundials_version'] = '.'.join(sundials_version.split('.')[:2])
+-    if env['sundials_version'] not in ('2.4','2.5','2.6','2.7','3.0','3.1','3.2'):
++    if env['sundials_version'] not in ('2.4','2.5','2.6','2.7','3.0','3.1','3.2','4.0','4.1'):
+         print("""ERROR: Sundials version %r is not supported.""" % env['sundials_version'])
+         sys.exit(1)
+     print("""INFO: Using system installation of Sundials version %s.""" % sundials_version)
+diff -Nur old/include/cantera/numerics/CVodesIntegrator.h new/include/cantera/numerics/CVodesIntegrator.h
+--- old/include/cantera/numerics/CVodesIntegrator.h	2018-08-24 16:24:45.000000000 +0300
++++ new/include/cantera/numerics/CVodesIntegrator.h	2019-08-14 04:39:50.000000000 +0300
+@@ -49,7 +49,6 @@
+         m_maxord = n;
+     }
+     virtual void setMethod(MethodType t);
+-    virtual void setIterator(IterType t);
+     virtual void setMaxStepSize(double hmax);
+     virtual void setMinStepSize(double hmin);
+     virtual void setMaxSteps(int nmax);
+diff -Nur old/include/cantera/numerics/Integrator.h new/include/cantera/numerics/Integrator.h
+--- old/include/cantera/numerics/Integrator.h	2018-08-24 16:24:45.000000000 +0300
++++ new/include/cantera/numerics/Integrator.h	2019-08-14 04:44:27.000000000 +0300
+@@ -34,17 +34,6 @@
+     Adams_Method //! Adams
+ };
+ 
+-//! Specifies the method used for iteration.
+-/*!
+- * Not all methods are supported by all integrators.
+- */
+-enum IterType {
+-    //!  Newton Iteration
+-    Newton_Iter,
+-    //! Functional Iteration
+-    Functional_Iter
+-};
+-
+ //!  Abstract base class for ODE system integrators.
+ /*!
+  *  @ingroup odeGroup
+@@ -163,11 +152,6 @@
+         warn("setMethodType");
+     }
+ 
+-    //! Set the linear iterator.
+-    virtual void setIterator(IterType t) {
+-        warn("setInterator");
+-    }
+-
+     //! Set the maximum step size
+     virtual void setMaxStepSize(double hmax) {
+         warn("setMaxStepSize");
+diff -Nur old/src/kinetics/ImplicitSurfChem.cpp new/src/kinetics/ImplicitSurfChem.cpp
+--- old/src/kinetics/ImplicitSurfChem.cpp	2018-08-24 16:24:45.000000000 +0300
++++ new/src/kinetics/ImplicitSurfChem.cpp	2019-08-14 04:45:57.000000000 +0300
+@@ -79,7 +79,6 @@
+     // numerically, and use a Newton linear iterator
+     m_integ->setMethod(BDF_Method);
+     m_integ->setProblemType(DENSE + NOJAC);
+-    m_integ->setIterator(Newton_Iter);
+     m_work.resize(ntmax);
+ }
+ 
+diff -Nur old/src/numerics/CVodesIntegrator.cpp new/src/numerics/CVodesIntegrator.cpp
+--- old/src/numerics/CVodesIntegrator.cpp	2018-08-24 16:24:45.000000000 +0300
++++ new/src/numerics/CVodesIntegrator.cpp	2019-08-14 04:49:02.000000000 +0300
+@@ -88,7 +88,6 @@
+     m_type(DENSE+NOJAC),
+     m_itol(CV_SS),
+     m_method(CV_BDF),
+-    m_iter(CV_NEWTON),
+     m_maxord(0),
+     m_reltol(1.e-9),
+     m_abstols(1.e-15),
+@@ -218,17 +217,6 @@
+     }
+ }
+ 
+-void CVodesIntegrator::setIterator(IterType t)
+-{
+-    if (t == Newton_Iter) {
+-        m_iter = CV_NEWTON;
+-    } else if (t == Functional_Iter) {
+-        m_iter = CV_FUNCTIONAL;
+-    } else {
+-        throw CanteraError("CVodesIntegrator::setIterator", "unknown iterator");
+-    }
+-}
+-
+ void CVodesIntegrator::sensInit(double t0, FuncEval& func)
+ {
+     m_np = func.nparams();
+@@ -284,7 +272,11 @@
+     //! Specify the method and the iteration type. Cantera Defaults:
+     //!        CV_BDF  - Use BDF methods
+     //!        CV_NEWTON - use Newton's method
+-    m_cvode_mem = CVodeCreate(m_method, m_iter);
++    #if CT_SUNDIALS_VERSION < 40
++        m_cvode_mem = CVodeCreate(m_method, CV_NEWTON);
++    #else
++        m_cvode_mem = CVodeCreate(m_method);
++    #endif
+     if (!m_cvode_mem) {
+         throw CanteraError("CVodesIntegrator::initialize",
+                            "CVodeCreate failed.");
+@@ -394,7 +386,11 @@
+         #if CT_SUNDIALS_VERSION >= 30
+             SUNLinSolFree((SUNLinearSolver) m_linsol);
+             SUNMatDestroy((SUNMatrix) m_linsol_matrix);
+-            m_linsol_matrix = SUNBandMatrix(N, nu, nl, nu+nl);
++            #if CT_SUNDIALS_VERSION < 40
++                m_linsol_matrix = SUNBandMatrix(N, nu, nl, nu+nl);
++            #else
++                m_linsol_matrix = SUNBandMatrix(N, nu, nl);
++            #endif
+             #if CT_SUNDIALS_USE_LAPACK
+                 m_linsol = SUNLapackBand(m_y, (SUNMatrix) m_linsol_matrix);
+             #else
+diff -Nur old/src/numerics/IDA_Solver.cpp new/src/numerics/IDA_Solver.cpp
+--- old/src/numerics/IDA_Solver.cpp	2018-08-24 16:24:45.000000000 +0300
++++ new/src/numerics/IDA_Solver.cpp	2019-08-14 04:51:01.000000000 +0300
+@@ -442,7 +442,11 @@
+         #if CT_SUNDIALS_VERSION >= 30
+             SUNLinSolFree((SUNLinearSolver) m_linsol);
+             SUNMatDestroy((SUNMatrix) m_linsol_matrix);
+-            m_linsol_matrix = SUNBandMatrix(N, nu, nl, nu+nl);
++            #if CT_SUNDIALS_VERSION < 40
++                m_linsol_matrix = SUNBandMatrix(N, nu, nl, nu+nl);
++            #else
++                m_linsol_matrix = SUNBandMatrix(N, nu, nl);
++            #endif
+             #if CT_SUNDIALS_USE_LAPACK
+                 m_linsol = SUNLapackBand(m_y, (SUNMatrix) m_linsol_matrix);
+             #else
+diff -Nur old/src/zeroD/ReactorNet.cpp new/src/zeroD/ReactorNet.cpp
+--- old/src/zeroD/ReactorNet.cpp	2018-08-24 16:24:45.000000000 +0300
++++ new/src/zeroD/ReactorNet.cpp	2019-08-14 04:51:35.000000000 +0300
+@@ -28,7 +28,6 @@
+     // numerically, and use a Newton linear iterator
+     m_integ->setMethod(BDF_Method);
+     m_integ->setProblemType(DENSE + NOJAC);
+-    m_integ->setIterator(Newton_Iter);
+ }
+ 
+ void ReactorNet::setInitialTime(double time)


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sci-libs/cantera/files/, sci-libs/cantera/
@ 2020-05-05 16:54 Matthias Maier
  0 siblings, 0 replies; 9+ messages in thread
From: Matthias Maier @ 2020-05-05 16:54 UTC (permalink / raw
  To: gentoo-commits

commit:     f2ace74dcbe808f7c6a6abd29d625f415602a633
Author:     Sergey Torokhov <torokhov-s-a <AT> yandex <DOT> ru>
AuthorDate: Tue Apr 21 01:17:42 2020 +0000
Commit:     Matthias Maier <tamiko <AT> gentoo <DOT> org>
CommitDate: Tue May  5 16:49:57 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f2ace74d

sci-libs/cantera: Fix site-packages install paths

Python 3.7 and 3.8 site-packages dirs are located under /lib
for amd64 arch now (instead of /lib64 like for python2.7 and python3.6)
so the changes for python installation patch is required.

Signed-off-by: Sergey Torokhov <torokhov-s-a <AT> yandex.ru>
Signed-off-by: Matthias Maier <tamiko <AT> gentoo.org>

 sci-libs/cantera/cantera-2.4.0-r5.ebuild                |  6 +++---
 .../files/cantera_2.4.0_env_python_install_prefix.patch | 17 +++++++++++++++++
 2 files changed, 20 insertions(+), 3 deletions(-)

diff --git a/sci-libs/cantera/cantera-2.4.0-r5.ebuild b/sci-libs/cantera/cantera-2.4.0-r5.ebuild
index 78f23ee905b..e4d8b7de2c0 100644
--- a/sci-libs/cantera/cantera-2.4.0-r5.ebuild
+++ b/sci-libs/cantera/cantera-2.4.0-r5.ebuild
@@ -52,9 +52,9 @@ DEPEND="
 
 PATCHES=(
 	"${FILESDIR}/${PN}_${PV}_env.patch"
-	"${FILESDIR}/${PN}_${PV}_env_python_install.patch"
+	"${FILESDIR}/${PN}_${PV}_env_python_install_prefix.patch"
 	"${FILESDIR}/${PN}_${PV}_sundials4.patch"
-	)
+)
 
 pkg_setup() {
 	fortran-2_pkg_setup
@@ -107,7 +107,7 @@ src_test() {
 }
 
 src_install() {
-	escons install stage_dir="${D}" libdirname="$(get_libdir)"
+	escons install stage_dir="${D}" libdirname="$(get_libdir)" python3_prefix="$(python_get_sitedir)"
 	if ! use cti ; then
 		rm -r "${D}/usr/share/man" || die "Can't remove man files."
 	else

diff --git a/sci-libs/cantera/files/cantera_2.4.0_env_python_install_prefix.patch b/sci-libs/cantera/files/cantera_2.4.0_env_python_install_prefix.patch
new file mode 100644
index 00000000000..83890799636
--- /dev/null
+++ b/sci-libs/cantera/files/cantera_2.4.0_env_python_install_prefix.patch
@@ -0,0 +1,17 @@
+diff -Nur old/interfaces/cython/SConscript new/interfaces/cython/SConscript
+--- old/interfaces/cython/SConscript	2018-08-24 16:24:45.000000000 +0300
++++ new/interfaces/cython/SConscript	2019-08-14 04:28:41.000000000 +0300
+@@ -83,10 +83,10 @@
+             extra = ''
+         elif localenv['OS'] == 'Darwin':
+             extra = localenv.subst(' --prefix=${python%s_prefix}' % major)
+-        elif localenv['libdirname'] == 'lib64':
+-            # 64-bit RHEL / Fedora
++        elif localenv['libdirname'] != 'lib':
++            # 64-bit RHEL / Fedora etc. or e.g. x32 Gentoo profile
+             extra = localenv.subst(
+-                ' --prefix=${python%s_prefix} --install-lib=${python%s_prefix}/lib64/python%s.%s/site-packages' % (major, major, major, minor))
++                ' --prefix=${stage_dir}${prefix} --install-lib=${python%s_prefix}' % (major))
+         else:
+             extra = '--user'
+             localenv.AppendENVPath(


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sci-libs/cantera/files/, sci-libs/cantera/
@ 2022-05-13 20:04 Sam James
  0 siblings, 0 replies; 9+ messages in thread
From: Sam James @ 2022-05-13 20:04 UTC (permalink / raw
  To: gentoo-commits

commit:     95eccece0ac1413544a5f45bd40b50271d5cb65e
Author:     Sergey Torokhov <torokhov-s-a <AT> yandex <DOT> ru>
AuthorDate: Fri May  6 21:36:41 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri May 13 20:03:53 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=95eccece

sci-libs/cantera: 2.6.0 version bump

dev-python/pip is used to install python bindings and
dev-python/pytest is used for python tests since this release

Signed-off-by: Sergey Torokhov <torokhov-s-a <AT> yandex.ru>
Closes: https://github.com/gentoo/gentoo/pull/25357
Signed-off-by: Sam James <sam <AT> gentoo.org>

 sci-libs/cantera/Manifest                      |   1 +
 sci-libs/cantera/cantera-2.6.0.ebuild          | 147 +++++++++++++++++++++++++
 sci-libs/cantera/files/cantera-2.6.0_env.patch |  57 ++++++++++
 3 files changed, 205 insertions(+)

diff --git a/sci-libs/cantera/Manifest b/sci-libs/cantera/Manifest
index 67533340104e..beccad729392 100644
--- a/sci-libs/cantera/Manifest
+++ b/sci-libs/cantera/Manifest
@@ -1 +1,2 @@
 DIST cantera-2.5.1.tar.gz 2492422 BLAKE2B b48c5d12fc2b69d309759afd20b55dc2533c23ccba840109cf7a85c4ebb8306eb48d9f007914184a9d409f7bf296814fe09e6e62a29cf8384edd954fdff2af4e SHA512 8cd65f6b86b3009f22ec243cb7cb833e26919c4925fd15fba8fb98aad2180d8c0fe7550e13efeb7cce55abab06d9400230d59c9c43b4d3be6b0575b1164a56bc
+DIST cantera-2.6.0.tar.gz 2586243 BLAKE2B 3562dc3641c70cdbd5e07062ecee56c0658b098c20bb477c3e741731db01e38fccf624e6769377420b01dd4bac72a0608cf226cce40ac12f13e71081090e06bc SHA512 74e12c89af38236bcc064034f74edcc690895151a9e453e728d130b83f5f527e675750c68a3fe36eea3c6aec6969685aa8828ae740a2e27b5df72a8ccc4d2856

diff --git a/sci-libs/cantera/cantera-2.6.0.ebuild b/sci-libs/cantera/cantera-2.6.0.ebuild
new file mode 100644
index 000000000000..35884d896367
--- /dev/null
+++ b/sci-libs/cantera/cantera-2.6.0.ebuild
@@ -0,0 +1,147 @@
+# 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
+	<sci-libs/sundials-5.9.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}]
+			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}/${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)"
+	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
+}

diff --git a/sci-libs/cantera/files/cantera-2.6.0_env.patch b/sci-libs/cantera/files/cantera-2.6.0_env.patch
new file mode 100644
index 000000000000..e49fb4679dd7
--- /dev/null
+++ b/sci-libs/cantera/files/cantera-2.6.0_env.patch
@@ -0,0 +1,57 @@
+diff -Naur old/SConstruct new/SConstruct
+--- old/SConstruct
++++ new/SConstruct
+@@ -178,6 +178,10 @@
+ 
+ config_options = [
+     Option(
++        "AR",
++        "The archiver to use.",
++        "${AR}"),
++    Option(
+         "CXX",
+         "The C++ compiler to use.",
+         "${CXX}"),
+@@ -740,7 +744,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)
+ 
+@@ -775,7 +779,7 @@
+ 
+ add_RegressionTest(env)
+ 
+-opts.AddVariables(*config.to_scons(["CC", "CXX"], env=env))
++opts.AddVariables(*config.to_scons(["AR", "CC", "CXX"], env=env))
+ opts.Update(env)
+ 
+ # Check if this is actually Apple's clang on macOS
+@@ -861,11 +865,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"] = get_command_output("git", "rev-parse", "--short", "HEAD")
+-    logger.info(f"Building Cantera from git commit '{env['git_commit']}'")
+-except (subprocess.CalledProcessError, FileNotFoundError):
+-    env["git_commit"] = "unknown"
++env["git_commit"] = "unknown"
+ 
+ # Print values of all build options:
+ # the (updated) "cantera.conf" combines all options that were specified by the user
+diff -Naur old/test_problems/SConscript new/test_problems/SConscript
+--- old/test_problems/SConscript
++++ new/test_problems/SConscript
+@@ -233,7 +233,7 @@
+      artifacts=['vcs_equilibrate_res.csv'])
+ 
+ CompileAndTest('clib', 'clib_test', 'clib_test',
+-               extensions=['^clib_test.c'], libs=localenv['cantera_shared_libs'])
++               extensions=['^clib_test.c'])
+ 
+ # C++ Samples
+ Test('cxx-bvp', 'cxx_samples', '#build/samples/cxx/bvp/blasius', None,


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sci-libs/cantera/files/, sci-libs/cantera/
@ 2023-01-30 10:35 Andrew Ammerlaan
  0 siblings, 0 replies; 9+ messages in thread
From: Andrew Ammerlaan @ 2023-01-30 10:35 UTC (permalink / raw
  To: gentoo-commits

commit:     f7863f22616f8bc02740874a95c084187444b10d
Author:     Sergey Torokhov <torokhov-s-a <AT> yandex <DOT> ru>
AuthorDate: Sat Jan 14 22:07:50 2023 +0000
Commit:     Andrew Ammerlaan <andrewammerlaan <AT> gentoo <DOT> org>
CommitDate: Mon Jan 30 09:59:57 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f7863f22

sci-libs/cantera: drop old 2.5.1-r4

Signed-off-by: Sergey Torokhov <torokhov-s-a <AT> yandex.ru>
Signed-off-by: Andrew Ammerlaan <andrewammerlaan <AT> gentoo.org>

 sci-libs/cantera/Manifest                      |   1 -
 sci-libs/cantera/cantera-2.5.1-r4.ebuild       | 145 -------------------------
 sci-libs/cantera/files/cantera-2.5.1_env.patch | 130 ----------------------
 3 files changed, 276 deletions(-)

diff --git a/sci-libs/cantera/Manifest b/sci-libs/cantera/Manifest
index beccad729392..6b5da97bd886 100644
--- a/sci-libs/cantera/Manifest
+++ b/sci-libs/cantera/Manifest
@@ -1,2 +1 @@
-DIST cantera-2.5.1.tar.gz 2492422 BLAKE2B b48c5d12fc2b69d309759afd20b55dc2533c23ccba840109cf7a85c4ebb8306eb48d9f007914184a9d409f7bf296814fe09e6e62a29cf8384edd954fdff2af4e SHA512 8cd65f6b86b3009f22ec243cb7cb833e26919c4925fd15fba8fb98aad2180d8c0fe7550e13efeb7cce55abab06d9400230d59c9c43b4d3be6b0575b1164a56bc
 DIST cantera-2.6.0.tar.gz 2586243 BLAKE2B 3562dc3641c70cdbd5e07062ecee56c0658b098c20bb477c3e741731db01e38fccf624e6769377420b01dd4bac72a0608cf226cce40ac12f13e71081090e06bc SHA512 74e12c89af38236bcc064034f74edcc690895151a9e453e728d130b83f5f527e675750c68a3fe36eea3c6aec6969685aa8828ae740a2e27b5df72a8ccc4d2856

diff --git a/sci-libs/cantera/cantera-2.5.1-r4.ebuild b/sci-libs/cantera/cantera-2.5.1-r4.ebuild
deleted file mode 100644
index 9d87e7aa5b6f..000000000000
--- a/sci-libs/cantera/cantera-2.5.1-r4.ebuild
+++ /dev/null
@@ -1,145 +0,0 @@
-# Copyright 1999-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_{9..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
-}

diff --git a/sci-libs/cantera/files/cantera-2.5.1_env.patch b/sci-libs/cantera/files/cantera-2.5.1_env.patch
deleted file mode 100644
index 77004803b127..000000000000
--- a/sci-libs/cantera/files/cantera-2.5.1_env.patch
+++ /dev/null
@@ -1,130 +0,0 @@
-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:")
-@@ -1149,10 +1149,24 @@
-         if retcode == 0:
-             config_error("Failed to determine Sundials BLAS/LAPACK.")
-         env['has_sundials_lapack'] = int(has_sundials_lapack.strip())
--    else:
--        # In Sundials 2.6, SUNDIALS_BLAS_LAPACK is either defined or undefined
-+    elif sundials_ver < parse_version('5.5'):
-+        # In Sundials 2.6-5.5, SUNDIALS_BLAS_LAPACK is either defined or undefined
-         env['has_sundials_lapack'] = conf.CheckDeclaration('SUNDIALS_BLAS_LAPACK',
-                 '#include "sundials/sundials_config.h"', 'C++')
-+    else:
-+        # In Sundials 5.5 and higher, two defines are included specific to the
-+        # SUNLINSOL packages indicating whether SUNDIALS has been built with LAPACK
-+        lapackband = conf.CheckDeclaration(
-+            "SUNDIALS_SUNLINSOL_LAPACKBAND",
-+            '#include "sundials/sundials_config.h"',
-+            "C++",
-+        )
-+        lapackdense = conf.CheckDeclaration(
-+            "SUNDIALS_SUNLINSOL_LAPACKDENSE",
-+            '#include "sundials/sundials_config.h"',
-+            "C++",
-+        )
-+        env["has_sundials_lapack"] = lapackband and lapackdense
- 
-     # In the case where a user is trying to link Cantera to an external BLAS/LAPACK
-     # library, but Sundials was configured without this support, print a Warning.
-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,


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sci-libs/cantera/files/, sci-libs/cantera/
@ 2023-10-27  2:34 Sam James
  0 siblings, 0 replies; 9+ messages in thread
From: Sam James @ 2023-10-27  2:34 UTC (permalink / raw
  To: gentoo-commits

commit:     16eaba9bc57ea1d0fd90045de20d4de98ca8a052
Author:     Sergey Torokhov <torokhov-s-a <AT> yandex <DOT> ru>
AuthorDate: Mon Oct 16 22:29:52 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Oct 27 02:30:39 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=16eaba9b

sci-libs/cantera: 3.0, mv libcantera_python3_XY.so to /usr/lib*/cantera

Change installation path of libcantera_python3_XY.so plugin
from "/usr/$(get_libdir)" to "/usr/$(get_libdir)/cantera" directory
and add new direcotry to RPATH to properly working of dlopen()
to load plugin from C++ user's code.

Signed-off-by: Sergey Torokhov <torokhov-s-a <AT> yandex.ru>
Closes: https://github.com/gentoo/gentoo/pull/32595
Signed-off-by: Sam James <sam <AT> gentoo.org>

 sci-libs/cantera/cantera-3.0.0.ebuild          |  4 ++--
 sci-libs/cantera/files/cantera-3.0.0_env.patch | 12 ++++++++++++
 2 files changed, 14 insertions(+), 2 deletions(-)

diff --git a/sci-libs/cantera/cantera-3.0.0.ebuild b/sci-libs/cantera/cantera-3.0.0.ebuild
index efc3e6149962..27478930c415 100644
--- a/sci-libs/cantera/cantera-3.0.0.ebuild
+++ b/sci-libs/cantera/cantera-3.0.0.ebuild
@@ -63,8 +63,6 @@ DEPEND="
 	)
 "
 
-QA_SONAME="usr/lib.*/libcantera_python3.*.so" # intended for dlopen()
-
 PATCHES=(
 	"${FILESDIR}/${P}_env.patch"
 )
@@ -98,6 +96,8 @@ src_configure() {
 		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" )

diff --git a/sci-libs/cantera/files/cantera-3.0.0_env.patch b/sci-libs/cantera/files/cantera-3.0.0_env.patch
index 786df7140632..cfc2874250e4 100644
--- a/sci-libs/cantera/files/cantera-3.0.0_env.patch
+++ b/sci-libs/cantera/files/cantera-3.0.0_env.patch
@@ -23,3 +23,15 @@ diff -Naur a/SConstruct b/SConstruct
  
  # Print values of all build options:
  # the (updated) "cantera.conf" combines all options that were specified by the user
+diff -Naur a/src/SConscript b/src/SConscript
+--- a/src/SConscript
++++ b/src/SConscript
+@@ -89,7 +89,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


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sci-libs/cantera/files/, sci-libs/cantera/
@ 2024-02-08  9:18 Joonas Niilola
  0 siblings, 0 replies; 9+ messages in thread
From: Joonas Niilola @ 2024-02-08  9:18 UTC (permalink / raw
  To: gentoo-commits

commit:     49bffbbd7d4f3fdf3c4c35fc006336562fe7bf39
Author:     Sergey Torokhov <torokhov-s-a <AT> yandex <DOT> ru>
AuthorDate: Sun Jan 14 09:03:07 2024 +0000
Commit:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
CommitDate: Thu Feb  8 09:17:34 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=49bffbbd

sci-libs/cantera: 3.0.0-r1 to enable python-3.12 (upstream patch)

Signed-off-by: Sergey Torokhov <torokhov-s-a <AT> yandex.ru>
Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>

 sci-libs/cantera/cantera-3.0.0-r1.ebuild           | 144 +++++++++++++++++++++
 .../files/cantera-3.0.0_enable_python-3.12.patch   |  75 +++++++++++
 2 files changed, 219 insertions(+)

diff --git a/sci-libs/cantera/cantera-3.0.0-r1.ebuild b/sci-libs/cantera/cantera-3.0.0-r1.ebuild
new file mode 100644
index 000000000000..8ab4a8c5f104
--- /dev/null
+++ b/sci-libs/cantera/cantera-3.0.0-r1.ebuild
@@ -0,0 +1,144 @@
+# 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}/${P}_env.patch"
+	"${FILESDIR}/${P}_enable_python-3.12.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."
+}

diff --git a/sci-libs/cantera/files/cantera-3.0.0_enable_python-3.12.patch b/sci-libs/cantera/files/cantera-3.0.0_enable_python-3.12.patch
new file mode 100644
index 000000000000..8efa7b0df9c5
--- /dev/null
+++ b/sci-libs/cantera/files/cantera-3.0.0_enable_python-3.12.patch
@@ -0,0 +1,75 @@
+From 27f8362f537fc313f8fdb5c07649ef0d92e3b7f6 Mon Sep 17 00:00:00 2001
+From: "Mark E. Fuller" <mark.e.fuller@gmx.de>
+Date: Sat, 26 Aug 2023 01:04:03 +0300
+Subject: [PATCH] mods to enable python3.12
+
+---
+ .github/workflows/main.yml             | 2 +-
+ interfaces/cython/setup.cfg.in         | 1 +
+ interfaces/python_minimal/setup.cfg.in | 1 +
+ interfaces/python_sdist/setup.cfg.in   | 1 +
+ src/base/application.h                 | 2 +-
+ 5 files changed, 5 insertions(+), 2 deletions(-)
+
+diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
+index 60822189bb..366ddd8435 100644
+--- a/.github/workflows/main.yml
++++ b/.github/workflows/main.yml
+@@ -65,7 +65,7 @@ jobs:
+     timeout-minutes: 60
+     strategy:
+       matrix:
+-        python-version: ['3.8', '3.10', '3.11']
++        python-version: ['3.8', '3.10', '3.11', '3.12']
+         os: ['ubuntu-20.04', 'ubuntu-22.04']
+       fail-fast: false
+     env:
+diff --git a/interfaces/cython/setup.cfg.in b/interfaces/cython/setup.cfg.in
+index 1a0358a77d..fd3c0b53c4 100644
+--- a/interfaces/cython/setup.cfg.in
++++ b/interfaces/cython/setup.cfg.in
+@@ -27,6 +27,7 @@ classifiers =
+     Programming Language :: Python :: 3.9
+     Programming Language :: Python :: 3.10
+     Programming Language :: Python :: 3.11
++    Programming Language :: Python :: 3.12
+     Programming Language :: Python :: Implementation :: CPython
+     Topic :: Scientific/Engineering :: Chemistry
+     Topic :: Scientific/Engineering :: Physics
+diff --git a/interfaces/python_minimal/setup.cfg.in b/interfaces/python_minimal/setup.cfg.in
+index 2d96c75eda..753b619ede 100644
+--- a/interfaces/python_minimal/setup.cfg.in
++++ b/interfaces/python_minimal/setup.cfg.in
+@@ -23,6 +23,7 @@ classifiers =
+     Programming Language :: Python :: 3.9
+     Programming Language :: Python :: 3.10
+     Programming Language :: Python :: 3.11
++    Programming Language :: Python :: 3.12
+     Topic :: Scientific/Engineering :: Chemistry
+     Topic :: Scientific/Engineering :: Physics
+ project_urls =
+diff --git a/interfaces/python_sdist/setup.cfg.in b/interfaces/python_sdist/setup.cfg.in
+index 219e53a3f0..e356b422b8 100644
+--- a/interfaces/python_sdist/setup.cfg.in
++++ b/interfaces/python_sdist/setup.cfg.in
+@@ -27,6 +27,7 @@ classifiers =
+     Programming Language :: Python :: 3.9
+     Programming Language :: Python :: 3.10
+     Programming Language :: Python :: 3.11
++    Programming Language :: Python :: 3.12
+     Programming Language :: Python :: Implementation :: CPython
+     Topic :: Scientific/Engineering :: Chemistry
+     Topic :: Scientific/Engineering :: Physics
+diff --git a/src/base/application.h b/src/base/application.h
+index 76a6c671a2..b03c049f14 100644
+--- a/src/base/application.h
++++ b/src/base/application.h
+@@ -434,7 +434,7 @@ class Application
+     vector<string> inputDirs;
+ 
+     //! Versions of Python to consider when attempting to load user extensions
+-    vector<string> m_pythonSearchVersions = {"3.11", "3.10", "3.9", "3.8"};
++    vector<string> m_pythonSearchVersions = {"3.12", "3.11", "3.10", "3.9", "3.8"};
+ 
+     //! Set of deprecation warnings that have been emitted (to suppress duplicates)
+     set<string> warnings;


^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2024-02-08  9:19 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-05-13 20:04 [gentoo-commits] repo/gentoo:master commit in: sci-libs/cantera/files/, sci-libs/cantera/ Sam James
  -- strict thread matches above, loose matches on Subject: below --
2024-02-08  9:18 Joonas Niilola
2023-10-27  2:34 Sam James
2023-01-30 10:35 Andrew Ammerlaan
2020-05-05 16:54 Matthias Maier
2019-09-06  3:04 Joonas Niilola
2019-07-30 15:25 Matthias Maier
2019-07-19 16:45 Michał Górny
2018-11-28 10:52 Michał Górny

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox