git: b1e7bc10f165 - main - devel/py-bullet3: drop VSX requirement

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

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

commit b1e7bc10f165263b8f8ebc55ddcbf9c0cb9c1818
Author:     Piotr Kubaj <pkubaj@FreeBSD.org>
AuthorDate: 2026-09-03 08:22:37 +0000
Commit:     Piotr Kubaj <pkubaj@FreeBSD.org>
CommitDate: 2026-09-11 12:49:15 +0000

    devel/py-bullet3: drop VSX requirement
    
    Merge upstream eigen patches, dropping VSX requirement.
---
 devel/py-bullet3/Makefile                          |  4 +---
 .../files/patch-examples_ThirdPartyLibs_Eigen_Core | 11 +++++++++++
 ...ibs_Eigen_src_Core_arch_AltiVec_MathFunctions.h | 23 ++++++++++++++++++++++
 ...tyLibs_Eigen_src_Core_arch_AltiVec_PacketMath.h | 15 ++++++++++++++
 4 files changed, 50 insertions(+), 3 deletions(-)

diff --git a/devel/py-bullet3/Makefile b/devel/py-bullet3/Makefile
index b78b5a61fb3a..b3b354f4a8c1 100644
--- a/devel/py-bullet3/Makefile
+++ b/devel/py-bullet3/Makefile
@@ -1,6 +1,6 @@
 PORTNAME=	bullet3
 DISTVERSION=	3.25
-PORTREVISION=	4
+PORTREVISION=	5
 CATEGORIES=	devel
 PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
 
@@ -21,8 +21,6 @@ USE_GL=		gl glew
 USE_GITHUB=	yes
 GH_ACCOUNT=	bulletphysics
 
-CFLAGS_powerpc64=	-mvsx
-
 TEST_ENV=	${MAKE_ENV} PYTHONPATH=${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}
 
 post-install:
diff --git a/devel/py-bullet3/files/patch-examples_ThirdPartyLibs_Eigen_Core b/devel/py-bullet3/files/patch-examples_ThirdPartyLibs_Eigen_Core
new file mode 100644
index 000000000000..007c4c30d66e
--- /dev/null
+++ b/devel/py-bullet3/files/patch-examples_ThirdPartyLibs_Eigen_Core
@@ -0,0 +1,11 @@
+--- examples/ThirdPartyLibs/Eigen/Core.orig	2026-09-02 19:00:49 UTC
++++ examples/ThirdPartyLibs/Eigen/Core	2026-09-02 19:01:41 UTC
+@@ -347,7 +347,7 @@
+ #include "src/Core/CoreIterators.h"
+ #include "src/Core/ConditionEstimator.h"
+ 
+-#if defined(EIGEN_VECTORIZE_ALTIVEC) || defined(EIGEN_VECTORIZE_VSX)
++#if defined(EIGEN_VECTORIZE_VSX)
+   #include "src/Core/arch/AltiVec/MatrixProduct.h"
+ #elif defined EIGEN_VECTORIZE_NEON
+   #include "src/Core/arch/NEON/GeneralBlockPanelKernel.h"
diff --git a/devel/py-bullet3/files/patch-examples_ThirdPartyLibs_Eigen_src_Core_arch_AltiVec_MathFunctions.h b/devel/py-bullet3/files/patch-examples_ThirdPartyLibs_Eigen_src_Core_arch_AltiVec_MathFunctions.h
new file mode 100644
index 000000000000..46121b2b76f7
--- /dev/null
+++ b/devel/py-bullet3/files/patch-examples_ThirdPartyLibs_Eigen_src_Core_arch_AltiVec_MathFunctions.h
@@ -0,0 +1,23 @@
+--- examples/ThirdPartyLibs/Eigen/src/Core/arch/AltiVec/MathFunctions.h.orig	2026-09-02 19:00:49 UTC
++++ examples/ThirdPartyLibs/Eigen/src/Core/arch/AltiVec/MathFunctions.h	2026-09-02 19:01:41 UTC
+@@ -76,6 +76,20 @@
+ }
+ #endif
+ 
++#ifndef __VSX__
++template<> EIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS EIGEN_UNUSED
++Packet4f psqrt<Packet4f>(const Packet4f& x)
++{
++  EIGEN_ALIGN16 float a[4];
++  pstore(a, x);
++  a[0] = numext::sqrt(a[0]);
++  a[1] = numext::sqrt(a[1]);
++  a[2] = numext::sqrt(a[2]);
++  a[3] = numext::sqrt(a[3]);
++  return pload<Packet4f>(a);
++}
++#endif
++
+ // Hyperbolic Tangent function.
+ template <>
+ EIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS EIGEN_UNUSED Packet4f
diff --git a/devel/py-bullet3/files/patch-examples_ThirdPartyLibs_Eigen_src_Core_arch_AltiVec_PacketMath.h b/devel/py-bullet3/files/patch-examples_ThirdPartyLibs_Eigen_src_Core_arch_AltiVec_PacketMath.h
new file mode 100644
index 000000000000..847f9ca41b60
--- /dev/null
+++ b/devel/py-bullet3/files/patch-examples_ThirdPartyLibs_Eigen_src_Core_arch_AltiVec_PacketMath.h
@@ -0,0 +1,15 @@
+--- examples/ThirdPartyLibs/Eigen/src/Core/arch/AltiVec/PacketMath.h.orig	2026-09-02 19:00:49 UTC
++++ examples/ThirdPartyLibs/Eigen/src/Core/arch/AltiVec/PacketMath.h	2026-09-02 19:01:41 UTC
+@@ -1340,9 +1340,11 @@
+ template<> EIGEN_STRONG_INLINE Packet8bf psub<Packet8bf>(const Packet8bf& a, const Packet8bf& b) {
+   BF16_TO_F32_BINARY_OP_WRAPPER(psub<Packet4f>, a, b);
+ }
++
++template<> Packet4f psqrt<Packet4f>(const Packet4f& x);
+ 
+ template<> EIGEN_STRONG_INLINE Packet8bf psqrt<Packet8bf> (const Packet8bf& a){
+-  BF16_TO_F32_UNARY_OP_WRAPPER(vec_sqrt, a);
++  BF16_TO_F32_UNARY_OP_WRAPPER(psqrt<Packet4f>, a);
+ }
+ template<> EIGEN_STRONG_INLINE Packet8bf prsqrt<Packet8bf> (const Packet8bf& a){
+   BF16_TO_F32_UNARY_OP_WRAPPER(prsqrt<Packet4f>, a);