Gentoo Archives: gentoo-commits

From: Matthias Maier <tamiko@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sci-libs/trilinos/
Date: Sat, 24 Oct 2020 21:26:30
Message-Id: 1603574767.07ef2a48df1f419875896379e6eeba4f6929cd7b.tamiko@gentoo
1 commit: 07ef2a48df1f419875896379e6eeba4f6929cd7b
2 Author: Matthias Maier <tamiko <AT> gentoo <DOT> org>
3 AuthorDate: Sat Oct 24 21:16:53 2020 +0000
4 Commit: Matthias Maier <tamiko <AT> gentoo <DOT> org>
5 CommitDate: Sat Oct 24 21:26:07 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=07ef2a48
7
8 sci-libs/trilinos: version bump to 13.0.0
9
10 Package-Manager: Portage-3.0.8, Repoman-3.0.2
11 Signed-off-by: Matthias Maier <tamiko <AT> gentoo.org>
12
13 sci-libs/trilinos/Manifest | 2 +
14 sci-libs/trilinos/trilinos-13.0.0.ebuild | 220 +++++++++++++++++++++++++++++++
15 2 files changed, 222 insertions(+)
16
17 diff --git a/sci-libs/trilinos/Manifest b/sci-libs/trilinos/Manifest
18 index 36e24a7c12e..53dace0ee15 100644
19 --- a/sci-libs/trilinos/Manifest
20 +++ b/sci-libs/trilinos/Manifest
21 @@ -2,3 +2,5 @@ DIST trilinos-12.14.1-patches-r0.tar.xz 6448 BLAKE2B f852a4612c400ddfb6dcecb476e
22 DIST trilinos-12.14.1.tar.gz 129036436 BLAKE2B e7401df2ff8408a7af4a8e90d93b1929df65228c4f5cf3c754d20ebdfa8f3835800f540e87c1198e0baf2fefe0920618ae497f59373720754ab0c9dc1da93136 SHA512 dfff0e0582cb5ad12614dd53e9635572c8d1ee86d96f432f5a6e046af63edb13f6bfa3037204ab89fbb0d27e9be9bd9661d47efb41ab2a6e421bca5eba6b6a87
23 DIST trilinos-12.18.1-patches-r0.tar.xz 6236 BLAKE2B fdcdedde68ef855aa98671223ad2c42467284ad7ca364e2b5ca715094a6efacc463f2d1812ee63ac980ca87dbe16bb2ac04835f52efa1df34651a608cb5407e9 SHA512 e6db2be4642b8f9797b0be6dd05641ae469dd5117b1b04da54ed955bd56473d6aaa69d59dfd7869db1e7059d2d9b2cb2d9269dd5ef863663eabb90c5c256b987
24 DIST trilinos-12.18.1.tar.gz 152007573 BLAKE2B 5dc2ee432d777712fb4ca1dc2d7ad68015f523fdbcbd4f55388a89d31c0946a1c5031b3e8f906952cf6b2f4f16928e6da5f17b1f6ee0f0e5669cfce5c8a09367 SHA512 e2a57df57e8e98ed97bbde9c1e768738f0eaccc32466aff6daa308573a860b3debee89bd570c113ca0f6a6458ff562aa6596ddf657236c368b7b2e26a4b4466b
25 +DIST trilinos-13.0.0-patches-r0.tar.xz 7672 BLAKE2B 6412f1226549086ef2fca3c4d8bba3c5541489879f4fa37c3598a7271128e3232fa1cc56a51d44fb88d679458a79a082c3984085ddbe4bc0884b0cb45ba683c0 SHA512 91372fe0f47a1f5d4dbc1856e2cfb9d4f1eb8cc0de941013a7a6e791730c9e10decdcd4ca39b36bae836ac66040bee70af187b4a056d46b0da0fe72e8c5943fc
26 +DIST trilinos-13.0.0.tar.gz 157960946 BLAKE2B 6336d71f469dd4561786092b175ec3396d6b7956aeec6ab8d9d6e87a1b1158a0840661a87514888fc16ea36c44d628dadb865a3244785c2c5d4b24213aca2096 SHA512 74b1e852971c8f040e8640688c879659bf6b03eed0bc6f76f31d768e7c4eb50b23fb8bfb9997d7f630001d80150161aac80fbd3237f52071657908320c1d723d
27
28 diff --git a/sci-libs/trilinos/trilinos-13.0.0.ebuild b/sci-libs/trilinos/trilinos-13.0.0.ebuild
29 new file mode 100644
30 index 00000000000..efce4176d97
31 --- /dev/null
32 +++ b/sci-libs/trilinos/trilinos-13.0.0.ebuild
33 @@ -0,0 +1,220 @@
34 +# Copyright 1999-2020 Gentoo Authors
35 +# Distributed under the terms of the GNU General Public License v2
36 +
37 +EAPI=7
38 +CMAKE_MAKEFILE_GENERATOR=emake
39 +
40 +inherit cmake-utils toolchain-funcs multilib toolchain-funcs
41 +
42 +DESCRIPTION="Scientific library collection for large scale problems"
43 +HOMEPAGE="http://trilinos.sandia.gov/"
44 +MY_PV="${PV//\./-}"
45 +PATCHSET="r0"
46 +SRC_URI="https://github.com/${PN}/Trilinos/archive/${PN}-release-${MY_PV}.tar.gz -> ${P}.tar.gz
47 + https://dev.gentoo.org/~tamiko/distfiles/${P}-patches-${PATCHSET}.tar.xz"
48 +
49 +KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
50 +
51 +LICENSE="BSD LGPL-2.1"
52 +SLOT="0"
53 +
54 +IUSE="
55 + adolc arprec boost clp cuda eigen glpk gtest hdf5 hwloc hypre
56 + matio metis mkl mumps netcdf petsc qd scalapack scotch sparse
57 + superlu taucs tbb test threads tvmet yaml zlib X
58 +"
59 +
60 +# TODO: fix export cmake function for tests
61 +RESTRICT="test"
62 +
63 +RDEPEND="
64 + sys-libs/binutils-libs
65 + virtual/blas
66 + virtual/lapack
67 + virtual/mpi
68 + adolc? ( sci-libs/adolc )
69 + arprec? ( sci-libs/arprec )
70 + boost? ( dev-libs/boost )
71 + clp? ( sci-libs/coinor-clp )
72 + cuda? ( >=dev-util/nvidia-cuda-toolkit-3.2 )
73 + eigen? ( dev-cpp/eigen:3 )
74 + glpk? ( sci-mathematics/glpk )
75 + gtest? ( dev-cpp/gtest )
76 + hdf5? ( sci-libs/hdf5[mpi] )
77 + hypre? ( sci-libs/hypre )
78 + hwloc? ( sys-apps/hwloc )
79 + matio? ( sci-libs/matio )
80 + mkl? ( sci-libs/mkl )
81 + metis? ( || ( sci-libs/parmetis sci-libs/metis ) )
82 + mumps? ( sci-libs/mumps )
83 + netcdf? ( sci-libs/netcdf )
84 + petsc? ( sci-mathematics/petsc )
85 + qd? ( sci-libs/qd )
86 + scalapack? ( sci-libs/scalapack )
87 + scotch? ( sci-libs/scotch )
88 + sparse? ( sci-libs/cxsparse sci-libs/umfpack )
89 + superlu? ( sci-libs/superlu )
90 + taucs? ( sci-libs/taucs )
91 + tbb? ( dev-cpp/tbb )
92 + tvmet? ( dev-libs/tvmet )
93 + yaml? ( dev-cpp/yaml-cpp )
94 + zlib? ( sys-libs/zlib )
95 + X? ( x11-libs/libX11 )"
96 +DEPEND="${RDEPEND}
97 + virtual/pkgconfig"
98 +
99 +S="${WORKDIR}/Trilinos-${PN}-release-${MY_PV}"
100 +
101 +PATCHES=(
102 + "${WORKDIR}"/patches
103 +)
104 +
105 +trilinos_conf() {
106 + local dirs libs d
107 + for d in $($(tc-getPKG_CONFIG) --libs-only-L $1); do
108 + dirs="${dirs};${d:2}"
109 + done
110 + [[ -n ${dirs} ]] && mycmakeargs+=( "-D${2}_LIBRARY_DIRS=${dirs:1}" )
111 + for d in $($(tc-getPKG_CONFIG) --libs-only-l $1); do
112 + libs="${libs};${d:2}"
113 + done
114 + [[ -n ${libs} ]] && mycmakeargs+=( "-D${2}_LIBRARY_NAMES=${libs:1}" )
115 + dirs=""
116 + for d in $($(tc-getPKG_CONFIG) --cflags-only-I $1); do
117 + dirs="${dirs};${d:2}"
118 + done
119 + [[ -n ${dirs} ]] && mycmakeargs+=( "-D${2}_INCLUDE_DIRS=${dirs:1}" )
120 +}
121 +
122 +src_configure() {
123 + local mycmakeargs=(
124 + -DBUILD_SHARED_LIBS=ON
125 + -DCMAKE_INSTALL_PREFIX="${EPREFIX}"
126 + -DCMAKE_SKIP_INSTALL_RPATH=ON
127 + -DTrilinos_INSTALL_CONFIG_DIR="${EPREFIX}/usr/$(get_libdir)/cmake"
128 + -DTrilinos_INSTALL_INCLUDE_DIR="${EPREFIX}/usr/include/trilinos"
129 + -DTrilinos_INSTALL_LIB_DIR="${EPREFIX}/usr/$(get_libdir)/trilinos"
130 + -DTrilinos_ENABLE_ALL_PACKAGES=ON
131 + -DTrilinos_ENABLE_PyTrilinos=OFF
132 + -DTrilinos_ENABLE_SEACAS=OFF
133 + -DTrilinos_ENABLE_SEACASChaco=OFF
134 + -DTrilinos_ENABLE_SEACASExodiff="$(usex netcdf)"
135 + -DTrilinos_ENABLE_SEACASExodus="$(usex netcdf)"
136 + -DTrilinos_ENABLE_TESTS="$(usex test)"
137 + -DZoltan2_ENABLE_Experimental=ON
138 + -DTPL_ENABLE_BinUtils=ON
139 + -DTPL_ENABLE_BLAS=ON
140 + -DTPL_ENABLE_LAPACK=ON
141 + -DTPL_ENABLE_MPI=ON
142 + -DTPL_ENABLE_ADOLC="$(usex adolc)"
143 + -DTPL_ENABLE_AMD="$(usex sparse)"
144 + -DTPL_ENABLE_ARPREC="$(usex arprec)"
145 + -DTPL_ENABLE_BLACS="$(usex scalapack)"
146 + -DTPL_ENABLE_BoostLib="$(usex boost)"
147 + -DTPL_ENABLE_Boost="$(usex boost)"
148 + -DTPL_ENABLE_Clp="$(usex clp)"
149 + -DTPL_ENABLE_CSparse="$(usex sparse)"
150 + -DTPL_ENABLE_CUDA="$(usex cuda)"
151 + -DTPL_ENABLE_CUSPARSE="$(usex cuda)"
152 + -DTPL_ENABLE_Eigen="$(usex eigen)"
153 + -DTPL_ENABLE_GLPK="$(usex glpk)"
154 + -DTPL_ENABLE_gtest="$(usex gtest)"
155 + -DTPL_ENABLE_HDF5="$(usex hdf5)"
156 + -DTPL_ENABLE_HWLOC="$(usex hwloc)"
157 + -DTPL_ENABLE_HYPRE="$(usex hypre)"
158 + -DTPL_ENABLE_Matio="$(usex matio)"
159 + -DTPL_ENABLE_METIS="$(usex metis)"
160 + -DTPL_ENABLE_MKL="$(usex mkl)"
161 + -DTPL_ENABLE_MUMPS="$(usex mumps)"
162 + -DTPL_ENABLE_Netcdf="$(usex netcdf)"
163 + -DTPL_ENABLE_PARDISO_MKL="$(usex mkl)"
164 + -DTPL_ENABLE_PETSC="$(usex petsc)"
165 + -DTPL_ENABLE_Pthread="$(usex threads)"
166 + -DTPL_ENABLE_QD="$(usex qd)"
167 + -DTPL_ENABLE_SCALAPACK="$(usex scalapack)"
168 + -DTPL_ENABLE_Scotch="$(usex scotch)"
169 + -DTPL_ENABLE_SuperLU="$(usex superlu)"
170 + -DTPL_ENABLE_TAUCS="$(usex taucs)"
171 + -DTPL_ENABLE_TBB="$(usex tbb)"
172 + -DTPL_ENABLE_Thrust="$(usex cuda)"
173 + -DTPL_ENABLE_TVMET="$(usex tvmet)"
174 + -DTPL_ENABLE_UMFPACK="$(usex sparse)"
175 + -DTPL_ENABLE_X11="$(usex X)"
176 + -DTPL_ENABLE_yaml-cpp="$(usex yaml)"
177 + -DTPL_ENABLE_Zlib="$(usex zlib)"
178 + -DML_ENABLE_SuperLU:BOOL=OFF
179 + )
180 +
181 + use eigen && \
182 + mycmakeargs+=(
183 + -DEigen_INCLUDE_DIRS="${EPREFIX}/usr/include/eigen3"
184 + )
185 + use hypre && \
186 + mycmakeargs+=(
187 + -DHYPRE_INCLUDE_DIRS="${EPREFIX}/usr/include/hypre"
188 + )
189 + use scotch && \
190 + mycmakeargs+=(
191 + -DScotch_INCLUDE_DIRS="${EPREFIX}/usr/include/scotch"
192 + )
193 +
194 + # cxsparse is a rewrite of csparse + extras
195 + use sparse && \
196 + mycmakeargs+=(
197 + -DCSparse_LIBRARY_NAMES="cxsparse"
198 + )
199 +
200 + # mandatory blas and lapack
201 + trilinos_conf blas BLAS
202 + trilinos_conf lapack LAPACK
203 + use superlu && trilinos_conf superlu SuperLU
204 + use metis && trilinos_conf metis METIS
205 +
206 + # blacs library is included in scalapack these days
207 + if use scalapack; then
208 + trilinos_conf scalapack SCALAPACK
209 + mycmakeargs+=(
210 + -DBLACS_LIBRARY_NAMES="scalapack"
211 + -DBLACS_INCLUDE_DIRS="${EPREFIX}/usr/include/blacs"
212 + )
213 + fi
214 +
215 + #
216 + # Make sure we use the compiler wrappers in order to build trilinos.
217 + #
218 + export CC=mpicc CXX=mpicxx && tc-export CC CXX
219 +
220 + #
221 + # cmake-utils eclass patches the base directory CMakeLists.txt
222 + # which does not work for complex Trilinos CMake modules
223 + #
224 + CMAKE_BUILD_TYPE=RELEASE cmake-utils_src_configure
225 +}
226 +
227 +src_install() {
228 + cmake-utils_src_install
229 +
230 + # Clean up the mess:
231 + mv "${ED}"/bin "${ED}/usr/$(get_libdir)"/trilinos || die "mv failed"
232 + mv "${ED}/usr/$(get_libdir)"/trilinos/cmake/* "${ED}/usr/$(get_libdir)"/cmake || die "mv failed"
233 + rmdir "${ED}/usr/$(get_libdir)/trilinos/cmake" || die "rmdir failed"
234 + if [ -f "${ED}"/lib/exodus.py ]; then
235 + mv "${ED}"/lib/exodus.py "${ED}/usr/$(get_libdir)"/trilinos || die "mv failed"
236 + fi
237 + if [[ $(get_libdir) != lib ]]; then
238 + mv "${ED}"/usr/lib/pkgconfig "${ED}/usr/$(get_libdir)"
239 + fi
240 +
241 + mv "${ED}"/include/* "${ED}"/usr/include || die "mv failed"
242 + rmdir "${ED}"/include
243 +
244 + #
245 + # register $(get_libdir)/trilinos in LDPATH so that the dynamic linker
246 + # has a chance to pick up the libraries...
247 + #
248 + cat >> "${T}"/99trilinos <<- EOF
249 + LDPATH="${EPREFIX}/usr/$(get_libdir)/trilinos"
250 + PATH="${EPREFIX}/usr/$(get_libdir)/trilinos/bin"
251 + EOF
252 + doenvd "${T}"/99trilinos
253 +}