Ticket #29256: Portfile.diff

File Portfile.diff, 2.3 KB (added by tenomoto (Takeshi Enomoto), 13 years ago)
  • Portfile

    old new  
    7979test.run            yes
    8080test.target         check
    8181
    82 variant atlas conflicts accelerate description {use BLAS from ATLAS} {
     82variant atlas conflicts no_atlas description {use BLAS from ATLAS} {
    8383    depends_lib-append port:atlas
    8484}
    85 variant accelerate conflicts atlas description {use BLAS from Accelerate.framework} {
    86     configure.fflags-append -ff2c
    87     if {![variant_isset g95]} {
    88         configure.args-append   --with-blas="-framework Accelerate"
     85variant no_atlas conflicts atlas description {use BLAS from Accelerate.framework} {
     86    if {[variant_isset g95] || ([string match *64* $build_arch] && ${os.major} == 10)} {
     87        depends_lib-append      port:dotwrp
     88        configure.args-append   --with-blas="-ldotwrp -framework Accelerate"
    8989    }
    9090    configure.args-append   --with-lapack="-framework Accelerate"
    91    
    92     if {[string match *64* $build_arch] && ${os.major} == 10} {
    93         # see http://www.macresearch.org/lapackblas-fortran-106#comment-17217
    94         pre-fetch {
    95             return -code error "Accelerate.framework cannot be used by 64-bit FORTRAN code on Snow Leopard."
    96         }
    97     }
    9891}
    9992if {[variant_isset g95]} {
    100     default_variants +accelerate
    101 } elseif {![variant_isset accelerate]} {
     93    default_variants +no_atlas
     94} elseif {![variant_isset no_atlas]} {
    10295    default_variants +atlas
    10396}
    104 if {![variant_isset atlas] && ![variant_isset accelerate]} {
     97if {![variant_isset atlas] && ![variant_isset no_atlas]} {
    10598    pre-fetch {
    10699        return -code error "You must use either the atlas or accelerate variant."
    107100    }
     
    122115    configure.compiler      macports-gcc-4.5
    123116}
    124117
    125 variant g95 description {build with g95} requires accelerate conflicts atlas gcc43 gcc44 gcc45 {
     118variant g95 description {build with g95} requires no_atlas conflicts atlas gcc43 gcc44 gcc45 {
    126119    depends_build-append    port:g95
    127     depends_lib-append  port:dotwrp
    128120    configure.f77       "${prefix}/bin/g95"
    129     configure.args-append   --with-blas="-ldotwrp -framework Accelerate"
    130 }
     121}
     122
     123variant accelerate requires no_atlas description {compatibility variant} {}
    131124
    132125if { ![variant_isset gcc43] && ![variant_isset gcc45] && ![variant_isset g95] } {
    133126    default_variants +gcc44