git: cae325dd1dee - 2026Q2 - math/flexiblas: fix build on platforms without OpenMP (armv7)

From: Robert Clausecker <fuz_at_FreeBSD.org>
Date: Fri, 26 Jun 2026 12:16:02 UTC
The branch 2026Q2 has been updated by fuz:

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

commit cae325dd1dee988c1cae5ee56a91da0739c27d2c
Author:     Robert Clausecker <fuz@FreeBSD.org>
AuthorDate: 2026-06-24 09:55:39 +0000
Commit:     Robert Clausecker <fuz@FreeBSD.org>
CommitDate: 2026-06-26 12:12:24 +0000

    math/flexiblas: fix build on platforms without OpenMP (armv7)
    
    On such platforms, openblas uses pthreads over OpenMP.  Add some more
    switches to pkg-plist to address this.
    
    Fix a typo in pkg-descr while we are at it.
    
    Approved by:    portmgr (build fix blanket)
    MFH:            2026Q2
    
    (cherry picked from commit b9b8097cb0139bd2bbbc22b810d40d8a266841f9)
---
 math/flexiblas/Makefile  | 9 +++++++--
 math/flexiblas/pkg-descr | 2 +-
 math/flexiblas/pkg-plist | 6 ++++--
 3 files changed, 12 insertions(+), 5 deletions(-)

diff --git a/math/flexiblas/Makefile b/math/flexiblas/Makefile
index 8f44ea07b0cd..a1fc52ed4f0c 100644
--- a/math/flexiblas/Makefile
+++ b/math/flexiblas/Makefile
@@ -40,11 +40,16 @@ EXAMPLES_CMAKE_OFF=	-DEXAMPLES:BOOL=OFF
 
 .if exists(${LOCALBASE}/lib/libatlas.so)
 LIB_DEPENDS+=	libatlas.so:math/atlas
-PLIST_SUB+=	OPENBLAS="@comment " ATLAS=""
+PLIST_SUB+=	OPENBLASOPENMP="@comment " OPENBLASPTHREAD="@comment " ATLAS=""
 .else
 LIB_DEPENDS+=	libcblas.so:math/cblas	\
 		libopenblas.so:math/openblas
-PLIST_SUB+=	OPENBLAS="" ATLAS="@comment "
+PLIST_SUB+=	ATLAS="@comment "
+.if exists(/usr/include/omp.h)
+PLIST_SUB+=	OPENBLASOPENMP="" OPENBLASPTHREAD="@comment " ATLAS="@comment "
+.else
+PLIST_SUB+=	OPENBLASOPENMP="@comment " OPENBLASPTHREAD="" ATLAS="@comment "
+.endif
 .endif
 
 post-install:
diff --git a/math/flexiblas/pkg-descr b/math/flexiblas/pkg-descr
index dc4860652fd2..292327711284 100644
--- a/math/flexiblas/pkg-descr
+++ b/math/flexiblas/pkg-descr
@@ -3,7 +3,7 @@ backends.
 
 - Runtime exchangeable BLAS and LAPACK backend without recompilation of any
   software.
-- Supports all BLAS functions and al LAPACK functions from Version 3.10.0 with
+- Supports all BLAS functions and all LAPACK functions from Version 3.10.0 with
   an 100% BLAS and LAPACK compatible ABI/API.
 - Flexible per system/per user/per host configuration files.
 - Integration of user-owned BLAS libraries without administrator privileges,
diff --git a/math/flexiblas/pkg-plist b/math/flexiblas/pkg-plist
index 8f46345364c7..b9cb6fb7a279 100644
--- a/math/flexiblas/pkg-plist
+++ b/math/flexiblas/pkg-plist
@@ -4,7 +4,8 @@ bin/flexiblas-config
 %%ATLAS%%etc/flexiblasrc.d/ATLAS.conf
 etc/flexiblasrc.d/BlisPThread.conf
 etc/flexiblasrc.d/NETLIB.conf
-%%OPENBLAS%%etc/flexiblasrc.d/OpenBLASOpenMP.conf
+%%OPENBLASOPENMP%%etc/flexiblasrc.d/OpenBLASOpenMP.conf
+%%OPENBLASPTHREAD%%etc/flexiblasrc.d/OpenBLASPThread.conf
 include/flexiblas/blas_gnu.h
 include/flexiblas/blas_intel.h
 include/flexiblas/cblas.h
@@ -34,7 +35,8 @@ lib/flexiblas/libflexiblas_fallback_lapack.so
 lib/flexiblas/libflexiblas_hook_dummy.so
 lib/flexiblas/libflexiblas_hook_profile.so
 lib/flexiblas/libflexiblas_netlib.so
-%%OPENBLAS%%lib/flexiblas/libflexiblas_openblasopenmp.so
+%%OPENBLASOPENMP%%lib/flexiblas/libflexiblas_openblasopenmp.so
+%%OPENBLASPTHREAD%%lib/flexiblas/libflexiblas_openblaspthread.so
 lib/libflexiblas.so
 lib/libflexiblas.so.3
 lib/libflexiblas.so.%%VE%%