git: 9ff296b7c547 - main - science/fleur: Re-add port: FLAPW code for atomic computations in quantum chemistry and physics

From: Yuri Victorovich <yuri_at_FreeBSD.org>
Date: Wed, 05 Jan 2022 09:40:38 UTC
The branch main has been updated by yuri:

URL: https://cgit.FreeBSD.org/ports/commit/?id=9ff296b7c547ab41f0934830d13d0c174ee2701b

commit 9ff296b7c547ab41f0934830d13d0c174ee2701b
Author:     Yuri Victorovich <yuri@FreeBSD.org>
AuthorDate: 2022-01-05 09:39:23 +0000
Commit:     Yuri Victorovich <yuri@FreeBSD.org>
CommitDate: 2022-01-05 09:40:35 +0000

    science/fleur: Re-add port: FLAPW code for atomic computations in quantum chemistry and physics
---
 MOVED                   |  1 -
 science/Makefile        |  1 +
 science/fleur/Makefile  | 71 +++++++++++++++++++++++++++++++++++++++++++++++++
 science/fleur/distinfo  |  3 +++
 science/fleur/pkg-descr |  7 +++++
 5 files changed, 82 insertions(+), 1 deletion(-)

diff --git a/MOVED b/MOVED
index 4e48205d1dc7..d8bbf2825dba 100644
--- a/MOVED
+++ b/MOVED
@@ -15314,7 +15314,6 @@ graphics/backfract||2020-08-27|Has expired: Broken for more than 6 months
 japanese/kanjipad||2020-08-27|Has expired: Broken for more than 6 months
 japanese/xdtp||2020-08-27|Has expired: Broken for more than 6 months
 net/hinfo||2020-08-27|Has expired: Broken for more than 6 months
-science/fleur||2020-08-27|Has expired: Broken for more than 6 months
 science/lm||2020-08-27|Has expired: Broken for more than 6 months
 security/ddos_scan||2020-08-27|Has expired: Broken for more than 6 months
 security/gag||2020-08-27|Has expired: Broken for more than 6 months
diff --git a/science/Makefile b/science/Makefile
index addb46a165d5..935c95f81d8d 100644
--- a/science/Makefile
+++ b/science/Makefile
@@ -81,6 +81,7 @@
     SUBDIR += fasthenry
     SUBDIR += fastjet
     SUBDIR += fisicalab
+    SUBDIR += fleur
     SUBDIR += frontistr
     SUBDIR += fsom
     SUBDIR += fvcom
diff --git a/science/fleur/Makefile b/science/fleur/Makefile
new file mode 100644
index 000000000000..77ae1aba9974
--- /dev/null
+++ b/science/fleur/Makefile
@@ -0,0 +1,71 @@
+PORTNAME=	fleur
+DISTVERSION=	5.1.20220103
+CATEGORIES=	science # chemistry
+
+MAINTAINER=	yuri@FreeBSD.org
+COMMENT=	FLAPW code for atomic computations in quantum chemistry and physics
+
+LICENSE=	MIT
+LICENSE_FILE=	${WRKSRC}/LICENSE
+
+LIB_DEPENDS=	liblapack.so:math/lapack \
+		libopenblas.so:math/openblas
+
+USES=		cmake:noninja fortran gnome localbase:ldflags shebanfgix tar:tgz
+USE_GNOME=	libxml2
+
+USE_GITLAB=	yes
+GL_SITE=	https://iffgit.fz-juelich.de
+GL_COMMIT=	0d3b9c4b71dc42ec0ba60fe5c6d2fce212e6fcd4
+
+SHEBANG_FILES=	tests/test.pl
+
+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 MPI SCALAPACK ELPA WANNIER
+OPTIONS_DEFAULT=	MPI SCALAPACK WANNIER # ELPA
+
+HDF5_CONFIGURE_ENV=	FLEUR_USE_HDF5=1 HDF5_ROOT=${LOCALBASE}/lib
+HDF5_CONFIGURE_ENV_OFF=	FLEUR_USE_HDF5=0
+HDF5_CMAKE_ON=		-DHDF5_INCLUDE_DIRS=${LOCALBASE}/include
+HDF5_LDFLAGS=		-lhdf5
+HDF5_LIB_DEPENDS=	libhdf5.so:science/hdf5
+HDF5_BROKEN=		Missing hdf5.mod in hdf5
+
+MPI_CONFIGURE_ENV=	FLEUR_USE_MPI=1
+MPI_CONFIGURE_ENV_OFF=	FLEUR_USE_MPI=0
+MPI_LDFLAGS=		-lmpich -lmpifort
+MPI_LIB_DEPENDS=	libmpich.so:net/mpich
+
+SCALAPACK_DESC=		Use the ScaLAPACK Scalable LAPACK library
+SCALAPACK_CMAKE_BOOL=	FREEBSD_USE_SCALAPACK
+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=	FREEBSD_USE_ELPA
+ELPA_VARS=		FFLAGS+=-I${LOCALBASE}/include/elpa-2018.05.001/modules
+ELPA_LDFLAGS=		-lelpa
+ELPA_LIB_DEPENDS=	libelpa.so:math/elpa
+ELPA_IMPLIES=		MPI
+ELPA_BROKEN=		math/elpa fails to build
+
+WANNIER_DESC=		Use Wannier library
+WANNIER_CONFIGURE_ENV=	FLEUR_USE_WANNIER=1
+WANNIER_CONFIGURE_ENV_OFF=	FLEUR_USE_WANNIER=0
+WANNIER_LDFLAGS=	-lwannier
+WANNIER_LIB_DEPENDS=	libwannier.so:science/wannier90
+
+EXECUTABLES=	bin/fleur \
+		bin/inpgen
+PLIST_FILES=	${EXECUTABLES}
+
+post-install: # strip
+	@cd ${STAGEDIR}${PREFIX} && ${STRIP_CMD} ${EXECUTABLES}
+
+do-test: # 9 testcases are known to fail, see https://iffgit.fz-juelich.de/fleur/fleur/-/issues/671
+	@cd ${TEST_WRKSRC} && ctest
+
+.include <bsd.port.mk>
diff --git a/science/fleur/distinfo b/science/fleur/distinfo
new file mode 100644
index 000000000000..7ebed6154d93
--- /dev/null
+++ b/science/fleur/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1641371174
+SHA256 (fleur-fleur-0d3b9c4b71dc42ec0ba60fe5c6d2fce212e6fcd4_GL0.tar.gz) = 5de9c06f283db361764fe3e278c4840576d63f0c4742c9499fcaa537f97b3f0f
+SIZE (fleur-fleur-0d3b9c4b71dc42ec0ba60fe5c6d2fce212e6fcd4_GL0.tar.gz) = 53095199
diff --git a/science/fleur/pkg-descr b/science/fleur/pkg-descr
new file mode 100644
index 000000000000..0717b276e387
--- /dev/null
+++ b/science/fleur/pkg-descr
@@ -0,0 +1,7 @@
+The FLAPW-Method (Full Potential Linearized Augmented Plane Wave Method) is an
+all-electron method which within density functional theory is universally
+applicable to all atoms of the periodic table and to systems with compact
+as well as open structures. It is widely considered to be the most precise
+electronic structure method in solid state physics.
+
+WWW: http://www.flapw.de/pm/index.php