Ticket #2917: patch-portdep.2.diff

File patch-portdep.2.diff, 2.1 KB (added by jberry@…, 19 years ago)

Patch alters darwinports.tcl and portdepends.tcl

  • base/src/darwinports1.0/darwinports.tcl

    RCS file: /Volumes/src/cvs/od/proj/darwinports/base/src/darwinports1.0/darwinports.tcl,v
    retrieving revision 1.161
    diff -u -r1.161 darwinports.tcl
     
    926926       
    927927        foreach depspec $depends {
    928928                # grab the portname portion of the depspec
    929                 set portname [lindex [split $depspec :] 2]
     929                set portname [lindex [split $depspec :] end]
    930930               
    931931                # Find the porturl
    932932                if {[catch {set res [dportsearch "^$portname\$"]} error]} {
  • base/src/port1.0/portdepends.tcl

    RCS file: /Volumes/src/cvs/od/proj/darwinports/base/src/port1.0/portdepends.tcl,v
    retrieving revision 1.39
    diff -u -r1.39 portdepends.tcl
     
    4444proc validate_depends_options {option action args} {
    4545    global targets
    4646    switch -regex $action {
    47         set|append|delete {
    48             foreach depspec $args {
    49                 if {[regexp {([A-Za-z\./0-9]+):([A-Za-z0-9_/\-\.$^\?\+\(\)\|\\]*):([-A-Za-z\./0-9_]+)} "$depspec" match deppath depregex portname]} {
    50                         switch -regex $deppath {
    51                         lib|bin|path {
    52                                 if {[string length $depregex] == 0} {
    53                                         return -code error [format [msgcat::mc "invalid depspec: %s (missing regex component)"] $depspec]
     47                set|append|delete {
     48                        foreach depspec $args {
     49                                switch -regex $depspec {
     50                                        (lib|bin|path):([-A-Za-z0-9_/.$^?+()|\\\\]+):([-A-Za-z./0-9_]+) {}
     51                                        (port):?:([-A-Za-z./0-9_]+) {}
     52                                        default { return -code error [format [msgcat::mc "invalid depspec: %s"] $depspec] }
    5453                                }
    5554                        }
    56                         port {}
    57                         default {return -code error [format [msgcat::mc "unknown depspec type: %s"] $deppath]}
    58                     }
    59                 } else {
    60                     return -code error [format [msgcat::mc "invalid depspec: %s"] $depspec]
    6155                }
    62             }
    63         }
    6456    }
    6557}