mirror of
https://github.com/macports/macports-ports.git
synced 2026-07-12 18:20:25 -07:00
See https://github.com/macports/macports-ports/pull/26909#issuecomment-3339115770
126 lines
4.2 KiB
Tcl
126 lines
4.2 KiB
Tcl
# -*- 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 cmake 1.1
|
|
PortGroup github 1.0
|
|
PortGroup mpi 1.0
|
|
|
|
github.setup ginkgo-project ginkgo 1.9.0 v
|
|
revision 0
|
|
categories math parallel
|
|
license BSD
|
|
maintainers nomaintainer
|
|
description Numerical linear algebra software package
|
|
long_description A numerical linear algebra library targeting many-core architectures.
|
|
homepage https://ginkgo-project.github.io
|
|
checksums rmd160 2916de4090486b0497f750572eb4f493b54fb407 \
|
|
sha256 18271e99f81a89cf27102f9d4e84653ae7a0cc745fcda9a7ed486c455553780b \
|
|
size 13180706
|
|
github.tarball_from archive
|
|
|
|
cmake.build_type Release
|
|
|
|
if {${os.platform} eq "darwin" && ${os.arch} eq "powerpc"} {
|
|
mpi.setup require require_fortran \
|
|
-gcc44 -gcc45 -gcc46 -gcc47 -gcc48 -gcc49 -gcc5 \
|
|
-clang -fortran
|
|
} else {
|
|
mpi.setup require require_fortran \
|
|
-gcc44 -gcc45 -gcc46 -gcc47 -gcc48 -gcc49 -gcc5
|
|
}
|
|
|
|
depends_lib-append port:metis
|
|
|
|
compiler.cxx_standard 2014
|
|
|
|
configure.args-append \
|
|
-DBUILD_SHARED_LIBS=ON \
|
|
-DGINKGO_MIXED_PRECISION=ON \
|
|
-DGINKGO_BUILD_MPI=ON \
|
|
-DGINKGO_BUILD_REFERENCE=ON \
|
|
-DGINKGO_BUILD_TESTS=OFF \
|
|
-DGINKGO_BUILD_BENCHMARKS=OFF \
|
|
-DGINKGO_BUILD_CUDA=OFF \
|
|
-DGINKGO_BUILD_DPCPP=OFF \
|
|
-DGINKGO_BUILD_HIP=OFF \
|
|
-DGINKGO_BUILD_DOC=OFF \
|
|
-DGINKGO_BUILD_EXAMPLES=OFF \
|
|
-DGINKGO_BUILD_HWLOC=OFF \
|
|
-DGINKGO_BUILD_OMP=OFF \
|
|
-DGINKGO_DEVEL_TOOLS=OFF \
|
|
-DGINKGO_DOC_GENERATE_EXAMPLES=OFF \
|
|
-DGINKGO_DOC_GENERATE_PDF=OFF \
|
|
-DGINKGO_JACOBI_FULL_OPTIMIZATIONS=OFF \
|
|
-DGINKGO_WITH_CCACHE=OFF \
|
|
-DMPIEXEC_EXECUTABLE=${prefix}/bin/${mpi.exec}
|
|
|
|
if {${configure.ccache}} {
|
|
configure.args-replace \
|
|
-DGINKGO_WITH_CCACHE=OFF \
|
|
-DGINKGO_WITH_CCACHE=ON
|
|
}
|
|
|
|
# Ginkgo does not support HWLOC on MacOS:
|
|
if {${os.platform} ne "darwin"} {
|
|
depends_lib-append \
|
|
port:hwloc
|
|
configure.args-replace \
|
|
-DGINKGO_BUILD_HWLOC=OFF -DGINKGO_BUILD_HWLOC=ON
|
|
}
|
|
|
|
# ___atomic_compare_exchange_8
|
|
if {[string match *gcc* ${configure.compiler}]} {
|
|
configure.ldflags-append -latomic
|
|
}
|
|
|
|
variant openmp description "Use OpenMP" {
|
|
compiler.openmp_version 3.0
|
|
|
|
configure.args-replace \
|
|
-DGINKGO_BUILD_OMP=OFF \
|
|
-DGINKGO_BUILD_OMP=ON
|
|
|
|
if {[string match *clang* ${configure.compiler}]} {
|
|
configure.ldflags-append \
|
|
-L${prefix}/lib/libomp \
|
|
-lomp
|
|
}
|
|
}
|
|
|
|
# FIXME: Upstream has broken this in 1.6.0 for Clang.
|
|
# Issue: https://github.com/ginkgo-project/ginkgo/issues/1482
|
|
# default_variants +openmp
|
|
|
|
variant tests description "Enable testing" {
|
|
# Test failures on PowerPC: https://github.com/ginkgo-project/ginkgo/issues/1260
|
|
# Test failures on aarch64: https://github.com/ginkgo-project/ginkgo/issues/1481
|
|
depends_test-append port:gtest
|
|
|
|
configure.pre_args-replace \
|
|
-DCMAKE_BUILD_WITH_INSTALL_RPATH:BOOL=ON \
|
|
-DCMAKE_BUILD_WITH_INSTALL_RPATH:BOOL=OFF
|
|
|
|
configure.args-replace \
|
|
-DGINKGO_BUILD_TESTS=OFF \
|
|
-DGINKGO_BUILD_TESTS=ON
|
|
|
|
configure.args-append \
|
|
-DGTEST_SRC_DIR=${prefix}/src/googletest/
|
|
|
|
if {${os.arch} eq "powerpc"} {
|
|
# There is some problem with the new hydra on PPC, is freezes at bindings test.
|
|
test.env-append \
|
|
OMP_NUM_THREADS=1
|
|
}
|
|
|
|
test.run yes
|
|
test.cmd ctest
|
|
}
|
|
|
|
platform darwin powerpc {
|
|
# FIXME: Something in multigrid tests freezes the OS badly.
|
|
post-patch {
|
|
reinplace "s|add_subdirectory(multigrid)||" ${worksrcpath}/test/CMakeLists.txt
|
|
}
|
|
}
|