git: fae646ee890a - main - security/john: allow to build JtR with OpenMPI support

From: Alexey Dokuchaev <danfe_at_FreeBSD.org>
Date: Sat, 29 Oct 2022 03:45:52 UTC
The branch main has been updated by danfe:

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

commit fae646ee890ae6170d5cde461a8c4658caf5188a
Author:     Alexey Dokuchaev <danfe@FreeBSD.org>
AuthorDate: 2022-10-29 03:44:46 +0000
Commit:     Alexey Dokuchaev <danfe@FreeBSD.org>
CommitDate: 2022-10-29 03:44:46 +0000

    security/john: allow to build JtR with OpenMPI support
    
    PR:     254922
---
 security/john/Makefile | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/security/john/Makefile b/security/john/Makefile
index 8822f293079c..a2220e5c2ecb 100644
--- a/security/john/Makefile
+++ b/security/john/Makefile
@@ -35,7 +35,7 @@ BINLINKS=	base64conv gpg2john rar2john unafs undrop unique \
 
 PORTDOCS=	*
 
-OPTIONS_DEFINE=	DOCS OPENCL OPENMP
+OPTIONS_DEFINE=	DOCS OPENCL OPENMP OPENMPI
 OPTIONS_DEFAULT=	OPENMP
 OPTIONS_SUB=	yes
 
@@ -47,6 +47,11 @@ OPENCL_USE=		PERL5=build
 
 OPENMP_CONFIGURE_OFF=	--disable-openmp
 
+OPENMPI_LIB_DEPENDS=	libmpi.so:net/openmpi
+OPENMPI_CONFIGURE_ON=	--enable-mpi
+OPENMPI_CONFIGURE_ENV=	CPPFLAGS="-I${LOCALBASE}/mpi/openmpi/include" \
+			LDFLAGS="-L${LOCALBASE}/mpi/openmpi/lib"
+
 post-patch:
 	@${REINPLACE_CMD} -e 's|/usr|${PREFIX}|' ${WRKSRC}/params.h
 	@${REINPLACE_CMD} -e '/^host_cpu=/s|$$| ; case $$host_cpu in\