sci-ml/ollama: filter flags in go file comments

Closes: https://bugs.gentoo.org/953049
Signed-off-by: Paul Zander <negril.nx+gentoo@gmail.com>
This commit is contained in:
Paul Zander 2025-04-07 20:09:33 +02:00
parent 2b8d876eb7
commit 4c15d8ccb1
No known key found for this signature in database
GPG Key ID: FD5F75FE9024E877
2 changed files with 8 additions and 0 deletions

View File

@ -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

View File

@ -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