Ticket #39352: Portfile-arpack.diff

File Portfile-arpack.diff, 3.4 KB (added by dstrubbe (David Strubbe), 11 years ago)
  • Portfile

    old new  
    1313description             Package for solving large scale eigenvalue problems
    1414long_description  \
    1515    ARPACK is a collection of Fortran77 subroutines designed to solve large \
    16     scale eigenvalue problems.
     16    scale eigenvalue problems. Parallel ARPACK (PARPACK) is included if built with an MPI variant.
    1717homepage            http://forge.scilab.org/index.php/p/arpack-ng
    1818master_sites        ${homepage}/downloads/497
    1919distfiles           get
     
    2323                    rmd160  2c55eca384cc0a1aebacdef527f88426932bf57b
    2424worksrcdir          ${name}-ng_${version}
    2525
    26 # openmpi does not have a universal variant
    27 universal_variant   no
    28 configure.args-append --enable-mpi home=${worksrcpath}
     26configure.args-append home=${worksrcpath}
     27# LDFLAGS needs to be defined here to avoid it having also a "-arch" option, considered illegal by gfortran
    2928if { ${build_arch}=="x86_64" || ${build_arch}=="ppc64" } {
    3029    configure.args-append FFLAGS='-O2 -m64' LDFLAGS='-L${prefix}/lib'
    3130} else {
    3231    configure.args-append FFLAGS='-O2 -m32' LDFLAGS='-L${prefix}/lib'
    3332}
    3433
    35 pre-fetch { 
    36         if {"darwin" == ${os.platform} && ${os.major} < 9} { 
    37                 ui_error "${name} ${version} requires Mac OS X 10.5 or greater" 
    38                 return -code error "incompatible Mac OS X version" 
    39         } 
     34pre-fetch {
     35        if {"darwin" == ${os.platform} && ${os.major} < 9} {
     36                ui_error "${name} ${version} requires Mac OS X 10.5 or greater"
     37                return -code error "incompatible Mac OS X version"
     38        }
    4039}
    4140
    42 
    4341# Fortran compilers can not cross-compile
    4442if { ${os.arch}=="i386" } {
    4543    set universal_archs_supported "i386 x86_64"
     
    4745    set universal_archs_supported "ppc ppc64"
    4846}
    4947
    50 variant openmpi description {build with OpenMPI} conflicts mpich {
    51     depends_lib-append port:openmpi
    52     configure.env-append MPIF77=${prefix}/bin/openmpif77
     48variant openmpi description {build PARPACK, with OpenMPI} conflicts mpich universal {
     49    depends_lib-append    port:openmpi
     50    configure.args-append --enable-mpi
     51    configure.env-append  MPIF77=${prefix}/bin/openmpif77
    5352}
    5453
    55 variant mpich description {build with MPICH} conflicts openmpi {
    56     depends_lib-append path:bin/mpicc:mpich
    57     configure.env-append MPIF77=${prefix}/bin/mpif77
     54variant mpich description {build PARPACK, with MPICH} conflicts openmpi {
     55    depends_lib-append    path:bin/mpif77:mpich
     56    configure.args-append --enable-mpi
     57    configure.env-append  MPIF77=${prefix}/bin/mpif77
    5858}
    5959
    6060if {![variant_isset mpich]} {
     
    9595        default_variants      +gcc47
    9696}
    9797
    98 # warning: this is ignored if atlas is installed
    9998variant accelerate conflicts atlas description {build with Accelerate framework} {
    100     configure.args-append --with-lapack=/usr/lib/liblapack.dylib
     99    configure.args-append --with-blas=/usr/lib/libblas.dylib --with-lapack=/usr/lib/liblapack.dylib
    101100    patchfiles-append patch-ARPACK-cdot-and-zdot.diff
    102101    if {[variant_isset openmpi] || [variant_isset mpich]} {
    103102        patchfiles-append patch-PARPACK-cdot-and-zdot.diff
     
    106105
    107106variant atlas description {build with atlas} {
    108107    depends_lib-append port:atlas
    109     patchfiles-append patch-configure-atlas.diff
    110     configure.args-append --with-lapack=${prefix}/lib/libtatlas.dylib
     108    configure.args-append --with-blas=${prefix}/lib/libsatlas.dylib
    111109}
    112110
    113111if {![variant_isset atlas]} {