[111990] trunk/base/src/port1.0/portutil.tcl

ryandesign at macports.org ryandesign at macports.org
Tue Oct 8 11:05:30 PDT 2013


Revision: 111990
          https://trac.macports.org/changeset/111990
Author:   ryandesign at macports.org
Date:     2013-10-08 11:05:30 -0700 (Tue, 08 Oct 2013)
Log Message:
-----------
portutil.tcl: add handle_option-prepend (#40655)

Modified Paths:
--------------
    trunk/base/src/port1.0/portutil.tcl

Modified: trunk/base/src/port1.0/portutil.tcl
===================================================================
--- trunk/base/src/port1.0/portutil.tcl	2013-10-08 17:10:55 UTC (rev 111989)
+++ trunk/base/src/port1.0/portutil.tcl	2013-10-08 18:05:30 UTC (rev 111990)
@@ -114,6 +114,23 @@
 }
 
 ##
+# Handle option-prepend
+#
+# @param option name of the option
+# @param args arguments
+proc handle_option-prepend {option args} {
+    global $option user_options option_procs
+
+    if {![info exists user_options($option)]} {
+        if {[info exists $option]} {
+            set $option [concat $args [set $option]]
+        } else {
+            set $option $args
+        }
+    }
+}
+
+##
 # Handle option-delete
 #
 # @param option name of the option
@@ -188,6 +205,7 @@
     foreach option $args {
         interp alias {} $option {} handle_option $option
         interp alias {} $option-append {} handle_option-append $option
+        interp alias {} $option-prepend {} handle_option-prepend $option
         interp alias {} $option-delete {} handle_option-delete $option
         interp alias {} $option-strsed {} handle_option-strsed $option
         interp alias {} $option-replace {} handle_option-replace $option
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20131008/e321d563/attachment.html>


More information about the macports-changes mailing list