/
Portfile
97 lines (82 loc) · 3.19 KB
/
Portfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
# -*- 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
github.setup opencollab arpack-ng 3.9.1
name arpack
revision 1
categories math
license BSD
platforms darwin
maintainers nomaintainer
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 8d9e9cd6754a4222e6dcd09cbe32bdcfd6be26d2 \
sha256 979ff2bfac27577250a60c78ae377e656f6484c66600376a6735ec3eeb506fe7 \
size 1020716
depends_build-append \
port:pkgconfig
compiler.cxx_standard 2011
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 {!${universal_possible} || ![variant_isset universal]} {
post-configure {
if {${build_arch} eq "arm64" || ${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 {!${universal_possible} || ![variant_isset universal]} {
if {${build_arch} eq "arm64" || ${build_arch} eq "x86_64" || ${build_arch} eq "ppc64"} {
configure.fflags-append -m64
} else {
configure.fflags-append -m32
}
if { ${compilers.gcc_default} eq "gcc10"} {
configure.fflags-append -fallow-argument-mismatch
}
}
# 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=''
# Enable ISO_C_BINDING support.
# This requires compiler support, and is supported by GNU Fortran 4.3 or later.
configure.args-append --enable-icb
pre-configure {
configure.args-append --with-blas="-L${prefix}/lib ${linalglib}"
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