1 |
commit: 971b1776cb9a0c70e4f0b2937822fcf932ff9046 |
2 |
Author: Matthias Maier <tamiko <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Aug 30 01:11:38 2016 +0000 |
4 |
Commit: Marius Brehler <marbre <AT> linux <DOT> sungazer <DOT> de> |
5 |
CommitDate: Tue Aug 30 01:11:38 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/sci.git/commit/?id=971b1776 |
7 |
|
8 |
sci-libs/trilinos: version bump to 12.6.4 |
9 |
|
10 |
Package-Manager: portage-2.2.28 |
11 |
|
12 |
sci-libs/trilinos/trilinos-12.6.4.ebuild | 208 +++++++++++++++++++++++++++++++ |
13 |
1 file changed, 208 insertions(+) |
14 |
|
15 |
diff --git a/sci-libs/trilinos/trilinos-12.6.4.ebuild b/sci-libs/trilinos/trilinos-12.6.4.ebuild |
16 |
new file mode 100644 |
17 |
index 0000000..707a6f1 |
18 |
--- /dev/null |
19 |
+++ b/sci-libs/trilinos/trilinos-12.6.4.ebuild |
20 |
@@ -0,0 +1,208 @@ |
21 |
+# Copyright 1999-2016 Gentoo Foundation |
22 |
+# Distributed under the terms of the GNU General Public License v2 |
23 |
+# $Id$ |
24 |
+ |
25 |
+EAPI=5 |
26 |
+ |
27 |
+inherit cmake-utils toolchain-funcs multilib toolchain-funcs |
28 |
+ |
29 |
+DESCRIPTION="Scientific library collection for large scale problems" |
30 |
+HOMEPAGE="http://trilinos.sandia.gov/" |
31 |
+SRC_URI="http://trilinos.org/oldsite/download/files/${P}-Source.tar.gz" |
32 |
+ |
33 |
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux" |
34 |
+ |
35 |
+LICENSE="BSD LGPL-2.1" |
36 |
+SLOT="0" |
37 |
+ |
38 |
+IUSE=" |
39 |
+ adolc arprec boost clp cppunit cuda eigen glpk gtest hdf5 hwloc hypre |
40 |
+ matio metis mkl mumps netcdf petsc qd qt4 scalapack scotch sparse |
41 |
+ superlu taucs tbb test threads tvmet yaml zlib |
42 |
+" |
43 |
+ |
44 |
+# TODO: fix export cmake function for tests |
45 |
+RESTRICT="test" |
46 |
+ |
47 |
+RDEPEND=" |
48 |
+ sys-libs/binutils-libs |
49 |
+ virtual/blas |
50 |
+ virtual/lapack |
51 |
+ virtual/mpi |
52 |
+ adolc? ( sci-libs/adolc ) |
53 |
+ arprec? ( sci-libs/arprec ) |
54 |
+ boost? ( dev-libs/boost ) |
55 |
+ clp? ( sci-libs/coinor-clp ) |
56 |
+ cuda? ( >=dev-util/nvidia-cuda-toolkit-3.2 ) |
57 |
+ eigen? ( dev-cpp/eigen:3 ) |
58 |
+ gtest? ( dev-cpp/gtest ) |
59 |
+ hdf5? ( sci-libs/hdf5[mpi] ) |
60 |
+ hypre? ( sci-libs/hypre ) |
61 |
+ hwloc? ( sys-apps/hwloc ) |
62 |
+ matio? ( sci-libs/matio ) |
63 |
+ mkl? ( sci-libs/mkl ) |
64 |
+ metis? ( || ( sci-libs/parmetis sci-libs/metis ) ) |
65 |
+ mumps? ( sci-libs/mumps ) |
66 |
+ netcdf? ( sci-libs/netcdf ) |
67 |
+ petsc? ( sci-mathematics/petsc ) |
68 |
+ qd? ( sci-libs/qd ) |
69 |
+ qt4? ( dev-qt/qtgui:4 ) |
70 |
+ scalapack? ( virtual/scalapack ) |
71 |
+ scotch? ( sci-libs/scotch ) |
72 |
+ sparse? ( sci-libs/cxsparse sci-libs/umfpack ) |
73 |
+ superlu? ( sci-libs/superlu ) |
74 |
+ taucs? ( sci-libs/taucs ) |
75 |
+ tbb? ( dev-cpp/tbb ) |
76 |
+ tvmet? ( dev-libs/tvmet ) |
77 |
+ yaml? ( dev-cpp/yaml-cpp ) |
78 |
+ zlib? ( sys-libs/zlib )" |
79 |
+DEPEND="${RDEPEND} |
80 |
+ virtual/pkgconfig" |
81 |
+ |
82 |
+S="${WORKDIR}/${P}-Source" |
83 |
+ |
84 |
+trilinos_conf() { |
85 |
+ local dirs libs d |
86 |
+ for d in $($(tc-getPKG_CONFIG) --libs-only-L $1); do |
87 |
+ dirs="${dirs};${d:2}" |
88 |
+ done |
89 |
+ [[ -n ${dirs} ]] && mycmakeargs+=( "-D${2}_LIBRARY_DIRS=${dirs:1}" ) |
90 |
+ for d in $($(tc-getPKG_CONFIG) --libs-only-l $1); do |
91 |
+ libs="${libs};${d:2}" |
92 |
+ done |
93 |
+ [[ -n ${libs} ]] && mycmakeargs+=( "-D${2}_LIBRARY_NAMES=${libs:1}" ) |
94 |
+ dirs="" |
95 |
+ for d in $($(tc-getPKG_CONFIG) --cflags-only-I $1); do |
96 |
+ dirs="${dirs};${d:2}" |
97 |
+ done |
98 |
+ [[ -n ${dirs} ]] && mycmakeargs+=( "-D${2}_INCLUDE_DIRS=${dirs:1}" ) |
99 |
+} |
100 |
+ |
101 |
+trilinos_enable() { |
102 |
+ cmake-utils_use $1 TPL_ENABLE_${2:-${1^^}} |
103 |
+} |
104 |
+ |
105 |
+src_prepare() { |
106 |
+ epatch "${FILESDIR}"/${PN}-11.14.1-fix-install-paths.patch \ |
107 |
+ "${FILESDIR}"/${PN}-12.6.2-fix_install_paths_for_destdir.patch |
108 |
+} |
109 |
+ |
110 |
+src_configure() { |
111 |
+ |
112 |
+ # temporarily disable SEACAS and pyTrilinos compilation |
113 |
+ local mycmakeargs=( |
114 |
+ -DBUILD_SHARED_LIBS=ON |
115 |
+ -DCMAKE_INSTALL_PREFIX="${EPREFIX}" |
116 |
+ -DTrilinos_ENABLE_ALL_PACKAGES=ON |
117 |
+ -DTrilinos_ENABLE_SEACAS=OFF |
118 |
+ -DTrilinos_ENABLE_PyTrilinos=OFF |
119 |
+ -DTrilinos_INSTALL_INCLUDE_DIR="${EPREFIX}/usr/include/trilinos" |
120 |
+ -DTrilinos_INSTALL_LIB_DIR="${EPREFIX}/usr/$(get_libdir)/trilinos" |
121 |
+ -DTrilinos_INSTALL_CONFIG_DIR="${EPREFIX}/usr/$(get_libdir)/cmake" |
122 |
+ -DTPL_ENABLE_BinUtils=ON |
123 |
+ -DTPL_ENABLE_MPI=ON |
124 |
+ -DTPL_ENABLE_BLAS=ON |
125 |
+ -DTPL_ENABLE_LAPACK=ON |
126 |
+ $(cmake-utils_use test Trilinos_ENABLE_TESTS) |
127 |
+ $(trilinos_enable adolc) |
128 |
+ $(trilinos_enable arprec) |
129 |
+ $(trilinos_enable boost Boost) |
130 |
+ $(trilinos_enable boost BoostLib) |
131 |
+ $(trilinos_enable cppunit Cppunit) |
132 |
+ $(trilinos_enable clp Clp) |
133 |
+ $(trilinos_enable cuda) |
134 |
+ $(trilinos_enable cuda CUSPARSE) |
135 |
+ $(trilinos_enable cuda Thrust) |
136 |
+ $(trilinos_enable eigen Eigen) |
137 |
+ $(trilinos_enable gtest gtest) |
138 |
+ $(trilinos_enable glpk) |
139 |
+ $(trilinos_enable hdf5) |
140 |
+ $(trilinos_enable hwloc) |
141 |
+ $(trilinos_enable hypre) |
142 |
+ $(trilinos_enable matio) |
143 |
+ $(trilinos_enable metis) |
144 |
+ $(trilinos_enable mkl) |
145 |
+ $(trilinos_enable mkl PARDISO_MKL) |
146 |
+ $(trilinos_enable mumps) |
147 |
+ $(trilinos_enable netcdf Netcdf) |
148 |
+ $(trilinos_enable petsc) |
149 |
+ $(trilinos_enable qd) |
150 |
+ $(trilinos_enable qt4 QT) |
151 |
+ $(trilinos_enable scalapack) |
152 |
+ $(trilinos_enable scalapack BLACS) |
153 |
+ $(trilinos_enable scotch Scotch) |
154 |
+ $(trilinos_enable sparse AMD) |
155 |
+ $(trilinos_enable sparse CSparse) |
156 |
+ $(trilinos_enable sparse UMFPACK) |
157 |
+ $(trilinos_enable superlu SuperLU) |
158 |
+ $(trilinos_enable taucs) |
159 |
+ $(trilinos_enable tbb) |
160 |
+ $(trilinos_enable threads Pthread) |
161 |
+ $(trilinos_enable tvmet) |
162 |
+ $(trilinos_enable yaml yaml-cpp) |
163 |
+ $(trilinos_enable zlib Zlib) |
164 |
+ ) |
165 |
+ |
166 |
+ use eigen && \ |
167 |
+ mycmakeargs+=( |
168 |
+ -DEigen_INCLUDE_DIRS="${EPREFIX}/usr/include/eigen3" |
169 |
+ ) |
170 |
+ use hypre && \ |
171 |
+ mycmakeargs+=( |
172 |
+ -DHYPRE_INCLUDE_DIRS="${EPREFIX}/usr/include/hypre" |
173 |
+ ) |
174 |
+ use scotch && \ |
175 |
+ mycmakeargs+=( |
176 |
+ -DScotch_INCLUDE_DIRS="${EPREFIX}/usr/include/scotch" |
177 |
+ ) |
178 |
+ |
179 |
+ # cxsparse is a rewrite of csparse + extras |
180 |
+ use sparse && \ |
181 |
+ mycmakeargs+=( |
182 |
+ -DCSparse_LIBRARY_NAMES="cxsparse" |
183 |
+ ) |
184 |
+ |
185 |
+ # mandatory blas and lapack |
186 |
+ trilinos_conf blas BLAS |
187 |
+ trilinos_conf lapack LAPACK |
188 |
+ use superlu && trilinos_conf superlu SuperLU |
189 |
+ use metis && trilinos_conf metis METIS |
190 |
+ |
191 |
+ # blacs library is included in scalapack these days |
192 |
+ if use scalapack; then |
193 |
+ trilinos_conf scalapack SCALAPACK |
194 |
+ mycmakeargs+=( |
195 |
+ -DBLACS_LIBRARY_NAMES="scalapack" |
196 |
+ -DBLACS_INCLUDE_DIRS="${EPREFIX}/usr/include/blacs" |
197 |
+ ) |
198 |
+ fi |
199 |
+ |
200 |
+ # TODO: do we need that line? |
201 |
+ export CC=mpicc CXX=mpicxx && tc-export CC CXX |
202 |
+ |
203 |
+ # cmake-utils eclass patches the base directory CMakeLists.txt |
204 |
+ # which does not work for complex Trilinos CMake modules |
205 |
+ CMAKE_BUILD_TYPE=RELEASE cmake-utils_src_configure |
206 |
+ |
207 |
+ # TODO: |
208 |
+ # python bindings with python-r1 |
209 |
+ # fix hypre bindings |
210 |
+ # fix hdf5 |
211 |
+ # cuda/thrust is untested |
212 |
+ # do we always need mpi? and for all packages: blah[mpi] ? |
213 |
+ # install docs, examples |
214 |
+ # see what packages are related, do we need REQUIRED_USE |
215 |
+ # proper use flags description |
216 |
+ # add more use flags/packages ? |
217 |
+} |
218 |
+ |
219 |
+src_install() { |
220 |
+ cmake-utils_src_install |
221 |
+ |
222 |
+ # register $(get_libdir)/trilinos in LDPATH so that the dynamic linker |
223 |
+ # has a chance to pick up the libraries... |
224 |
+ cat >> "${T}"/99trilinos <<- EOF |
225 |
+ LDPATH="${EPREFIX}/usr/$(get_libdir)/trilinos" |
226 |
+ EOF |
227 |
+ doenvd "${T}"/99trilinos |
228 |
+} |