Install this version:
emerge -a =app-accessibility/whisper-cpp-9999
If this version is masked, you can unmask it using the autounmask tool or standard emerge options:
autounmask =app-accessibility/whisper-cpp-9999
Or alternatively:
emerge --autounmask-write -a =app-accessibility/whisper-cpp-9999
| Version | EAPI | Keywords | Slot |
|---|---|---|---|
| 9999 | 8 | 0 |
# Copyright 1999-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
PYTHON_COMPAT=( python3_{12..15} )
inherit cuda cmake git-r3 python-any-r1
DESCRIPTION="Port of OpenAI's Whisper model in C/C++"
HOMEPAGE="https://github.com/ggml-org/whisper.cpp"
EGIT_REPO_URI="https://github.com/ggml-org/whisper.cpp"
LICENSE="MIT"
SLOT="0"
IUSE="blas cuda ffmpeg hip opencl sdl2 vulkan"
CDEPEND="blas? ( sci-libs/openblas )
cuda? ( dev-util/nvidia-cuda-toolkit:= )
ffmpeg? ( media-video/ffmpeg:= )
hip? ( sci-libs/hipBLAS:= )
sdl2? ( media-libs/libsdl2:= )"
DEPEND="${CDEPEND}
opencl? ( dev-util/opencl-headers )
vulkan? ( dev-util/vulkan-headers )
"
RDEPEND="${CDEPEND}
opencl? ( dev-libs/opencl-icd-loader )
vulkan? ( media-libs/vulkan-loader )
"
# The OpenCL backend embeds its kernels with a stdlib-only Python script.
BDEPEND="
opencl? ( ${PYTHON_DEPS} )
vulkan? ( media-libs/shaderc )
"
pkg_setup() {
use opencl && python-any-r1_pkg_setup
}
src_configure() {
local mycmakeargs=(
-DWHISPER_BUILD_EXAMPLES=ON
-DWHISPER_BUILD_TESTS=OFF
-DGGML_NATIVE=OFF
-DGGML_CCACHE=OFF
-DGGML_BLAS=$(usex blas)
-DGGML_OPENCL=$(usex opencl)
# ggml accepts only Adreno and Intel GPUs, and its Adreno kernels reject
# every other device, so they are enabled only where Adreno exists.
# verified 2026-10-06
-DGGML_OPENCL_USE_ADRENO_KERNELS=$(usex arm64)
-DGGML_CUDA=$(usex cuda)
-DGGML_HIP=$(usex hip)
-DGGML_VULKAN=$(usex vulkan)
-DWHISPER_FFMPEG=$(usex ffmpeg)
-DWHISPER_SDL2=$(usex sdl2)
)
if use cuda; then
# nvcc rejects a gcc newer than its toolkit supports; cuda_gccdir picks
# the newest installed one it accepts. It returns nothing under a
# non-GNU toolchain, and a path that does not exist where CHOST is not
# *-pc-linux-gnu; nvcc then keeps its default. verified 2026-10-08
local cuda_gcc_bindir
if cuda_gcc_bindir="$(cuda_gccdir)" && [[ -x ${cuda_gcc_bindir}/g++ ]]; then
mycmakeargs+=( -DCMAKE_CUDA_HOST_COMPILER="${cuda_gcc_bindir}/g++" )
fi
fi
if use blas; then
# Generic FindBLAS may select a library without cblas_sgemm.
mycmakeargs+=( -DGGML_BLAS_VENDOR=OpenBLAS )
fi
cmake_src_configure
}
src_install() {
cmake_src_install
newinitd "${FILESDIR}/${PN}.init" "${PN}"
newconfd "${FILESDIR}/${PN}.confd" "${PN}"
}
Manage flags for this package:
euse -i <flag> -p app-accessibility/whisper-cpp |
euse -E <flag> -p app-accessibility/whisper-cpp |
euse -D <flag> -p app-accessibility/whisper-cpp
blas? ( sci-libs/openblas ) cuda? ( dev-util/nvidia-cuda-toolkit:= ) ffmpeg? ( media-video/ffmpeg:= ) hip? ( sci-libs/hipBLAS:= ) sdl2? ( media-libs/libsdl2:= ) opencl? ( dev-util/opencl-headers ) vulkan? ( dev-util/vulkan-headers )
blas? ( sci-libs/openblas ) cuda? ( dev-util/nvidia-cuda-toolkit:= ) ffmpeg? ( media-video/ffmpeg:= ) hip? ( sci-libs/hipBLAS:= ) sdl2? ( media-libs/libsdl2:= ) opencl? ( dev-libs/opencl-icd-loader ) vulkan? ( media-libs/vulkan-loader )
opencl? ( ) vulkan? ( media-libs/shaderc )