commit: 81caba2ad9ebb0abe371a282212341311cf1cbd9 Author: Paul Zander <negril.nx+gentoo <AT> gmail <DOT> com> AuthorDate: Sat Jan 10 13:35:29 2026 +0000 Commit: Paul Zander <negril.nx+gentoo <AT> gmail <DOT> com> CommitDate: Sat Jan 10 13:35:29 2026 +0000 URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=81caba2a
sci-ml/ollama: fix backend install, pass default cuda arch See-also: https://github.com/gentoo/guru/pull/406 Bug: https://bugs.gentoo.org/968549 Signed-off-by: Paul Zander <negril.nx+gentoo <AT> gmail.com> .../ollama/{ollama-9999.ebuild => ollama-0.13.5-r2.ebuild} | 12 +++++++++++- sci-ml/ollama/ollama-9999.ebuild | 12 +++++++++++- 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/sci-ml/ollama/ollama-9999.ebuild b/sci-ml/ollama/ollama-0.13.5-r2.ebuild similarity index 96% copy from sci-ml/ollama/ollama-9999.ebuild copy to sci-ml/ollama/ollama-0.13.5-r2.ebuild index 34c4726698..968bd09f50 100644 --- a/sci-ml/ollama/ollama-9999.ebuild +++ b/sci-ml/ollama/ollama-0.13.5-r2.ebuild @@ -235,7 +235,8 @@ src_configure() { # backends end up in /usr/bin otherwise -DGGML_BACKEND_DL="yes" - -DGGML_BACKEND_DIR="${EPREFIX}/usr/$(get_libdir)/${PN}/backends" + # TODO causes duplicate install warning but breaks detection otherwise ollama/issues/13614 + -DGGML_BACKEND_DIR="${EPREFIX}/usr/$(get_libdir)/${PN}" # -DGGML_CPU="yes" -DGGML_BLAS="$(usex blas)" @@ -272,6 +273,15 @@ src_configure() { CUDAHOSTCXX="$(cuda_gccdir)" CUDAHOSTLD="$(tc-getCXX)" + # default to all for now until cuda.eclass is updated + if [[ ! -v CUDAARCHS ]]; then + local CUDAARCHS="all" + fi + + mycmakeargs+=( + -DCMAKE_CUDA_ARCHITECTURES="${CUDAARCHS}" + ) + cuda_add_sandbox -w addpredict "/dev/char/" else diff --git a/sci-ml/ollama/ollama-9999.ebuild b/sci-ml/ollama/ollama-9999.ebuild index 34c4726698..968bd09f50 100644 --- a/sci-ml/ollama/ollama-9999.ebuild +++ b/sci-ml/ollama/ollama-9999.ebuild @@ -235,7 +235,8 @@ src_configure() { # backends end up in /usr/bin otherwise -DGGML_BACKEND_DL="yes" - -DGGML_BACKEND_DIR="${EPREFIX}/usr/$(get_libdir)/${PN}/backends" + # TODO causes duplicate install warning but breaks detection otherwise ollama/issues/13614 + -DGGML_BACKEND_DIR="${EPREFIX}/usr/$(get_libdir)/${PN}" # -DGGML_CPU="yes" -DGGML_BLAS="$(usex blas)" @@ -272,6 +273,15 @@ src_configure() { CUDAHOSTCXX="$(cuda_gccdir)" CUDAHOSTLD="$(tc-getCXX)" + # default to all for now until cuda.eclass is updated + if [[ ! -v CUDAARCHS ]]; then + local CUDAARCHS="all" + fi + + mycmakeargs+=( + -DCMAKE_CUDA_ARCHITECTURES="${CUDAARCHS}" + ) + cuda_add_sandbox -w addpredict "/dev/char/" else
