From 4c15d8ccb15dbf406efdfda4048901c4e687d8c1 Mon Sep 17 00:00:00 2001 From: Paul Zander Date: Mon, 7 Apr 2025 20:09:33 +0200 Subject: [PATCH] sci-ml/ollama: filter flags in go file comments Closes: https://bugs.gentoo.org/953049 Signed-off-by: Paul Zander --- sci-ml/ollama/ollama-0.6.3.ebuild | 4 ++++ sci-ml/ollama/ollama-9999.ebuild | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/sci-ml/ollama/ollama-0.6.3.ebuild b/sci-ml/ollama/ollama-0.6.3.ebuild index 9f07083dd7..cf664c7562 100644 --- a/sci-ml/ollama/ollama-0.6.3.ebuild +++ b/sci-ml/ollama/ollama-0.6.3.ebuild @@ -93,6 +93,10 @@ src_prepare() { -e "/PRE_INCLUDE_REGEXES.*hip/d" \ -i CMakeLists.txt || die sed + sed \ + -e "s/-O3/${CFLAGS}/g" \ + -i ml/backend/ggml/ggml/src/ggml-cpu/cpu.go || die sed + if use amd64; then if ! use cpu_flags_x86_avx; then sed -e "/ggml_add_cpu_backend_variant(sandybridge/s/^/# /g" -i ml/backend/ggml/ggml/src/CMakeLists.txt || die diff --git a/sci-ml/ollama/ollama-9999.ebuild b/sci-ml/ollama/ollama-9999.ebuild index 7147e4cc84..6726a59702 100644 --- a/sci-ml/ollama/ollama-9999.ebuild +++ b/sci-ml/ollama/ollama-9999.ebuild @@ -93,6 +93,10 @@ src_prepare() { -e "/PRE_INCLUDE_REGEXES.*hip/d" \ -i CMakeLists.txt || die sed + sed \ + -e "s/-O3/${CFLAGS}/g" \ + -i ml/backend/ggml/ggml/src/ggml-cpu/cpu.go || die sed + if use amd64; then if ! use cpu_flags_x86_avx; then sed -e "/ggml_add_cpu_backend_variant(sandybridge/s/^/# /g" -i ml/backend/ggml/ggml/src/CMakeLists.txt || die