Ticket #421: patch-portactivate.tcl.diff
File patch-portactivate.tcl.diff, 1.6 KB (added by lperry (Perry Lee), 16 years ago) |
---|
-
portactivate.tcl
49 49 set_ui_prefix 50 50 51 51 proc activate_main {args} { 52 global portname portversion portrevision portvariants user_options portnotes52 global env portname portversion portrevision portvariants user_options portnotes 53 53 registry_activate $portname ${portversion}_${portrevision}${portvariants} [array get user_options] 54 54 55 55 # Display notes at the end of the activation phase. 56 56 if {[info exists portnotes] && $portnotes ne {}} { 57 ui_msg \n$portnotes\n 57 # If env(COLUMNS) exists, limit each line's width to this width. 58 if {[info exists env(COLUMNS)]} { 59 set maxlen $env(COLUMNS) 60 61 ui_msg "" 62 foreach line [split $portnotes "\n"] { 63 set joiner "" 64 set lines "" 65 set newline "" 66 67 foreach word [split $line " "] { 68 if {[string length $newline] + [string length $word] >= $maxlen} { 69 lappend lines $newline 70 set newline "" 71 set joiner "" 72 } 73 append newline $joiner $word 74 set joiner " " 75 } 76 if {$newline ne {}} { 77 lappend lines $newline 78 } 79 ui_msg [join $lines "\n"] 80 } 81 ui_msg "" 82 } else { 83 ui_msg \n$portnotes\n 84 } 58 85 } 59 86 60 87 return 0