Ticket #34369: Portfile.diff2

File Portfile.diff2, 1.5 KB (added by mamoll (Mark Moll), 13 years ago)
Line 
1Index: Portfile
2===================================================================
3--- Portfile    (revision 93111)
4+++ Portfile    (working copy)
5@@ -5,7 +5,7 @@
6 
7 name          arpack
8 version       3.1.0
9-revision      1
10+revision      2
11 categories    math
12 license       BSD
13 platforms     darwin
14@@ -25,14 +25,12 @@
15 
16 # openmpi does not have a universal variant
17 universal_variant   no
18-depends_build port:openmpi
19 configure.args-append --enable-mpi home=${worksrcpath}
20 if { ${build_arch}=="x86_64" || ${build_arch}=="ppc64" } {
21     configure.args-append FFLAGS='-O2 -m64' LDFLAGS='-L${prefix}/lib'
22 } else {
23     configure.args-append FFLAGS='-O2 -m32' LDFLAGS='-L${prefix}/lib'
24 }
25-configure.env-append MPIF77=${prefix}/bin/openmpif77
26 
27 pre-fetch {
28        if {"darwin" == ${os.platform} && ${os.major} < 9} {
29@@ -49,6 +47,22 @@
30     set universal_archs_supported "ppc ppc64"
31 }
32 
33+variant openmpi description {build with OpenMPI} conflicts mpich2 {
34+    depends_build port:openmpi
35+    configure.env-append MPIF77=${prefix}/bin/openmpif77
36+}
37+
38+variant mpich2 description {build with MPICH2} conflicts openmpi {
39+    depends_build port:mpich2
40+    configure.env-append MPIF77=${prefix}/bin/mpif77
41+    configure.args-append FFLAGS='-I${prefix}/include/mpich2'
42+}
43+
44+if {![variant_isset mpich2]} {
45+    default_variants +openmpi
46+}
47+
48+
49 variant gcc42 description {build with gfortran-mp-4.2} conflicts gcc43 gcc44 gcc45 gcc46 gcc47 g95 universal {
50        depends_build-append    port:gcc42
51        configure.env-append F77=${prefix}/bin/gfortran-mp-4.2