git: e0a8cc0d3378 - main - net/mpich: Fix failure to build when devel/uthash is installed

From: Yuri Victorovich <yuri_at_FreeBSD.org>
Date: Sun, 31 Mar 2024 02:35:00 UTC
The branch main has been updated by yuri:

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

commit e0a8cc0d3378269c5e7681ae4177a85e1b8baaf8
Author:     John Hein <jcfyecrayz@liamekaens.com>
AuthorDate: 2024-03-31 01:52:59 +0000
Commit:     Yuri Victorovich <yuri@FreeBSD.org>
CommitDate: 2024-03-31 02:34:54 +0000

    net/mpich: Fix failure to build when devel/uthash is installed
    
    PR:             265684
---
 net/mpich/Makefile | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/net/mpich/Makefile b/net/mpich/Makefile
index cc286bb6b560..1b80b870bdb6 100644
--- a/net/mpich/Makefile
+++ b/net/mpich/Makefile
@@ -1,6 +1,6 @@
 PORTNAME=	mpich
 PORTVERSION=	4.1.2
-PORTREVISION=	3
+PORTREVISION=	4
 CATEGORIES=	net parallel
 MASTER_SITES=	https://www.mpich.org/static/downloads/${DISTVERSION}/
 
@@ -65,6 +65,7 @@ L0_CONFIGURE_OFF=	--without-ze
 
 CONFIGURE_ARGS=	--enable-fast=""	\
 		--with-libfabric=${LOCALBASE} \
+		--with-libfabric-include=${WRKDIR}/include \
 		pkgconfigdir="${PREFIX}/libdata/pkgconfig" \
 		MPICHLIB_CFLAGS="${CFLAGS}" \
 		CFLAGS="-I${LOCALBASE}/include/json-c ${CFLAGS_F2018}" \
@@ -115,5 +116,9 @@ post-extract:
 
 post-patch:
 	${RM} -r ${WRKSRC}/www
+# To avoid pollution from ${LOCALBASE}/include, set up the build to look in
+# ${WRKDIR} for libfabric include/rdma/ header files (see --with-libfabric
+# configure args).
+	${MKDIR} ${WRKDIR}/include && ${LN} -s ${LOCALBASE}/include/rdma ${WRKDIR}/include/
 
 .include <bsd.port.post.mk>