Ticket #55471: portindex.tcl.diff

File portindex.tcl.diff, 1.9 KB (added by ryandesign (Ryan Carsten Schmidt), 6 years ago)
  • src/port/portindex.tcl

    diff --git a/src/port/portindex.tcl b/src/port/portindex.tcl
    index ff6ffe72..dba778d8 100644
    a b mportinit ui_options global_options global_variations 
    2222# Standard procedures
    2323proc print_usage args {
    2424    global argv0
    25     puts "Usage: $argv0 \[-df\] \[-o output directory\] \[-p plat_ver_arch\] \[directory\]"
     25    puts "Usage: $argv0 \[-df\] \[-o output directory\] \[-p plat_ver_\[cxxlib_\]arch\] \[directory\]"
    2626    puts "-d:\tOutput debugging information"
    2727    puts "-f:\tDo a full re-index instead of updating"
    2828    puts "-o:\tOutput all files to specified directory"
    for {set i 0} {$i < $argc} {incr i} { 
    197197                set platlist [split [lindex $argv $i] _]
    198198                set os_platform [lindex $platlist 0]
    199199                set os_major [lindex $platlist 1]
    200                 set os_arch [lindex $platlist 2]
     200                if {[llength $platlist] > 3} {
     201                    set cxx_stdlib [lindex $platlist 2]
     202                    switch -- $cxx_stdlib {
     203                        libcxx {
     204                            set cxx_stdlib libc++
     205                        }
     206                        libstdcxx {
     207                            set cxx_stdlib libstdc++
     208                        }
     209                        default {
     210                            puts stderr "Unknown C++ standard library: $cxx_stdlib (use libcxx or libstdcxx)"
     211                            print_usage
     212                            exit 1
     213                        }
     214                    }
     215                    lappend port_options cxx_stdlib $cxx_stdlib
     216                    set os_arch [lindex $platlist 3]
     217                } else {
     218                    set os_arch [lindex $platlist 2]
     219                }
    201220                if {$os_platform eq "macosx"} {
    202221                    lappend port_options os.subplatform $os_platform os.universal_supported yes
    203222                    set os_platform darwin