git: e30ce086a7a3 - main - science/conduit: Add MPI options NOMPI,MPICH,OPENMPI; Change default

From: Yuri Victorovich <yuri_at_FreeBSD.org>
Date: Tue, 23 Aug 2022 01:26:56 UTC
The branch main has been updated by yuri:

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

commit e30ce086a7a37fae1179cced3cda8e2696029b3f
Author:     Yuri Victorovich <yuri@FreeBSD.org>
AuthorDate: 2022-08-23 01:24:35 +0000
Commit:     Yuri Victorovich <yuri@FreeBSD.org>
CommitDate: 2022-08-23 01:26:54 +0000

    science/conduit: Add MPI options NOMPI,MPICH,OPENMPI; Change default
    
    ... MPI option to MPICH to match the choice in dependent ports.
---
 science/conduit/Makefile  | 18 +++++++++++++++---
 science/conduit/pkg-plist | 28 ++++++++++++++--------------
 2 files changed, 29 insertions(+), 17 deletions(-)

diff --git a/science/conduit/Makefile b/science/conduit/Makefile
index 1e32feeb0672..72c520d3a9e8 100644
--- a/science/conduit/Makefile
+++ b/science/conduit/Makefile
@@ -1,7 +1,7 @@
 PORTNAME=	conduit
 DISTVERSIONPREFIX=	v
 DISTVERSION=	0.8.3
-PORTREVISION=	2
+PORTREVISION=	3
 CATEGORIES=	science
 
 MAINTAINER=	yuri@FreeBSD.org
@@ -11,7 +11,6 @@ LICENSE=	BSD3CLAUSE
 LICENSE_FILE=	${WRKSRC}/../LICENSE
 
 LIB_DEPENDS=	libhdf5.so:science/hdf5 \
-		libmpi_cxx.so:net/openmpi \
 		libsiloh5.so:science/silo \
 		libsz.so:science/libaec
 
@@ -26,7 +25,7 @@ GH_TUPLE=	LLNL:blt:86a7d6b:blt/blt \
 
 WRKSRC_SUBDIR=	src
 
-CMAKE_ON=	ENABLE_FORTRAN ENABLE_MPI
+CMAKE_ON=	ENABLE_FORTRAN
 CMAKE_OFF=	CONDUIT_ENABLE_TESTS ENABLE_DOCS ENABLE_EXAMPLES ENABLE_GIT ENABLE_TESTS ENABLE_VALGRIND
 CMAKE_ARGS=	-DHDF5_DIR=${LOCALBASE} \
 		-DSILO_DIR=${LOCALBASE} \
@@ -34,4 +33,17 @@ CMAKE_ARGS=	-DHDF5_DIR=${LOCALBASE} \
 #CMAKE_ARGS+=	-DADIOS_DIR=${LOCALBASE} # broken, see https://github.com/LLNL/conduit/issues/841
 CMAKE_TESTING_ON=	ENABLE_TESTS
 
+OPTIONS_SINGLE=		MPI
+OPTIONS_SINGLE_MPI=	NOMPI MPICH OPENMPI
+OPTIONS_DEFAULT=	MPICH
+OPTIONS_SUB=		yes
+
+NOMPI_DESC=		Build without parallel processing support
+
+MPICH_USES=		mpi:mpich
+MPICH_CMAKE_ON=		-DENABLE_MPI=ON
+
+OPENMPI_USES=		mpi:openmpi
+OPENMPI_CMAKE_ON=	-DENABLE_MPI=ON
+
 .include <bsd.port.mk>
diff --git a/science/conduit/pkg-plist b/science/conduit/pkg-plist
index eae8d0e4ea99..916359c3bfe0 100644
--- a/science/conduit/pkg-plist
+++ b/science/conduit/pkg-plist
@@ -25,11 +25,11 @@ include/conduit/conduit_blueprint_mesh_examples_polystar.hpp
 include/conduit/conduit_blueprint_mesh_examples_related_boundary.hpp
 include/conduit/conduit_blueprint_mesh_examples_venn.hpp
 include/conduit/conduit_blueprint_mesh_utils.hpp
-include/conduit/conduit_blueprint_mpi.hpp
-include/conduit/conduit_blueprint_mpi_mesh.h
-include/conduit/conduit_blueprint_mpi_mesh.hpp
-include/conduit/conduit_blueprint_mpi_mesh_examples.hpp
-include/conduit/conduit_blueprint_mpi_mesh_partition.hpp
+%%NO_NOMPI%%include/conduit/conduit_blueprint_mpi.hpp
+%%NO_NOMPI%%include/conduit/conduit_blueprint_mpi_mesh.h
+%%NO_NOMPI%%include/conduit/conduit_blueprint_mpi_mesh.hpp
+%%NO_NOMPI%%include/conduit/conduit_blueprint_mpi_mesh_examples.hpp
+%%NO_NOMPI%%include/conduit/conduit_blueprint_mpi_mesh_partition.hpp
 include/conduit/conduit_blueprint_o2mrelation.hpp
 include/conduit/conduit_blueprint_o2mrelation_examples.hpp
 include/conduit/conduit_blueprint_o2mrelation_iterator.hpp
@@ -89,12 +89,12 @@ include/conduit/conduit_relay_io_identify_protocol.hpp
 include/conduit/conduit_relay_io_identify_protocol_api.hpp
 include/conduit/conduit_relay_io_silo.hpp
 include/conduit/conduit_relay_io_silo_api.hpp
-include/conduit/conduit_relay_mpi.hpp
-include/conduit/conduit_relay_mpi_io.h
-include/conduit/conduit_relay_mpi_io.hpp
-include/conduit/conduit_relay_mpi_io_blueprint.hpp
-include/conduit/conduit_relay_mpi_io_hdf5.hpp
-include/conduit/conduit_relay_mpi_io_silo.hpp
+%%NO_NOMPI%%include/conduit/conduit_relay_mpi.hpp
+%%NO_NOMPI%%include/conduit/conduit_relay_mpi_io.h
+%%NO_NOMPI%%include/conduit/conduit_relay_mpi_io.hpp
+%%NO_NOMPI%%include/conduit/conduit_relay_mpi_io_blueprint.hpp
+%%NO_NOMPI%%include/conduit/conduit_relay_mpi_io_hdf5.hpp
+%%NO_NOMPI%%include/conduit/conduit_relay_mpi_io_silo.hpp
 include/conduit/conduit_relay_silo.hpp
 include/conduit/conduit_relay_web.hpp
 include/conduit/conduit_relay_web_node_viewer_server.hpp
@@ -109,10 +109,10 @@ lib/cmake/conduit/conduit_setup_deps.cmake
 lib/cmake/conduit/conduit_setup_targets.cmake
 lib/libconduit.so
 lib/libconduit_blueprint.so
-lib/libconduit_blueprint_mpi.so
+%%NO_NOMPI%%lib/libconduit_blueprint_mpi.so
 lib/libconduit_relay.so
-lib/libconduit_relay_mpi.so
-lib/libconduit_relay_mpi_io.so
+%%NO_NOMPI%%lib/libconduit_relay_mpi.so
+%%NO_NOMPI%%lib/libconduit_relay_mpi_io.so
 %%DATADIR%%/conduit_config.mk
 %%DATADIR%%/web_clients/node_viewer/index.html
 %%DATADIR%%/web_clients/node_viewer/resources/d3/LICENSE