git: 4a95268b93c5 - 2022Q3 - science/elmerfem: Unbreak by removing link flag -lMPI::MPI_C

From: Yuri Victorovich <yuri_at_FreeBSD.org>
Date: Thu, 21 Jul 2022 16:38:22 UTC
The branch 2022Q3 has been updated by yuri:

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

commit 4a95268b93c583e99858a184271fae27365b61d8
Author:     Yuri Victorovich <yuri@FreeBSD.org>
AuthorDate: 2022-07-21 16:36:30 +0000
Commit:     Yuri Victorovich <yuri@FreeBSD.org>
CommitDate: 2022-07-21 16:38:13 +0000

    science/elmerfem: Unbreak by removing link flag -lMPI::MPI_C
    
    This flag causes build failure.
    Its origin is unclear.
    
    Reported by:    fallout
    Approved by:    portmgr (unbreak)
    
    (cherry picked from commit 741edec0685d80c641a071f0bdcf2d5e82019962)
---
 science/elmerfem/Makefile | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/science/elmerfem/Makefile b/science/elmerfem/Makefile
index 7d42a1de33cd..d541eb069802 100644
--- a/science/elmerfem/Makefile
+++ b/science/elmerfem/Makefile
@@ -100,6 +100,10 @@ post-patch-OCC-on:
 	@${REINPLACE_CMD} -e 's|$${INCLUDE}|${LOCALBASE}/include/OpenCASCADE|' \
 		"${WRKSRC}/cmake/Modules/FindOCE.cmake"
 
+post-configure:
+	# workaround for https://github.com/ElmerCSC/elmerfem/issues/334
+	@${REINPLACE_CMD} -e 's| -lMPI::MPI_C | |' ${BUILD_WRKSRC}/ElmerGUI/Application/CMakeFiles/ElmerGUI.dir/link.txt
+
 post-install:
 	${LN} -sf ElmerSolver_mpi ${STAGEDIR}${PREFIX}/bin/ElmerSolver
 	${LN} -sf libelmersolver.so ${_LIBSTAGEDIR}/libelmersolver.so.0