git: d5450fe2bc97 - main - math/dbcsr: Correct plist; Use GCC to support OpenMP in dbcsr and cp2k; Correct options definition

From: Yuri Victorovich <yuri_at_FreeBSD.org>
Date: Wed, 11 Sep 2024 02:46:13 UTC
The branch main has been updated by yuri:

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

commit d5450fe2bc97460ba5304a7f0dc88b47d39b9029
Author:     Yuri Victorovich <yuri@FreeBSD.org>
AuthorDate: 2024-09-11 02:31:27 +0000
Commit:     Yuri Victorovich <yuri@FreeBSD.org>
CommitDate: 2024-09-11 02:45:58 +0000

    math/dbcsr: Correct plist; Use GCC to support OpenMP in dbcsr and cp2k; Correct options definition
---
 math/dbcsr/Makefile  | 9 ++++++---
 math/dbcsr/pkg-plist | 8 ++++----
 2 files changed, 10 insertions(+), 7 deletions(-)

diff --git a/math/dbcsr/Makefile b/math/dbcsr/Makefile
index 924676e7fd64..908f92fe2b7f 100644
--- a/math/dbcsr/Makefile
+++ b/math/dbcsr/Makefile
@@ -1,6 +1,7 @@
 PORTNAME=	dbcsr
 DISTVERSIONPREFIX=	v
 DISTVERSION=	2.7.0
+PORTREVISION=	1
 CATEGORIES=	math
 
 MAINTAINER=	yuri@FreeBSD.org
@@ -18,6 +19,7 @@ BUILD_DEPENDS=	fypp:devel/py-fypp@${PY_FLAVOR}
 
 USES=		blaslapack:openblas cmake:noninja,testing compiler:c++14-lang fortran \
 		python:build
+USE_GCC=	yes # OpenMP is used from both Forran and C code, therefore C code should be compiled with GCC, otherwise it fails at run-time (same in cp2k)
 USE_LDCONFIG=	yes
 
 USE_GITHUB=	yes
@@ -32,18 +34,19 @@ CMAKE_ARGS=	-DBLA_VENDOR:STRING="OpenBLAS" -DPython_EXECUTABLE=${PYTHON_CMD}
 
 BINARY_ALIAS=	git=false # with git sonames get messed up
 
-OPTIONS_DEFINE=		MPIX OPENMP C_API # libxsmm is supposed to be supported, but cmake build lacks the corresponding option: https://github.com/cp2k/dbcsr/issues/73
-OPTIONS_DEFAULT=	MPIX OPENMP C_API
+OPTIONS_DEFINE=		C_API MPIX OPENMP # libxsmm is supposed to be supported, but cmake build lacks the corresponding option: https://github.com/cp2k/dbcsr/issues/73
+OPTIONS_DEFAULT=	C_API MPIX OPENMP
 OPTIONS_SUB=		yes
 
 MPIX_DESC=		Use OpenMPI
-MPIX_CMAKE_BOOL=	USE_MPI
+MPIX_CMAKE_BOOL=	USE_MPI USE_MPI_F08
 MPIX_USES=		mpi:mpich
 
 OPENMP_CMAKE_BOOL=	USE_OPENMP
 
 C_API_DESC=		Build the C API library
 C_API_CMAKE_BOOL=	WITH_C_API
+C_API_IMPLIES=		MPIX # the ISO_C_BINDINGS require MPI unconditionally
 
 .include <bsd.port.pre.mk>
 
diff --git a/math/dbcsr/pkg-plist b/math/dbcsr/pkg-plist
index cbb5dc0c1985..15152268d65a 100644
--- a/math/dbcsr/pkg-plist
+++ b/math/dbcsr/pkg-plist
@@ -1,6 +1,6 @@
 %%C_API%%include/dbcsr.h
 include/dbcsr_api.mod
-include/dbcsr_tensor.h
+%%C_API%%include/dbcsr_tensor.h
 include/dbcsr_tensor_api.mod
 lib/cmake/dbcsr/DBCSRConfig.cmake
 lib/cmake/dbcsr/DBCSRConfigVersion.cmake
@@ -9,6 +9,6 @@ lib/cmake/dbcsr/DBCSRTargets.cmake
 lib/libdbcsr.so
 lib/libdbcsr.so.2.7
 lib/libdbcsr.so.2.7.0
-lib/libdbcsr_c.so
-lib/libdbcsr_c.so.2.7
-lib/libdbcsr_c.so.2.7.0
+%%C_API%%lib/libdbcsr_c.so
+%%C_API%%lib/libdbcsr_c.so.2.7
+%%C_API%%lib/libdbcsr_c.so.2.7.0