git: 741edec0685d - main - science/elmerfem: Unbreak by removing link flag -lMPI::MPI_C

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

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

commit 741edec0685d80c641a071f0bdcf2d5e82019962
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:37:38 +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)
---
 science/elmerfem/Makefile | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/science/elmerfem/Makefile b/science/elmerfem/Makefile
index 6ae760af6c20..1bfb77ad2021 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