From c630fb1ee03355af2db790b8b4cc1b1e169e1691 Mon Sep 17 00:00:00 2001
From: j1nx
Date: Tue, 17 Jan 2023 10:19:18 +0100
Subject: [PATCH] Bump whispercpp and build the example tools.
---
buildroot-external/configs/rpi3_64-gui_defconfig | 1 +
buildroot-external/configs/rpi4_64-gui_defconfig | 1 +
.../package/whispercpp/whispercpp.hash | 2 +-
.../package/whispercpp/whispercpp.mk | 15 +++++++++++++--
4 files changed, 16 insertions(+), 3 deletions(-)
diff --git a/buildroot-external/configs/rpi3_64-gui_defconfig b/buildroot-external/configs/rpi3_64-gui_defconfig
index 71311126..370b3087 100644
--- a/buildroot-external/configs/rpi3_64-gui_defconfig
+++ b/buildroot-external/configs/rpi3_64-gui_defconfig
@@ -285,6 +285,7 @@ BR2_PACKAGE_LIBERATION=y
BR2_PACKAGE_MESA3D=y
BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_V3D=y
BR2_PACKAGE_MESA3D_OPENGL_ES=y
+BR2_PACKAGE_SDL2=y
BR2_PACKAGE_QT5=y
BR2_PACKAGE_QT53D=y
BR2_PACKAGE_QT5BASE_CONCURRENT=y
diff --git a/buildroot-external/configs/rpi4_64-gui_defconfig b/buildroot-external/configs/rpi4_64-gui_defconfig
index fb7951df..7fd510fb 100644
--- a/buildroot-external/configs/rpi4_64-gui_defconfig
+++ b/buildroot-external/configs/rpi4_64-gui_defconfig
@@ -286,6 +286,7 @@ BR2_PACKAGE_LIBERATION=y
BR2_PACKAGE_MESA3D=y
BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_V3D=y
BR2_PACKAGE_MESA3D_OPENGL_ES=y
+BR2_PACKAGE_SDL2=y
BR2_PACKAGE_QT5=y
BR2_PACKAGE_QT53D=y
BR2_PACKAGE_QT5BASE_CONCURRENT=y
diff --git a/buildroot-external/package/whispercpp/whispercpp.hash b/buildroot-external/package/whispercpp/whispercpp.hash
index 306a77b5..c596aa74 100644
--- a/buildroot-external/package/whispercpp/whispercpp.hash
+++ b/buildroot-external/package/whispercpp/whispercpp.hash
@@ -1,2 +1,2 @@
# Locally computed
-sha256 e974f0ab60bafce03512faadc22c2fbcc47526622fa36a6b1cee28155d00f6e0 whispercpp-aa6adda26e1ee9843dddb013890e3312bee52cfe.tar.gz
+sha256 df4dcd394a0b5fbd74c8f39f144edd7737b748f9f2c2bbf317d5c8dfc609b8fa whispercpp-8738427dd60bda894df1ff3c12317cca2e960016.tar.gz
diff --git a/buildroot-external/package/whispercpp/whispercpp.mk b/buildroot-external/package/whispercpp/whispercpp.mk
index f17398f1..9f03d8ca 100644
--- a/buildroot-external/package/whispercpp/whispercpp.mk
+++ b/buildroot-external/package/whispercpp/whispercpp.mk
@@ -4,7 +4,7 @@
#
################################################################################
-WHISPERCPP_VERSION = aa6adda26e1ee9843dddb013890e3312bee52cfe
+WHISPERCPP_VERSION = 8738427dd60bda894df1ff3c12317cca2e960016
WHISPERCPP_SITE = $(call github,ggerganov,whisper.cpp,$(WHISPERCPP_VERSION))
WHISPERCPP_LICENSE = Apache License 2.0
@@ -14,6 +14,17 @@ WHISPERCPP_SUPPORTS_IN_SOURCE_BUILD = NO
WHISPERCPP_CONF_OPTS = \
-DBUILD_SHARED_LIBS_DEFAULT=ON \
- -DWHISPER_SUPPORT_OPENBLAS=ON
+ -DWHISPER_SUPPORT_OPENBLAS=ON \
+ -DWHISPER_BUILD_TESTS=ON \
+ -DWHISPER_BUILD_EXAMPLES=ON \
+ -DWHISPER_SUPPORT_SDL2=ON
+
+WHISPERCPP_POST_INSTALL_TARGET_HOOKS = WHISPERCPP_INSTALL_BINS
+
+define WHISPERCPP_INSTALL_BINS
+ mkdir -p $(TARGET_DIR)/usr/bin/whispercpp
+ $(INSTALL) -D -m 755 $(@D)/buildroot-build/bin/* \
+ $(TARGET_DIR)/usr/bin/whispercpp/
+endef
$(eval $(cmake-package))