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

Last change on this file since 97759 was 97759, checked in by g5pw@…, 7 years ago

science/openmpi:
adding gcc47 variant

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