# -*- 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 mpi 1.0
PortGroup linear_algebra 1.0
name octopus
version 7.2
revision 1
categories science
platforms darwin
license GPL-2+
maintainers {dstrubbe @dstrubbe}
description A real-space (time-dependent) density-functional theory code.
long_description Octopus is a scientific program aimed at ab initio virtual experimentation \
on a hopefully ever-increasing range of system types. \
Electrons are described quantum-mechanically within density-functional \
theory (DFT), in its time-dependent form (TDDFT) when doing simulations \
in time. Nuclei are described classically as point particles. Electron-nucleus \
interaction is described within the pseudopotential approximation.
homepage http://www.tddft.org/programs/octopus
master_sites ${homepage}/download/${version}
checksums rmd160 695a22404ab2ce0efbd5555be1077f61ff0d430c \
sha256 f5589f14ff30d5a960af697fb4ab71daf4f3e2d19dd6e5229cd2b62f0eaeff0f
# clang38: errors on operate.o
compiler.blacklist macports-clang-3.8
# clang versions are unnecessary
mpi.setup require_fortran -clang
# this incorrectly passes if libxc +gcc5, octopus +mpich, mpich-default +gcc49
compilers.enforce_fortran libxc
compilers.enforce_some_fortran fftw-3
depends_lib port:libxc port:fftw-3 port:gsl
configure.args --with-libxc-prefix=${prefix} --with-fftw-prefix=${prefix} \
--disable-gdlib --without-sparskit --with-netcdf-prefix=no \
--with-etsf-io-prefix=no --with-berkeleygw-prefix=no \
--with-arpack=no --with-parpack=no --with-feast=no \
--with-isf-prefix=no --with-pnfft-prefix=no --with-metis-prefix=no \
--with-parmetis-prefix=no --with-libfm=no --with-pfft-prefix=no \
--with-pspio-prefix=no --with-nfft=no --with-blacs=no \
--with-scalapack=no
# configure will find and use these other libraries unless they are explicitly disabled
configure.optflags -O3
# FIXME: does fortran default variant not happen in time to make fftw-3 get
# installed +gcc48?
# gfortran -> gfortran5?
if {[mpi_variant_isset]} {
configure.args-delete --disable-mpi
configure.args-append --enable-mpi
}
pre-configure {
configure.args-append --with-blas="-L${prefix}/lib ${linalglib}"
# not necessary unless mixing clang++ and gfortran;
# found automatically when using MPI wrappers
if {![gcc_variant_isset] && ![mpi_variant_isset]} {
configure.ldflags-append "-lc++"
}
}
# libxc does not have universal variant, so octopus cannot either
universal_variant no
test.run yes
test.target check
pre-test {
if {[mpi_variant_isset]} {
test.env-append MPIEXEC=${prefix}/bin/${mpi.exec}
}
# test infrastructure uses /bin/ps for job parallelism which is forbidden by sandboxing
append portsandbox_profile " (allow process-exec (literal \"/bin/ps\") (with no-profile))"
}
variant threads description {Build with OpenMP and threaded libraries} {
configure.args-append --enable-openmp
}
variant netcdf description {Build with support for NetCDF output} {
configure.args-delete --with-netcdf-prefix=no
configure.args-append --with-netcdf-prefix=${prefix}