source: trunk/dports/science/mpich2-devel/Portfile @ 96920

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

mpich2-devel: Update to 1.5rc1; remove legacy configure option

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