Gentoo Archives: gentoo-commits

From: Sergey Torokhov <torokhov-s-a@××××××.ru>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/proj/guru:dev commit in: sci-physics/SU2/
Date: Tue, 31 Aug 2021 14:07:05
Message-Id: 1630418797.2ad0e8d212342dc865f04cec8ce8fba3b64006fc.SergeyTorokhov@gentoo
1 commit: 2ad0e8d212342dc865f04cec8ce8fba3b64006fc
2 Author: Sergey Torokhov <torokhov-s-a <AT> yandex <DOT> ru>
3 AuthorDate: Tue Aug 31 14:01:55 2021 +0000
4 Commit: Sergey Torokhov <torokhov-s-a <AT> yandex <DOT> ru>
5 CommitDate: Tue Aug 31 14:06:37 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=2ad0e8d2
7
8 sci-physics/SU2: 7.2.0 version bump
9
10 Parmetis has free-non-comm licence type and as configure.ac
11 has explicit configuration option for this therefore
12 the USE="parmetis" introduced with forced removing of parmetis
13 enabling from meson.build file in scr-prepare phase.
14
15 Signed-off-by: Sergey Torokhov <torokhov-s-a <AT> yandex.ru>
16
17 sci-physics/SU2/Manifest | 3 +
18 sci-physics/SU2/SU2-7.2.0.ebuild | 131 +++++++++++++++++++++++++++++++++++++++
19 sci-physics/SU2/metadata.xml | 1 +
20 3 files changed, 135 insertions(+)
21
22 diff --git a/sci-physics/SU2/Manifest b/sci-physics/SU2/Manifest
23 index 7148f13f0..d50e3c990 100644
24 --- a/sci-physics/SU2/Manifest
25 +++ b/sci-physics/SU2/Manifest
26 @@ -1,4 +1,7 @@
27 DIST SU2-7.1.1-TestCases.tar.gz 453640460 BLAKE2B 661349f1690eda1f9c4438a0c03c59d4bab7a1e49965a94d1e3ba6fe54ab5f14c9eae0ae93d5027068d5d02465af72cc39e8a4319de6b888d01b0e353a2bf296 SHA512 8a30160b9c6d7f2d23c7cd88e089bcefa98b1fdeeef43060da4fe4840a7061e790f250c656b44f2e491108cf5c2701fd0dbad67e651db3d59a79f8e521c2e36d
28 DIST SU2-7.1.1-Tutorials.tar.gz 71446250 BLAKE2B 30d4f9dda28958da80617d5ddcf635304c19f7de68a1bd5dd52ac7df84bf643d028c2ee8d2e3425f4d8a4faa06e8ed95150c51293629453c0b27101c33278a1f SHA512 7f38588effa471f705c297c5a9fb6bca344932224453cb46021a715b58f9a0d45e16edb73df9a2a079dd7bd7909bbf0236fc0dc2df11b88bfb6f3a6c7769fdfe
29 DIST SU2-7.1.1.tar.gz 20553973 BLAKE2B a8c7f851cf570c08c345725e6660fc84683a4a7b6982edc586661847dc0b0db06f1825170afc34d85adced512c5272a0632005838ae6952be4265eb05c921bab SHA512 5980c2a24821d5e8cc83a953377d2779a158da30b6c1d2ef5db8a2b4f7a2ba555d5a35d755216a5c860e48e97b325f9687f3b2bd0c741b2d21bbcfcd31689ea9
30 +DIST SU2-7.2.0-TestCases.tar.gz 464156192 BLAKE2B 405a5ccdd13bc5109feca1462b6ac434a4d817adbaca964465678683d5593fa940579e364e33414da5f059a89b2919fbc0baed82967246356da49c87ac9ce63f SHA512 d75894c285ac7cb4c72eece10a02f014fb2d85b585c08d1a9bbf12ab51f6004be99c368bde98734891dc45446d0656b21317b50d7d14af95b6ce4bfe72871f11
31 +DIST SU2-7.2.0-Tutorials.tar.gz 72845754 BLAKE2B ef670a77d0189e9fd8ad48d96bd4617de558311d0df0d81a10dd3cbf8b97b7fbcb0e6725746d8451ce12a923f6895a392582fa980f4054b3b1306609431900ff SHA512 c91cfbdfb26169fc36575f60ec3133ea4a6f39c8433e276840a0f96c7508f3ee898020179ac01d606da9c5e10ee2ad263a642ff6f6b7400d75f4eb03ee7e1cf8
32 +DIST SU2-7.2.0.tar.gz 15356101 BLAKE2B e52f09d0451c200f6fd6874d55bedf7733f934cb2cee378ca286107960bd82332adc932cae57e9052654b34972717a4f8969db216acdcef8a6816b648119df94 SHA512 5600ebb97ef5939333907f75cda58a02810642439309fc8626ed974dfbfaffdf0cd7d9cc81de310cb12e6f92f98b64c58d607ad93095bd86cc583768947ccf6b
33 DIST mutationpp-1.0.1.tar.gz 4021945 BLAKE2B caae3ca155541a36822a950047efb867aab098bc9db311d675acca272d7f317ff35524086a0ea5eda524bbe125e4874f41dc1dbad92bfee4387e3a0c649bbd0a SHA512 ba8beeb7cdaf1b526571e27f745d8d53c1e20a96bd194a5949acb8b6d5f75553867158a63bfc7198502177a9e8a91bf82a67d450a3ba72b21f8490539f45ef01
34
35 diff --git a/sci-physics/SU2/SU2-7.2.0.ebuild b/sci-physics/SU2/SU2-7.2.0.ebuild
36 new file mode 100644
37 index 000000000..84dfe6e00
38 --- /dev/null
39 +++ b/sci-physics/SU2/SU2-7.2.0.ebuild
40 @@ -0,0 +1,131 @@
41 +# Copyright 1999-2021 Gentoo Authors
42 +# Distributed under the terms of the GNU General Public License v2
43 +
44 +EAPI=7
45 +
46 +PYTHON_COMPAT=( python3_{8..9} )
47 +
48 +inherit meson python-single-r1
49 +
50 +DESCRIPTION="SU2: An Open-Source Suite for Multiphysics Simulation and Design"
51 +HOMEPAGE="https://su2code.github.io/"
52 +SRC_URI="
53 + https://github.com/su2code/SU2/archive/v${PV}.tar.gz -> ${P}.tar.gz
54 + mpp? ( https://github.com/mutationpp/Mutationpp/archive/v1.0.1.tar.gz -> mutationpp-1.0.1.tar.gz )
55 + test? ( https://github.com/su2code/TestCases/archive/v${PV}.tar.gz -> ${P}-TestCases.tar.gz )
56 + tutorials? ( https://github.com/su2code/Tutorials/archive/v${PV}.tar.gz -> ${P}-Tutorials.tar.gz )
57 +"
58 +
59 +# SU2: LGPL-2.1; cgnslib: ZLIB, TecIO: all-rights-reserved;
60 +# Metis: Apache-2.0; Parmetis: all-rights-reserved, free-noncomm; Mutationpp: LGPL-3.0.
61 +LICENSE="Apache-2.0 LGPL-2.1 LGPL-3 ZLIB all-rights-reserved free-noncomm"
62 +SLOT="0"
63 +KEYWORDS="~amd64"
64 +
65 +# cgns, metis, parmetis are bundled;
66 +# omp is disable as it's experimental;
67 +# pastix is disabled as it's require additional external bundled libs;
68 +# autodiff (medi), directdiff (opti) features require additional external bundled libs.
69 +IUSE="cgns mkl +mpi mpp openblas parmetis tecio test tutorials"
70 +RESTRICT="!test? ( test )"
71 +REQUIRED_USE="
72 + ${PYTHON_REQUIRED_USE}
73 + mkl? ( !openblas )
74 +"
75 +
76 +RDEPEND="
77 + ${PYTHON_DEPS}
78 + mpi? ( virtual/mpi[cxx] )
79 + mkl? ( sci-libs/mkl )
80 + openblas? ( sci-libs/openblas )
81 +"
82 +DEPEND="
83 + ${RDEPEND}
84 + tecio? ( >=dev-libs/boost-1.76.0:= )
85 +"
86 +BDEPEND="virtual/pkgconfig"
87 +
88 +PATCHES=(
89 + "${FILESDIR}/${PN}-7.0.4-unbundle_boost.patch"
90 + "${FILESDIR}/${PN}-7.1.0-fix-env.patch"
91 +)
92 +
93 +DOCS=( "README.md" "SU2_PY/documentation.txt" )
94 +
95 +src_unpack() {
96 + unpack "${P}.tar.gz"
97 + if use mpp ; then
98 + einfo "Unpacking mutationpp-1.0.1.tar.gz to /var/tmp/portage/sci-physics/${P}/work/${P}/subprojects/Mutationpp"
99 + tar -C "${P}"/subprojects/Mutationpp --strip-components=1 -xzf "${DISTDIR}/mutationpp-1.0.1.tar.gz" || die
100 + fi
101 + if use test ; then
102 + einfo "Unpacking ${P}-TestCases.tar.gz to /var/tmp/portage/sci-physics/${P}/work/${P}/TestCases"
103 + tar -C "${P}"/TestCases --strip-components=1 -xzf "${DISTDIR}/${P}-TestCases.tar.gz" || die
104 + fi
105 + if use tutorials ; then
106 + einfo "Unpacking ${P}-Tutorials.tar.gz to /var/tmp/portage/sci-physics/${P}/work/${P}"
107 + mkdir "${P}"/Tutorials || die
108 + tar -C "${P}"/Tutorials --strip-components=1 -xzf "${DISTDIR}/${P}-Tutorials.tar.gz" || die
109 + fi
110 +}
111 +
112 +src_prepare(){
113 + default
114 + # boost Geometry requires c++14 since >=boost-1.75
115 + sed -i -e 's:cpp_std=c++11:cpp_std=c++14:' meson.build || die
116 +
117 + # Force Disable parmetis support in meson.build (configure.ac has optional switch)
118 + use !parmetis && { sed -i -e "/parmetis/Id" meson.build || die ; }
119 +}
120 +
121 +src_configure() {
122 + local emesonargs=(
123 + -Denable-autodiff=false
124 + -Denable-directdiff=false
125 + -Denable-pastix=false
126 + -Denable-pywrapper=false
127 + -Dwith-omp=false
128 + $(meson_feature mpi with-mpi)
129 + $(meson_use cgns enable-cgns)
130 + $(meson_use mkl enable-mkl)
131 + $(meson_use mpp enable-mpp)
132 + $(meson_use openblas enable-openblas)
133 + $(meson_use tecio enable-tecio)
134 + $(meson_use test enable-tests)
135 + )
136 + meson_src_configure
137 +}
138 +
139 +src_test() {
140 + ln -s ../../${P}-build/SU2_CFD/src/SU2_CFD SU2_PY/SU2_CFD
141 + ln -s ../../${P}-build/SU2_DEF/src/SU2_DEF SU2_PY/SU2_DEF
142 + ln -s ../../${P}-build/SU2_DOT/src/SU2_DOT SU2_PY/SU2_DOT
143 + ln -s ../../${P}-build/SU2_GEO/src/SU2_GEO SU2_PY/SU2_GEO
144 + ln -s ../../${P}-build/SU2_SOL/src/SU2_SOL SU2_PY/SU2_SOL
145 +
146 + export SU2_RUN="${S}/SU2_PY"
147 + export SU2_HOME="${S}"
148 + export PATH=$PATH:$SU2_RUN
149 + export PYTHONPATH=$PYTHONPATH:$SU2_RUN
150 +
151 + einfo "Running UnitTests ..."
152 + ../${P}-build/UnitTests/test_driver
153 +
154 + pushd TestCases/
155 + use mpi && python parallel_regression.py
156 + use mpi || python serial_regression.py
157 + use tutorials && use mpi && python tutorials.py
158 + popd
159 +}
160 +
161 +src_install() {
162 + meson_src_install
163 + mkdir -p "${D}$(python_get_sitedir)" || die
164 + mv "${ED}"/usr/bin/{FSI_tools,SU2,SU2_Nastran,*.py} -t "${D}$(python_get_sitedir)" || die
165 + python_optimize "${D}/$(python_get_sitedir)"
166 +
167 + if use tutorials ; then
168 + insinto "/usr/share/${P}"
169 + doins -r Tutorials
170 + fi
171 +}
172
173 diff --git a/sci-physics/SU2/metadata.xml b/sci-physics/SU2/metadata.xml
174 index 377649313..8d14e595d 100644
175 --- a/sci-physics/SU2/metadata.xml
176 +++ b/sci-physics/SU2/metadata.xml
177 @@ -10,6 +10,7 @@
178 <flag name="mkl">Enable Intel MKL support</flag>
179 <flag name="mpp">Enable Mutation++ library support</flag>
180 <flag name="openblas">Enable OpenBLAS support</flag>
181 + <flag name="parmetis">Enable Parmetis support (Metis support is always on)</flag>
182 <flag name="tecio">Enable TECIO support</flag>
183 <flag name="tutorials">Install Tutorials files</flag>
184 </use>