source: trunk/dports/science/mpich2/Portfile @ 95556

Last change on this file since 95556 was 95556, checked in by eborisch@…, 8 years ago

mpich2-devel: New portfile for preview releases of mpich2. Initial version at 1.5b2.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 6.6 KB
Line 
1# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
2# $Id: Portfile 95556 2012-07-16 17:55:03Z eborisch@macports.org $
3
4PortSystem          1.0
5
6name                mpich2
7version             1.4.1p1
8license             BSD
9categories          science parallel net
10platforms           darwin
11maintainers         eborisch \
12                    openmaintainer
13
14description         Message Passing Interface (MPI) Library
15
16long_description    MPICH2 is an implementation of the Message-Passing \
17                    Interface (MPI). The goals of MPICH2 are to provide an \
18                    MPI implementation for important platforms, including \
19                    clusters, SMPs, and massively parallel processors. It \
20                    also provides a vehicle for MPI implementation research \
21                    and for developing new and better parallel programming \
22                    environments.
23
24homepage            http://www.mcs.anl.gov/research/projects/mpich2/
25master_sites        ${homepage}downloads/tarballs/${version}/
26
27checksums           md5     b470666749bcb4a0449a072a18e2c204 \
28                    sha1    8dcc8888fb27232eb8f76c11cc890f1c3c483804 \
29                    rmd160  1d355cc07b8675af77b1c255fd10696844447298
30
31# Don't build if lammpi is around.
32pre-configure {
33    if {[file exists ${prefix}/etc/lammpi/lam-helpfile]} {
34        ui_error "Cannot co-exist with lammpi; please deactivate lammpi before configuring."
35        return -code error
36    }
37}
38
39pre-build {
40    if {[file exists ${prefix}/etc/lammpi/lam-helpfile]} {
41        ui_error "Cannot co-exist with lammpi; please deactivate lammpi before building."
42        return -code error
43    }
44}
45
46# Puts all entries in <prefix>/share into appropriate mpich2 subdirs
47destroot.args       PACKAGE=mpich2
48patchfiles          patch-src-util-createshlib.in
49
50# the default include-dir conflicts with openmpi!
51configure.args      --with-thread-package=posix \
52                    --enable-timer-type=mach_absolute_time \
53                    --enable-cxx \
54                    --mandir=${prefix}/share/man \
55                    --docdir=${prefix}/share/doc/${name} \
56                    --htmldir=${prefix}/share/doc/${name} \
57                    --includedir=${prefix}/include/${name} \
58                    --disable-f77 --disable-fc \
59                    --with-mpe \
60                    --with-device=ch3:nemesis \
61                    "F90FLAGS='' F90=''" \
62                    --with-pm=hydra \
63                    --enable-shared \
64                    --enable-cache \
65                    --enable-smpcoll \
66                    --enable-base-cache
67
68build.args-append   VERBOSE=1
69
70universal_variant   no
71use_parallel_build  no
72conflicts           lammpi \
73                    mpich2-devel
74
75# Fixes for the beta DESTDIR support in 1.4.1. Should go away in 1.5 branch.
76post-patch {
77    reinplace -E "s|fix=\\\$\\\{DESTDIR\\\}|fix=|g" \
78        ${worksrcpath}/Makefile.in
79    reinplace -E "s|dir=\\\$\\\{DESTDIR\\\}|dir=|g" \
80        ${worksrcpath}/Makefile.in
81}
82
83post-destroot {
84    reinplace -E "s|${destroot}||g" ${destroot}${prefix}/bin/mpicxx \
85                                    ${destroot}${prefix}/bin/mpicc \
86                                    ${destroot}${prefix}/etc/mpicxx.conf \
87                                    ${destroot}${prefix}/etc/mpicc.conf
88    if {[ variant_isset gcc42 ] ||
89        [ variant_isset gcc43 ] ||
90        [ variant_isset gcc44 ] ||
91        [ variant_isset gcc45 ] ||
92        [ variant_isset gcc46 ] ||
93        [ variant_isset gcc47 ]} {
94        reinplace -E "s|${destroot}||g" ${destroot}${prefix}/bin/mpif77 \
95                                        ${destroot}${prefix}/bin/mpif90 \
96                                        ${destroot}${prefix}/etc/mpif77.conf \
97                                        ${destroot}${prefix}/etc/mpif90.conf
98    }
99
100    file delete ${destroot}${prefix}/sbin/mpeuninstall
101}
102
103# As MPICH creates compiler wrappers, there are lots of
104# variants for what compiler the user would like to wrap.
105
106variant gcc47 description {
107    Enable Fortran 77 and Fortran 90 bindings using gfortran from gcc47
108} conflicts gcc42 gcc43 gcc44 gcc45 gcc46 llvm clang {
109    depends_lib-append      port:gcc47
110    configure.compiler      macports-gcc-4.7
111}
112
113variant gcc46 description {
114    Enable Fortran 77 and Fortran 90 bindings using gfortran from gcc46
115} conflicts gcc42 gcc43 gcc44 gcc45 gcc47 llvm clang {
116    depends_lib-append      port:gcc46
117    configure.compiler      macports-gcc-4.6
118}
119
120variant gcc45 description {
121    Enable Fortran 77 and Fortran 90 bindings using gfortran from gcc45
122} conflicts gcc42 gcc43 gcc44 gcc46 gcc47 llvm clang {
123    depends_lib-append      port:gcc45
124    configure.compiler      macports-gcc-4.5
125}
126
127variant gcc44 description {
128    Enable Fortran 77 and Fortran 90 bindings using gfortran from gcc44
129} conflicts gcc42 gcc43 gcc45 gcc46 gcc47 llvm clang {
130    depends_lib-append      port:gcc44
131    configure.compiler      macports-gcc-4.4
132}
133
134variant gcc43 description {
135    Enable Fortran 77 and Fortran 90 bindings using gfortran from gcc43
136} conflicts gcc42 gcc44 gcc45 gcc46 gcc47 llvm clang {
137    depends_lib-append      port:gcc43
138    configure.compiler      macports-gcc-4.3
139}
140
141variant gcc42 description {
142    Enable Fortran 77 and Fortran 90 bindings using gfortran from gcc42
143} conflicts gcc43 gcc44 gcc45 gcc46 gcc47 llvm clang {
144    depends_lib-append      port:gcc42
145    configure.compiler      macports-gcc-4.2
146}
147if {[ variant_isset gcc42 ] ||
148    [ variant_isset gcc43 ] ||
149    [ variant_isset gcc44 ] ||
150    [ variant_isset gcc45 ] ||
151    [ variant_isset gcc46 ] ||
152    [ variant_isset gcc47 ]} {
153    configure.args-append   --enable-f77 --enable-fc
154    configure.args-delete   --disable-f77 --disable-fc
155}
156
157variant llvm description {
158    Use llvm-gcc
159} conflicts gcc42 gcc43 gcc44 gcc45 gcc46 gcc47 clang {
160    configure.compiler      llvm-gcc-4.2
161}
162
163variant clang description {
164    Use clang
165} conflicts gcc42 gcc43 gcc44 gcc45 gcc46 gcc47 llvm {
166    configure.compiler      clang
167    configure.cxx           clang++
168    configure.cflags-append -w
169    configure.cxxflags-append -w
170}
171
172variant gforker description {
173    Use gforker process manager instead of the default hydra
174} {
175    configure.args-append   --with-pm=gforker
176    configure.args-delete   --with-pm=hydra
177}
178
179platform darwin {
180    configure.args-append   --enable-sharedlibs=osx-gcc
181}
182
183variant default_mpi description {
184    Install as defalt MPI -- conflict with OpenMPI
185} {
186    configure.args-delete   --includedir=${prefix}/include/${name}
187    conflicts-append        openmpi
188}
189
190livecheck.type      regex
191livecheck.regex     ${name}-(\[0-9.p\]+)${extract.suffix}
Note: See TracBrowser for help on using the repository browser.