[142490] trunk/dports/_resources/port1.0/group/compilers-1.0.tcl
dstrubbe at macports.org
dstrubbe at macports.org
Sat Dec 12 05:58:45 PST 2015
Revision: 142490
https://trac.macports.org/changeset/142490
Author: dstrubbe at macports.org
Date: 2015-11-12 16:50:00 -0800 (Thu, 12 Nov 2015)
Log Message:
-----------
compilers portgroup: Add new proc compilers.enforce_some_fortran to enforce that a dependency has some Fortran variant set, without being concerned which one.
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 2015-11-13 00:40:49 UTC (rev 142489)
+++ trunk/dports/_resources/port1.0/group/compilers-1.0.tcl 2015-11-13 00:50:00 UTC (rev 142490)
@@ -68,6 +68,7 @@
# fortran_variant_isset {}: is a Fortran variant set
# compilers.enforce_c {args}: enforce that a dependency has the same C variant as is set here
# compilers.enforce_fortran {args}: enforce that a dependency has the same Fortran variant as is set here
+# compilers.enforce_some_fortran {args}: enforce that a dependency has some Fortran variant set
#
# The compilers.gcc_default variable may be useful for setting a default compiler variant
# even in ports that do not use this PortGroup's automatic creation of variants.
@@ -85,6 +86,7 @@
default compilers.setup_done 0
default compilers.required_c {}
default compilers.required_f {}
+default compilers.required_some_f {}
default compilers.variants_conflict {}
default compilers.libfortran {}
@@ -527,6 +529,13 @@
}
}
+proc compilers.enforce_some_fortran {args} {
+ global compilers.required_some_f
+ foreach portname $args {
+ lappend compilers.required_some_f $portname
+ }
+}
+
proc compilers.action_enforce_f {args} {
global compilers.gcc_default
@@ -556,6 +565,21 @@
}
}
+proc compilers.action_enforce_some_f {args} {
+ ui_debug "compilers.enforce_some_fortran list: ${args}"
+ foreach portname $args {
+ if {![catch {set result [active_variants $portname "" ""]}]} {
+ if {[fortran_active_variant_name $portname] eq ""} {
+ ui_error "Install $portname with a Fortran variant (e.g. +gfortran, +gccX, +g95)"
+ return -code error "$portname not installed with a Fortran variant"
+ }
+ } else {
+ ui_error "Internal error: compilers.enforce_some_fortran: '$portname' is not an installed port."
+ return -code error "Internal error: compilers.enforce_some_fortran: '$portname' is not an installed port."
+ }
+ }
+}
+
proc compilers.setup {args} {
global cdb compilers.variants compilers.clang_variants compilers.gcc_variants
global compilers.dragonegg_variants compilers.fortran_variants
@@ -684,4 +708,5 @@
}
eval compilers.action_enforce_c ${compilers.required_c}
eval compilers.action_enforce_f ${compilers.required_f}
+ eval compilers.action_enforce_some_f ${compilers.required_some_f}
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20151212/9478e798/attachment.html>
More information about the macports-changes
mailing list