Permalink
Fetching contributors…
Cannot retrieve contributors at this time
92 lines (78 sloc) 2.98 KB
# -*- 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
PortSystem 1.0
PortGroup muniversal 1.0
PortGroup mpi 1.0
PortGroup github 1.0
PortGroup linear_algebra 1.0
PortGroup cxx11 1.1
github.setup opencollab arpack-ng 3.6.2
name arpack
revision 0
categories math
license BSD
platforms darwin
maintainers openmaintainer {mmoll @mamoll}
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 fd421729b8073fae025613cf6188fa2cda90a52b \
sha256 9ff13f286ec78c9914be9b9dc255774b067627f89d5d5ff93585714ae7797877 \
size 968959
mpi.setup require_fortran
use_autoreconf yes
configure.args home=${worksrcpath} --disable-mpi
# add missing arch flags to one Makefile
patchfiles-append patch-Makefile.am.diff
if {![variant_isset universal]} {
post-configure {
if {${build_arch} eq "x86_64" || ${build_arch} eq "ppc64"} {
set arch_flag -m64
} else {
set arch_flag -m32
}
reinplace \
"s|@MACPORTS_ARCH_FLAGS@|${arch_flag}|g" \
${worksrcpath}/PARPACK/SRC/MPI/Makefile
}
} else {
post-configure {
foreach arch ${configure.universal_archs} {
reinplace \
"s|@MACPORTS_ARCH_FLAGS@|[muniversal_get_arch_flag ${arch} fortran]|g" \
${worksrcpath}-${arch}/PARPACK/SRC/MPI/Makefile
}
}
}
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 {
configure.args-append --with-blas="-L${prefix}/lib ${linalglib}"
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"
}
test.run yes
test.target check