From: Debian Med Packaging Team
 <debian-med-packaging@lists.alioth.debian.org>
Date: Thu, 7 Aug 2025 16:31:33 +0200
Subject: Fix #922776
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit

On ppc64el, altivec.h redefines bool, pixel and vector which can collide with
c++ types.
This altivec.h inclusion is done by opencl in CL/cl_platform.h .
As altivec.h explains, it's possible to undefine those for C++ compatibility in
libhmsbeagle/GPU/GPUInterface.h where we don't need them and where it fails,
while doing that on the right plateform.
Finally, enable libhmsbeagle1v5 on ppc64el.
Author: Frédéric Bonnard <frediz@debian.org>
---
 libhmsbeagle/GPU/GPUInterface.h | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/libhmsbeagle/GPU/GPUInterface.h b/libhmsbeagle/GPU/GPUInterface.h
index cc8a3e1..1f9205a 100644
--- a/libhmsbeagle/GPU/GPUInterface.h
+++ b/libhmsbeagle/GPU/GPUInterface.h
@@ -48,6 +48,11 @@
         #include <OpenCL/opencl.h>
 #   else
         #include <CL/opencl.h>
+#       if defined(__VEC__) && defined(__ALTIVEC__) && !defined(__APPLE_ALTIVEC__)
+            #undef vector
+            #undef pixel
+            #undef bool
+#       endif
 #   endif
 #   ifdef BEAGLE_XCODE
         #include "libhmsbeagle/GPU/kernels/BeagleOpenCL_kernels_xcode.h"
