[126930] trunk/dports/_resources/port1.0/group/perl5-1.0.tcl
pixilla at macports.org
pixilla at macports.org
Fri Oct 17 13:18:46 PDT 2014
Revision: 126930
https://trac.macports.org/changeset/126930
Author: pixilla at macports.org
Date: 2014-10-17 13:18:46 -0700 (Fri, 17 Oct 2014)
Log Message:
-----------
_resources/port1.0/group:
- Add perl5.require_variant option for requiring a perl variant be selected.
Modified Paths:
--------------
trunk/dports/_resources/port1.0/group/perl5-1.0.tcl
Modified: trunk/dports/_resources/port1.0/group/perl5-1.0.tcl
===================================================================
--- trunk/dports/_resources/port1.0/group/perl5-1.0.tcl 2014-10-17 20:17:55 UTC (rev 126929)
+++ trunk/dports/_resources/port1.0/group/perl5-1.0.tcl 2014-10-17 20:18:46 UTC (rev 126930)
@@ -76,11 +76,12 @@
}
# Set perl variant options and defaults
-options perl5.default_variant perl5.variant perl5.set_default_variant perl5.conflict_variants
+options perl5.default_variant perl5.variant perl5.set_default_variant perl5.conflict_variants perl5.require_variant
default perl5.default_variant [string map {. _} perl${perl5.default_branch}]
default perl5.variant {[string map {. _} perl${perl5.major}]}
default perl5.set_default_variant {true}
default perl5.conflict_variants {true}
+default perl5.require_variant {false}
# Get variant names from branches
proc perl5.get_variant_names {branches} {
set ret {}
@@ -91,7 +92,7 @@
}
# Create perl variants
proc perl5.create_variants {branches} {
- global perl5.major perl5.default_variant perl5.variant perl5.set_default_variant perl5.conflict_variants
+ global name perl5.major perl5.default_variant perl5.variant perl5.set_default_variant perl5.conflict_variants perl5.require_variant
set variants [perl5.get_variant_names ${branches}]
foreach branch ${branches} {
set index [lsearch ${branches} ${branch}]
@@ -110,6 +111,11 @@
if {${perl5.default_variant} eq ${perl5.variant} && ${perl5.set_default_variant}} {
default_variants-append +${perl5.variant}
}
+# Require perl variant
+ if {![variant_isset ${perl5.variant}] && ${perl5.require_variant}} {
+ ui_error "${name} requires one of these variants: ${variants}"
+ return -code error "absence of required perl variant"
+ }
# Set perl version and deps
foreach branch ${branches} {
set index [lsearch ${branches} ${branch}]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20141017/3931eb34/attachment.html>
More information about the macports-changes
mailing list