1 |
commit: ba5dae561b2ec97063abbc7a325a89bef04c9593 |
2 |
Author: Matthias Maier <tamiko <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Nov 30 03:54:29 2022 +0000 |
4 |
Commit: Matthias Maier <tamiko <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Nov 30 04:29:49 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ba5dae56 |
7 |
|
8 |
sci-libs/trilinos: add 13.4.1 |
9 |
|
10 |
Signed-off-by: Matthias Maier <tamiko <AT> gentoo.org> |
11 |
|
12 |
sci-libs/trilinos/Manifest | 1 + |
13 |
sci-libs/trilinos/trilinos-13.4.1.ebuild | 252 +++++++++++++++++++++++++++++++ |
14 |
2 files changed, 253 insertions(+) |
15 |
|
16 |
diff --git a/sci-libs/trilinos/Manifest b/sci-libs/trilinos/Manifest |
17 |
index a73620dc1516..338fd4d91ba0 100644 |
18 |
--- a/sci-libs/trilinos/Manifest |
19 |
+++ b/sci-libs/trilinos/Manifest |
20 |
@@ -4,3 +4,4 @@ DIST trilinos-13.2.0-patches-r0.tar.xz 7896 BLAKE2B 7bd482fd17c7a9a0f7d536f6e65a |
21 |
DIST trilinos-13.2.0.tar.gz 165860771 BLAKE2B 9ea8b27fd37a277aa1a988659919a012928edfd8b57a0fde240d9b9dce2832ab08fc0daf780aaab2a1422337bd02eddd6301fee203ab7ba4c213391cccd3be83 SHA512 b16dc9a815c8983f44786aac537b1b4ad7a43721eb553d6d33f07188280988f4297b4978b36d2d837a43faf16b518db29bf9b7997549318e3c95fd366eb16bc9 |
22 |
DIST trilinos-13.4.0-patches-r0.tar.xz 8740 BLAKE2B 333ab9ff1acb2f4b08007c7b99b96f023f6c742e4f991fc0ab9dd6595be7e3e319a77d5e329790cedca72d7a9060df837549d28e8a6cb4b8a838570d455ae356 SHA512 f30c16801cadec2a612ab2f7d3ca05c5ddfdfc513343a182562253cdfb58d38fa8b771ab07f7bc6bcb2505d146469da2ddda478f74447de746d5eca850da123e |
23 |
DIST trilinos-13.4.0.tar.gz 168733479 BLAKE2B 3c4a1c89b792ec771c6347eebb6bb54a82fa5f172d1c5934bbd42c8bc9708a71451bd030ec0f5264191a62169b3c1305ac7a1290b3ab4845fb6e8ffef15ee03c SHA512 27a5636bac8106a0705948ca4705b739878f0d8afa74264d1cd31036811084457e27e03e86dfad59a80d5e9ee798237fa930b50574ec3e43979e53c6ab5da535 |
24 |
+DIST trilinos-13.4.1.tar.gz 168720416 BLAKE2B 5201c36aa998045f4eab99b67fce25f9a2f2a9524b8ca1147cd8db9ccc306e3df61336df3b2ee981317c8defbae2df9e36546a0e5ddfed3142213e437e4dfba0 SHA512 9c0fb3af2fa625cd0af1309bfa61c212e12657820707348c81355d506e07f540da5e42aa30237fbc80adf257bb636029345f248abaf7ef96fcdaed1c28ec3a19 |
25 |
|
26 |
diff --git a/sci-libs/trilinos/trilinos-13.4.1.ebuild b/sci-libs/trilinos/trilinos-13.4.1.ebuild |
27 |
new file mode 100644 |
28 |
index 000000000000..34f7303abddb |
29 |
--- /dev/null |
30 |
+++ b/sci-libs/trilinos/trilinos-13.4.1.ebuild |
31 |
@@ -0,0 +1,252 @@ |
32 |
+# Copyright 1999-2022 Gentoo Authors |
33 |
+# Distributed under the terms of the GNU General Public License v2 |
34 |
+ |
35 |
+EAPI=8 |
36 |
+ |
37 |
+CMAKE_MAKEFILE_GENERATOR=emake |
38 |
+inherit cmake toolchain-funcs |
39 |
+ |
40 |
+DESCRIPTION="Scientific library collection for large scale problems" |
41 |
+HOMEPAGE="http://trilinos.sandia.gov/" |
42 |
+MY_PV="${PV//\./-}" |
43 |
+PATCHSET="r0" |
44 |
+SRC_URI="https://github.com/${PN}/Trilinos/archive/${PN}-release-${MY_PV}.tar.gz -> ${P}.tar.gz |
45 |
+ https://dev.gentoo.org/~tamiko/distfiles/${PN}-13.4.0-patches-${PATCHSET}.tar.xz" |
46 |
+ |
47 |
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux" |
48 |
+LICENSE="BSD LGPL-2.1" |
49 |
+SLOT="0" |
50 |
+ |
51 |
+IUSE=" |
52 |
+ adolc all-packages arprec clp cuda eigen glpk gtest hdf5 hwloc hypre |
53 |
+ matio metis mkl mumps netcdf openmp petsc qd scalapack scotch sparse |
54 |
+ superlu taucs tbb test threads tvmet yaml zlib X |
55 |
+" |
56 |
+ |
57 |
+# TODO: fix export cmake function for tests |
58 |
+RESTRICT="test" |
59 |
+ |
60 |
+RDEPEND=" |
61 |
+ !dev-cpp/kokkos |
62 |
+ dev-libs/boost:= |
63 |
+ sys-libs/binutils-libs:= |
64 |
+ virtual/blas |
65 |
+ virtual/lapack |
66 |
+ virtual/mpi |
67 |
+ adolc? ( sci-libs/adolc ) |
68 |
+ arprec? ( sci-libs/arprec ) |
69 |
+ clp? ( sci-libs/coinor-clp ) |
70 |
+ cuda? ( >=dev-util/nvidia-cuda-toolkit-3.2 ) |
71 |
+ eigen? ( dev-cpp/eigen:3 ) |
72 |
+ glpk? ( sci-mathematics/glpk ) |
73 |
+ gtest? ( dev-cpp/gtest ) |
74 |
+ hdf5? ( sci-libs/hdf5:=[mpi] ) |
75 |
+ hypre? ( sci-libs/hypre:= ) |
76 |
+ hwloc? ( sys-apps/hwloc:= ) |
77 |
+ matio? ( sci-libs/matio ) |
78 |
+ mkl? ( sci-libs/mkl ) |
79 |
+ metis? ( sci-libs/metis ) |
80 |
+ mumps? ( sci-libs/mumps ) |
81 |
+ netcdf? ( sci-libs/netcdf:= ) |
82 |
+ petsc? ( sci-mathematics/petsc ) |
83 |
+ qd? ( sci-libs/qd ) |
84 |
+ scalapack? ( sci-libs/scalapack ) |
85 |
+ scotch? ( sci-libs/scotch:= ) |
86 |
+ sparse? ( sci-libs/cxsparse sci-libs/umfpack ) |
87 |
+ superlu? ( sci-libs/superlu:= ) |
88 |
+ taucs? ( sci-libs/taucs ) |
89 |
+ tbb? ( dev-cpp/tbb:= ) |
90 |
+ tvmet? ( dev-libs/tvmet ) |
91 |
+ yaml? ( dev-cpp/yaml-cpp:= ) |
92 |
+ zlib? ( sys-libs/zlib ) |
93 |
+ X? ( x11-libs/libX11 )" |
94 |
+DEPEND="${RDEPEND} |
95 |
+ virtual/pkgconfig" |
96 |
+ |
97 |
+S="${WORKDIR}/Trilinos-${PN}-release-${MY_PV}" |
98 |
+ |
99 |
+PATCHES=( |
100 |
+ "${WORKDIR}"/patches |
101 |
+) |
102 |
+ |
103 |
+pkg_pretend() { |
104 |
+ [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp |
105 |
+} |
106 |
+ |
107 |
+pkg_setup() { |
108 |
+ [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp |
109 |
+} |
110 |
+ |
111 |
+trilinos_conf() { |
112 |
+ local dirs libs d |
113 |
+ for d in $($(tc-getPKG_CONFIG) --libs-only-L $1); do |
114 |
+ dirs="${dirs};${d:2}" |
115 |
+ done |
116 |
+ [[ -n ${dirs} ]] && mycmakeargs+=( "-D${2}_LIBRARY_DIRS=${dirs:1}" ) |
117 |
+ for d in $($(tc-getPKG_CONFIG) --libs-only-l $1); do |
118 |
+ libs="${libs};${d:2}" |
119 |
+ done |
120 |
+ [[ -n ${libs} ]] && mycmakeargs+=( "-D${2}_LIBRARY_NAMES=${libs:1}" ) |
121 |
+ dirs="" |
122 |
+ for d in $($(tc-getPKG_CONFIG) --cflags-only-I $1); do |
123 |
+ dirs="${dirs};${d:2}" |
124 |
+ done |
125 |
+ [[ -n ${dirs} ]] && mycmakeargs+=( "-D${2}_INCLUDE_DIRS=${dirs:1}" ) |
126 |
+} |
127 |
+ |
128 |
+# |
129 |
+# The following packages are currently disabled: |
130 |
+# - Adelus/Zadelus due to underlinkage. |
131 |
+# - Moertel due to underlinkage |
132 |
+# - SEACAS is incompatible with netcdf, see |
133 |
+# https://github.com/trilinos/Trilinos/tree/master/packages/seacas#netcdf |
134 |
+# |
135 |
+ |
136 |
+src_configure() { |
137 |
+ local mycmakeargs=( |
138 |
+ -DBUILD_SHARED_LIBS=ON |
139 |
+ -DCMAKE_INSTALL_PREFIX="${EPREFIX}" |
140 |
+ -DCMAKE_SKIP_INSTALL_RPATH=ON |
141 |
+ -DCMAKE_INSTALL_RPATH_USE_LINK_PATH=OFF |
142 |
+ -DTrilinos_INSTALL_CONFIG_DIR="${EPREFIX}/usr/$(get_libdir)/cmake" |
143 |
+ -DTrilinos_INSTALL_INCLUDE_DIR="${EPREFIX}/usr/include/trilinos" |
144 |
+ -DTrilinos_INSTALL_LIB_DIR="${EPREFIX}/usr/$(get_libdir)/trilinos" |
145 |
+ -DTrilinos_ENABLE_ALL_PACKAGES="$(usex all-packages)" |
146 |
+ -DTrilinos_ENABLE_Adelus=OFF |
147 |
+ -DTrilinos_ENABLE_Moertel=OFF |
148 |
+ -DTrilinos_ENABLE_PyTrilinos=OFF |
149 |
+ -DTrilinos_ENABLE_SEACAS=OFF |
150 |
+ -DTrilinos_ENABLE_Amesos=ON |
151 |
+ -DTrilinos_ENABLE_AztecOO=ON |
152 |
+ -DTrilinos_ENABLE_COMPLEX_DOUBLE=ON |
153 |
+ -DTrilinos_ENABLE_COMPLEX_FLOAT=ON |
154 |
+ -DTrilinos_ENABLE_EpetraExt=ON |
155 |
+ -DTrilinos_ENABLE_Epetra=ON |
156 |
+ -DTrilinos_ENABLE_Ifpack=ON |
157 |
+ -DTrilinos_ENABLE_ML=ON |
158 |
+ -DTrilinos_ENABLE_MueLu=ON |
159 |
+ -DTrilinos_ENABLE_OpenMP="$(usex openmp)" |
160 |
+ -DTrilinos_ENABLE_ROL=ON |
161 |
+ -DTrilinos_ENABLE_Sacado=ON |
162 |
+ -DTrilinos_ENABLE_Teuchos=ON |
163 |
+ -DTrilinos_ENABLE_Tpetra=ON |
164 |
+ -DTrilinos_ENABLE_Zoltan=ON |
165 |
+ -DTrilinos_ENABLE_TESTS="$(usex test)" |
166 |
+ -DTPL_ENABLE_BinUtils=ON |
167 |
+ -DTPL_ENABLE_BLAS=ON |
168 |
+ -DTPL_ENABLE_LAPACK=ON |
169 |
+ -DTPL_ENABLE_MPI=ON |
170 |
+ -DTPL_ENABLE_ADOLC="$(usex adolc)" |
171 |
+ -DTPL_ENABLE_AMD="$(usex sparse)" |
172 |
+ -DTPL_ENABLE_ARPREC="$(usex arprec)" |
173 |
+ -DTPL_ENABLE_BLACS="$(usex scalapack)" |
174 |
+ -DTPL_ENABLE_BoostLib=ON |
175 |
+ -DTPL_ENABLE_Boost=ON |
176 |
+ -DTPL_ENABLE_Clp="$(usex clp)" |
177 |
+ -DTPL_ENABLE_CSparse="$(usex sparse)" |
178 |
+ -DTPL_ENABLE_CUDA="$(usex cuda)" |
179 |
+ -DTPL_ENABLE_CUSPARSE="$(usex cuda)" |
180 |
+ -DTPL_ENABLE_Eigen="$(usex eigen)" |
181 |
+ -DTPL_ENABLE_GLPK="$(usex glpk)" |
182 |
+ -DTPL_ENABLE_gtest="$(usex gtest)" |
183 |
+ -DTPL_ENABLE_HDF5="$(usex hdf5)" |
184 |
+ -DTPL_ENABLE_HWLOC="$(usex hwloc)" |
185 |
+ -DTPL_ENABLE_HYPRE="$(usex hypre)" |
186 |
+ -DTPL_ENABLE_Matio="$(usex matio)" |
187 |
+ -DTPL_ENABLE_METIS="$(usex metis)" |
188 |
+ -DTPL_ENABLE_MKL="$(usex mkl)" |
189 |
+ -DTPL_ENABLE_MUMPS="$(usex mumps)" |
190 |
+ -DTPL_ENABLE_Netcdf="$(usex netcdf)" |
191 |
+ -DTPL_ENABLE_PARDISO_MKL="$(usex mkl)" |
192 |
+ -DTPL_ENABLE_PETSC="$(usex petsc)" |
193 |
+ -DTPL_ENABLE_Pthread="$(usex threads)" |
194 |
+ -DTPL_ENABLE_QD="$(usex qd)" |
195 |
+ -DTPL_ENABLE_SCALAPACK="$(usex scalapack)" |
196 |
+ -DTPL_ENABLE_Scotch="$(usex scotch)" |
197 |
+ -DTPL_ENABLE_SuperLU="$(usex superlu)" |
198 |
+ -DTPL_ENABLE_TAUCS="$(usex taucs)" |
199 |
+ -DTPL_ENABLE_TBB="$(usex tbb)" |
200 |
+ -DTPL_ENABLE_Thrust="$(usex cuda)" |
201 |
+ -DTPL_ENABLE_TVMET="$(usex tvmet)" |
202 |
+ -DTPL_ENABLE_UMFPACK="$(usex sparse)" |
203 |
+ -DTPL_ENABLE_X11="$(usex X)" |
204 |
+ -DTPL_ENABLE_yaml-cpp="$(usex yaml)" |
205 |
+ -DTPL_ENABLE_Zlib="$(usex zlib)" |
206 |
+ ) |
207 |
+ |
208 |
+ # |
209 |
+ # Make sure some critical configuration options are always set |
210 |
+ # correctly independently of what Trilinos dependency resolver thinks |
211 |
+ # it should be doing. |
212 |
+ # |
213 |
+ local mycmakeargs+=( |
214 |
+ -DAmesos2_ENABLE_LAPACK=ON |
215 |
+ -DAmesos2_ENABLE_MUMPS=OFF |
216 |
+ -DTpetra_INST_SERIAL=ON |
217 |
+ ) |
218 |
+ |
219 |
+ use eigen && \ |
220 |
+ mycmakeargs+=( |
221 |
+ -DEigen_INCLUDE_DIRS="${EPREFIX}/usr/include/eigen3" |
222 |
+ ) |
223 |
+ use hypre && \ |
224 |
+ mycmakeargs+=( |
225 |
+ -DHYPRE_INCLUDE_DIRS="${EPREFIX}/usr/include/hypre" |
226 |
+ ) |
227 |
+ use scotch && \ |
228 |
+ mycmakeargs+=( |
229 |
+ -DScotch_INCLUDE_DIRS="${EPREFIX}/usr/include/scotch" |
230 |
+ ) |
231 |
+ |
232 |
+ # cxsparse is a rewrite of csparse + extras |
233 |
+ use sparse && \ |
234 |
+ mycmakeargs+=( |
235 |
+ -DCSparse_LIBRARY_NAMES="cxsparse" |
236 |
+ ) |
237 |
+ |
238 |
+ # mandatory blas and lapack |
239 |
+ trilinos_conf blas BLAS |
240 |
+ trilinos_conf lapack LAPACK |
241 |
+ use superlu && trilinos_conf superlu SuperLU |
242 |
+ use metis && trilinos_conf metis METIS |
243 |
+ |
244 |
+ # blacs library is included in scalapack these days |
245 |
+ if use scalapack; then |
246 |
+ trilinos_conf scalapack SCALAPACK |
247 |
+ mycmakeargs+=( |
248 |
+ -DBLACS_LIBRARY_NAMES="scalapack" |
249 |
+ -DBLACS_INCLUDE_DIRS="${EPREFIX}/usr/include/blacs" |
250 |
+ ) |
251 |
+ fi |
252 |
+ |
253 |
+ # |
254 |
+ # Make sure we use the compiler wrappers in order to build trilinos. |
255 |
+ # |
256 |
+ [ ! -z "${CC}"] && export OMPI_CC="${CC}" MPICH_CC="${CC}" && tc-export OMPI_CC MPICH_CC |
257 |
+ [ ! -z "${CXX}"] && export OMPI_CXX="${CXX}" MPICH_CXX="${CXX}" && tc-export OMPI_CXX MPICH_CXX |
258 |
+ export CC=mpicc CXX=mpicxx && tc-export CC CXX |
259 |
+ |
260 |
+ # Trilinos needs a custom build type: |
261 |
+ local CMAKE_BUILD_TYPE=Release |
262 |
+ |
263 |
+ cmake_src_configure |
264 |
+} |
265 |
+ |
266 |
+src_install() { |
267 |
+ cmake_src_install |
268 |
+ |
269 |
+ # Clean up the mess: |
270 |
+ mv "${ED}"/bin "${ED}/usr/$(get_libdir)"/trilinos || die "mv failed" |
271 |
+ mv "${ED}/usr/$(get_libdir)"/trilinos/cmake/* "${ED}/usr/$(get_libdir)"/cmake || die "mv failed" |
272 |
+ rmdir "${ED}/usr/$(get_libdir)/trilinos/cmake" || die "rmdir failed" |
273 |
+ |
274 |
+ # |
275 |
+ # register $(get_libdir)/trilinos in LDPATH so that the dynamic linker |
276 |
+ # has a chance to pick up the libraries... |
277 |
+ # |
278 |
+ cat >> "${T}"/99trilinos <<- EOF |
279 |
+ LDPATH="${EPREFIX}/usr/$(get_libdir)/trilinos" |
280 |
+ PATH="${EPREFIX}/usr/$(get_libdir)/trilinos/bin" |
281 |
+ EOF |
282 |
+ doenvd "${T}"/99trilinos |
283 |
+} |