commit:     fb105c916a2ee882686351f01f149e71594261cf
Author:     Alexey Korepanov <kaikaikai <AT> yandex <DOT> ru>
AuthorDate: Sat Feb  8 16:49:15 2025 +0000
Commit:     Alexey Korepanov <kaikaikai <AT> yandex <DOT> ru>
CommitDate: Sat Feb  8 16:49:15 2025 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=fb105c91

sci-misc/llama-cpp: add dependencies on curl and numpy

Signed-off-by: Alexey Korepanov <kaikaikai <AT> yandex.ru>

 sci-misc/llama-cpp/llama-cpp-0_pre4576.ebuild | 9 +++++++++
 sci-misc/llama-cpp/llama-cpp-9999.ebuild      | 9 +++++++++
 2 files changed, 18 insertions(+)

diff --git a/sci-misc/llama-cpp/llama-cpp-0_pre4576.ebuild 
b/sci-misc/llama-cpp/llama-cpp-0_pre4576.ebuild
index 39210dddf..8b9c1438d 100644
--- a/sci-misc/llama-cpp/llama-cpp-0_pre4576.ebuild
+++ b/sci-misc/llama-cpp/llama-cpp-0_pre4576.ebuild
@@ -21,6 +21,14 @@ HOMEPAGE="https://github.com/ggerganov/llama.cpp";
 LICENSE="MIT"
 SLOT="0"
 CPU_FLAGS_X86=( avx avx2 f16c )
+IUSE="curl"
+
+# curl is needed for pulling models from huggingface
+# numpy is used by convert_hf_to_gguf.py
+DEPEND="curl? ( net-misc/curl:= )"
+RDEPEND="${DEPEND}
+       dev-python/numpy
+"
 
 src_configure() {
        local mycmakeargs=(
@@ -28,6 +36,7 @@ src_configure() {
                -DLLAMA_BUILD_SERVER=ON
                -DCMAKE_SKIP_BUILD_RPATH=ON
                -DGGML_NATIVE=0 # don't set march
+               -DLLAMA_CURL=$(usex curl ON OFF)
                -DBUILD_NUMBER="1"
        )
        cmake_src_configure

diff --git a/sci-misc/llama-cpp/llama-cpp-9999.ebuild 
b/sci-misc/llama-cpp/llama-cpp-9999.ebuild
index 39210dddf..8b9c1438d 100644
--- a/sci-misc/llama-cpp/llama-cpp-9999.ebuild
+++ b/sci-misc/llama-cpp/llama-cpp-9999.ebuild
@@ -21,6 +21,14 @@ HOMEPAGE="https://github.com/ggerganov/llama.cpp";
 LICENSE="MIT"
 SLOT="0"
 CPU_FLAGS_X86=( avx avx2 f16c )
+IUSE="curl"
+
+# curl is needed for pulling models from huggingface
+# numpy is used by convert_hf_to_gguf.py
+DEPEND="curl? ( net-misc/curl:= )"
+RDEPEND="${DEPEND}
+       dev-python/numpy
+"
 
 src_configure() {
        local mycmakeargs=(
@@ -28,6 +36,7 @@ src_configure() {
                -DLLAMA_BUILD_SERVER=ON
                -DCMAKE_SKIP_BUILD_RPATH=ON
                -DGGML_NATIVE=0 # don't set march
+               -DLLAMA_CURL=$(usex curl ON OFF)
                -DBUILD_NUMBER="1"
        )
        cmake_src_configure

Reply via email to