Subject: [bug#69628] [PATCH WIP qt-team 19/21] gnu: Add qtspeech.

From: Zheng Junjie <[email-masked]>
Date: Fri, 8 Mar 2024 14:30:19 +0800

* gnu/packages/qt.scm (qtspeech): New variable.

Change-Id: Iba3277b2774b80366960b57207ed179979e54215
---
 gnu/packages/qt.scm | 32 ++++++++++++++++++++++++++++++++
 1 file changed, 32 insertions(+)

diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm
index cf4baee99b..4fb07e1a36 100644
--- a/gnu/packages/qt.scm
+++ b/gnu/packages/qt.scm
@@ -2580,6 +2580,38 @@ (define-public qtspeech-5
 In such a scenario, the messaging application can read out the incoming
 message.")))
 
+(define-public qtspeech
+  (package
+    (inherit qtspeech-5)
+    (name "qtspeech")
+    (version "6.6.2")
+    (source (origin
+              (method url-fetch)
+              (uri (qt-url name version))
+              (sha256
+               (base32
+                "1qvf3p2p1pc5fw40d8zq0iawaaqkc0dp5yx85b1dnw1j809bn8y0"))))
+    (build-system qt-build-system)
+    (arguments
+     (list #:phases
+           #~(modify-phases %standard-phases
+               (delete 'check)               ;move after the install phase
+               (add-after 'install 'check
+                 (assoc-ref %standard-phases 'check))
+               (add-before 'check 'prepare-for-tests
+                 (lambda* (#:key outputs #:allow-other-keys)
+                   (setenv "QML2_IMPORT_PATH"
+                           (string-append (assoc-ref outputs "out")
+                                          "/lib/qt6/qml:"
+                                          (getenv "QML2_IMPORT_PATH")))))
+               (add-after 'install 'delete-installed-tests
+                 (lambda _
+                   (delete-file-recursively
+                    (string-append #$output "/tests")))))))
+    (native-inputs '())
+    (propagated-inputs (list qtmultimedia))
+    (inputs (list qtbase qtdeclarative))))
+
 (define-public qtvirtualkeyboard-5
   (package
     (inherit qtsvg-5)
-- 
2.41.0