# Copyright 2023 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 inherit cmake if [[ "${PV}" != "9999" ]]; then KEYWORDS="~amd64" MY_PV="b${PV#0_pre}" S="${WORKDIR}/llama.cpp-${MY_PV}" SRC_URI="https://github.com/ggerganov/llama.cpp/archive/refs/tags/${MY_PV}.tar.gz -> ${P}.tar.gz" else inherit git-r3 EGIT_REPO_URI="https://github.com/ggerganov/llama.cpp.git" fi DESCRIPTION="Port of Facebook's LLaMA model in C/C++" HOMEPAGE="https://github.com/ggerganov/llama.cpp" LICENSE="MIT" SLOT="0" CPU_FLAGS_X86=( avx avx2 f16c ) src_configure() { local mycmakeargs=( -DLLAMA_BUILD_TESTS=OFF -DLLAMA_BUILD_SERVER=ON -DCMAKE_SKIP_BUILD_RPATH=ON -DGGML_NATIVE=0 # don't set march -DBUILD_NUMBER="1" ) cmake_src_configure }