# -*- 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 # $Id$ PortSystem 1.0 PortGroup bitbucket 1.0 PortGroup cmake 1.0 PortGroup mpi 1.0 bitbucket.setup fenics-project dolfin 2016.1.0 dolfin- revision 1 categories math license LGPL-3+ platforms darwin universal_variant no maintainers sean openmaintainer description DOLFIN is a part of FEniCS long_description DOLFIN is a library that functions as the main user interface of FEniCS checksums rmd160 4a8f9c21a947b204338c9cf17f2cbe642f64190e \ sha256 0db95c8f193fd56d741cb90682e0a6a21e366c4f48d33e1eb501d2f98aa1a05b mpi.setup require configure.args-append \ -DPYTHON_EXECUTABLE:FILEPATH=${prefix}/bin/python2.7 \ -DPYTHON_INCLUDE_DIR:PATH=${frameworks_dir}/Python.framework/Headers \ -DPYTHON_LIBRARY:FILEPATH=${prefix}/lib/libpython2.7.dylib \ -DDOLFIN_INSTALL_PYTHON_MODULE_DIR=${frameworks_dir}/Python.framework/Versions/2.7/lib/python2.7/site-packages \ -DDOLFIN_INSTALL_PYTHON_PURE_MODULE_DIR=${frameworks_dir}/Python.framework/Versions/2.7/lib/python2.7/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 depends_build-append \ port:pkgconfig depends_lib-append port:python27 \ port:py27-ply \ port:armadillo \ port:py27-ffc \ port:vtk \ port:eigen3 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/python2.7,' {} +" } # 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:cgal 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:py27-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-2.7 } 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 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:py27-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:py27-slepc4py configure.args-delete -DDOLFIN_ENABLE_SLEPC4PY:BOOL=OFF configure.args-append -DDOLFIN_ENABLE_SLEPC4PY:BOOL=ON } default_variants +suitesparse