From bea291454398bf7c3ad338be63074f7ab88ff1f5 Mon Sep 17 00:00:00 2001
From: j1nx
Date: Thu, 2 Sep 2021 20:41:14 +0200
Subject: [PATCH] Add picotts
---
buildroot-external/Config.in | 1 +
.../configs/rpi4_64-gui_defconfig | 1 +
buildroot-external/package/picotts/Config.in | 7 +++++++
.../package/picotts/picotts.hash | 2 ++
buildroot-external/package/picotts/picotts.mk | 19 +++++++++++++++++++
5 files changed, 30 insertions(+)
create mode 100644 buildroot-external/package/picotts/Config.in
create mode 100644 buildroot-external/package/picotts/picotts.hash
create mode 100644 buildroot-external/package/picotts/picotts.mk
diff --git a/buildroot-external/Config.in b/buildroot-external/Config.in
index 47982f54..2b0a895d 100644
--- a/buildroot-external/Config.in
+++ b/buildroot-external/Config.in
@@ -81,6 +81,7 @@ endmenu
source "$BR2_EXTERNAL_OPENVOICEOS_PATH/package/lottie-qml/Config.in"
source "$BR2_EXTERNAL_OPENVOICEOS_PATH/package/ncpamixer/Config.in"
source "$BR2_EXTERNAL_OPENVOICEOS_PATH/package/ovos-splash/Config.in"
+ source "$BR2_EXTERNAL_OPENVOICEOS_PATH/package/picotts/Config.in"
source "$BR2_EXTERNAL_OPENVOICEOS_PATH/package/qt5ct/Config.in"
source "$BR2_EXTERNAL_OPENVOICEOS_PATH/package/respeaker/Config.in"
source "$BR2_EXTERNAL_OPENVOICEOS_PATH/package/rpi-eeprom/Config.in"
diff --git a/buildroot-external/configs/rpi4_64-gui_defconfig b/buildroot-external/configs/rpi4_64-gui_defconfig
index b024caf5..29277cbf 100644
--- a/buildroot-external/configs/rpi4_64-gui_defconfig
+++ b/buildroot-external/configs/rpi4_64-gui_defconfig
@@ -601,6 +601,7 @@ BR2_PACKAGE_LIBREM=y
BR2_PACKAGE_LOTTIE_QML=y
BR2_PACKAGE_NCPAMIXER=y
BR2_PACKAGE_OVOS_SPLASH=y
+BR2_PACKAGE_PICOTTS=y
BR2_PACKAGE_QT5CT=y
BR2_PACKAGE_RESPEAKER=y
BR2_PACKAGE_RPI_EEPROM=y
diff --git a/buildroot-external/package/picotts/Config.in b/buildroot-external/package/picotts/Config.in
new file mode 100644
index 00000000..32336773
--- /dev/null
+++ b/buildroot-external/package/picotts/Config.in
@@ -0,0 +1,7 @@
+config BR2_PACKAGE_PICOTTS
+ bool "picotts"
+ help
+ Text to speech voice sinthesizer from SVox,
+ included in Android AOSP.
+
+ https://github.com/naggety/picotts
diff --git a/buildroot-external/package/picotts/picotts.hash b/buildroot-external/package/picotts/picotts.hash
new file mode 100644
index 00000000..7c9d9680
--- /dev/null
+++ b/buildroot-external/package/picotts/picotts.hash
@@ -0,0 +1,2 @@
+# Locally calculated
+sha256 f9556495fd56b96160cdae873ca2dbb0f0a578259c74f4ca939effa3fa1cb101 picotts-21089d223e177ba3cb7e385db8613a093dff74b5.tar.gz
diff --git a/buildroot-external/package/picotts/picotts.mk b/buildroot-external/package/picotts/picotts.mk
new file mode 100644
index 00000000..9c93cf62
--- /dev/null
+++ b/buildroot-external/package/picotts/picotts.mk
@@ -0,0 +1,19 @@
+################################################################################
+#
+# picotts
+#
+################################################################################
+
+PICOTTS_VERSION = 21089d223e177ba3cb7e385db8613a093dff74b5
+PICOTTS_SITE = $(call github,naggety,picotts,$(PICOTTS_VERSION))
+PICOTTS_LICENSE = MIT
+PICOTTS_LICENSE_FILES = COPYING
+PICOTTS_AUTORECONF = YES
+PICOTTS_SUBDIR = pico
+PICOTTS_DEPENDENCIES = host-pkgconf host-automake host-autoconf host-libtool
+
+define PICOTTS_RUN_AUTOGEN
+ cd $(@D)/pico && PATH=$(BR_PATH) ./autogen.sh
+endef
+
+$(eval $(autotools-package))