Ticket #36803: Portfile.R-framework.diff

File Portfile.R-framework.diff, 4.7 KB (added by kjellpk (Kjell Konis), 12 years ago)
  • Portfile

    old new  
    1 # $Id: Portfile 98344 2012-10-03 03:05:15Z ryandesign@macports.org $
     1# $Id: Portfile 98006 2012-09-21 21:18:53Z adfernandes@macports.org $
    22
    33PortSystem 1.0
    44
    55set major 2
    66set minor 15
    7 set point 1
     7set point 2
    88
    99name                        R-framework
    1010conflicts                   R
    1111version                     ${major}.${minor}.${point}
    12 revision                    4
    1312categories                  math science
    1413maintainers                 me.com:kjell.konis
    1514license                     {GPL-2 GPL-3}
     
    3534distname                    R-${version}
    3635dist_subdir                 R
    3736
    38 checksums                   rmd160  84a010906424f3e84b84a71236424a8f2bf1df08 \
    39                             sha256  96e4baea9dc7653b9160d7f2e1d321d0f252fee37ceb4273d4c94f0d4d815485
     37checksums                   rmd160  ca20ed9d794df53906802eee2ca32e634f8e8708 \
     38                            sha256  292837ae259b7668509b8a5d4ec8be0aa50c327cfe7a534bac419b4ca766d66d
    4039
    4140depends_build               port:pkgconfig
    4241
     
    6059                            --enable-R-shlib \
    6160                            --enable-BLAS-shlib \
    6261                            --enable-openmp \
    63                             --with-blas="-framework vecLib" \
    64                             --with-lapack="-framework vecLib" \
    6562                            --with-readline \
    6663                            --with-aqua \
    6764                            --without-tcltk \
     
    8481    configure.args-append   --with-cairo
    8582}
    8683
    87 variant debug description {Build with debug symbols} {
     84variant accelerate conflicts atlas builtin_lapack description {build using the BLAS and Lapack in Apple's Accelerate framework} {
     85    configure.args-append   --with-blas="-framework vecLib" \
     86                            --with-lapack="-framework vecLib"
     87}
     88
     89variant atlas conflicts accelerate builtin_lapack description {build using the BLAS and Lapack provided by the atlas port} {
     90    #more in post-destroot phase
     91    configure.args-append   --without-blas --without-lapack
     92}
     93
     94variant builtin_lapack conflicts accelerate atlas description {build using reference BLAS and Lapack} {
     95    configure.args-append   --without-blas --without-lapack
     96}
     97
     98variant debug description {build with debug symbols} {
    8899    configure.optflags-append -g
    89100}
    90101
     
    150161
    151162default_variants +cairo +recommended +tcltk +x11
    152163
     164if {![variant_isset accelerate] && ![variant_isset atlas] && ![variant_isset builtin_lapack]} {
     165    default_variants-append +accelerate
     166}
     167
    153168if {![variant_isset gcc45] && ![variant_isset gcc46] && ![variant_isset gcc47] && ![variant_isset llvm_gcc42]} {
    154169    default_variants-append +llvm_gcc42
    155170}
     
    204219        ${destroot}${resources}/bin/exec/${build_arch}/R"
    205220
    206221    ln -s ${build_arch}/libR.dylib ${destroot}${resources}/lib/libR.dylib
    207     ln -s ${build_arch}/libRblas.dylib ${destroot}${resources}/lib/libRblas.dylib
    208     ln -s ${build_arch}/libRlapack.dylib ${destroot}${resources}/lib/libRlapack.dylib
     222
     223    if {[variant_isset atlas]} {
     224        file delete ${destroot}${resources}/lib/${build_arch}/libRblas.dylib
     225        file delete ${destroot}${resources}/lib/${build_arch}/libRlapack.dylib
     226        ln -s ${prefix}/lib/libtatlas.dylib ${destroot}${resources}/lib/${build_arch}/libRblas.dylib
     227        ln -s ${prefix}/lib/libtatlas.dylib ${destroot}${resources}/lib/${build_arch}/libRlapack.dylib
     228        ln -s ${prefix}/lib/libtatlas.dylib ${destroot}${resources}/lib/libRblas.dylib
     229        ln -s ${prefix}/lib/libtatlas.dylib ${destroot}${resources}/lib/libRlapack.dylib
     230    } else {
     231        ln -s ${build_arch}/libRblas.dylib ${destroot}${resources}/lib/libRblas.dylib
     232        ln -s ${build_arch}/libRlapack.dylib ${destroot}${resources}/lib/libRlapack.dylib
     233    }
    209234
    210235    ln -s ${resources}/bin/R ${destroot}${prefix}/bin/R
    211236    ln -s ${resources}/bin/Rscript ${destroot}${prefix}/bin/Rscript
     
    217242
    218243
    219244
    220 # Hopefully can get rid of this soon
    221 
    222 platform darwin 12 {
    223     configure.args-delete --with-blas="-framework vecLib" --with-lapack="-framework vecLib"
    224     configure.args-append --without-blas --without-lapack
    225     pre-configure {
    226         ui_msg "Temporary Mountain Lion issue: using builtin lapack"
    227     }
    228 }
    229 
    230 if {[variant_isset gcc45] || [variant_isset gcc46]} {
    231     if {${os.platform} == "darwin" && ${os.major} == 12} {
    232         ui_error "This version of the R-framework port does not compile with gcc45 or gcc46 on Mountain Lion"
    233         return -code error "incompatible variant"
    234     }
    235 }
    236 
    237