git: 845709dfeab6 - main - math/superlu-mt: fix build on platforms without OpenMP
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 22 Jun 2026 09:30:14 UTC
The branch main has been updated by fuz:
URL: https://cgit.FreeBSD.org/ports/commit/?id=845709dfeab69a65b1b7c42902e8566049034432
commit 845709dfeab69a65b1b7c42902e8566049034432
Author: Robert Clausecker <fuz@FreeBSD.org>
AuthorDate: 2026-06-21 09:36:06 +0000
Commit: Robert Clausecker <fuz@FreeBSD.org>
CommitDate: 2026-06-22 08:41:45 +0000
math/superlu-mt: fix build on platforms without OpenMP
Only build the OpenMP version of the library where supported.
Approved by: portmgr (build fix blanket)
MFH: 2026Q2
---
math/superlu-mt/Makefile | 6 ++++++
math/superlu-mt/pkg-plist | 2 +-
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/math/superlu-mt/Makefile b/math/superlu-mt/Makefile
index 92b4878557ac..28771fb5151e 100644
--- a/math/superlu-mt/Makefile
+++ b/math/superlu-mt/Makefile
@@ -25,7 +25,13 @@ CMAKE_ON= BUILD_SHARED_LIBS USE_XSDK_DEFAULTS
CMAKE_OFF= enable_fortran \
enable_tests \
enable_examples
+.if exists(/usr/include/omp.h)
CMAKE_ARGS= -DTHREAD_API=BOTH
+PLIST_SUB+= OPENMP=""
+.else
+CMAKE_ARGS= -DTHREAD_API=PTHREAD
+PLIST_SUB+= OPENMP="@comment "
+.endif
LDFLAGS+= -lpthread \
-lm \
diff --git a/math/superlu-mt/pkg-plist b/math/superlu-mt/pkg-plist
index 339ce71cb6a9..37fa4fe964ca 100644
--- a/math/superlu-mt/pkg-plist
+++ b/math/superlu-mt/pkg-plist
@@ -10,5 +10,5 @@ include/superlu_mt/slu_mt_util.h
include/superlu_mt/slu_mt_zdefs.h
include/superlu_mt/slu_scomplex.h
include/superlu_mt/supermatrix.h
-lib/libsuperlu_mt_OPENMP.so
+%%OPENMP%%lib/libsuperlu_mt_OPENMP.so
lib/libsuperlu_mt_PTHREAD.so