source: trunk/dports/science/openmpi/Portfile @ 82723

Last change on this file since 82723 was 82723, checked in by mww@…, 9 years ago

version 1.5.4

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