source: trunk/dports/science/mpich2-devel/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.1 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-devel
7set pkgname         mpich2
8version             1.5rc1
9revision            1
10license             BSD
11categories          science parallel net
12platforms           darwin
13maintainers         eborisch \
14                    openmaintainer
15
16description         Message Passing Interface (MPI) Library
17
18long_description    MPICH2 is an implementation of the Message-Passing \
19                    Interface (MPI). The goals of MPICH2 are to provide an \
20                    MPI implementation for important platforms, including \
21                    clusters, SMPs, and massively parallel processors. It \
22                    also provides a vehicle for MPI implementation research \
23                    and for developing new and better parallel programming \
24                    environments.
25
26homepage            http://www.mcs.anl.gov/research/projects/mpich2/
27master_sites        ${homepage}downloads/tarballs/${version}/
28distname            ${pkgname}-${version}
29
30checksums   \
31    rmd160  9009286b0e2a51b4d3d2d673bda7de679ba7997d \
32    sha256  cc1c634c3da33f5691f3461349371f2320f6cc87d26312289a54e80c017f00a9
33
34depends_lib-append  port:libxml2
35
36# Don't build if lammpi is around.
37pre-configure {
38    if {[file exists ${prefix}/etc/lammpi/lam-helpfile]} {
39        ui_error \
40    "Cannot co-exist with lammpi; please deactivate lammpi before configuring."
41        return -code error
42    }
43}
44
45pre-build {
46    if {[file exists ${prefix}/etc/lammpi/lam-helpfile]} {
47        ui_error \
48    "Cannot co-exist with lammpi; please deactivate lammpi before building."
49        return -code error
50    }
51}
52
53configure.args      --disable-dependency-tracking \
54                    --disable-f77 \
55                    --disable-fc \
56                    --disable-silent-rules \
57                    --enable-alloca \
58                    --enable-base-cache \
59                    --enable-cache \
60                    --enable-cxx \
61                    --enable-fast=O2 \
62                    --enable-shared \
63                    --enable-smpcoll \
64                    --includedir=${prefix}/include/${pkgname} \
65                    --with-device=ch3:nemesis \
66                    --with-mpe \
67                    --with-pm=hydra \
68                    --with-thread-package=posix \
69                    "F90FLAGS='' F90=''" \
70                    MPICH2LIB_CPPFLAGS=-I${prefix}/include
71
72platform darwin {
73    configure.args-append   --enable-timer-type=mach_absolute_time
74}
75
76
77# We're making compiler wrappers here... don't default to -O2 for wrappers.
78# Actual library code is compiled with -O2 via --enable-fast=O2 configure arg
79configure.cflags-delete     -O2
80configure.cxxflags-delete   -O2
81configure.fflags-delete     -O2
82configure.fcflags-delete    -O2
83configure.cppflags-delete   -I${prefix}/include
84
85universal_variant   no
86conflicts           lammpi \
87                    mpich2
88
89post-destroot {
90    # Move examples directories to preferred location
91    move ${destroot}${prefix}/share/examples \
92      ${destroot}${prefix}/share/doc/${pkgname}/examples
93
94    # Remove un-needed (in MacPorts) binaries
95    file delete ${destroot}${prefix}/sbin/mpeuninstall
96    file delete ${destroot}${prefix}/sbin/mpecheckinstall
97
98    # That's what man pages are for
99    delete ${destroot}${prefix}/share/doc/www4
100}
101
102# As MPICH creates compiler wrappers, there are lots of
103# variants for what compiler the user would like to wrap.
104
105variant gcc47 description {
106    Enable Fortran 77 and Fortran 90 bindings using gfortran from gcc47 port
107} conflicts gcc43 gcc44 gcc45 gcc46 llvm clang clang31 {
108    depends_lib-append      port:gcc47
109    configure.compiler      macports-gcc-4.7
110}
111
112variant gcc46 description {
113    Enable Fortran 77 and Fortran 90 bindings using gfortran from gcc46 port
114} conflicts gcc43 gcc44 gcc45 gcc47 llvm clang clang31 {
115    depends_lib-append      port:gcc46
116    configure.compiler      macports-gcc-4.6
117}
118
119variant gcc45 description {
120    Enable Fortran 77 and Fortran 90 bindings using gfortran from gcc45 port
121} conflicts gcc43 gcc44 gcc46 gcc47 llvm clang clang31 {
122    depends_lib-append      port:gcc45
123    configure.compiler      macports-gcc-4.5
124}
125
126variant gcc44 description {
127    Enable Fortran 77 and Fortran 90 bindings using gfortran from gcc44 port
128} conflicts gcc43 gcc45 gcc46 gcc47 llvm clang clang31 {
129    depends_lib-append      port:gcc44
130    configure.compiler      macports-gcc-4.4
131}
132
133variant gcc43 description {
134    Enable Fortran 77 and Fortran 90 bindings using gfortran from gcc43 port
135} conflicts gcc44 gcc45 gcc46 gcc47 llvm clang clang31 {
136    depends_lib-append      port:gcc43
137    configure.compiler      macports-gcc-4.3
138}
139
140if {[ variant_isset gcc43 ] ||
141    [ variant_isset gcc44 ] ||
142    [ variant_isset gcc45 ] ||
143    [ variant_isset gcc46 ] ||
144    [ variant_isset gcc47 ]} {
145    configure.args-append   --enable-f77 --enable-fc
146    configure.args-delete   --disable-f77 --disable-fc
147}
148
149variant llvm description {
150    Use llvm-gcc
151} conflicts gcc43 gcc44 gcc45 gcc46 gcc47 clang clang31 {
152    configure.compiler      llvm-gcc-4.2
153}
154
155variant clang description {
156    Use clang
157} conflicts gcc43 gcc44 gcc45 gcc46 gcc47 llvm clang31 {
158    configure.compiler      clang
159}
160
161variant clang31 description {
162    Use clang 3.1 from MacPorts
163} conflicts gcc43 gcc44 gcc45 gcc46 gcc47 llvm clang {
164    depends_lib-append      port:clang-3.1
165    configure.compiler      clang
166    configure.cc            ${prefix}/bin/clang-mp-3.1
167    configure.cxx           ${prefix}/bin/clang++-mp-3.1
168}
169
170variant gforker description {
171    Use gforker process manager instead of the default hydra
172} {
173    configure.args-append   --with-pm=gforker
174    configure.args-delete   --with-pm=hydra
175}
176
177variant tuned description {Build with more optimizations)} {
178    configure.args-delete       --enable-fast=O2
179    configure.args-append       --enable-fast=all \
180                                MPICH2LIB_CFLAGS='-fomit-frame-pointer -O2'
181}
182
183livecheck.type      regex
184livecheck.regex     ${pkgname}-(\[0-9.pbrc\]+)${extract.suffix}
185livecheck.url       ${homepage}downloads/index.php?s=downloads
Note: See TracBrowser for help on using the repository browser.