/[gentoo-x86]/sys-cluster/mpe2/mpe2-1.0.6_p1-r1.ebuild
Gentoo

Contents of /sys-cluster/mpe2/mpe2-1.0.6_p1-r1.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.7 - (show annotations) (download)
Tue Oct 16 18:46:07 2012 UTC (22 months, 2 weeks ago) by jlec
Branch: MAIN
Changes since 1.6: +4 -7 lines
sys-cluster/mpe2: Remove virtual/fortran and always call fortran-2_pkg_setup as intend by the updated fortran-2.eclass

(Portage version: 2.2.0_alpha138/cvs/Linux x86_64, signed Manifest commit with key 70EB7916)

1 # Copyright 1999-2012 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/sys-cluster/mpe2/mpe2-1.0.6_p1-r1.ebuild,v 1.6 2012/10/14 19:35:01 jlec Exp $
4
5 EAPI=2
6
7 FORTRAN_NEEDED=fortran
8
9 inherit eutils fortran-2 java-utils-2 toolchain-funcs
10
11 MY_P=${P/_/}
12 DESCRIPTION="MPI development tools"
13 HOMEPAGE="http://www-unix.mcs.anl.gov/perfvis/download/index.htm"
14 SRC_URI="ftp://ftp.mcs.anl.gov/pub/mpi/${PN%2}/${MY_P}.tar.gz"
15
16 LICENSE="as-is"
17 SLOT="0"
18 KEYWORDS="~amd64 ~x86"
19 IUSE="minimal fortran threads debug"
20
21 COMMON_DEPEND="!minimal? ( x11-libs/libXtst
22 x11-libs/libXi )
23 || ( sys-cluster/openmpi[fortran?,threads?]
24 sys-cluster/mpich2[fortran?,threads?] )"
25
26 DEPEND="!minimal? ( >=virtual/jdk-1.4 )
27 ${COMMON_DEPEND}"
28
29 RDEPEND="
30 !minimal? ( >=virtual/jre-1.4 )
31 ${COMMON_DEPEND}"
32
33 S="${WORKDIR}"/${MY_P}
34 MPE_IMP=""
35
36 # README:
37 # This ebuild is created to handle building with both mpich2 and openmpi.
38 # However, without empi (in the science overlay), and some further
39 # conversion to use mpi.eclass, we can only handle one implementation
40 # at a time. I still believe it's better to have the ebuild setup
41 # correctly in preperation.
42
43 pkg_setup() {
44 fortran-2_pkg_setup
45 local i
46
47 if has_version sys-cluster/openmpi; then
48 MPE_IMP=openmpi
49 elif has_version sys-cluster/mpich2; then
50 MPE_IMP=mpich2
51 else
52 die "Unknown MPI implementation"
53 fi
54
55 export JFLAGS="${JFLAGS} $(java-pkg_javac-args)"
56
57 if [[ "${MPE_IMP}" == openmpi ]] && [ -z "${MPE2_FORCE_OPENMPI_TEST}" ]; then
58 echo
59 elog "Currently src_test fails on collchk with openmpi, hence"
60 elog "testing is disabled by default. If you would like to"
61 elog "force testing, please add MPE_FORCE_OPENMPI_TEST=1"
62 elog "to your environment."
63 echo
64 fi
65
66 einfo "Building with support for: sys-cluster/${MPE_IMP}"
67 }
68
69 src_prepare() {
70 # Don't assume path contains ./
71 sed -i 's,\($MPERUN\) $pgm,\1 ./$pgm,' sbin/mpetestexeclog.in
72 epatch "${FILESDIR}"/slog2sdk-trace_rlog-makefile-fixes.patch
73 epatch "${FILESDIR}"/slog2sdk-trace_sample-makefile-fixes.patch
74 }
75
76 src_configure() {
77 local c="--with-mpicc=/usr/bin/mpicc"
78
79 if use fortran; then
80 c="${c} --with-mpif77=/usr/bin/mpif77"
81 else
82 c="${c} --disable-f77"
83 fi
84
85 if use minimal; then
86 c="${c} --enable-slog2=no --disable-rlog --disable-sample"
87 else
88 c="${c} --with-java2=$(java-config --jdk-home) --enable-slog2=build"
89 fi
90
91 if [[ "${MPE_IMP}" == openmpi ]]; then
92 c="${c} --disable-rlog --disable-sample"
93 fi
94
95 econf ${c} \
96 --sysconfdir=/etc/${PN} \
97 --datadir=/usr/share/${PN} \
98 --with-htmldir=/usr/share/${PN} \
99 --with-docdir=/usr/share/${PN} \
100 --enable-collchk \
101 --enable-wrappers \
102 $(use_enable !minimal graphics) \
103 $(use_enable threads threadlogging) \
104 $(use_enable debug g)
105 }
106
107 src_test() {
108 local rc
109
110 cd "${S}"
111 if [[ "${MPE_IMP}" == mpich2 ]]; then
112 echo "MPD_SECRETWORD=junk" > "${T}"/mpd.conf
113 chmod 600 "${T}"/mpd.conf
114 export MPD_CONF_FILE="${T}/mpd.conf"
115 "${ROOT}"usr/bin/mpd -d --pidfile="${T}"/mpd.pid
116 elif [[ "${MPE_IMP}" == openmpi* ]] && [ -z "${MPE2_FORCE_OPENMPI_TEST}" ]; then
117 elog
118 elog "Skipping tests for openmpi"
119 elog
120 return 0
121 fi
122
123 # No parallel make:
124 # http://trac.mcs.anl.gov/projects/mpich2/ticket/1095#comment:1
125 emake -j1 \
126 CC="${S}"/bin/mpecc \
127 FC="${S}"/bin/mpefc \
128 MPERUN="${ROOT}/usr/bin/mpiexec -n 4" \
129 CLOG2TOSLOG2="${S}/src/slog2sdk/bin/clog2TOslog2" \
130 check;
131 rc=${?}
132 if [[ "${MPE_IMP}" == mpich2 ]]; then
133 "${ROOT}"usr/bin/mpdallexit || kill $(<"${T}"/mpd.pid)
134 fi
135
136 return ${rc}
137 }
138
139 src_install() {
140 # No parallel make:
141 # http://trac.mcs.anl.gov/projects/mpich2/ticket/1095#comment:1
142 emake -j1 DESTDIR="${D}" install || die
143 rm -f "${D}"/usr/sbin/mpeuninstall || die
144 }

  ViewVC Help
Powered by ViewVC 1.1.20