Changeset 79647
- Timestamp:
- 06/22/11 06:14:06 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/gsoc11-rev-upgrade/base/src/macports1.0/macports.tcl
r79637 r79647 3561 3561 } 3562 3562 if {1 == [regexp -nocase {\(architecture ([^\s]+)\)} $otool_line match arch]} { 3563 switch $arch {3563 switch -glob $arch { 3564 3564 x86_64 {} 3565 3565 i386 {} 3566 # todo: what are the correct string reported by otool -arch all -L for the PPC archs?3566 ppc* {} 3567 3567 default { 3568 3568 ui_warn "Unknown architecture $arch" … … 3581 3581 } 3582 3582 ui_debug "Linked against: $file, architecture $arch, version $curr_version, compatibility version $comp_version" 3583 set lib_found false 3584 if {[catch {set lib_otool_output [exec /usr/bin/otool -arch $arch -L $file]}] == 0} { 3585 set lib_otool_lines [split $lib_otool_output "\n"] 3586 foreach lib_otool_line $lib_otool_lines { 3587 if {1 == [regexp -nocase {^\t([^\s]+) \(compatibility version ([^,]+), current version ([^)]+)\)} $lib_otool_line match lib_file lib_comp_version lib_curr_version]} { 3588 if {$file == $lib_file} { 3589 set lib_found true 3590 if {$curr_version != $lib_curr_version} { 3591 if {$comp_version != $lib_comp_version} { 3592 ui_warn "Incompatible library version of $file: Expected $comp_version, but $lib_comp_version is installed!" 3583 if {[file exists $file]} { 3584 set lib_found false 3585 if {[catch {set lib_install_name [exec /usr/bin/otool -arch $arch -X -D $file]}] == 0} { 3586 if {[catch {set lib_otool_output [exec /usr/bin/otool -arch $arch -X -L $file]}] == 0} { 3587 set lib_otool_lines [split $lib_otool_output "\n"] 3588 foreach lib_otool_line $lib_otool_lines { 3589 if {1 == [regexp -nocase {^\t([^\s]+) \(compatibility version ([^,]+), current version ([^)]+)\)} $lib_otool_line match lib_file lib_comp_version lib_curr_version]} { 3590 # call with -D to get install name, search for install name in -L output 3591 if {$lib_install_name == $lib_file} { 3592 set lib_found true 3593 if {$curr_version != $lib_curr_version} { 3594 if {$comp_version != $lib_comp_version} { 3595 ui_warn "Incompatible library version of $file: Expected $comp_version, but $lib_comp_version is installed!" 3596 } 3597 } 3598 break; 3593 3599 } 3594 3600 } … … 3596 3602 } 3597 3603 } 3598 } 3599 if {$lib_found == false} { 3600 ui_warn "Missing dependency $file!" 3604 if {$lib_found == false} { 3605 ui_warn "Missing architecture in file: $arch in $file!" 3606 } 3607 } else { 3608 ui_warn "Missing dependency: $file!" 3601 3609 } 3602 3610 continue;
Note: See TracChangeset
for help on using the changeset viewer.

