Gentoo Archives: gentoo-commits

From: Justin Lecher <jlec@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/sci:master commit in: eclass/
Date: Sun, 29 Nov 2015 10:17:57
Message-Id: 1448791597.100476f47ffdcc076edab3f319f136cd891c788d.jlec@gentoo
1 commit: 100476f47ffdcc076edab3f319f136cd891c788d
2 Author: Justin Lecher <jlec <AT> gentoo <DOT> org>
3 AuthorDate: Sun Nov 29 10:06:37 2015 +0000
4 Commit: Justin Lecher <jlec <AT> gentoo <DOT> org>
5 CommitDate: Sun Nov 29 10:06:37 2015 +0000
6 URL: https://gitweb.gentoo.org/proj/sci.git/commit/?id=100476f4
7
8 mpi.eclass: Fix documention for man pages
9
10 Signed-off-by: Justin Lecher <jlec <AT> gentoo.org>
11
12 eclass/mpi.eclass | 110 +++++++++++++++++++++++++++++++++---------------------
13 1 file changed, 67 insertions(+), 43 deletions(-)
14
15 diff --git a/eclass/mpi.eclass b/eclass/mpi.eclass
16 index c22940f..ce9c671 100644
17 --- a/eclass/mpi.eclass
18 +++ b/eclass/mpi.eclass
19 @@ -1,4 +1,4 @@
20 -# Copyright 1999-2008 Gentoo Foundation
21 +# Copyright 1999-2015 Gentoo Foundation
22 # Distributed under the terms of the GNU General Public License v2
23 # $Id$
24
25 @@ -7,7 +7,7 @@ inherit multilib
26 # @ECLASS: mpi.eclass
27 # @MAINTAINER:
28 # Justin Bronder <jsbronder@g.o>
29 -# @BLURB: Common functions for mpi-pkg.eclass and mpi-imp.eclass
30 +# @BLURB: Common functions for mpi-pkg.eclass and mpi-imp.eclass
31
32 # History:
33 # 2009-06-26 (jsbronder): Add ability to require common use flags.
34 @@ -20,8 +20,15 @@ inherit multilib
35 # Private Variables #
36 #####################
37
38 +# @ECLASS-VARIABLE: __MPI_ALL_IMPLEMENTATION_PNS
39 +# @INTERNAL
40 +# @DESCRIPTION:
41 # All known mpi implementations
42 __MPI_ALL_IMPLEMENTATION_PNS="mpich mpich2 openmpi lam-mpi openib-mvapich2"
43 +
44 +# @ECLASS-VARIABLE: __MPI_ALL_CLASSABLE_PNS
45 +# @INTERNAL
46 +# @DESCRIPTION:
47 # All mpi implentations that can be classed.
48 __MPI_ALL_CLASSABLE_PNS="mpich openmpi mpich2 lam-mpi"
49
50 @@ -32,26 +39,25 @@ __MPI_ALL_CLASSABLE_PNS="mpich openmpi mpich2 lam-mpi"
51 ###################################################################
52
53 # @ECLASS-VARIABLE: MPI_UNCLASSED_DEP_STR
54 -# @DESCRIPTION: String inserted into the deplist when not using a classed
55 +# @DEFAULT_UNSET
56 +# @DESCRIPTION:
57 +# String inserted into the deplist when not using a classed
58 # install.
59
60 # @FUNCTION: mpi_classed
61 -# @USAGE:
62 # @RETURN: True if this build is classed.
63 mpi_classed() {
64 [[ ${CATEGORY} == mpi-* ]]
65 }
66
67 # @FUNCTION: mpi_class
68 -# @USAGE:
69 -# @RETURN: The name of the current class, or nothing if unclassed.
70 +# @RETURN: The name of the current class, or nothing if unclassed.
71 mpi_class() {
72 mpi_classed && echo "${CATEGORY}"
73 }
74
75 # @FUNCTION: mpi_root
76 -# @USAGE:
77 -# @RETURN: The root path that packages should start installing to. In the end,
78 +# @RETURN: The root path that packages should start installing to. In the end,
79 # the majority of a package will will install to ${ROOT}$(mpi_root).
80 mpi_root() {
81 if mpi_classed; then
82 @@ -62,8 +68,8 @@ mpi_root() {
83 }
84
85 # @FUNCTION: mpi_econf_args
86 -# @USAGE:
87 -# @DESCRIPTION: If classed, returns a list of arguments for econf that sets the
88 +# @DESCRIPTION:
89 +# If classed, returns a list of arguments for econf that sets the
90 # default install locations correctly. Should be first in the list of arguments
91 # to econf so that any unsuitable options can be overwritten.
92 mpi_econf_args() {
93 @@ -82,10 +88,12 @@ mpi_econf_args() {
94 }
95
96 # @FUNCTION: _mpi_do
97 -# @USAGE: $1 - Standard ebuild command to replicate.
98 -# @DESCRIPTION: Large wrapping class for all of the {do,new}* commands that need
99 +# @USAGE: <Standard ebuild command to replicate>
100 +# @DESCRIPTION:
101 +# Large wrapping class for all of the {do,new}* commands that need
102 # to respect the new root to install to. Works with unclassed builds as well.
103 # Currently supports:
104 +#
105 # @CODE
106 # dobin newbin dodoc newdoc
107 # doexe newexe dohtml dolib
108 @@ -94,7 +102,6 @@ mpi_econf_args() {
109 # doinfo dodir dohard doins
110 # dosym
111 # @CODE
112 -
113 _mpi_do() {
114 local rc prefix d
115 local cmd=${1}
116 @@ -195,7 +202,8 @@ mpi_dosym() { _mpi_do "dosym" $*; }
117 ###########################################
118
119 # @FUNCTION: mpi_imp_deplist
120 -# @USAGE:
121 +# @DESCRIPTION:
122 +# To be written
123 # @RETURNS: Returns a deplist that handles the blocking between mpi
124 # implementations, and any blockers as specified in MPI_UNCLASSED_DEP_STR
125 mpi_imp_deplist() {
126 @@ -215,6 +223,9 @@ mpi_imp_deplist() {
127 echo "${ver}"
128 }
129
130 +# @FUNCTION: mpi_imp_add_eselect
131 +# @DESCRIPTION:
132 +# To be written
133 mpi_imp_add_eselect() {
134 mpi_classed || return 0
135 local c=$(mpi_class)
136 @@ -235,33 +246,39 @@ mpi_imp_add_eselect() {
137 ########################################
138
139 # @ECLASS-VARIABLE: MPI_PKG_NEED_IMPS
140 -# @DESCRIPTION: List of package names (${PN}) that this package is compatible
141 +# @DESCRIPTION:
142 +# List of package names (${PN}) that this package is compatible
143 # with. Default is the list of all mpi implementations
144 MPI_PKG_NEED_IMPS="${MPI_PKG_NEED_IMPS:-${__MPI_ALL_CLASSABLE_PNS}}"
145
146
147 # @ECLASS-VARIABLE: MPI_PKG_USE_CXX
148 -# @DESCRIPTION: Require a mpi implementation with c++ enabled.
149 +# @DESCRIPTION:
150 +# Require a mpi implementation with c++ enabled.
151 # This feature requires EAPI 2 style use dependencies
152 MPI_PKG_USE_CXX="${MPI_PKG_USE_CXX:-0}"
153
154 # @ECLASS-VARIABLE: MPI_PKG_USE_FC
155 -# @DESCRIPTION: Require a mpi implementation with fortran enabled.
156 +# @DESCRIPTION:
157 +# Require a mpi implementation with fortran enabled.
158 # This feature requires EAPI 2 style use dependencies
159 MPI_PKG_USE_FC="${MPI_PKG_USE_FC:-0}"
160
161 # @ECLASS-VARIABLE: MPI_PKG_USE_ROMIO
162 -# @DESCRIPTION: Require a mpi implementation with romio enabled.
163 +# @DESCRIPTION:
164 +# Require a mpi implementation with romio enabled.
165 # This feature requires EAPI 2 style use dependencies
166 MPI_PKG_USE_ROMIO="${MPI_PKG_USE_ROMIO:-0}"
167
168 # @ECLASS-VARIABLE: MPI_PKG_USE_THREADS
169 -# @DESCRIPTION: Require a mpi implementation with threads enabled.
170 +# @DESCRIPTION:
171 +# Require a mpi implementation with threads enabled.
172 # This feature requires EAPI 2 style use dependencies
173 MPI_PKG_USE_THREADS="${MPI_PKG_USE_THREADS:-0}"
174
175 # @ECLASS-VARIABLE: MPI_PKG_USE_DEPS
176 -# @DESCRIPTION: Set the use deps for the virtual mpi package
177 +# @DESCRIPTION:
178 +# Set the use deps for the virtual mpi package
179 # directly. For instance, if set to 'fortran=,threads?' then a dep on
180 # virtual/mpi[fortran=,threads?] will be added.
181 # This feature requires EAPI 2 style use dependencies
182 @@ -269,7 +286,8 @@ MPI_PKG_USE_DEPS="${MPI_PKG_USE_DEPS}"
183
184
185 # @FUNCTION: mpi_pkg_deplist
186 -# @USAGE:
187 +# @DESCRIPTION:
188 +# To be written
189 # @RETURN: Returns a deplist comprised of valid implementations and any blockers
190 # depending on if this package is building with mpi class support.
191 mpi_pkg_deplist() {
192 @@ -325,8 +343,10 @@ mpi_pkg_deplist() {
193 }
194
195 # @FUNCTION: mpi_pkg_base_imp
196 -# @USAGE:
197 -# @DESCRIPTION: Returns the ${PN} of the package providing mpi support. Works
198 +# @DESCRIPTION:
199 +# To be written
200 +# @RETURNS:
201 +# Returns the ${PN} of the package providing mpi support. Works
202 # even when using an unclassed mpi build.
203 mpi_pkg_base_imp() {
204 if mpi_classed; then
205 @@ -342,35 +362,37 @@ mpi_pkg_base_imp() {
206 }
207
208 # @FUNCTION: mpi_pkg_cc
209 -# @USAGE:
210 -# @DESCRIPTION: Returns the full path to the mpi C compiler. Trys to find one
211 +# @DESCRIPTION:
212 +# Returns the full path to the mpi C compiler. Trys to find one
213 # even if this build is unclassed. If return is empty, user should assume the
214 # implementation does not support this compiler
215 +mpi_pkg_cc() { _mpi_pkg_compiler "MPI_CC" "cc"; }
216 +
217 # @FUNCTION: mpi_pkg_cxx
218 -# @USAGE:
219 -# @DESCRIPTION: Returns the full path to the mpi C++ compiler. Trys to find one
220 +# @DESCRIPTION:
221 +# Returns the full path to the mpi C++ compiler. Trys to find one
222 # even if this build is unclassed. If return is empty, user should assume the
223 # implementation does not support this compiler
224 +mpi_pkg_cxx() { _mpi_pkg_compiler "MPI_CXX" "cxx c++"; }
225 +
226 # @FUNCTION: mpi_pkg_fc
227 -# @USAGE:
228 -# @DESCRIPTION: Returns the full path to the mpi f90 compiler. Trys to find one
229 +# @DESCRIPTION:
230 +# Returns the full path to the mpi f90 compiler. Trys to find one
231 # even if this build is unclassed. If return is empty, user should assume the
232 # implementation does not support this compiler
233 +mpi_pkg_fc() { _mpi_pkg_compiler "MPI_FC" "f90 fc"; }
234 +
235 # @FUNCTION: mpi_pkg_f77
236 -# @USAGE:
237 -# @DESCRIPTION: Returns the full path to the mpi f77 compiler. Trys to find one
238 +# @DESCRIPTION:
239 +# Returns the full path to the mpi f77 compiler. Trys to find one
240 # even if this build is unclassed. If return is empty, user should assume the
241 # implementation does not support this compiler
242 -
243 -mpi_pkg_cc() { _mpi_pkg_compiler "MPI_CC" "cc"; }
244 -mpi_pkg_cxx() { _mpi_pkg_compiler "MPI_CXX" "cxx c++"; }
245 mpi_pkg_f77() { _mpi_pkg_compiler "MPI_F77" "f77"; }
246 -mpi_pkg_fc() { _mpi_pkg_compiler "MPI_FC" "f90 fc"; }
247
248
249 # @FUNCTION: mpi_pkg_set_ld_library_path
250 -# @USAGE:
251 -# @DESCRIPTION: Adds the correct path(s) to the end of LD_LIBRARY_PATH. Does
252 +# @DESCRIPTION:
253 +# Adds the correct path(s) to the end of LD_LIBRARY_PATH. Does
254 # nothing if the build is unclassed.
255 mpi_pkg_set_ld_library_path() {
256 if mpi_classed; then
257 @@ -378,6 +400,8 @@ mpi_pkg_set_ld_library_path() {
258 fi
259 }
260
261 +# @FUNCTION: _mpi_pkg_compiler
262 +# @DESCRIPTION:
263 # If classed, we can ask eselect-mpi. Otherwise we'll look for some common
264 # executable names in ${ROOT}usr/bin.
265 _mpi_pkg_compiler() {
266 @@ -397,8 +421,8 @@ _mpi_pkg_compiler() {
267 }
268
269 # @FUNCTION: mpi_pkg_set_env
270 -# @USAGE:
271 -# @DESCRIPTION: Exports 'some influential environment variables'. CC, CXX, F77, FC
272 +# @DESCRIPTION:
273 +# Exports 'some influential environment variables'. CC, CXX, F77, FC
274 mpi_pkg_set_env() {
275 if mpi_classed; then
276 _mpi_oCC=$CC
277 @@ -417,8 +441,8 @@ mpi_pkg_set_env() {
278 }
279
280 # @FUNCTION: mpi_pkg_restore_env
281 -# @USAGE:
282 -# @DESCRIPTION: Attempts to undo the damage done by mpi_pkg_set_env
283 +# @DESCRIPTION:
284 +# Attempts to undo the damage done by mpi_pkg_set_env
285 mpi_pkg_restore_env() {
286 if mpi_classed; then
287 export CC=$_mpi_oCC
288 @@ -433,8 +457,8 @@ mpi_pkg_restore_env() {
289
290
291 # @FUNCTION: _get_eselect_var
292 -# @USAGE: $1 - Variable to get from the class definition
293 -# @RETURN: If classed, and given a valid variable, the contents; empty
294 +# @USAGE: <Variable to get from the class definition>
295 +# @RETURN: If classed, and given a valid variable, the contents; empty
296 # otherwise.
297 _get_eselect_var() {
298 if mpi_classed && [ -n "${1}" ]; then