mirror of
https://github.com/macports/macports-ports.git
synced 2026-07-12 18:20:25 -07:00
167 lines
6.8 KiB
Plaintext
167 lines
6.8 KiB
Plaintext
# -*- coding: utf-8; mode: tcl; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 4; truncate-lines: t -*- vim:fenc=utf-8:et:sw=4:ts=4:sts=4
|
|
|
|
PortSystem 1.0
|
|
PortGroup bitbucket 1.0
|
|
PortGroup cmake 1.1
|
|
PortGroup mpi 1.0
|
|
|
|
bitbucket.setup fenics-project dolfin 2019.1.0
|
|
revision 3
|
|
categories math
|
|
license LGPL-3+
|
|
platforms darwin
|
|
universal_variant no
|
|
maintainers nomaintainer
|
|
description DOLFIN is a part of FEniCS
|
|
long_description DOLFIN is a library that functions as the main user interface of FEniCS
|
|
|
|
checksums rmd160 ce75ed93b3f111364444e2e337add3408b81fa4c \
|
|
sha256 42b30031ea77089304b2d986212b4fab54b3dc216041bda4b7a946a9bd6e10a1 \
|
|
size 6542964
|
|
|
|
mpi.setup require
|
|
|
|
set python.version 312
|
|
set python.branch [string index ${python.version} 0].[string range ${python.version} 1 end]
|
|
|
|
patchfiles-append patch-VTK.diff
|
|
|
|
configure.args-append \
|
|
-DBOOST_ROOT=${prefix}/libexec/boost/1.76 \
|
|
-DPYTHON_EXECUTABLE:FILEPATH=${prefix}/bin/python${python.branch} \
|
|
-DPYTHON_INCLUDE_DIR:PATH=${frameworks_dir}/Python.framework/Headers \
|
|
-DDOLFIN_INSTALL_PYTHON_MODULE_DIR=${frameworks_dir}/Python.framework/Versions/${python.branch}/lib/python${python.branch}/site-packages \
|
|
-DDOLFIN_INSTALL_PYTHON_PURE_MODULE_DIR=${frameworks_dir}/Python.framework/Versions/${python.branch}/lib/python${python.branch}/site-packages \
|
|
-DDOLFIN_ENABLE_CGAL:BOOL=OFF \
|
|
-DDOLFIN_ENABLE_DOCS:BOOL=OFF \
|
|
-DDOLFIN_ENABLE_HDF5:BOOL=OFF \
|
|
-DDOLFIN_ENABLE_MPI:BOOL=ON \
|
|
-DDOLFIN_ENABLE_PARMETIS:BOOL=OFF \
|
|
-DDOLFIN_ENABLE_PETSC:BOOL=OFF \
|
|
-DDOLFIN_ENABLE_PETSC4PY:BOOL=OFF \
|
|
-DDOLFIN_ENABLE_SCOTCH:BOOL=OFF \
|
|
-DDOLFIN_ENABLE_SLEPC:BOOL=OFF \
|
|
-DDOLFIN_ENABLE_SLEPC4PY:BOOL=OFF \
|
|
-DDOLFIN_ENABLE_SPHINX:BOOL=OFF \
|
|
-DDOLFIN_ENABLE_TRILINOS:BOOL=OFF \
|
|
-DDOLFIN_ENABLE_CHOLMOD:BOOL=OFF \
|
|
-DDOLFIN_ENABLE_UMFPACK:BOOL=OFF \
|
|
-DDOLFIN_ENABLE_PASTIX:BOOL=OFF \
|
|
-DDOLFIN_ENABLE_SUNDIALS:BOOL=OFF
|
|
|
|
depends_build-append \
|
|
port:pkgconfig
|
|
|
|
depends_lib-append port:armadillo \
|
|
port:boost176 \
|
|
path:share/pkgconfig/eigen3.pc:eigen3 \
|
|
port:py${python.version}-ffc \
|
|
port:py${python.version}-ply
|
|
|
|
mpi.enforce_variant \
|
|
armadillo boost176
|
|
|
|
configure.post_args ..
|
|
configure.dir ${worksrcpath}/build
|
|
build.dir ${worksrcpath}/build
|
|
|
|
post-patch {
|
|
file mkdir ${worksrcpath}/build
|
|
# delete the message telling users to source a bash file, which is unneeded
|
|
# for the macports version
|
|
delete ${worksrcpath}/cmake/post-install/
|
|
reinplace "s,add_subdirectory(cmake/post-install),," ${worksrcpath}/CMakeLists.txt
|
|
|
|
# we also need to find and replace all instances of '/usr/bin/env python'
|
|
system -W ${worksrcpath} "find . -type f -exec /usr/bin/perl -pi -e 's,/usr/bin/env python,${prefix}/bin/python3.6,' {} +"
|
|
}
|
|
|
|
# dolfin's configure seems to be too good at find default compilers so we
|
|
# explicitly set them here
|
|
pre-configure {
|
|
mpi.enforce_variant boost
|
|
configure.args-append \
|
|
-DCMAKE_C_COMPILER=${configure.cc} \
|
|
-DCMAKE_CXX_COMPILER=${configure.cxx} \
|
|
-DCMAKE_Fortran_COMPILER=${configure.fc} \
|
|
-DMPI_C_COMPILER=${mpi.cc} \
|
|
-DMPI_CXX_COMPILER=${mpi.cxx} \
|
|
-DMPI_Fortran_COMPILER=${mpi.fc} \
|
|
-DMPIEXEC=${mpi.exec}
|
|
}
|
|
|
|
variant cgal description {Build with CGAL interface} {
|
|
depends_lib-append port:cgal4
|
|
configure.args-delete -DDOLFIN_ENABLE_CGAL:BOOL=OFF
|
|
configure.args-append -DDOLFIN_ENABLE_CGAL:BOOL=ON
|
|
}
|
|
|
|
variant docs description {Build documentation} {
|
|
depends_lib-append port:py${python.version}-sphinx
|
|
configure.args-delete -DDOLFIN_ENABLE_DOCS:BOOL=OFF \
|
|
-DDOLFIN_ENABLE_SPHINX:BOOL=OFF
|
|
configure.args-append -DDOLFIN_ENABLE_DOCS:BOOL=ON \
|
|
-DDOLFIN_ENABLE_SPHINX:BOOL=ON \
|
|
-DSPHINX_EXECUTABLE:FILEPATH=${prefix}/bin/sphinx-build-${python.branch}
|
|
}
|
|
|
|
variant hdf5 description {Build with HDF5 interface} {
|
|
depends_lib-append port:hdf5
|
|
configure.args-delete -DDOLFIN_ENABLE_HDF5:BOOL=OFF
|
|
configure.args-append -DDOLFIN_ENABLE_HDF5:BOOL=ON
|
|
mpi.enforce_variant hdf5
|
|
}
|
|
|
|
variant parmetis description {Build with parmetisinterface} {
|
|
depends_lib-append port:parmetis
|
|
configure.args-delete -DDOLFIN_ENABLE_PARMETIS:BOOL=OFF
|
|
configure.args-append -DDOLFIN_ENABLE_PARMETIS:BOOL=ON
|
|
mpi.enforce_variant parmetis
|
|
}
|
|
|
|
variant scotch description {Build with SCOTCH interface} {
|
|
depends_lib-append port:scotch
|
|
configure.args-delete -DDOLFIN_ENABLE_SCOTCH:BOOL=OFF
|
|
configure.args-append -DDOLFIN_ENABLE_SCOTCH:BOOL=ON
|
|
mpi.enforce_variant scotch
|
|
}
|
|
|
|
variant suitesparse description {Build with SuiteSparse interface} {
|
|
depends_lib-append port:SuiteSparse_UMFPACK port:SuiteSparse_AMD
|
|
configure.args-delete -DDOLFIN_ENABLE_CHOLMOD:BOOL=OFF \
|
|
-DDOLFIN_ENABLE_UMFPACK:BOOL=OFF
|
|
configure.args-append -DDOLFIN_ENABLE_CHOLMOD:BOOL=ON \
|
|
-DDOLFIN_ENABLE_UMFPACK:BOOL=ON
|
|
}
|
|
|
|
variant petsc description {Build with PETSc interface} {
|
|
# dolfin assumes too much about petsc on the mac so we patch the cmake
|
|
# files to remove this special logic
|
|
depends_lib-append port:petsc
|
|
configure.args-delete -DDOLFIN_ENABLE_PETSC:BOOL=OFF
|
|
configure.args-append -DDOLFIN_ENABLE_PETSC:BOOL=ON
|
|
configure.env-append PETSC_DIR=${prefix}/lib/petsc PETSC_ARCH=
|
|
mpi.enforce_variant petsc
|
|
}
|
|
|
|
variant petsc4py description {Build with PETSc4py interface} requires petsc {
|
|
depends_lib-append port:py${python.version}-petsc4py
|
|
configure.args-delete -DDOLFIN_ENABLE_PETSC4PY:BOOL=OFF
|
|
configure.args-append -DDOLFIN_ENABLE_PETSC4PY:BOOL=ON
|
|
}
|
|
|
|
variant slepc description {Build with SLEPc interface} requires petsc {
|
|
depends_lib-append port:slepc
|
|
configure.args-delete -DDOLFIN_ENABLE_SLEPC:BOOL=OFF
|
|
configure.args-append -DDOLFIN_ENABLE_SLEPC:BOOL=ON
|
|
configure.env-append SLEPC_DIR=${prefix}/lib/slepc
|
|
}
|
|
|
|
variant slepc4py description {Build with SLEPc4py interface} requires slepc {
|
|
depends_lib-append port:py${python.version}-slepc4py
|
|
configure.args-delete -DDOLFIN_ENABLE_SLEPC4PY:BOOL=OFF
|
|
configure.args-append -DDOLFIN_ENABLE_SLEPC4PY:BOOL=ON
|
|
}
|
|
|
|
default_variants +suitesparse
|