Gentoo Archives: gentoo-commits

From: Justin Lecher <jlec@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/sci:master commit in: sys-cluster/mpe2/, licenses/
Date: Tue, 02 Dec 2014 08:19:19
Message-Id: 1417298166.ba27c5abd5a986dc687d272d91312f2374d9ae93.jlec@gentoo
1 commit: ba27c5abd5a986dc687d272d91312f2374d9ae93
2 Author: Marius Brehler <marbre <AT> linux <DOT> sungazer <DOT> de>
3 AuthorDate: Sat Nov 29 21:56:06 2014 +0000
4 Commit: Justin Lecher <jlec <AT> gentoo <DOT> org>
5 CommitDate: Sat Nov 29 21:56:06 2014 +0000
6 URL: http://sources.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=ba27c5ab
7
8 sys-cluster/mpe2: Add ebuild to overlay and bump version
9
10 ---
11 licenses/mpich2 | 39 ++++++++++
12 sys-cluster/mpe2/ChangeLog | 9 +++
13 sys-cluster/mpe2/metadata.xml | 5 ++
14 sys-cluster/mpe2/mpe2-1.3.0.ebuild | 142 +++++++++++++++++++++++++++++++++++++
15 4 files changed, 195 insertions(+)
16
17 diff --git a/licenses/mpich2 b/licenses/mpich2
18 new file mode 100644
19 index 0000000..a9216d4
20 --- /dev/null
21 +++ b/licenses/mpich2
22 @@ -0,0 +1,39 @@
23 +
24 + COPYRIGHT
25 +
26 +The following is a notice of limited availability of the code, and disclaimer
27 +which must be included in the prologue of the code and in all source listings
28 +of the code.
29 +
30 +Copyright Notice
31 + + 2002 University of Chicago
32 +
33 +Permission is hereby granted to use, reproduce, prepare derivative works, and
34 +to redistribute to others. This software was authored by:
35 +
36 +Mathematics and Computer Science Division
37 +Argonne National Laboratory, Argonne IL 60439
38 +
39 +(and)
40 +
41 +Department of Computer Science
42 +University of Illinois at Urbana-Champaign
43 +
44 +
45 + GOVERNMENT LICENSE
46 +
47 +Portions of this material resulted from work developed under a U.S.
48 +Government Contract and are subject to the following license: the Government
49 +is granted for itself and others acting on its behalf a paid-up, nonexclusive,
50 +irrevocable worldwide license in this computer software to reproduce, prepare
51 +derivative works, and perform publicly and display publicly.
52 +
53 + DISCLAIMER
54 +
55 +This computer code material was prepared, in part, as an account of work
56 +sponsored by an agency of the United States Government. Neither the United
57 +States, nor the University of Chicago, nor any of their employees, makes any
58 +warranty express or implied, or assumes any legal liability or responsibility
59 +for the accuracy, completeness, or usefulness of any information, apparatus,
60 +product, or process disclosed, or represents that its use would not infringe
61 +privately owned rights.
62
63 diff --git a/sys-cluster/mpe2/ChangeLog b/sys-cluster/mpe2/ChangeLog
64 new file mode 100644
65 index 0000000..b424437
66 --- /dev/null
67 +++ b/sys-cluster/mpe2/ChangeLog
68 @@ -0,0 +1,9 @@
69 +# ChangeLog for sys-cluster/mpe2
70 +# Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
71 +# $Header: $
72 +
73 +*mpe2-1.3.0 (29 Nov 2014)
74 +
75 + 29 Nov 2014; Marius Brehler <marbre@××××××××××××××.de> +metadata.xml,
76 + +mpe2-1.3.0.ebuild:
77 + Add to overlay and bump version
78
79 diff --git a/sys-cluster/mpe2/metadata.xml b/sys-cluster/mpe2/metadata.xml
80 new file mode 100644
81 index 0000000..55dd68a
82 --- /dev/null
83 +++ b/sys-cluster/mpe2/metadata.xml
84 @@ -0,0 +1,5 @@
85 +<?xml version="1.0" encoding="UTF-8"?>
86 +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
87 +<pkgmetadata>
88 + <herd>cluster</herd>
89 +</pkgmetadata>
90
91 diff --git a/sys-cluster/mpe2/mpe2-1.3.0.ebuild b/sys-cluster/mpe2/mpe2-1.3.0.ebuild
92 new file mode 100644
93 index 0000000..b76e7ad
94 --- /dev/null
95 +++ b/sys-cluster/mpe2/mpe2-1.3.0.ebuild
96 @@ -0,0 +1,142 @@
97 +# Copyright 1999-2014 Gentoo Foundation
98 +# Distributed under the terms of the GNU General Public License v2
99 +# $Header: $
100 +
101 +EAPI=5
102 +
103 +FORTRAN_NEEDED=fortran
104 +
105 +inherit eutils fortran-2 java-utils-2 toolchain-funcs
106 +
107 +MY_P=${P/_/}
108 +DESCRIPTION="MPI development tools"
109 +HOMEPAGE="http://www-unix.mcs.anl.gov/perfvis/download/index.htm"
110 +SRC_URI="ftp://ftp.mcs.anl.gov/pub/mpi/${PN%2}/${MY_P}.tar.gz"
111 +
112 +LICENSE="mpich2"
113 +SLOT="0"
114 +KEYWORDS="~amd64 ~x86"
115 +IUSE="minimal fortran threads debug"
116 +
117 +COMMON_DEPEND="!minimal? ( x11-libs/libXtst
118 + x11-libs/libXi )
119 + || ( sys-cluster/openmpi[fortran?,threads?]
120 + sys-cluster/mpich2[fortran?,threads?] )"
121 +
122 +DEPEND="!minimal? ( >=virtual/jdk-1.4 )
123 + ${COMMON_DEPEND}"
124 +
125 +RDEPEND="
126 +!minimal? ( >=virtual/jre-1.4 )
127 + ${COMMON_DEPEND}"
128 +
129 +S="${WORKDIR}"/${MY_P}
130 +MPE_IMP=""
131 +
132 +# README:
133 +# This ebuild is created to handle building with both mpich2 and openmpi.
134 +# However, without empi (in the science overlay), and some further
135 +# conversion to use mpi.eclass, we can only handle one implementation
136 +# at a time. I still believe it's better to have the ebuild setup
137 +# correctly in preperation.
138 +
139 +pkg_setup() {
140 + fortran-2_pkg_setup
141 + local i
142 +
143 + if has_version sys-cluster/openmpi; then
144 + MPE_IMP=openmpi
145 + elif has_version sys-cluster/mpich2; then
146 + MPE_IMP=mpich2
147 + else
148 + die "Unknown MPI implementation"
149 + fi
150 +
151 + export JFLAGS="${JFLAGS} $(java-pkg_javac-args)"
152 +
153 + if [[ "${MPE_IMP}" == openmpi ]] && [ -z "${MPE2_FORCE_OPENMPI_TEST}" ]; then
154 + echo
155 + elog "Currently src_test fails on collchk with openmpi, hence"
156 + elog "testing is disabled by default. If you would like to"
157 + elog "force testing, please add MPE_FORCE_OPENMPI_TEST=1"
158 + elog "to your environment."
159 + echo
160 + fi
161 +
162 + einfo "Building with support for: sys-cluster/${MPE_IMP}"
163 +}
164 +
165 +src_prepare() {
166 + # Don't assume path contains ./
167 + sed -i 's,\($MPERUN\) $pgm,\1 ./$pgm,' sbin/mpetestexeclog.in
168 +}
169 +
170 +src_configure() {
171 + local c="--with-mpicc=/usr/bin/mpicc"
172 +
173 + if use fortran; then
174 + c="${c} --with-mpif77=/usr/bin/mpif77"
175 + else
176 + c="${c} --disable-f77"
177 + fi
178 +
179 + if use minimal; then
180 + c="${c} --enable-slog2=no --disable-rlog --disable-sample"
181 + else
182 + c="${c} --with-java2=$(java-config --jdk-home) --enable-slog2=build"
183 + fi
184 +
185 + if [[ "${MPE_IMP}" == openmpi ]]; then
186 + c="${c} --disable-rlog --disable-sample"
187 + fi
188 +
189 + econf ${c} \
190 + --sysconfdir=/etc/${PN} \
191 + --datadir=/usr/share/${PN} \
192 + --with-htmldir=/usr/share/${PN} \
193 + --with-docdir=/usr/share/${PN} \
194 + --enable-collchk \
195 + --enable-wrappers \
196 + $(use_enable !minimal graphics) \
197 + $(use_enable threads threadlogging) \
198 + $(use_enable debug g)
199 +}
200 +
201 +src_test() {
202 + local rc
203 +
204 + cd "${S}"
205 + if [[ "${MPE_IMP}" == mpich2 ]]; then
206 + echo "MPD_SECRETWORD=junk" > "${T}"/mpd.conf
207 + chmod 600 "${T}"/mpd.conf
208 + export MPD_CONF_FILE="${T}/mpd.conf"
209 + "${ROOT}"usr/bin/mpd -d --pidfile="${T}"/mpd.pid
210 + elif [[ "${MPE_IMP}" == openmpi* ]] && [ -z "${MPE2_FORCE_OPENMPI_TEST}" ]; then
211 + elog
212 + elog "Skipping tests for openmpi"
213 + elog
214 + return 0
215 + fi
216 +
217 + # No parallel make:
218 + # http://trac.mcs.anl.gov/projects/mpich2/ticket/1095#comment:1
219 + emake -j1 \
220 + CC="${S}"/bin/mpecc \
221 + FC="${S}"/bin/mpefc \
222 + MPERUN="${ROOT}/usr/bin/mpiexec -n 4" \
223 + CLOG2TOSLOG2="${S}/src/slog2sdk/bin/clog2TOslog2" \
224 + check;
225 + rc=${?}
226 + if [[ "${MPE_IMP}" == mpich2 ]]; then
227 + "${ROOT}"usr/bin/mpdallexit || kill $(<"${T}"/mpd.pid)
228 + fi
229 +
230 + return ${rc}
231 +}
232 +
233 +src_install() {
234 + # No parallel make:
235 + # http://trac.mcs.anl.gov/projects/mpich2/ticket/1095#comment:1
236 + emake -j1 DESTDIR="${D}" install || die
237 + rm -f "${D}"/usr/sbin/mpeuninstall || die
238 +}