git: f1ed1195febf - main - science/nlcglib: OPENMP option if OFF and ON is broken where OpenMP isn't available

From: Yuri Victorovich <yuri_at_FreeBSD.org>
Date: Thu, 20 Feb 2025 17:20:09 UTC
The branch main has been updated by yuri:

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

commit f1ed1195febfba489278eb84b1c247523673168e
Author:     Yuri Victorovich <yuri@FreeBSD.org>
AuthorDate: 2025-02-20 15:05:50 +0000
Commit:     Yuri Victorovich <yuri@FreeBSD.org>
CommitDate: 2025-02-20 15:05:50 +0000

    science/nlcglib: OPENMP option if OFF and ON is broken where OpenMP isn't available
---
 science/nlcglib/Makefile | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/science/nlcglib/Makefile b/science/nlcglib/Makefile
index 43c6f0600133..208a28091b6a 100644
--- a/science/nlcglib/Makefile
+++ b/science/nlcglib/Makefile
@@ -1,7 +1,7 @@
 PORTNAME=	nlcglib
 DISTVERSIONPREFIX=	v
 DISTVERSION=	1.1.0
-PORTREVISION=	2
+PORTREVISION=	3
 CATEGORIES=	science
 
 MAINTAINER=	yuri@FreeBSD.org
@@ -16,10 +16,6 @@ LIB_DEPENDS=	libkokkoscore.so:devel/kokkos \
 		libopenblas.so:math/openblas
 TEST_DEPENDS=	googletest>0:devel/googletest
 
-.if !exists(/usr/include/omp.h)
-BROKEN=		requires OpenMP support that is missing on this architecture
-.endif
-
 USES=		cmake:testing pkgconfig
 USE_LDCONFIG=	yes
 
@@ -31,7 +27,13 @@ CMAKE_TESTING_ON=	BUILD_TESTS # tests fail to compile, see https://github.com/si
 OPTIONS_DEFINE=		OPENMP
 OPTIONS_SINGLE=		MPI
 OPTIONS_SINGLE_MPI=	MPICH OPENMPI
-OPTIONS_DEFAULT=	MPICH OPENMP
+OPTIONS_DEFAULT=	MPICH
+
+.if exists(/usr/include/omp.h)
+OPTIONS_DEFAULT+=	OPENMP
+.else
+OPENMP_BROKEN=		requires OpenMP support that is missing on this architecture
+.endif
 
 MPICH_USES=		mpi:mpich