source: trunk/dports/science/openmpi/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: 5.2 KB
Line 
1# $Id: Portfile 97763 2012-09-14 18:56:08Z jeremyhu@macports.org $
2
3PortSystem 1.0
4
5name                    openmpi
6version                 1.5.5
7revision                1
8set branch              [join [lrange [split ${version} .] 0 1] .]
9categories              science parallel net
10platforms               darwin
11license                 BSD
12maintainers             mww openmaintainer
13description             A High Performance Message Passing Library
14long_description        Open MPI is a project combining technologies and resources \
15                        from several other projects (FT-MPI, LA-MPI, LAM/MPI, and \
16                        PACX-MPI) in order to build the best MPI library available. A \
17                        completely new MPI-2 compliant implementation, Open MPI offers \
18                        advantages for system and software vendors, application developers \
19                        and computer science researchers.
20
21homepage                http://www.open-mpi.org/
22set subdir              ompi/v${branch}/downloads/
23master_sites            http://www.open-mpi.org/software/${subdir} \
24                        http://www.open-mpi.de/software/${subdir} \
25                        http://icl.cs.utk.edu/open-mpi/${subdir} \
26                        freebsd
27checksums           md5     f882fd61ff89db856bfd8f0dfa42e1bd \
28                    sha1    206e555f6d376443f2342f721d944e67dd1a04ef \
29                    rmd160  6e7648ec0fa553c16b40f886b397d11863039eb2
30use_bzip2               yes
31
32pre-extract { file mkdir ${workpath}/build }
33
34configure.dir   ${workpath}/build
35configure.cmd   ${worksrcpath}/configure
36configure.args  --disable-mpi-f77 --disable-mpi-f90 \
37                --with-xgrid \
38                --sysconfdir=${prefix}/etc/${name} \
39                --includedir=${prefix}/include/${name} \
40                --bindir=${prefix}/lib/${name}/bin \
41                --mandir=${prefix}/share/man
42
43if {${configure.compiler} == "llvm-gcc-4.2"} {
44    configure.compiler clang
45}
46
47build.dir       ${configure.dir}
48
49destroot.dir    ${build.dir}
50set wrappers    {mpicc mpicxx mpic++}
51post-destroot {
52        foreach bin {mpirun mpiexec} {
53                system -W ${destroot}${prefix}/bin \
54                        "ln -sf ${prefix}/lib/${name}/bin/orterun open${bin}"
55        }
56        foreach bin ${wrappers} {
57                system -W ${destroot}${prefix}/bin \
58                        "ln -sf ${prefix}/lib/${name}/bin/opal_wrapper open${bin}"
59                system -W ${destroot}${prefix}/share/${name} \
60                        "ln -sf ${prefix}/share/${name}/${bin}-wrapper-data.txt \
61                        open${bin}-wrapper-data.txt"
62        }
63}
64
65variant threads description {enable threads for MPI applications} {
66        configure.args-append --enable-mpi-threads
67}
68
69variant progressthreads description {enable threads asynchronous communication progress} {
70        configure.args-append --enable-progress-threads
71}
72
73variant valgrind description {enable valgrind support} {
74        depends_lib-append    port:valgrind
75        configure.args-append --enable-debug --enable-memchecker --with-valgrind=${prefix}
76}
77
78variant gcc43 description {build mpif77 and mpif90 using gcc43} conflicts gcc44 gcc45 gcc46 gcc47 g95 {
79        configure.args-delete --disable-mpi-f77 --disable-mpi-f90
80        configure.args-append --enable-mpi-f77 --enable-mpi-f90
81        configure.f77         ${prefix}/bin/gfortran-mp-4.3
82        configure.fc          ${prefix}/bin/gfortran-mp-4.3
83        depends_lib-append    port:gcc43
84        lappend wrappers mpif77 mpif90
85}
86
87variant gcc44 description {build mpif77 and mpif90 using gcc44} conflicts gcc43 gcc45 gcc46 gcc47 g95 {
88        configure.args-delete --disable-mpi-f77 --disable-mpi-f90
89        configure.args-append --enable-mpi-f77 --enable-mpi-f90
90        configure.f77         ${prefix}/bin/gfortran-mp-4.4
91        configure.fc          ${prefix}/bin/gfortran-mp-4.4
92        depends_lib-append    port:gcc44
93        lappend wrappers mpif77 mpif90
94}
95
96variant gcc45 description {build mpif77 and mpif90 using gcc45} conflicts gcc43 gcc44 gcc46 gcc47 g95 {
97        configure.args-delete --disable-mpi-f77 --disable-mpi-f90
98        configure.args-append --enable-mpi-f77 --enable-mpi-f90
99        configure.f77         ${prefix}/bin/gfortran-mp-4.5
100        configure.fc          ${prefix}/bin/gfortran-mp-4.5
101        depends_lib-append    port:gcc45
102        lappend wrappers mpif77 mpif90
103}
104
105variant gcc46 description {build mpif77 and mpif90 using gcc46} conflicts gcc43 gcc44 gcc45 gcc47 g95 {
106        configure.args-delete --disable-mpi-f77 --disable-mpi-f90
107        configure.args-append --enable-mpi-f77 --enable-mpi-f90
108        configure.f77         ${prefix}/bin/gfortran-mp-4.6
109        configure.fc          ${prefix}/bin/gfortran-mp-4.6
110        depends_lib-append    port:gcc46
111        lappend wrappers mpif77 mpif90
112}
113
114variant gcc47 description {build mpif77 and mpif90 using gcc47} conflicts gcc43 gcc44 gcc45 gcc46 g95 {
115        configure.args-delete --disable-mpi-f77 --disable-mpi-f90
116        configure.args-append --enable-mpi-f77 --enable-mpi-f90
117        configure.f77         ${prefix}/bin/gfortran-mp-4.7
118        configure.fc          ${prefix}/bin/gfortran-mp-4.7
119        depends_lib-append    port:gcc47
120        lappend wrappers mpif77 mpif90
121}
122
123variant g95 description {build mpif77 and mpif90 using g95} conflicts gcc43 gcc44 gcc45 gcc46 gcc47 {
124        configure.args-delete --disable-mpi-f77 --disable-mpi-f90
125        configure.args-append --enable-mpi-f77 --enable-mpi-f90
126        configure.f77         ${prefix}/bin/g95
127        configure.fc          ${prefix}/bin/g95
128        depends_lib-append    port:g95
129        lappend wrappers mpif77 mpif90
130}
131
132# dependents like netcdf need some form of fortran
133if {![variant_isset gcc43] && ![variant_isset gcc44] && ![variant_isset gcc46] && ![variant_isset g95]} {
134    default_variants +gcc45
135}
136
137livecheck.type  regex
138livecheck.url   http://www.open-mpi.org/software/ompi/v1.5/
139livecheck.regex openmpi-(\[0-9\.\]+).tar.bz2
140
141universal_variant no
142
143# remove -arch from ldflags, ticket #22833
144configure.ld_archflags
145# avoid building against older installed version, ticket #23864
146configure.cppflags-delete -I${prefix}/include
147configure.ldflags-delete -L${prefix}/lib
Note: See TracBrowser for help on using the repository browser.