# -*- 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: Portfile 145625 2016-02-11 15:09:45Z mmoll@macports.org $ PortSystem 1.0 PortGroup active_variants 1.1 PortGroup muniversal 1.0 PortGroup mpi 1.0 PortGroup github 1.0 github.setup opencollab arpack-ng 3.3.0 name arpack revision 3 categories math license BSD platforms darwin maintainers openmaintainer mmoll description Package for solving large-scale eigenvalue problems long_description ARPACK is a collection of Fortran77 subroutines designed to \ solve large scale eigenvalue problems. Parallel ARPACK (PARPACK) \ is included if built with an MPI variant. worksrcdir ${name}-ng-${version} checksums rmd160 76f87a65f9c6e6a2a8d5e31acc2e404fd755b473 \ sha256 2d3d0d802fb60a26502c7cace31ef0066ede2b00c193fb2bca437ee54185b617 mpi.setup require_fortran use_autoreconf yes configure.args home=${worksrcpath} --disable-mpi if {![variant_isset universal]} { if {${build_arch} eq "x86_64" || ${build_arch} eq "ppc64"} { configure.fflags-append -m64 } else { configure.fflags-append -m32 } } # LDFLAGS needs to be cleared to avoid it having a "-arch" option, considered illegal by gfortran # also, if it has ${prefix}/lib it will prevent +accelerate from working if atlas is present. configure.args-append LDFLAGS='' pre-configure { if {${os.platform} eq "darwin" && ${os.major} < 9} { ui_error "${name} ${version} requires Mac OS X 10.5 or greater" return -code error "incompatible Mac OS X version" } if {[mpi_variant_isset]} { configure.args-delete --disable-mpi configure.args-append --enable-mpi configure.args-append F77=${mpi.f77} \ MPIF77=${mpi.f77} } } # Fortran compilers can not cross-compile if {${os.arch} eq "i386"} { set universal_archs_supported "i386 x86_64" } else { set universal_archs_supported "ppc ppc64" } variant accelerate conflicts atlas openblas description {build with Accelerate framework} { depends_lib-append port:vecLibFort configure.args-append --with-blas="-L${prefix}/lib -lvecLibFort" } variant atlas conflicts accelerate openblas description {build with atlas} { depends_lib-append port:atlas configure.args-append --with-blas="-L${prefix}/lib -lsatlas" } variant openblas conflicts accelerate atlas description {build with openblas} { require_active_variants openblas lapack depends_lib-append path:lib/libopenblas.dylib:OpenBLAS configure.args-append --with-blas="-L${prefix}/lib -lopenblas" } if {![variant_isset atlas] && ![variant_isset openblas]} { default_variants +accelerate } if {![variant_isset accelerate] && ![variant_isset openblas] && ![variant_isset atlas] } { ui_error "\n\nYou must select either the +accelerate, +atlas, or +openblas variant.\n" return -code error "Invalid variant selection" } post-destroot { reinplace "s|/usr|${prefix}|g" ${destroot}${prefix}/lib/pkgconfig/arpack.pc } test.run yes test.target check