# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4 # $Id$ PortSystem 1.0 PortGroup python 1.0 PortGroup active_variants 1.1 PortGroup github 1.0 PortGroup compilers 1.0 github.setup scipy scipy 0.18.1 v name py-scipy checksums rmd160 1d1f01fb55e0bb779f65cfcecdac2e99fd775285 \ sha256 7216840b0db191fd2fddccb3ed4eb4d773cf7d9f31b75bc8402d72c2cff214ab platforms darwin license BSD maintainers sean michaelld openmaintainer description An opensource library of scientific tools for Python long_description ${description} homepage http://www.scipy.org/ python.versions 26 27 33 34 35 python.add_archflags no universal_variant no compilers.setup require_fortran -clang -dragonegg -gcc44 -gcc45 -gcc46 \ -gcc47 -gcc48 -g95 clang37 livecheck.regex archive/[join ${github.tag_prefix} ""](\[^"r\]+)${extract.suffix} if {${name} ne ${subport}} { depends_lib-append port:py${python.version}-numpy \ port:py${python.version}-nose \ port:swig-python worksrcdir ${distname} build.env-append CCFLAGS="-I${prefix}/include -L${prefix}/lib" destroot.env-append CCFLAGS="-I${prefix}/include -L${prefix}/lib" configure.fflags-append -fno-second-underscore pre-configure { set fc_options "config_fc --fcompiler gnu95 --f77exec ${configure.f77} --f77flags='${configure.f77_archflags} ${configure.fflags}' --f90exec ${configure.f90} --f90flags='${configure.f90_archflags} ${configure.fflags}'" set config_options "config --cc ${configure.cc} --include-dirs ${prefix}/include --library-dirs ${prefix}/lib" build.cmd-append ${fc_options} ${config_options} destroot.cmd-append ${fc_options} ${config_options} build.env-append CC="${configure.cc}" \ CXX="${configure.cxx}" \ CFLAGS="${configure.cc_archflags}" \ CXXFLAGS="${configure.cxx_archflags}" \ CPPFLAGS="${configure.cppflags}" destroot.env-append CC="${configure.cc}" \ CXX="${configure.cxx}" \ CFLAGS="${configure.cc_archflags}" \ CXXFLAGS="${configure.cxx_archflags}" \ CPPFLAGS="${configure.cppflags}" } post-destroot { # for some reason read-world is not set system "chmod -R a+r ${destroot}${prefix}" } variant atlas conflicts openblas description "Use MacPorts ATLAS libraries" { depends_lib-append port:atlas } variant openblas conflicts atlas description "Use MacPorts OpenBLAS Libraries" { depends_lib-append path:lib/libopenblas.dylib:openblas } # Can be removed after 2017-01-22 variant gcc48 requires gfortran description {Legacy compatibility variant} {} if {[variant_isset atlas]} { # use MacPorts atlas build.env-append OPENBLAS=None \ ATLAS=${prefix}/lib \ LAPACK=${prefix}/lib \ BLAS=${prefix}/lib destroot.env-append OPENBLAS=None \ ATLAS=${prefix}/lib \ LAPACK=${prefix}/lib \ BLAS=${prefix}/lib pre-fetch { # scipy needs fortran; so we only need to check if atlas is # compiled with +nofortran if {![catch {set result [active_variants atlas "" nofortran]}]} { if {!$result} { return -code error \ "You have selected the +atlas variant but atlas was built with +nofortran.\ scipy needs a fortran enabled atlas. Please rebuild atlas without the +nofortran\ variant." } } # also check that numpy has the atlas variant active if {![catch {set result [active_variants py${python.version}-numpy atlas ""]}]} { if {!$result} { return -code error \ "You have selected the +atlas variant but py${python.version}-numpy does not\ have the +atlas variant active. Please ensure that numpy is activated with the\ +atlas variant." } } } } elseif {[variant_isset openblas]} { # use MacPorts OpenBLAS build.env-append OPENBLAS=${prefix}/lib \ ATLAS=None destroot.env-append OPENBLAS=${prefix}/lib \ ATLAS=None } else { # use Accelerate BLAS build.env-append OPENBLAS=None \ ATLAS=None \ LAPACK=/usr/lib \ BLAS=/usr/lib destroot.env-append OPENBLAS=None \ ATLAS=None \ LAPACK=/usr/lib \ BLAS=/usr/lib } livecheck.type none }