commit:     36a39a0a8040d36ff378936b335447b7d9f315a7
Author:     Sergey Alirzaev <l29ah <AT> riseup <DOT> net>
AuthorDate: Thu Jul  3 19:32:59 2025 +0000
Commit:     Sergey Alirzaev <zl29ah <AT> gmail <DOT> com>
CommitDate: Thu Jul  3 19:32:59 2025 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=36a39a0a

sci-misc/llama-cpp: avoid clashing with whisper.cpp

Signed-off-by: Sergey Alirzaev <l29ah <AT> riseup.net>

 sci-misc/llama-cpp/Manifest                                        | 1 +
 .../{llama-cpp-9999.ebuild => llama-cpp-0_pre5821.ebuild}          | 7 +++++++
 sci-misc/llama-cpp/llama-cpp-9999.ebuild                           | 7 +++++++
 3 files changed, 15 insertions(+)

diff --git a/sci-misc/llama-cpp/Manifest b/sci-misc/llama-cpp/Manifest
index 2c1322d57c..5ac03312f7 100644
--- a/sci-misc/llama-cpp/Manifest
+++ b/sci-misc/llama-cpp/Manifest
@@ -3,3 +3,4 @@ DIST llama-cpp-0_pre4848.tar.gz 20799416 BLAKE2B 
6731dd8ab01f66fca24ad385c2611bc
 DIST llama-cpp-0_pre5097.tar.gz 21018571 BLAKE2B 
001241580964aa6874a3aa4dbfa0a8cda58a144578992f6a6df7c5c7887cda847503f47c7f3be7b19bb3758ab6ce8de60435e29129cac71672160b29b1cab340
 SHA512 
86543cd001014fa4fee01a37d46e1794c2ffac7c25c7ed328aa4afd3d615b7f42b617ca5d8a0a78b5a41e31cb81184fc6f55f58ffd9433acb3f36cb947a620a5
 DIST llama-cpp-0_pre5332.tar.gz 21140774 BLAKE2B 
a390d4c1c6902d90d1e779291e1fcbe69ab57eb35a5df0be6fb3d9edc88b086a18bcf48983b3c0b2e88d0cfaaddbfdeee74fb126b8a758547836f5b83dd4bc33
 SHA512 
c19c3a6b47684f9466e2872aa67d8516add69028c4fdc7d1abb7a0ff7d87b92adfdaf773cda87461be8e891285c6de34a4edca70244936e8efaf10cc02126a8d
 DIST llama-cpp-0_pre5633.tar.gz 24986657 BLAKE2B 
6215dbfea54cb23a57419cc5a530be5622ec834c6d005337bcf92c50e152979375592088e215845e8f07c6b3f7eec15132cd15ebf9b0725adabe499951ae4735
 SHA512 
11a1917eb86c7065ea901cb62bdc7a25d8d7b962358570c2c7ae0c2d7abce6d19ebc6af74512593ebafbb4ee23546128cf8bfee5ba769c4f3cd2e254cdc1a1a4
+DIST llama-cpp-0_pre5821.tar.gz 25019017 BLAKE2B 
5bf7e168a690ac02aee17dd72469481db3b7c61db990407596a99f814eef1737e9c83aae18ef27d3cd3cca01159104e702ed114cd28c1291aea03422a0b5c0f2
 SHA512 
7aed0a1a29bb4096d67f781299bf48718021f5a0916451a9bdaada2ac1181cc84cbaeab43811e12c13a10beb0d23f0897cfb5f2f26929a166dfd50d90d026d37

diff --git a/sci-misc/llama-cpp/llama-cpp-9999.ebuild 
b/sci-misc/llama-cpp/llama-cpp-0_pre5821.ebuild
similarity index 89%
copy from sci-misc/llama-cpp/llama-cpp-9999.ebuild
copy to sci-misc/llama-cpp/llama-cpp-0_pre5821.ebuild
index e85f09260c..333c68cfd2 100644
--- a/sci-misc/llama-cpp/llama-cpp-9999.ebuild
+++ b/sci-misc/llama-cpp/llama-cpp-0_pre5821.ebuild
@@ -77,6 +77,10 @@ src_configure() {
                -DBUILD_NUMBER="1"
                -DGENTOO_REMOVE_CMAKE_BLAS_HACK=ON
                -DGGML_CUDA=$(usex cuda ON OFF)
+
+               # avoid clashing with whisper.cpp
+               -DCMAKE_INSTALL_LIBDIR="${EPREFIX}/usr/$(get_libdir)/llama.cpp"
+               -DCMAKE_INSTALL_RPATH="${EPREFIX}/usr/$(get_libdir)/llama.cpp"
        )
 
        if use openblas ; then
@@ -104,4 +108,7 @@ src_configure() {
 src_install() {
        cmake_src_install
        dobin "${BUILD_DIR}/bin/rpc-server"
+
+       # avoid clashing with whisper.cpp
+       rm -rf "${ED}/usr/include"
 }

diff --git a/sci-misc/llama-cpp/llama-cpp-9999.ebuild 
b/sci-misc/llama-cpp/llama-cpp-9999.ebuild
index e85f09260c..333c68cfd2 100644
--- a/sci-misc/llama-cpp/llama-cpp-9999.ebuild
+++ b/sci-misc/llama-cpp/llama-cpp-9999.ebuild
@@ -77,6 +77,10 @@ src_configure() {
                -DBUILD_NUMBER="1"
                -DGENTOO_REMOVE_CMAKE_BLAS_HACK=ON
                -DGGML_CUDA=$(usex cuda ON OFF)
+
+               # avoid clashing with whisper.cpp
+               -DCMAKE_INSTALL_LIBDIR="${EPREFIX}/usr/$(get_libdir)/llama.cpp"
+               -DCMAKE_INSTALL_RPATH="${EPREFIX}/usr/$(get_libdir)/llama.cpp"
        )
 
        if use openblas ; then
@@ -104,4 +108,7 @@ src_configure() {
 src_install() {
        cmake_src_install
        dobin "${BUILD_DIR}/bin/rpc-server"
+
+       # avoid clashing with whisper.cpp
+       rm -rf "${ED}/usr/include"
 }

Reply via email to