54 lines
867 B
Bash
54 lines
867 B
Bash
# Copyright 1999-2026 Gentoo Authors
|
|
# Distributed under the terms of the GNU General Public License v2
|
|
|
|
EAPI=8
|
|
|
|
inherit cmake git-r3
|
|
|
|
DESCRIPTION="Diffusion model inference in pure C/C++"
|
|
HOMEPAGE="https://github.com/leejet/stable-diffusion.cpp"
|
|
EGIT_REPO_URI="https://github.com/leejet/stable-diffusion.cpp.git"
|
|
EGIT_COMMIT="refs/tags/master-841-6b3edaa"
|
|
|
|
LICENSE="MIT"
|
|
SLOT="0"
|
|
KEYWORDS="amd64 x86"
|
|
IUSE="vulkan"
|
|
|
|
DEPEND="
|
|
sci-ml/ggml
|
|
media-libs/libwebm
|
|
vulkan? (
|
|
dev-util/glslang
|
|
dev-util/vulkan-headers
|
|
media-libs/vulkan-loader
|
|
)
|
|
"
|
|
|
|
RDEPEND="
|
|
${DEPEND}
|
|
"
|
|
|
|
src_configure() {
|
|
local mycmakeargs=(
|
|
# -DSD_BUILD_EXAMPLES=OFF
|
|
|
|
-DSD_WEBP=ON
|
|
-DSD_WEBM=ON
|
|
)
|
|
|
|
if use vulkan; then
|
|
mycmakeargs+=(
|
|
-DSD_VULKAN=ON
|
|
)
|
|
fi
|
|
|
|
cmake_src_configure
|
|
}
|
|
|
|
src_install() {
|
|
# cmake_src_install
|
|
dobin ${BUILD_DIR}/bin/sd-cli
|
|
dobin ${BUILD_DIR}/bin/sd-server
|
|
}
|