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

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

Revbump everything which could've been built with gcc44 or gcc45. Remove gcc42 variants since gcc42 only builds on Tiger (#33919).

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 6.3 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 97763 2012-09-14 18:56:08Z jeremyhu@macports.org $
3
4PortSystem          1.0
5
6name                mpich2
7version             1.4.1p1
8revision            1
9license             BSD
10categories          science parallel net
11platforms           darwin
12maintainers         eborisch \
13                    openmaintainer
14
15description         Message Passing Interface (MPI) Library
16
17long_description    MPICH2 is an implementation of the Message-Passing \
18                    Interface (MPI). The goals of MPICH2 are to provide an \
19                    MPI implementation for important platforms, including \
20                    clusters, SMPs, and massively parallel processors. It \
21                    also provides a vehicle for MPI implementation research \
22                    and for developing new and better parallel programming \
23                    environments.
24
25homepage            http://www.mcs.anl.gov/research/projects/mpich2/
26master_sites        ${homepage}downloads/tarballs/${version}/
27
28checksums           md5     b470666749bcb4a0449a072a18e2c204 \
29                    sha1    8dcc8888fb27232eb8f76c11cc890f1c3c483804 \
30                    rmd160  1d355cc07b8675af77b1c255fd10696844447298
31
32# Don't build if lammpi is around.
33pre-configure {
34    if {[file exists ${prefix}/etc/lammpi/lam-helpfile]} {
35        ui_error "Cannot co-exist with lammpi; please deactivate lammpi before configuring."
36        return -code error
37    }
38}
39
40pre-build {
41    if {[file exists ${prefix}/etc/lammpi/lam-helpfile]} {
42        ui_error "Cannot co-exist with lammpi; please deactivate lammpi before building."
43        return -code error
44    }
45}
46
47# Puts all entries in <prefix>/share into appropriate mpich2 subdirs
48destroot.args       PACKAGE=mpich2
49patchfiles          patch-src-util-createshlib.in
50
51# the default include-dir conflicts with openmpi!
52configure.args      --with-thread-package=posix \
53                    --enable-timer-type=mach_absolute_time \
54                    --enable-cxx \
55                    --mandir=${prefix}/share/man \
56                    --docdir=${prefix}/share/doc/${name} \
57                    --htmldir=${prefix}/share/doc/${name} \
58                    --includedir=${prefix}/include/${name} \
59                    --disable-f77 --disable-fc \
60                    --with-mpe \
61                    --with-device=ch3:nemesis \
62                    "F90FLAGS='' F90=''" \
63                    --with-pm=hydra \
64                    --enable-shared \
65                    --enable-cache \
66                    --enable-smpcoll \
67                    --enable-base-cache
68
69build.args-append   VERBOSE=1
70
71universal_variant   no
72use_parallel_build  no
73conflicts           lammpi \
74                    mpich2-devel
75
76# Fixes for the beta DESTDIR support in 1.4.1. Should go away in 1.5 branch.
77post-patch {
78    reinplace -E "s|fix=\\\$\\\{DESTDIR\\\}|fix=|g" \
79        ${worksrcpath}/Makefile.in
80    reinplace -E "s|dir=\\\$\\\{DESTDIR\\\}|dir=|g" \
81        ${worksrcpath}/Makefile.in
82}
83
84post-destroot {
85    reinplace -E "s|${destroot}||g" ${destroot}${prefix}/bin/mpicxx \
86                                    ${destroot}${prefix}/bin/mpicc \
87                                    ${destroot}${prefix}/etc/mpicxx.conf \
88                                    ${destroot}${prefix}/etc/mpicc.conf
89    if {[ 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 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 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 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 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 gcc44 gcc45 gcc46 gcc47 llvm clang {
137    depends_lib-append      port:gcc43
138    configure.compiler      macports-gcc-4.3
139}
140
141if {[ variant_isset gcc43 ] ||
142    [ variant_isset gcc44 ] ||
143    [ variant_isset gcc45 ] ||
144    [ variant_isset gcc46 ] ||
145    [ variant_isset gcc47 ]} {
146    configure.args-append   --enable-f77 --enable-fc
147    configure.args-delete   --disable-f77 --disable-fc
148}
149
150variant llvm description {
151    Use llvm-gcc
152} conflicts gcc43 gcc44 gcc45 gcc46 gcc47 clang {
153    configure.compiler      llvm-gcc-4.2
154}
155
156variant clang description {
157    Use clang
158} conflicts gcc43 gcc44 gcc45 gcc46 gcc47 llvm {
159    configure.compiler      clang
160    configure.cxx           clang++
161    configure.cflags-append -w
162    configure.cxxflags-append -w
163}
164
165variant gforker description {
166    Use gforker process manager instead of the default hydra
167} {
168    configure.args-append   --with-pm=gforker
169    configure.args-delete   --with-pm=hydra
170}
171
172platform darwin {
173    configure.args-append   --enable-sharedlibs=osx-gcc
174}
175
176variant default_mpi description {
177    Install as defalt MPI -- conflict with OpenMPI
178} {
179    configure.args-delete   --includedir=${prefix}/include/${name}
180    conflicts-append        openmpi
181}
182
183livecheck.type      regex
184livecheck.regex     ${name}-(\[0-9.p\]+)${extract.suffix}
Note: See TracBrowser for help on using the repository browser.