git: 693e8cb7080c - main - science/trilinos: Enable features needed for Xyce; Eliminate conflict with mpich; Add -lexecinfo

From: Yuri Victorovich <yuri_at_FreeBSD.org>
Date: Sat, 09 Jul 2022 05:46:59 UTC
The branch main has been updated by yuri:

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

commit 693e8cb7080cf17ceba8c87c71b3dab2720d7ed4
Author:     Yuri Victorovich <yuri@FreeBSD.org>
AuthorDate: 2022-07-09 05:40:10 +0000
Commit:     Yuri Victorovich <yuri@FreeBSD.org>
CommitDate: 2022-07-09 05:46:57 +0000

    science/trilinos: Enable features needed for Xyce; Eliminate conflict with mpich; Add -lexecinfo
---
 science/trilinos/Makefile  | 30 +++++++++++++++++++++++++++---
 science/trilinos/pkg-plist | 17 ++++++++++++-----
 2 files changed, 39 insertions(+), 8 deletions(-)

diff --git a/science/trilinos/Makefile b/science/trilinos/Makefile
index 41206545d1e4..d84adf0749dc 100644
--- a/science/trilinos/Makefile
+++ b/science/trilinos/Makefile
@@ -1,6 +1,7 @@
 PORTNAME=	trilinos
 DISTVERSIONPREFIX=	trilinos-release-
 DISTVERSION=	13-4-0
+PORTREVISION=	1
 CATEGORIES=	science # physics
 
 MAINTAINER=	yuri@FreeBSD.org
@@ -13,8 +14,10 @@ BUILD_DEPENDS=	bash:shells/bash \
 		boost-libs>0:devel/boost-libs \
 		swig:devel/swig \
 		${PYNUMPY}
-LIB_DEPENDS=	libblas.so:math/blas \
-		liblapack.so:math/lapack
+LIB_DEPENDS=	libamd.so:math/suitesparse-amd \
+		libblas.so:math/blas \
+		liblapack.so:math/lapack \
+		libumfpack.so:math/suitesparse-umfpack
 RUN_DEPENDS=	bash:shells/bash
 
 USES=		cmake compiler:c++14-lang fortran perl5 python shebangfix
@@ -28,8 +31,9 @@ SHEBANG_FILES=	packages/kokkos/bin/kokkos_launch_compiler \
 		packages/phalanx/scripts/phalanx_create_evaluator.py
 
 CXXFLAGS+=	-DBOOST_STACKTRACE_GNU_SOURCE_NOT_REQUIRED # fails otherwise with backtrace-related symbol error explicitly printed by Boost
+LDFLAGS+=	-lexecinfo # only for kokkos (?), to prevent missing symbols
 
-CONFLICTS_INSTALL=	mpich kokkos # installs bundled kokkos, need to figure out how to prevent this
+CONFLICTS_INSTALL=	kokkos # installs bundled kokkos, need to figure out how to prevent this
 
 ## configure Trilinos
 
@@ -51,4 +55,24 @@ CMAKE_ARGS+=	-DTrilinos_ENABLE_OpenMP:BOOL=OFF
 #CMAKE_ARGS+=	-DMPI_BASE_DIR:PATH="${LOCALBASE}/mpi/openmpi"
 #CMAKE_ARGS+=	-DMPI_BIN_DIR:PATH="${LOCALBASE}/mpi/openmpi/bin"
 
+## additional features/packages required by Xyce
+
+CMAKE_ON+=	EpetraExt_BUILD_BTF
+CMAKE_ON+=	EpetraExt_BUILD_EXPERIMENTAL
+CMAKE_ON+=	EpetraExt_BUILD_GRAPH_REORDERINGS
+#CMAKE_ON+=	Teuchos_ENABLE_COMPLEX # this feature is broken in Trilinos
+CMAKE_ON+=	Trilinos_ENABLE_COMPLEX_DOUBLE
+# Enabling the UMFPACK feature required by the above features.
+CMAKE_ON+=	TPL_ENABLE_UMFPACK
+CMAKE_ON+=	TPL_ENABLE_AMD
+CMAKE_ARGS+=	-DUMFPACK_INCLUDE_DIRS=${LOCALBASE}/include/suitesparse
+CMAKE_ARGS+=	-DTPL_AMD_INCLUDE_DIRS=${LOCALBASE}/include/suitesparse
+CMAKE_ARGS+=	-DAMD_LIBRARY_DIRS=${LOCALBASE}/lib
+
+# users: https://duongdo27.github.io/Trilinos/users.html
+
+post-install:
+	# remove MPI headers that it installs
+	@${RM} ${STAGEDIR}${PREFIX}/include/mpi*.h
+
 .include <bsd.port.mk>
diff --git a/science/trilinos/pkg-plist b/science/trilinos/pkg-plist
index a755e903cee5..22cf80210846 100644
--- a/science/trilinos/pkg-plist
+++ b/science/trilinos/pkg-plist
@@ -79,6 +79,11 @@ include/Amesos2_TpetraRowMatrix_AbstractMatrixAdapter_decl.hpp
 include/Amesos2_TpetraRowMatrix_AbstractMatrixAdapter_def.hpp
 include/Amesos2_TypeDecl.hpp
 include/Amesos2_TypeMap.hpp
+include/Amesos2_Umfpack.hpp
+include/Amesos2_Umfpack_FunctionMap.hpp
+include/Amesos2_Umfpack_TypeMap.hpp
+include/Amesos2_Umfpack_decl.hpp
+include/Amesos2_Umfpack_def.hpp
 include/Amesos2_Util.hpp
 include/Amesos2_VectorTraits.hpp
 include/Amesos2_Version.hpp
@@ -97,6 +102,7 @@ include/Amesos_Status.h
 include/Amesos_Support.h
 include/Amesos_TestRowMatrix.h
 include/Amesos_Time.h
+include/Amesos_Umfpack.h
 include/Amesos_Utils.h
 include/Amesos_config.h
 include/AnasaziBasicEigenproblem.hpp
@@ -390,13 +396,18 @@ include/Domi_Utils.hpp
 include/Domi_Version.hpp
 include/Domi_config.h
 include/Domi_getValidParameters.hpp
+include/EpetraExt_AMD_CrsGraph.h
 include/EpetraExt_AmesosAMDGlobal_CrsGraph.h
 include/EpetraExt_AmesosBTFGlobal_LinearProblem.h
 include/EpetraExt_AmesosBTF_CrsGraph.h
 include/EpetraExt_AmesosBTF_CrsMatrix.h
+include/EpetraExt_BTF_CrsGraph.h
+include/EpetraExt_BTF_CrsMatrix.h
+include/EpetraExt_BTF_LinearProblem.h
 include/EpetraExt_BlockAdjacencyGraph.h
 include/EpetraExt_BlockCrsMatrix.h
 include/EpetraExt_BlockDiagMatrix.h
+include/EpetraExt_BlockJacobi_LinearProblem.h
 include/EpetraExt_BlockMapIn.h
 include/EpetraExt_BlockMapOut.h
 include/EpetraExt_BlockMultiVector.h
@@ -441,6 +452,7 @@ include/EpetraExt_Scale_LinearProblem.h
 include/EpetraExt_SolverMap_CrsMatrix.h
 include/EpetraExt_SolverMap_LinearProblem.h
 include/EpetraExt_SubCopy_CrsMatrix.h
+include/EpetraExt_SymmRCM_CrsGraph.h
 include/EpetraExt_TCrsGraph_MapColoringIndex.h
 include/EpetraExt_TimedEpetraOperator.hpp
 include/EpetraExt_Transform.h
@@ -6923,11 +6935,6 @@ include/ml_xxt.h
 include/ml_xyt.h
 include/mli_solver.h
 include/mmio_Tpetra.h
-include/mpi.h
-include/mpi_config.h
-include/mpi_implementation.h
-include/mpi_profile.h
-include/mpi_prototypes.h
 include/mrtr_convexhull_Def.hpp
 include/mrtr_function.H
 include/mrtr_functions.H