Ticket #38677: Portfile.diff

File Portfile.diff, 787 bytes (added by jmroot (Joshua Root), 12 years ago)
  • Portfile

     
    160160set universal           [variant_isset universal]
    161161
    162162# Finds the type of CPU we are running on
     163set native_arch $build_arch
    163164if {${os.arch} == "i386"} {
    164165
    165166    set universal_archs_supported {i386 x86_64}
    166     set native_arch     [exec sysctl -n hw.machine]
    167 } else {
     167    if {![catch {sysctl hw.machine} result]} {
     168        set native_arch $result
     169    }
     170} elseif {${os.arch} == "powerpc"} {
    168171
    169172    set universal_archs_supported {ppc  ppc64}
    170     if {[exec sysctl -n hw.cpusubtype] == 100} {
    171    
     173    if {![catch {sysctl hw.cpusubtype} result] && $result == 100} {
    172174        set native_arch "ppc64"
    173175    } else {
    174176