# -*- 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
PortGroup linear_algebra 1.0
maintainers {dstrubbe @dstrubbe} openmaintainer
description Plane-wave density-functional theory code
long_description An integrated suite of open-source computer codes for electronic-structure \
calculations and materials modeling at the nanoscale. It is based on density-functional \
theory, plane waves, and pseudopotentials. \
This package will build pw, pp, ld1, upf, cp, and ph.
homepage http://www.quantum-espresso.org
master_sites https://gitlab.com/QEF/q-e/-/archive/qe-${version}
checksums rmd160 792ecd97ee33fab46faa9a653cbee9bed18d5999 \
sha256 b0d7e9f617b848753ad923d8c6ca5490d5d82495f82b032b71a0ff2f2e9cfa08 \
depends_lib-append port:fftw-3
distname q-e-qe-${version}
autoconf.dir ${worksrcpath}/install
patch-install-m4-x_ac_qe_f90.m4.diff \
patch-install-m4-x_ac_qe_mpif90.m4.diff \
# g95 is not compatible with OpenMP
mpi.setup default require_fortran -g95
if {[mpi_variant_isset]} {
if {![catch {sysctl hw.ncpu} result]} {
set n2jobs [expr {$result*2}]
reinplace -W ${worksrcpath} "s|PARA_PREFIX=\" \"||" environment_variables
reinplace -W ${worksrcpath} "s|PARA_PREFIX=\"mpirun -np 4\"|PARA_PREFIX=\"${mpi.exec} -n ${njobs}\"|" environment_variables
reinplace -W ${worksrcpath} "s|PARA_IMAGE_PREFIX=\"mpirun -np 4\"|PARA_IMAGE_PREFIX=\"${mpi.exec} -n ${n2jobs}\"|" environment_variables
# there is now a testsuite, 'make test-suite'
# note: this will download some pseudopotentials and maybe other stuff