git: b41577a705c4 - main - security/openfhe: Add the OPENMP option enabled only where OpenMP is enabled

From: Yuri Victorovich <yuri_at_FreeBSD.org>
Date: Sun, 04 Dec 2022 06:48:30 UTC
The branch main has been updated by yuri:

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

commit b41577a705c45eeab937a34fe4a0f97d1b2d9e12
Author:     Yuri Victorovich <yuri@FreeBSD.org>
AuthorDate: 2022-12-04 03:28:19 +0000
Commit:     Yuri Victorovich <yuri@FreeBSD.org>
CommitDate: 2022-12-04 06:48:23 +0000

    security/openfhe: Add the OPENMP option enabled only where OpenMP is enabled
    
    Reported by:    fallout
---
 security/openfhe/Makefile | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/security/openfhe/Makefile b/security/openfhe/Makefile
index f478a54f7a7b..98069d7ed9f0 100644
--- a/security/openfhe/Makefile
+++ b/security/openfhe/Makefile
@@ -1,7 +1,7 @@
 PORTNAME=	openfhe
 DISTVERSIONPREFIX=	v
 DISTVERSION=	1.0.1
-PORTREVISION=	1
+PORTREVISION=	2
 CATEGORIES=	security math
 
 MAINTAINER=	yuri@FreeBSD.org
@@ -30,7 +30,7 @@ CMAKE_TESTING_TARGET=	testall
 
 BINARY_ALIAS=	git=false
 
-OPTIONS_DEFINE=		HEXL NTL
+OPTIONS_DEFINE=		HEXL NTL OPENMP
 OPTIONS_DEFAULT=	NTL
 
 HEXL_DESC=		Buld with Intel hexl
@@ -42,4 +42,11 @@ NTL_CMAKE_BOOL=		WITH_NTL
 NTL_LIB_DEPENDS=	libgmp.so:math/gmp \
 			libntl.so:math/ntl
 
+OPENMP_CMAKE_BOOL=	WITH_OPENMP
+.if exists(/usr/include/omp.h)
+OPTIONS_DEFAULT+=	OPENMP
+.else
+OPENMP_BROKEN=		OpenMP isn't enabled on this architecture
+.endif
+
 .include <bsd.port.mk>