Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions common/shlibs
Original file line number Diff line number Diff line change
Expand Up @@ -4695,3 +4695,5 @@ libcgif.so.0 cgif-0.5.3_1
libdsk.so.5 libdsk-1.5.22_1
libblend2d.so libblend2d-0.21.2_1
libqjs.so.0 libquickjs-ng-0.18.0_1
libggml.so.1 ggml-1.1.1_1
libggml-base.so.1 ggml-1.1.1_1
1 change: 1 addition & 0 deletions srcpkgs/ggml-devel
39 changes: 39 additions & 0 deletions srcpkgs/ggml/template
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Template file for 'ggml'
pkgname=ggml
version=1.1.1
revision=1
build_style=cmake
configure_args="-DBUILD_SHARED_LIBS=ON -DGGML_NATIVE=OFF -DGGML_BUILD_EXAMPLES=OFF
-DGGML_VULKAN=ON"
hostmakedepends="shaderc"
makedepends="libgomp-devel vulkan-loader-devel Vulkan-Headers SPIRV-Headers"
short_desc="Tensor library for machine learning"
maintainer="Mateusz Sylwestrzak <slymattz@gmail.com>"
license="MIT"
homepage="https://github.com/ggml-org/ggml"
changelog="https://github.com/ggml-org/ggml/releases"
distfiles="https://github.com/ggml-org/ggml/archive/refs/tags/v${version}.tar.gz"
checksum=ee3f83e4839e4be8201fd87019855d70713362b7b657d2fde283d95274a7b8b3

case "$XBPS_TARGET_MACHINE" in
armv6l*)
# Error: selected processor does not support yield in ARM mode
# Vulkan offers little practical benefit on ARMv6 hardware anyway
configure_args="${configure_args/-DGGML_VULKAN=ON/-DGGML_VULKAN=OFF}"
;;
esac

post_install() {
vlicense LICENSE
}

ggml-devel_package() {
short_desc+=" - development files"
depends="${sourcepkg}>=${version}_${revision}"
pkg_install() {
vmove usr/include
vmove "usr/lib/*.so"
vmove usr/lib/pkgconfig
vmove usr/lib/cmake
}
}
1 change: 1 addition & 0 deletions srcpkgs/whisper.cpp-devel
1 change: 1 addition & 0 deletions srcpkgs/whisper.cpp-server
50 changes: 50 additions & 0 deletions srcpkgs/whisper.cpp/template
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# Template file for 'whisper.cpp'
pkgname=whisper.cpp
version=1.9.6
revision=1
build_style=cmake
configure_args="-DWHISPER_COMMON_FFMPEG=ON -DWHISPER_BUILD_SERVER=ON
-DWHISPER_USE_SYSTEM_GGML=ON -DWHISPER_BUILD_IS_DEV=OFF"
hostmakedepends="pkg-config"
makedepends="ffmpeg6-devel ggml-devel libgomp-devel"
short_desc="Port of OpenAI's Whisper model in C/C++"
maintainer="Mateusz Sylwestrzak <slymattz@gmail.com>"
license="MIT"
homepage="https://github.com/ggml-org/whisper.cpp"
changelog="https://github.com/ggml-org/whisper.cpp/releases"
distfiles="https://github.com/ggml-org/whisper.cpp/archive/refs/tags/v${version}.tar.gz"
checksum=7ab15dc88022d2425ad94dcffd8abbf1b6d7018089b4e48d6b40780738e0b445

do_check() {
# test-vad-full: needs ggml-base.en.bin model to pass
# test-whisper-cli-large: takes too much resources
# test-parakeet: requires network and additional tools
ctest --test-dir build \
-E 'test-vad-full|test-whisper-cli-large|test-parakeet'
}

post_install() {
vlicense LICENSE

# downloads Whisper model files that have already been converted to ggml format
vbin models/download-ggml-model.sh download-ggml-model
}

whisper.cpp-server_package() {
short_desc+=" - server"
depends="${sourcepkg}>=${version}_${revision}"
pkg_install() {
vmove usr/bin/whisper-server
}
}

whisper.cpp-devel_package() {
short_desc+=" - development files"
depends="${sourcepkg}>=${version}_${revision}"
pkg_install() {
vmove usr/include
vmove "usr/lib/*.so"
vmove usr/lib/pkgconfig
vmove usr/lib/cmake
}
}