Ticket #61700: Portfile-WIP.diff

File Portfile-WIP.diff, 2.5 KB (added by jmroot (Joshua Root), 4 years ago)

Partly complete fix

  • math/OpenBLAS/Portfile

    diff --git a/math/OpenBLAS/Portfile b/math/OpenBLAS/Portfile
    index a97dc353392..d87645ed597 100644
    a b if {${os.major} >= 11 && ${os.major} <= 17} { 
    3030    set blas_arch "CORE2"
    3131}
    3232#OS 10.14 supports down to Mac Pro 5,1 that has Nehalem architecture
    33 if {${os.major} >= 18} {
    34     set blas_arch "NEHALEM"
    35 }
     33if {${os.major} >= 18} {
     34    if {${os.arch} eq "arm"} {
     35        # FIXME use correct arch name
     36        #set blas_arch "???"
     37    } else {
     38        set blas_arch "NEHALEM"
     39    }
     40}
    3641if {![info exists blas_arch]} {
    3742    #For older versions, we force native variant as there is no PPCG3 target in OpenBLAS
    3843    default_variants-append +native
    3944}
    40 if {${build_arch} eq "arm64" } {
    41     #currently require native builds for Apple Silicon
    42     default_variants-append +native
    43 }
    4445
    4546subport OpenBLAS-devel {}
    4647if {[string first "-devel" $subport] > 0} {
    pre-build { 
    113114            puts $makeINC "CC = ${configure.cc}"
    114115            puts $makeINC "FC = ${configure.fc}"
    115116
    116             if {${arch} eq "x86_64" || ${arch} eq "ppc64"} {
     117            if {${arch} in [list arm64 ppc64 x86_64]} {
    117118                puts $makeINC "BINARY = 64"
    118119            } else {
    119120                puts $makeINC "BINARY = 32"
    pre-build { 
    135136                }
    136137            }
    137138
    138             if {${build_arch} eq "ppc" || ${build_arch} eq "ppc64"} {
    139                 # on a PPC of some sort; just disable AVX
     139            if {${build_arch} ni [list i386 x86_64]} {
     140                # not on x86 of some sort; just disable AVX
    140141                puts $makeINC "NO_AVX = 1"
    141142                puts $makeINC "NO_AVX2 = 1"
    142143                puts $makeINC "NO_AVX512 = 1"
    pre-build { 
    172173        puts $makeINC "CC = ${configure.cc}"
    173174        puts $makeINC "FC = ${configure.fc}"
    174175
    175         if {${build_arch} eq "x86_64" || ${build_arch} eq "ppc64"} {
     176        if {${build_arch} in [list arm64 ppc64 x86_64]} {
    176177            puts $makeINC "BINARY = 64"
    177178        } else {
    178179            puts $makeINC "BINARY = 32"
    pre-build { 
    191192        }
    192193
    193194        #Setting up build flags
    194         if {${build_arch} eq "ppc" || ${build_arch} eq "ppc64"} {
    195             # on a PPC of some sort; just disable AVX
     195        if {${build_arch} ni [list i386 x86_64]} {
     196            # not on x86 of some sort; just disable AVX
    196197            puts $makeINC "NO_AVX = 1"
    197198            puts $makeINC "NO_AVX2 = 1"
    198199            puts $makeINC "NO_AVX512 = 1"