[142438] trunk/dports/_resources/port1.0/group/mpi-1.0.tcl

dstrubbe at macports.org dstrubbe at macports.org
Sat Dec 12 05:45:34 PST 2015


Revision: 142438
          https://trac.macports.org/changeset/142438
Author:   dstrubbe at macports.org
Date:     2015-11-11 19:30:02 -0800 (Wed, 11 Nov 2015)
Log Message:
-----------
mpi portgroup: Add documentation. Add option to make MPI default but not required.

Modified Paths:
--------------
    trunk/dports/_resources/port1.0/group/mpi-1.0.tcl

Modified: trunk/dports/_resources/port1.0/group/mpi-1.0.tcl
===================================================================
--- trunk/dports/_resources/port1.0/group/mpi-1.0.tcl	2015-11-12 03:29:07 UTC (rev 142437)
+++ trunk/dports/_resources/port1.0/group/mpi-1.0.tcl	2015-11-12 03:30:02 UTC (rev 142438)
@@ -35,11 +35,29 @@
 # Usage:
 #
 #   PortGroup               mpi 1.0
+#
+# Available procedures:
+# proc mpi_active_variant_name {depspec}
+#   Returns the name of the active MPI variant of a dependency.
+# proc mpi_variant_name {}
+#   Returns the name of the active MPI variant of this port.
+# proc mpi.enforce_variant {args}
+#   Raise an error if the dependency does not have the same MPI variant
+#   as this port. Also enforces that the dependency has the same C variant.
+# proc mpi_variant_isset {}
+#   Whether an MPI variant has been set.
+# proc mpi.setup {args}
+#   Creates MPI variants.
+#   Available arguments: "require" means an MPI variant must be set. "-mpich", "-openmpi", etc.
+#   means remove this variant from the list. All of the arguments for compilers.setup are available
+#   too and will be passed to that procedure. "default" means an MPI variant (mpich) will be
+#   set as a default variant.
 
 PortGroup compilers 1.0
 
 default mpi.variants {}
 default mpi.require 0
+default mpi.default 0
 default mpi.required_variants {}
 
 set mpi.cc   mpicc
@@ -231,7 +249,11 @@
         switch -exact $v {
             require {
                 set mpi.require 1
+                set mpi.default 1
             }
+            "default" {
+                set mpi.default 1
+            }
             require_fortran {
                 set cl [add_from_list $cl "require_fortran"]
             }
@@ -288,10 +310,9 @@
         require_active_variants $mpi $cv $cl
     }
 
-    if {${mpi.require} && ![mpi_variant_isset]} {
+    if {${mpi.default} && ![mpi_variant_isset]} {
         default_variants-append +mpich
     }
-
 }
 
 pre-fetch {
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20151212/1cabd20d/attachment.html>


More information about the macports-changes mailing list