git: d7a03dce78c9 - main - astro/oskar: fix build without libomp

From: Piotr Kubaj <pkubaj_at_FreeBSD.org>
Date: Tue, 14 Mar 2023 19:04:46 UTC
The branch main has been updated by pkubaj:

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

commit d7a03dce78c9c54215763e9b5a68f04fca68bd21
Author:     Piotr Kubaj <pkubaj@FreeBSD.org>
AuthorDate: 2023-03-14 19:03:57 +0000
Commit:     Piotr Kubaj <pkubaj@FreeBSD.org>
CommitDate: 2023-03-14 19:03:57 +0000

    astro/oskar: fix build without libomp
    
    CMake Error at /usr/local/share/cmake/Modules/FindOpenMP.cmake:261 (try_compile):
      Failed to generate test project build system.
    Call Stack (most recent call first):
      /usr/local/share/cmake/Modules/FindOpenMP.cmake:537 (_OPENMP_GET_FLAGS)
      CMakeLists.txt:94 (find_package)
---
 astro/oskar/Makefile | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/astro/oskar/Makefile b/astro/oskar/Makefile
index 3ee914634f9b..2dd172789014 100644
--- a/astro/oskar/Makefile
+++ b/astro/oskar/Makefile
@@ -18,8 +18,12 @@ LIB_DEPENDS=	libcfitsio.so:astro/cfitsio \
 		libhdf5.so:science/hdf5 \
 		libsz.so:science/libaec
 
-USES=		cmake compiler:c++11-lang localbase:ldflags python qt:5 \
-		shebangfix
+USES=		cmake localbase:ldflags python qt:5 shebangfix
+.if !exists(/usr/include/omp.h)
+USES+=		compiler:gcc-c++11-lib
+.else
+USES+=		compiler:c++11-lang
+.endif
 USE_QT=		core gui network widgets buildtools:build qmake:build
 USE_LDCONFIG=	yes