mirror of
https://github.com/gentoo-mirror/guru.git
synced 2026-07-19 03:53:22 -04:00
app-accessibility/whisper-cpp: new package, add 1.7.6
Signed-off-by: Sergey Alirzaev <l29ah@riseup.net>
This commit is contained in:
54
app-accessibility/whisper-cpp/whisper-cpp-1.7.6.ebuild
Normal file
54
app-accessibility/whisper-cpp/whisper-cpp-1.7.6.ebuild
Normal file
@@ -0,0 +1,54 @@
|
||||
# Copyright 2023-2024 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
inherit cmake
|
||||
|
||||
MyPN="whisper.cpp"
|
||||
MyP="${MyPN}-${PV}"
|
||||
|
||||
DESCRIPTION="Port of OpenAI's Whisper model in C/C++ "
|
||||
HOMEPAGE="https://github.com/ggml-org/whisper.cpp"
|
||||
SRC_URI="https://github.com/ggml-org/whisper.cpp/archive/refs/tags/v${PV}.tar.gz -> ${MyP}.tar.gz"
|
||||
|
||||
S="${WORKDIR}/${MyP}"
|
||||
|
||||
LICENSE="MIT"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64"
|
||||
IUSE="blas cuda hip opencl sdl2"
|
||||
|
||||
DEPEND="blas? ( virtual/blas )
|
||||
cuda? ( dev-util/nvidia-cuda-toolkit:= )
|
||||
hip? ( sci-libs/hipBLAS:= )
|
||||
opencl? ( sci-libs/clblast:= )
|
||||
sdl2? ( media-libs/libsdl2:= )"
|
||||
RDEPEND="${DEPEND}"
|
||||
|
||||
# Enabling multiple may lead to build failures, whisper-cpp won't use more than one either way
|
||||
REQUIRED_USE="?? ( blas cuda hip opencl )"
|
||||
|
||||
src_prepare() {
|
||||
eapply_user
|
||||
cmake_src_prepare
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
# Note: CUDA and HIP are currently untested. Build failures may occur.
|
||||
# Turning off examples causes errors during configure
|
||||
# -DWHISPER_BUILD_TESTS=$(usex test)
|
||||
local mycmakeargs=(
|
||||
-DWHISPER_BUILD_EXAMPLES=ON
|
||||
-DWHISPER_BLAS=$(usex blas)
|
||||
-DWHISPER_CLBLAST=$(usex opencl)
|
||||
-DWHISPER_CUBLAS=$(usex cuda)
|
||||
-DWHISPER_HIPBLAS=$(usex hip)
|
||||
-DWHISPER_SDL2=$(usex sdl2)
|
||||
)
|
||||
cmake_src_configure
|
||||
}
|
||||
|
||||
src_install() {
|
||||
cmake_src_install
|
||||
}
|
||||
Reference in New Issue
Block a user