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

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

openmpi: use clang instead of llvm-gcc-4.2; see #30330

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 4.8 KB
Line 
1# $Id: Portfile 82801 2011-08-20 19:01:11Z ryandesign@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
41if {${configure.compiler} == "llvm-gcc-4.2"} {
42    configure.compiler clang
43}
44
45build.dir       ${configure.dir}
46
47destroot.dir    ${build.dir}
48set wrappers    {mpicc mpicxx mpic++}
49post-destroot {
50        foreach bin {mpirun mpiexec} {
51                system "cd ${destroot}${prefix}/bin \
52                        && ln -sf ${prefix}/lib/${name}/bin/orterun open${bin}"
53        }
54        foreach bin ${wrappers} {
55                system "cd ${destroot}${prefix}/bin \
56                        && ln -sf ${prefix}/lib/${name}/bin/opal_wrapper open${bin}"
57                system "cd ${destroot}${prefix}/share/${name} \
58                && ln -sf ${prefix}/share/${name}/${bin}-wrapper-data.txt \
59                        open${bin}-wrapper-data.txt"
60        }
61}
62
63variant threads description {enable threads for MPI applications} {
64        configure.args-append --enable-mpi-threads
65}
66
67variant progressthreads description {enable threads asynchronous communication progress} {
68        configure.args-append --enable-progress-threads
69}
70
71variant valgrind description {enable valgrind support} {
72        depends_lib-append    port:valgrind
73        configure.args-append --enable-debug --enable-memchecker --with-valgrind=${prefix}
74}
75
76variant gcc42 description {build mpif77 and mpif90 using gcc42} conflicts gcc43 gcc44 gcc45 g95 {
77        configure.args-delete --disable-mpi-f77 --disable-mpi-f90
78        configure.args-append --enable-mpi-f77 --enable-mpi-f90
79        configure.f77         ${prefix}/bin/gfortran-mp-4.2
80        configure.fc          ${prefix}/bin/gfortran-mp-4.2
81        depends_lib-append    port:gcc42
82        lappend wrappers mpif77 mpif90
83}
84
85variant gcc43 description {build mpif77 and mpif90 using gcc43} conflicts gcc42 gcc44 gcc45 g95 {
86        configure.args-delete --disable-mpi-f77 --disable-mpi-f90
87        configure.args-append --enable-mpi-f77 --enable-mpi-f90
88        configure.f77         ${prefix}/bin/gfortran-mp-4.3
89        configure.fc          ${prefix}/bin/gfortran-mp-4.3
90        depends_lib-append    port:gcc43
91        lappend wrappers mpif77 mpif90
92}
93
94variant gcc44 description {build mpif77 and mpif90 using gcc44} conflicts gcc42 gcc43 gcc45 g95 {
95        configure.args-delete --disable-mpi-f77 --disable-mpi-f90
96        configure.args-append --enable-mpi-f77 --enable-mpi-f90
97        configure.f77         ${prefix}/bin/gfortran-mp-4.4
98        configure.fc          ${prefix}/bin/gfortran-mp-4.4
99        depends_lib-append    port:gcc44
100        lappend wrappers mpif77 mpif90
101}
102
103variant gcc45 description {build mpif77 and mpif90 using gcc45} conflicts gcc42 gcc43 gcc44 g95 {
104        configure.args-delete --disable-mpi-f77 --disable-mpi-f90
105        configure.args-append --enable-mpi-f77 --enable-mpi-f90
106        configure.f77         ${prefix}/bin/gfortran-mp-4.5
107        configure.fc          ${prefix}/bin/gfortran-mp-4.5
108        depends_lib-append    port:gcc45
109        lappend wrappers mpif77 mpif90
110}
111
112variant g95 description {build mpif77 and mpif90 using g95} conflicts gcc42 gcc43 gcc44 gcc45 {
113        configure.args-delete --disable-mpi-f77 --disable-mpi-f90
114        configure.args-append --enable-mpi-f77 --enable-mpi-f90
115        configure.f77         ${prefix}/bin/g95
116        configure.fc          ${prefix}/bin/g95
117        depends_lib-append    port:g95
118        lappend wrappers mpif77 mpif90
119}
120
121# dependents like netcdf need some form of fortran
122if {![variant_isset gcc42] && ![variant_isset gcc43] && ![variant_isset gcc44] && ![variant_isset gcc45] && ![variant_isset g95]} {
123    default_variants +gcc44
124}
125
126livecheck.type  regex
127livecheck.url   http://www.open-mpi.org/software/ompi/v1.5/
128livecheck.regex openmpi-(\[0-9\.\]+).tar.bz2
129
130universal_variant no
131
132# remove -arch from ldflags, ticket #22833
133configure.ld_archflags
134# avoid building against older installed version, ticket #23864
135configure.cppflags-delete -I${prefix}/include
136configure.ldflags-delete -L${prefix}/lib
Note: See TracBrowser for help on using the repository browser.