source: trunk/dports/math/arpack/Portfile @ 145625

Last change on this file since 145625 was 145625, checked in by mmoll@…, 4 years ago

math/arpack: add missing dependency. likely fix for #50596

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 3.2 KB
Line 
1# -*- 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
2# $Id: Portfile 145625 2016-02-11 15:09:45Z mmoll@macports.org $
3
4PortSystem          1.0
5PortGroup           active_variants 1.1
6PortGroup           muniversal 1.0
7PortGroup           mpi 1.0
8PortGroup           github 1.0
9
10github.setup        opencollab arpack-ng 3.3.0
11name                arpack
12revision            3
13categories          math
14license             BSD
15platforms           darwin
16maintainers         openmaintainer mmoll
17description         Package for solving large-scale eigenvalue problems
18long_description    ARPACK is a collection of Fortran77 subroutines designed to \
19                    solve large scale eigenvalue problems. Parallel ARPACK (PARPACK) \
20                    is included if built with an MPI variant.
21worksrcdir          ${name}-ng-${version}
22
23checksums           rmd160  76f87a65f9c6e6a2a8d5e31acc2e404fd755b473 \
24                    sha256  2d3d0d802fb60a26502c7cace31ef0066ede2b00c193fb2bca437ee54185b617
25
26mpi.setup           require_fortran
27
28use_autoreconf      yes
29configure.args      home=${worksrcpath} --disable-mpi
30
31if {![variant_isset universal]} {
32    if {${build_arch} eq "x86_64" || ${build_arch} eq "ppc64"} {
33        configure.fflags-append -m64
34    } else {
35        configure.fflags-append -m32
36    }
37}
38
39# LDFLAGS needs to be cleared to avoid it having a "-arch" option, considered illegal by gfortran
40# also, if it has ${prefix}/lib it will prevent +accelerate from working if atlas is present.
41configure.args-append LDFLAGS=''
42
43pre-configure {
44    if {${os.platform} eq "darwin" && ${os.major} < 9} {
45        ui_error "${name} ${version} requires Mac OS X 10.5 or greater"
46        return -code error "incompatible Mac OS X version"
47    }
48
49    if {[mpi_variant_isset]} {
50        configure.args-delete  --disable-mpi
51        configure.args-append  --enable-mpi
52        configure.args-append  F77=${mpi.f77} \
53                               MPIF77=${mpi.f77}
54    }
55}
56
57# Fortran compilers can not cross-compile
58if {${os.arch} eq "i386"} {
59    set universal_archs_supported "i386 x86_64"
60} else {
61    set universal_archs_supported "ppc ppc64"
62}
63
64variant accelerate conflicts atlas openblas description {build with Accelerate framework} {
65    depends_lib-append port:vecLibFort
66    configure.args-append --with-blas="-L${prefix}/lib -lvecLibFort"
67}
68
69variant atlas conflicts accelerate openblas description {build with atlas} {
70    depends_lib-append port:atlas
71    configure.args-append --with-blas="-L${prefix}/lib -lsatlas"
72}
73
74variant openblas conflicts accelerate atlas description {build with openblas} {
75    require_active_variants openblas lapack
76    depends_lib-append path:lib/libopenblas.dylib:OpenBLAS
77    configure.args-append --with-blas="-L${prefix}/lib -lopenblas"
78}
79
80if {![variant_isset atlas] && ![variant_isset openblas]} {
81    default_variants +accelerate
82}
83
84if {![variant_isset accelerate] && ![variant_isset openblas] && ![variant_isset atlas] } {
85    ui_error "\n\nYou must select either the +accelerate, +atlas, or +openblas variant.\n"
86    return -code error "Invalid variant selection"
87}
88
89post-destroot {
90    reinplace "s|/usr|${prefix}|g" ${destroot}${prefix}/lib/pkgconfig/arpack.pc
91}
92
93test.run    yes
94test.target check
Note: See TracBrowser for help on using the repository browser.