git: 3c66acbc5c97 - main - misc/py-llama-cpp-python: fix build on powerpc64*

From: Piotr Kubaj <pkubaj_at_FreeBSD.org>
Date: Sun, 03 Aug 2025 21:39:10 UTC
The branch main has been updated by pkubaj:

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

commit 3c66acbc5c97d47ef07c855846f27c3c4944e70a
Author:     Piotr Kubaj <pkubaj@FreeBSD.org>
AuthorDate: 2025-08-02 23:30:01 +0000
Commit:     Piotr Kubaj <pkubaj@FreeBSD.org>
CommitDate: 2025-08-03 21:39:02 +0000

    misc/py-llama-cpp-python: fix build on powerpc64*
    
    /wrkdirs/usr/ports/misc/py-llama-cpp-python/work-py311/llama-cpp-python-0.3.2/vendor/llama.cpp/ggml/src/ggml-cpu/llamafile/sgemm.cpp:1659:1: error: unknown type name '_Bool'
     1659 | bool llamafile_sgemm(int64_t m, int64_t n, int64_t k, const void *A, int64_t lda, const void *B, int64_t ldb, void *C,
          | ^
    /wrkdirs/usr/ports/misc/py-llama-cpp-python/work-py311/llama-cpp-python-0.3.2/vendor/llama.cpp/ggml/src/ggml-cpu/./ggml-cpu-impl.h:323:14: note: expanded from macro 'bool'
      323 | #define bool _Bool
          |              ^
    4 warnings and 1 error generated.
---
 .../patch-vendor_llama.cpp_ggml_src_ggml-cpu_ggml-cpu-impl.h  | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/misc/py-llama-cpp-python/files/patch-vendor_llama.cpp_ggml_src_ggml-cpu_ggml-cpu-impl.h b/misc/py-llama-cpp-python/files/patch-vendor_llama.cpp_ggml_src_ggml-cpu_ggml-cpu-impl.h
new file mode 100644
index 000000000000..376142c64242
--- /dev/null
+++ b/misc/py-llama-cpp-python/files/patch-vendor_llama.cpp_ggml_src_ggml-cpu_ggml-cpu-impl.h
@@ -0,0 +1,11 @@
+--- vendor/llama.cpp/ggml/src/ggml-cpu/ggml-cpu-impl.h.orig	2025-08-02 23:17:06 UTC
++++ vendor/llama.cpp/ggml/src/ggml-cpu/ggml-cpu-impl.h
+@@ -319,8 +319,6 @@ inline static int32x4_t ggml_vdotq_s32(int32x4_t acc, 
+ #else
+ #ifdef __POWER9_VECTOR__
+ #include <altivec.h>
+-#undef bool
+-#define bool _Bool
+ #else
+ #if defined(_MSC_VER) || defined(__MINGW32__)
+ #include <intrin.h>