Ticket #58528: patch-Portfile.2.diff

File patch-Portfile.2.diff, 1.7 KB (added by NicosPavlov, 5 years ago)

Revised patch with correct use of build_arch

  • Portfile

    old new  
    2828if {${os.major} == 9} {
    2929    if {${os.arch} eq "i386" || [variant_isset universal]} {
    3030        set blas_arch "YONAH"
    31     } else {
     31    } else { #PPC
    3232        set blas_arch "PPCG4"
    3333    }
    3434}
    3535#OS 10.6 supports down to Intel Core Solo architecture
    3636if {${os.major} == 10} {
    37     set blas_arch "YONAH"
     37    if {${build_arch} eq "i386" || [variant_isset universal]} {
     38        set blas_arch "YONAH"
     39    } else { #YONAH does not support 64-bit, see #58528
     40        set blas_arch "CORE2"
     41    }
    3842}
    3943#OS 10.7-10.11 supports down to iMac 7,1, with Intel Core 2 Duo architecture
    4044#OS 10.12-13 supports down to iMac 10,1, with Intel Core 2 Duo architecture
     
    130134                puts $makeINC "NO_LAPACK = 1"
    131135            }
    132136
     137            #We set a minimal target in case native variant is not set
    133138            if {![variant_isset native]} {
    134                 #We set a minimal target in case native variant is not set
     139                #PPC case for 10.5, default was set to i386 target
    135140                if {${build_arch} eq "ppc" || ${build_arch} eq "ppc64"} {
    136141                    puts $makeINC "TARGET = PPCG4"
    137142                } else {
    138                     puts $makeINC "TARGET = ${blas_arch}"
     143                    #64-bit case for 10.6, default was set to i386 32-bit target
     144                    if {${os.major} == 10 && ${build_arch} eq "x86_64"} {
     145                        puts $makeINC "TARGET = CORE2"
     146                    } else {
     147                        puts $makeINC "TARGET = ${blas_arch}"
     148                    }
    139149                }
    140150            }
    141151