[116309] trunk/dports/_resources/port1.0/group/compilers-1.0.tcl

sean at macports.org sean at macports.org
Thu Jan 23 12:09:18 PST 2014


Revision: 116309
          https://trac.macports.org/changeset/116309
Author:   sean at macports.org
Date:     2014-01-23 12:09:18 -0800 (Thu, 23 Jan 2014)
Log Message:
-----------
compilers-1.0: add gcc_variant_name proc

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

Modified: trunk/dports/_resources/port1.0/group/compilers-1.0.tcl
===================================================================
--- trunk/dports/_resources/port1.0/group/compilers-1.0.tcl	2014-01-23 20:09:12 UTC (rev 116308)
+++ trunk/dports/_resources/port1.0/group/compilers-1.0.tcl	2014-01-23 20:09:18 UTC (rev 116309)
@@ -365,6 +365,23 @@
     return [expr {[clang_variant_name] ne ""}]
 }
 
+proc gcc_variant_name {} {
+    global compilers.gcc_variants variations
+
+    foreach c ${compilers.gcc_variants} {
+        # we need to check the default_variants so we can't use variant_isset
+        if {[info exists variations($c)] && $variations($c) eq "+"} {
+            return $c
+        }
+    }
+
+    return ""
+}
+
+proc gcc_variant_isset {} {
+    return [expr {[gcc_variant_name] ne ""}]
+}
+
 proc avx_compiler_isset {} {
     global configure.cc
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20140123/e08917ee/attachment.html>


More information about the macports-changes mailing list