2026-02-07 10:00:33 +00:00
# not enough RAM to compile
ONLY_FOR_ARCHS = ${ LP64_ARCHS }
2026-06-07 18:52:29 +00:00
BROKEN-riscv64 = error: incompatible pointer types passing 'const int64_t *' ( aka 'const long long *' ) to parameter of type 'const long *' [ -Wincompatible-pointer-types]
2026-02-07 10:00:33 +00:00
2026-02-04 18:38:03 +00:00
COMMENT = diffusion model inference system
GH_ACCOUNT = leejet
GH_PROJECT = stable-diffusion.cpp
2026-06-08 19:55:51 +00:00
GH_TAGNAME = master-685-19bdfe2
2026-05-06 16:21:29 +00:00
PKGNAME = stable-diffusion.cpp-0.0.${ GH_TAGNAME : S /master-// : C /-.+//g }
2026-06-09 19:12:50 +00:00
REVISION = 0
2026-02-04 18:38:03 +00:00
2026-06-08 19:55:51 +00:00
VERSION.ggml = 0ce7ad348a3151e1da9f65d962044546bcaad421
2026-02-04 18:38:03 +00:00
DISTFILES.ggml = ${ VERSION .ggml } .tar.gz
SITES.ggml = https://github.com/ggml-org/ggml/archive/
CATEGORIES = graphics
FLAVORS = vulkan
FLAVOR ?=
2026-05-16 11:20:25 +00:00
MAINTAINER = Volker Schlecht <volker@openbsd.org>
2026-03-17 17:35:00 +00:00
2026-02-04 18:38:03 +00:00
# MIT
PERMIT_PACKAGE = Yes
WANTLIB += ${ COMPILER_LIBCXX } c m
MODULES = devel/cmake
COMPILER = base-clang ports-gcc
CONFIGURE_ARGS += -DGGML_CCACHE= off \
-DSD_BUILD_SHARED_GGML_LIB= off \
-DSD_USE_SYSTEM_GGML= off
CFLAGS += -I${ LOCALBASE } /include
CXXFLAGS += -I${ LOCALBASE } /include
DOCDIR = ${ PREFIX } /share/doc/stable-diffusion.cpp/
.if ${FLAVOR : Mvulkan }
CONFIGURE_ARGS += -DSD_VULKAN= on
2026-06-09 19:12:50 +00:00
BUILD_DEPENDS += graphics/shaderc \
graphics/spirv-headers
2026-02-04 18:38:03 +00:00
LIB_DEPENDS += graphics/vulkan-loader
WANTLIB += vulkan
. e n d i f
post-extract :
cd ${ WRKSRC } && rm -r ./ggml && mv ../ggml-${ VERSION .ggml } ./ggml
post-install :
# stable-diffusion.cpp needs its own ggml that's statically linked.
# installing it would create conflicts with devel/libggml
rm -r ${ PREFIX } /include/{ ggml*,gguf*}
rm -r ${ PREFIX } /lib/libggml*
rm -rf ${ PREFIX } /lib/cmake
${ INSTALL_DATA_DIR } ${ DOCDIR }
${ INSTALL_DATA } ${ WRKSRC } /docs/* ${ DOCDIR }
. i n c l u d e < b s d . p o r t . m k >