git: 76297830c75b - main - misc/onnxruntime: drop VSX requirement on powerpc64

From: Piotr Kubaj <pkubaj_at_FreeBSD.org>
Date: Fri, 11 Sep 2026 12:50:17 UTC
The branch main has been updated by pkubaj:

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

commit 76297830c75b5fbdd8aebaaa630a327898008b21
Author:     Piotr Kubaj <pkubaj@FreeBSD.org>
AuthorDate: 2026-09-03 11:28:15 +0000
Commit:     Piotr Kubaj <pkubaj@FreeBSD.org>
CommitDate: 2026-09-11 12:49:20 +0000

    misc/onnxruntime: drop VSX requirement on powerpc64
    
    Use generic kernels when VSX is not available.
---
 misc/onnxruntime/Makefile                              |  3 ++-
 .../files/patch-cmake_onnxruntime__mlas.cmake          | 18 ++++++++++++++++++
 2 files changed, 20 insertions(+), 1 deletion(-)

diff --git a/misc/onnxruntime/Makefile b/misc/onnxruntime/Makefile
index 3446f8609c1e..6f32222fa9c0 100644
--- a/misc/onnxruntime/Makefile
+++ b/misc/onnxruntime/Makefile
@@ -1,6 +1,7 @@
 PORTNAME=	onnxruntime
 DISTVERSIONPREFIX=	v
 DISTVERSION=	1.27.0
+PORTREVISION=	1
 CATEGORIES=	misc # machine-learning
 DIST_SUBDIR=	${PORTNAME}
 
@@ -37,7 +38,7 @@ CXXFLAGS+=	-Wno-deprecated-declarations #fixes error: 'vec_lvsl' is deprecated:
 #CXXFLAGS+=	-Wno-deprecated-altivec-src-compat #fixes error: current handling of vector bool and vector pixel types in this context are deprecated; the default behaviour will soon change to that implied by the '-altivec-compat=xl' option
 CXXFLAGS+=	-I${WRKSRC}/include/onnxruntime/core/common/logging # otherwise logging.h isn't found
 CXXFLAGS+=	-frtti # fixes error: onnxruntime/test/contrib_ops/gather_block_quantized_op_test.cc:85:77: error: use of typeid requires -frtti
-CXXFLAGS_powerpc64=	-mvsx
+CXXFLAGS_powerpc64=	-Wno-error=deprecated-altivec-src-compat
 
 BINARY_ALIAS=	patch=gpatch
 
diff --git a/misc/onnxruntime/files/patch-cmake_onnxruntime__mlas.cmake b/misc/onnxruntime/files/patch-cmake_onnxruntime__mlas.cmake
new file mode 100644
index 000000000000..48533c5b1f52
--- /dev/null
+++ b/misc/onnxruntime/files/patch-cmake_onnxruntime__mlas.cmake
@@ -0,0 +1,18 @@
+--- cmake/onnxruntime_mlas.cmake.orig	2026-09-02 19:55:21 UTC
++++ cmake/onnxruntime_mlas.cmake
+@@ -617,6 +617,15 @@ else()
+         endif()
+     endif()
+     if(POWER AND MLAS_SOURCE_IS_NOT_SET)
++        check_cxx_source_compiles("
++          #ifndef __VSX__
++          #error VSX is not supported
++          #endif
++          int main() { return 0; }"
++          MLAS_HAS_VSX
++        )
++    endif()
++    if(POWER AND MLAS_HAS_VSX AND MLAS_SOURCE_IS_NOT_SET)
+         set(mlas_platform_srcs
+           ${MLAS_SRC_DIR}/power/SgemmKernelPower.cpp
+           ${MLAS_SRC_DIR}/dgemm.cpp