git: 814bd7c461c9 - main - math/pdal: drop VSX requirement on powerpc64

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

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

commit 814bd7c461c979d1ffbf6455aa21936393ba8145
Author:     Piotr Kubaj <pkubaj@FreeBSD.org>
AuthorDate: 2026-09-03 10:25:36 +0000
Commit:     Piotr Kubaj <pkubaj@FreeBSD.org>
CommitDate: 2026-09-11 12:49:19 +0000

    math/pdal: drop VSX requirement on powerpc64
    
    Merge upstream eigen patches to allow building on G5.
---
 math/pdal/Makefile                                 |  4 +---
 math/pdal/files/patch-vendor_eigen_Eigen_Core      | 11 +++++++++++
 ...gen_Eigen_src_Core_arch_AltiVec_MathFunctions.h | 23 ++++++++++++++++++++++
 ..._eigen_Eigen_src_Core_arch_AltiVec_PacketMath.h | 15 ++++++++++++++
 4 files changed, 50 insertions(+), 3 deletions(-)

diff --git a/math/pdal/Makefile b/math/pdal/Makefile
index c012fa9d834a..9baf0aef3a2e 100644
--- a/math/pdal/Makefile
+++ b/math/pdal/Makefile
@@ -1,6 +1,6 @@
 PORTNAME=	pdal
 DISTVERSION=	2.8.4
-PORTREVISION=	8
+PORTREVISION=	9
 CATEGORIES=	math databases graphics
 MASTER_SITES=	https://github.com/PDAL/PDAL/releases/download/${DISTVERSION}/
 DISTNAME=	${PORTNAME}-${DISTVERSION}-src
@@ -72,8 +72,6 @@ MBIO_CMAKE_BOOL=	BUILD_PLUGIN_MBIO
 PGPOINTCLOUD_CMAKE_BOOL=	BUILD_PLUGIN_PGPOINTCLOUD
 PGPOINTCLOUD_USES=	pgsql
 
-CXXFLAGS_powerpc64=	-mvsx
-
 pre-install-BASH-on:
 	${MKDIR} ${STAGEDIR}${PREFIX}/share/bash-completion/completions
 
diff --git a/math/pdal/files/patch-vendor_eigen_Eigen_Core b/math/pdal/files/patch-vendor_eigen_Eigen_Core
new file mode 100644
index 000000000000..c30973fb6011
--- /dev/null
+++ b/math/pdal/files/patch-vendor_eigen_Eigen_Core
@@ -0,0 +1,11 @@
+--- vendor/eigen/Eigen/Core.orig	2025-02-03 13:42:28 UTC
++++ vendor/eigen/Eigen/Core	2026-09-02 17:05:45 UTC
+@@ -346,7 +346,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/math/pdal/files/patch-vendor_eigen_Eigen_src_Core_arch_AltiVec_MathFunctions.h b/math/pdal/files/patch-vendor_eigen_Eigen_src_Core_arch_AltiVec_MathFunctions.h
new file mode 100644
index 000000000000..db13a06c9ecf
--- /dev/null
+++ b/math/pdal/files/patch-vendor_eigen_Eigen_src_Core_arch_AltiVec_MathFunctions.h
@@ -0,0 +1,23 @@
+--- vendor/eigen/Eigen/src/Core/arch/AltiVec/MathFunctions.h.orig	2025-02-03 13:42:28 UTC
++++ vendor/eigen/Eigen/src/Core/arch/AltiVec/MathFunctions.h	2026-09-02 17:05:45 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/math/pdal/files/patch-vendor_eigen_Eigen_src_Core_arch_AltiVec_PacketMath.h b/math/pdal/files/patch-vendor_eigen_Eigen_src_Core_arch_AltiVec_PacketMath.h
new file mode 100644
index 000000000000..0a76543ce444
--- /dev/null
+++ b/math/pdal/files/patch-vendor_eigen_Eigen_src_Core_arch_AltiVec_PacketMath.h
@@ -0,0 +1,15 @@
+--- vendor/eigen/Eigen/src/Core/arch/AltiVec/PacketMath.h.orig	2025-02-03 13:42:28 UTC
++++ vendor/eigen/Eigen/src/Core/arch/AltiVec/PacketMath.h	2026-09-02 17:05:45 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);