commit: b722747e8f10a905d0d5ba63f04f1a143d598643 Author: Sergey Alirzaev <l29ah <AT> riseup <DOT> net> AuthorDate: Sat Jul 12 22:50:21 2025 +0000 Commit: Sergey Alirzaev <zl29ah <AT> gmail <DOT> com> CommitDate: Sat Jul 12 22:50:21 2025 +0000 URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=b722747e
app-accessibility/whisper-cpp: new package, add 1.7.6 Signed-off-by: Sergey Alirzaev <l29ah <AT> riseup.net> app-accessibility/whisper-cpp/Manifest | 1 + app-accessibility/whisper-cpp/metadata.xml | 15 ++++++ .../whisper-cpp/whisper-cpp-1.7.6.ebuild | 54 ++++++++++++++++++++++ 3 files changed, 70 insertions(+) diff --git a/app-accessibility/whisper-cpp/Manifest b/app-accessibility/whisper-cpp/Manifest new file mode 100644 index 0000000000..6ed96e375f --- /dev/null +++ b/app-accessibility/whisper-cpp/Manifest @@ -0,0 +1 @@ +DIST whisper.cpp-1.7.6.tar.gz 7307730 BLAKE2B 3c03346f2f2aef0aed5c4c2dc856efc730f6a7440106fde0db47ac7d042830c5c5d5cd18c5a8ab4871f54ae60e50aa89c0900bb6509f9c61dc1745dd497b74f2 SHA512 7e0ec9d6afe234afaaa83d7d69051504252c27ecdacbedf3d70992429801bcd1078794a0bb76cf4dafb74131dd0f506bd24c3f3100815c35b8ac2b12336492ef diff --git a/app-accessibility/whisper-cpp/metadata.xml b/app-accessibility/whisper-cpp/metadata.xml new file mode 100644 index 0000000000..9ac72d30b5 --- /dev/null +++ b/app-accessibility/whisper-cpp/metadata.xml @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <use> + <flag name="hip">Build a HIP (ROCm) backend</flag> + <flag name="sdl2">Build and install example applications that use media-libs/libsdl2</flag> + </use> + <upstream> + <remote-id type="github">ggml-org/whisper.cpp</remote-id> + </upstream> + <maintainer type="person"> + <email>[email protected]</email> + <name>Sergey Alirzaev</name> + </maintainer> +</pkgmetadata> diff --git a/app-accessibility/whisper-cpp/whisper-cpp-1.7.6.ebuild b/app-accessibility/whisper-cpp/whisper-cpp-1.7.6.ebuild new file mode 100644 index 0000000000..2b3876511d --- /dev/null +++ b/app-accessibility/whisper-cpp/whisper-cpp-1.7.6.ebuild @@ -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 +}
