1 |
commit: 9d648a8dc23bf7801c596ada300f56f0894d73b6 |
2 |
Author: Sergey Torokhov <torokhov-s-a <AT> yandex <DOT> ru> |
3 |
AuthorDate: Tue Apr 21 01:10:09 2020 +0000 |
4 |
Commit: Matthias Maier <tamiko <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue May 5 16:49:50 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9d648a8d |
7 |
|
8 |
sci-libs/cantera: Revision bump. Pass FFLAGS for FORTRANFLAGS |
9 |
|
10 |
FFLAGS env variable is passed now for FORTRANFLAGS compile option. |
11 |
FFLAGS is presented by default in profile (see https://bugs.gentoo.org/575446). |
12 |
|
13 |
Signed-off-by: Sergey Torokhov <torokhov-s-a <AT> yandex.ru> |
14 |
Signed-off-by: Matthias Maier <tamiko <AT> gentoo.org> |
15 |
|
16 |
sci-libs/cantera/cantera-2.4.0-r5.ebuild | 131 +++++++++++++++++++++++++++++++ |
17 |
1 file changed, 131 insertions(+) |
18 |
|
19 |
diff --git a/sci-libs/cantera/cantera-2.4.0-r5.ebuild b/sci-libs/cantera/cantera-2.4.0-r5.ebuild |
20 |
new file mode 100644 |
21 |
index 00000000000..78f23ee905b |
22 |
--- /dev/null |
23 |
+++ b/sci-libs/cantera/cantera-2.4.0-r5.ebuild |
24 |
@@ -0,0 +1,131 @@ |
25 |
+# Copyright 1999-2020 Gentoo Authors |
26 |
+# Distributed under the terms of the GNU General Public License v2 |
27 |
+ |
28 |
+EAPI=7 |
29 |
+ |
30 |
+PYTHON_COMPAT=( python3_{6,7,8} ) |
31 |
+ |
32 |
+FORTRAN_NEEDED=fortran |
33 |
+FORTRAN_STANDARD=90 |
34 |
+ |
35 |
+inherit desktop fortran-2 python-single-r1 scons-utils toolchain-funcs |
36 |
+ |
37 |
+DESCRIPTION="Object-oriented tool suite for chemical kinetics, thermodynamics, and transport" |
38 |
+HOMEPAGE="https://www.cantera.org" |
39 |
+SRC_URI="https://github.com/Cantera/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" |
40 |
+ |
41 |
+LICENSE="BSD" |
42 |
+SLOT="0" |
43 |
+KEYWORDS="~amd64 ~x86" |
44 |
+IUSE="+cti fortran pch +python test" |
45 |
+RESTRICT="!test? ( test )" |
46 |
+ |
47 |
+REQUIRED_USE=" |
48 |
+ python? ( cti ) |
49 |
+ ${PYTHON_REQUIRED_USE} |
50 |
+ " |
51 |
+ |
52 |
+RDEPEND=" |
53 |
+ ${PYTHON_DEPS} |
54 |
+ python? ( |
55 |
+ $(python_gen_cond_dep ' |
56 |
+ dev-python/numpy[${PYTHON_MULTI_USEDEP}] |
57 |
+ ') |
58 |
+ ) |
59 |
+ <sci-libs/sundials-5.2.0:0= |
60 |
+" |
61 |
+ |
62 |
+DEPEND=" |
63 |
+ ${RDEPEND} |
64 |
+ dev-cpp/eigen:3 |
65 |
+ dev-libs/boost |
66 |
+ dev-libs/libfmt |
67 |
+ python? ( |
68 |
+ $(python_gen_cond_dep ' |
69 |
+ dev-python/cython[${PYTHON_MULTI_USEDEP}] |
70 |
+ ') |
71 |
+ ) |
72 |
+ test? ( |
73 |
+ >=dev-cpp/gtest-1.8.0 |
74 |
+ ) |
75 |
+" |
76 |
+ |
77 |
+PATCHES=( |
78 |
+ "${FILESDIR}/${PN}_${PV}_env.patch" |
79 |
+ "${FILESDIR}/${PN}_${PV}_env_python_install.patch" |
80 |
+ "${FILESDIR}/${PN}_${PV}_sundials4.patch" |
81 |
+ ) |
82 |
+ |
83 |
+pkg_setup() { |
84 |
+ fortran-2_pkg_setup |
85 |
+ python-single-r1_pkg_setup |
86 |
+} |
87 |
+ |
88 |
+## Full list of configuration options of Cantera is presented here: |
89 |
+## http://cantera.org/docs/sphinx/html/compiling/config-options.html |
90 |
+ |
91 |
+src_configure() { |
92 |
+ scons_vars=( |
93 |
+ CC="$(tc-getCC)" |
94 |
+ CXX="$(tc-getCXX)" |
95 |
+ cc_flags="${CXXFLAGS}" |
96 |
+ cxx_flags="-std=c++11" |
97 |
+ debug="no" |
98 |
+ FORTRAN="$(tc-getFC)" |
99 |
+ FORTRANFLAGS="${FFLAGS}" |
100 |
+ optimize_flags="-Wno-inline" |
101 |
+ renamed_shared_libraries="no" |
102 |
+ use_pch=$(usex pch) |
103 |
+## In some cases other order can break the detection of right location of Boost: ## |
104 |
+ system_fmt="y" |
105 |
+ system_sundials="y" |
106 |
+ system_eigen="y" |
107 |
+ env_vars="all" |
108 |
+ extra_inc_dirs="/usr/include/eigen3" |
109 |
+ ) |
110 |
+ use test || scons_vars+=( googletest="none" ) |
111 |
+ |
112 |
+ scons_targets=( |
113 |
+ f90_interface=$(usex fortran y n) |
114 |
+ python2_package="none" |
115 |
+ ) |
116 |
+ |
117 |
+ if use cti ; then |
118 |
+ local scons_python=$(usex python full minimal) |
119 |
+ scons_targets+=( python3_package="${scons_python}" python3_cmd="${EPYTHON}" ) |
120 |
+ else |
121 |
+ scons_targets+=( python3_package="none" ) |
122 |
+ fi |
123 |
+} |
124 |
+ |
125 |
+src_compile() { |
126 |
+ escons build "${scons_vars[@]}" "${scons_targets[@]}" prefix="/usr" |
127 |
+} |
128 |
+ |
129 |
+src_test() { |
130 |
+ escons test |
131 |
+} |
132 |
+ |
133 |
+src_install() { |
134 |
+ escons install stage_dir="${D}" libdirname="$(get_libdir)" |
135 |
+ if ! use cti ; then |
136 |
+ rm -r "${D}/usr/share/man" || die "Can't remove man files." |
137 |
+ else |
138 |
+ # Run the byte-compile of modules |
139 |
+ python_optimize "${D}/$(python_get_sitedir)/${PN}" |
140 |
+ fi |
141 |
+} |
142 |
+ |
143 |
+pkg_postinst() { |
144 |
+ if use cti && ! use python ; then |
145 |
+ elog "Cantera was build without 'python' use-flag therefore the CTI tool 'ck2cti'" |
146 |
+ elog "will convert Chemkin files to Cantera format without verification of kinetic mechanism." |
147 |
+ fi |
148 |
+ |
149 |
+ local post_msg=$(usex fortran "and Fortran " "") |
150 |
+ elog "C++ ${post_msg}samples are installed to '/usr/share/${PN}/samples/' directory." |
151 |
+ |
152 |
+ if use python ; then |
153 |
+ elog "Python examples are installed to '$(python_get_sitedir)/${PN}/examples/' directories." |
154 |
+ fi |
155 |
+} |