freebsd-ports/science/fleur/Makefile
Yuri Victorovich 749db82df5 */*: Change DISTVERSION to have a hyphen when it refers to a specific revision
When DISTVERSION contains the real version and a revision modifier,
such modifier should be separated with '-', not '.'
2022-12-01 10:42:20 -08:00

85 lines
3.2 KiB
Makefile

PORTNAME= fleur
DISTVERSION= 6.0-20220715
PORTREVISION= 1
CATEGORIES= science # chemistry
MAINTAINER= yuri@FreeBSD.org
COMMENT= FLAPW code for atomic computations in quantum chemistry and physics
WWW= https://www.flapw.de/master/
LICENSE= MIT
LICENSE_FILE= ${WRKSRC}/LICENSE
BROKEN_aarch64= Fatal Error: Cannot find an intrinsic module named 'ieee_arithmetic' at (1)
LIB_DEPENDS= libfftw3.so:math/fftw3 \
liblapack.so:math/lapack \
libopenblas.so:math/openblas
TEST_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pytest>0:devel/py-pytest@${PY_FLAVOR} \
USES= cmake:noninja fortran gnome localbase:ldflags python:test tar:tgz
USE_GNOME= libxml2
USE_GITLAB= yes
GL_SITE= https://iffgit.fz-juelich.de
GL_COMMIT= a2934446e0eb1fcbf7a69d4d652c969cef0c8c8d
FFLAGS= -I${LOCALBASE}/include
LDFLAGS+= -llapack -lopenblas -lxml2 # to fix missing symbols, see https://iffgit.fz-juelich.de/fleur/fleur/-/issues/670
OPTIONS_DEFINE= HDF5 KPLIB MPI SCALAPACK ELPA LIBXC WANNIER
OPTIONS_DEFAULT= MPI SCALAPACK ELPA WANNIER # HDF5 KPLIB LIBXC
HDF5_CMAKE_BOOL= CLI_FLEUR_USE_HDF5
HDF5_CMAKE_ON= -DHDF5_INCLUDE_DIRS=${LOCALBASE}/include
HDF5_LIB_DEPENDS= libhdf5.so:science/hdf5
HDF5_BROKEN= Missing hdf5.mod in hdf5 # hdf5 doesn't include Fortran binding
KPLIB_DESC= Use kpLib library
#KPLIB_CMAKE_BOOL= CLI_FLEUR_USE_KPLIB
KPLIB_DEPENDS= libkplib.so:science/kplib
KPLIB_BROKEN= Fails to find the pre-installed libkplib.so library, see https://iffgit.fz-juelich.de/fleur/fleur/-/issues/691
MPI_CMAKE_BOOL= CLI_FLEUR_USE_MPI
MPI_LDFLAGS= -lmpich -lmpifort
MPI_LIB_DEPENDS= libmpich.so:net/mpich
MPI_VARS= SUFFIX=_MPI
SCALAPACK_DESC= Use the ScaLAPACK Scalable LAPACK library
SCALAPACK_CMAKE_BOOL= FLEUR_USE_SCALAPACK # no such variable, see https://iffgit.fz-juelich.de/fleur/fleur/-/issues/692, it works only through LDFLAGS set below
SCALAPACK_VARS= FFLAGS+=-fallow-argument-mismatch
SCALAPACK_LDFLAGS= -lscalapack
SCALAPACK_LIB_DEPENDS= libscalapack.so:math/scalapack
SCALAPACK_IMPLIES= MPI
ELPA_DESC= Use libelpa, Eigenvalue SoLver for Petaflop Applications
ELPA_CMAKE_BOOL= FLEUR_USE_ELPA # no such variable, see https://iffgit.fz-juelich.de/fleur/fleur/-/issues/689, it works only through FFLAGS set below
ELPA_VARS= FFLAGS+=-I${LOCALBASE}/include/elpa-2021.11.001/modules
ELPA_LDFLAGS= -lelpa
ELPA_LIB_DEPENDS= libelpa.so:math/elpa
LIBXC_DESC= Use libxc library
LIBXC_CMAKE_BOOL= CLI_FLEUR_USE_LIBXC
LIBXC_LIB_DEPENDS= libxc.so:science/libxc
LIBXC_BROKEN= Silently links with libxc when CLI_FLEUR_USE_LIBXC=OFF, see https://iffgit.fz-juelich.de/fleur/fleur/-/issues/690
WANNIER_DESC= Use Wannier library
WANNIER_CMAKE_BOOL= CLI_FLEUR_USE_WANNIER
WANNIER_LIB_DEPENDS= libwannier.so:science/wannier90
EXECUTABLES= bin/fleur${SUFFIX} \
bin/inpgen
PLIST_FILES= ${EXECUTABLES}
CONFLICTS_BUILD= libxc # see https://iffgit.fz-juelich.de/fleur/fleur/-/issues/690
post-install: # strip
@cd ${STAGEDIR}${PREFIX} && ${STRIP_CMD} ${EXECUTABLES}
do-test:
# now: some tests fail or freeze, possibly because of missing hdf5 and kplib dependencies
# was: 9 testcases are known to fail, see https://iffgit.fz-juelich.de/fleur/fleur/-/issues/671
@cd ${WRKSRC}/tests && pytest ../tests --build_dir=${TEST_WRKSRC}
.include <bsd.port.mk>