Files

164 lines
5.7 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 legacysupport 1.1
PortGroup mpi 1.0
PortGroup gitlab 1.0
PortGroup boost 1.0
# On <10.15 built-in libc++ has no support for std::filesystem
legacysupport.newest_darwin_requires_legacy 18
legacysupport.use_mp_libcxx yes
gitlab.instance https://gitlab.nektar.info
gitlab.setup nektar nektar 5.9.0 v
boost.version 1.87
name nektarpp
revision 0
categories science
license MIT
homepage https://www.nektar.info/
maintainers {xyloid.org:dave @mdave} openmaintainer
description spectral/hp element framework
long_description Nektar++ is a spectral/hp element framework which aims to be easy \
to use and support a wide range of features, including 1D, 2D and \
3D element support, hybrid shaped elements and continuous and \
discontinuous implementations. As well as a modern C++ API, it \
ships with a range of solvers including CFD, advection-diffusion \
equations and cardiac electrophysiology.
# Additional dependencies for Tetgen and Triangle
master_sites ${master_sites}:main \
${homepage}thirdparty/:thirdparty
set main_distfile ${distfiles}
distfiles ${main_distfile}:main
checksums nektar-5.9.0.tar.bz2 \
rmd160 e45b6efc6bad1d9632942c3e31b7935ce792bba4 \
sha256 927ea415863e6bc9a264474a2489b02ffcfc8906ed01192ef8cba2c4a5d641d0 \
size 75295891
# Only the full Nektar++ source should be extracted - CMake will extract any
# third-party dependencies.
extract.only ${main_distfile}
patchfiles no-homebrew.patch \
system-pybind11.patch
compiler.cxx_standard 2017
cmake.build_type Release
mpi.setup
depends_lib-append port:arpack \
port:fftw-3 \
port:opencascade \
port:scotch \
port:tetgen \
port:tinyxml \
port:triangle \
port:vtk \
port:zlib
# Don't build demos and tests by default.
configure.args-append -DNEKTAR_BUILD_DEMOS=OFF \
-DNEKTAR_ERROR_ON_WARNINGS=OFF \
-DNEKTAR_BUILD_TESTS=OFF \
-DNEKTAR_BUILD_UNIT_TESTS=OFF \
-DNEKTAR_SOLVER_DIFFUSION=OFF \
-DNEKTAR_SOLVER_DUMMY=OFF \
-DNEKTAR_SOLVER_ELASTICITY=OFF \
-DNEKTAR_SOLVER_MMF=OFF \
-DNEKTAR_USE_ARPACK=ON \
-DNEKTAR_USE_FFTW=ON \
-DNEKTAR_USE_MESHGEN=ON \
-DNEKTAR_USE_SCOTCH=ON \
-DNEKTAR_USE_VTK=ON
variant petsc description {
Enable PETSc support for linear algebra solvers.
} {
depends_lib-append port:petsc
configure.args-append \
-DNEKTAR_USE_PETSC=ON
}
if {[mpi_variant_isset]} {
distfiles-append gsmpi-1.2.1_2.tar.bz2:thirdparty
checksums-append gsmpi-1.2.1_2.tar.bz2 \
rmd160 9f5bfcb6a93e77287a1bde8c4f2062b1e839829d \
sha256 ddd97ee9750f5425de144e10e39e8959d6f96d7f7c8e174f5107bc30dad4f48a \
size 39835
depends_lib-append port:hdf5
require_active_variants hdf5 [mpi_variant_name]
require_active_variants scotch [mpi_variant_name]
configure.args-append \
-DNEKTAR_USE_HDF5=ON \
-DNEKTAR_USE_MPI=ON
}
variant oce description {
use Community Edition version of OpenCASCADE
} {
depends_lib-replace port:opencascade port:oce
}
# NOTE: v5.2.0 looking for OCE before OpenCASCADE, disable when it doesn't required
if {![variant_isset oce]} {
post-patch {
reinplace "/FIND_PACKAGE\(OCE /s/^/#/g" ${worksrcpath}/cmake/FindOCC.cmake
}
}
post-extract {
# Copy additional third-party sources into correct position.
file mkdir ${worksrcpath}/ThirdParty
foreach distfile ${distfiles} {
set distfile [lindex [split ${distfile} :] 0]
if {${distfile} ne ${main_distfile}} {
copy ${distpath}/${distfile} ${worksrcpath}/ThirdParty/
}
}
}
set pythons_suffixes {310 311 312 313}
set pythons_ports {}
foreach s ${pythons_suffixes} {
lappend pythons_ports python${s}
}
foreach s ${pythons_suffixes} {
set p python${s}
set v [string index ${s} 0].[string range ${s} 1 2]
set pe ${prefix}/bin/python${v}
set i [lsearch -exact ${pythons_ports} ${p}]
set c [lreplace ${pythons_ports} ${i} ${i}]
variant ${p} description "Build the Python ${v} bindings" conflicts {*}${c} "
depends_lib-append port:${p} \
port:py${s}-numpy \
port:pybind11
configure.args-append -DNEKTAR_BUILD_PYTHON=ON \
-DPYTHON_EXECUTABLE=${pe}
# Install Python libraries using setup.py.
post-destroot {
system -W ${build.dir}/python \"${pe} setup.py install --root=${destroot}\"
}
require_active_variants boost ${p}
require_active_variants boost-numpy ${p}
require_active_variants vtk ${p}
"
}