git: b381e146488b - main - science/spglib: fix build without libomp

From: Piotr Kubaj <pkubaj_at_FreeBSD.org>
Date: Tue, 31 May 2022 03:13:21 UTC
The branch main has been updated by pkubaj:

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

commit b381e146488b86fa5fe808fb0d8db2b42a27e935
Author:     Piotr Kubaj <pkubaj@FreeBSD.org>
AuthorDate: 2022-05-31 03:05:56 +0000
Commit:     Piotr Kubaj <pkubaj@FreeBSD.org>
CommitDate: 2022-05-31 03:05:56 +0000

    science/spglib: fix build without libomp
    
    CMake Error at /usr/local/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
      Could NOT find OpenMP_C (missing: OpenMP_C_FLAGS OpenMP_C_LIB_NAMES)
    Call Stack (most recent call first):
      /usr/local/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:594 (_FPHSA_FAILURE_MESSAGE)
      /usr/local/share/cmake/Modules/FindOpenMP.cmake:596 (find_package_handle_standard_args)
      CMakeLists.txt:42 (find_package)
---
 science/spglib/Makefile | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/science/spglib/Makefile b/science/spglib/Makefile
index 8b92284b2353..b79425cd2835 100644
--- a/science/spglib/Makefile
+++ b/science/spglib/Makefile
@@ -13,4 +13,8 @@ USES=		cmake
 USE_GITHUB=	yes
 USE_LDCONFIG=	yes
 
+.if !exists(/usr/include/omp.h)
+CMAKE_ARGS+=	-DUSE_OMP:BOOL=OFF
+.endif
+
 .include <bsd.port.mk>