[108320] trunk/dports/science/netcdf/Portfile

takeshi at macports.org takeshi at macports.org
Fri Jul 19 06:08:09 PDT 2013


Revision: 108320
          https://trac.macports.org/changeset/108320
Author:   takeshi at macports.org
Date:     2013-07-19 06:08:09 -0700 (Fri, 19 Jul 2013)
Log Message:
-----------
netcdf: use active_variants properly with catch, closing #39785 again

Modified Paths:
--------------
    trunk/dports/science/netcdf/Portfile

Modified: trunk/dports/science/netcdf/Portfile
===================================================================
--- trunk/dports/science/netcdf/Portfile	2013-07-19 13:01:56 UTC (rev 108319)
+++ trunk/dports/science/netcdf/Portfile	2013-07-19 13:08:09 UTC (rev 108320)
@@ -2,6 +2,7 @@
 # $Id$
 
 PortSystem                  1.0
+PortGroup                   active_variants 1.1
 
 name                        netcdf
 epoch                       2
@@ -29,9 +30,8 @@
 
 patchfiles          patch-configure.diff
 
-if {[variant_isset netcdf4]} {
-    set hdf5cc [exec grep "C Compiler" ${prefix}/lib/libhdf5.settings | awk {BEGIN{FS="/"}{print $NF}}]
-    if {${hdf5cc}=="openmpicc"} {
+if {![catch {set result [active_variants hdf5-18 openmpi ""]}]} {
+    if {$result} {
         default_variants +openmpi
     } elseif {[variant_isset openmpi]} {
         ui_error "Install hdf5-18 +openmpi"
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20130719/ab3f7ee6/attachment-0001.html>


More information about the macports-changes mailing list