From patchwork Wed Mar 24 01:07:18 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: qblade X-Patchwork-Id: 28061 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 0610027BC5C; Wed, 24 Mar 2021 01:08:10 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, FREEMAIL_FROM,MAILING_LIST_MULTI,SPF_HELO_PASS,T_DKIM_INVALID, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 98C0E27BC59 for ; Wed, 24 Mar 2021 01:08:09 +0000 (GMT) Received: from localhost ([::1]:40922 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lOs0G-0003nd-Oj for patchwork@mira.cbaines.net; Tue, 23 Mar 2021 21:08:08 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59788) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lOs0A-0003mB-8P for guix-patches@gnu.org; Tue, 23 Mar 2021 21:08:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:50162) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lOs0A-0005zE-0I for guix-patches@gnu.org; Tue, 23 Mar 2021 21:08:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lOs09-0005ZH-P3 for guix-patches@gnu.org; Tue, 23 Mar 2021 21:08:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#47355] ekho use new method to fix datadir Resent-From: qblade Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 24 Mar 2021 01:08:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 47355 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: To: 47355@debbugs.gnu.org X-Debbugs-Original-To: Guix-patches Received: via spool by submit@debbugs.gnu.org id=B.161654807521388 (code B ref -1); Wed, 24 Mar 2021 01:08:01 +0000 Received: (at submit) by debbugs.gnu.org; 24 Mar 2021 01:07:55 +0000 Received: from localhost ([127.0.0.1]:33475 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lOs03-0005Yu-1o for submit@debbugs.gnu.org; Tue, 23 Mar 2021 21:07:55 -0400 Received: from lists.gnu.org ([209.51.188.17]:42518) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lOrzy-0005Yj-Vp for submit@debbugs.gnu.org; Tue, 23 Mar 2021 21:07:53 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59746) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lOrzy-0003kt-Hi for guix-patches@gnu.org; Tue, 23 Mar 2021 21:07:50 -0400 Received: from mail-40141.protonmail.ch ([185.70.40.141]:33204) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lOrzo-0005nV-JO for guix-patches@gnu.org; Tue, 23 Mar 2021 21:07:49 -0400 Date: Wed, 24 Mar 2021 01:07:18 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail; t=1616548045; bh=OwXnZD5z6EpW9NOL5kJTS7sciPrGaZ+TNcHqlOlz4k4=; h=Date:To:From:Reply-To:Subject:From; b=abJDosxulm5rKEx/Uq3mtZwhr4nimBBfePIjadxmYAMiRl8ODRQ5F4QuXKZxHhDsz n4vJnE0fgLH9MgjoLqyNAJQWdIk3MA8F8TzSm19BLJlX8E9YvNmpB5aQ5wEwN1HddA cGYUYVQB2Og4503knkE4+WxXjFgClDHEpiJKAOOg= Message-ID: MIME-Version: 1.0 Received-SPF: pass client-ip=185.70.40.141; envelope-from=qblade@protonmail.com; helo=mail-40141.protonmail.ch X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" Reply-to: qblade X-ACL-Warn: , qblade via Guix-patches X-Patchwork-Original-From: qblade via Guix-patches via From: qblade X-getmail-retrieved-from-mailbox: Patches I discussed with the developers of this project. It is not recommended to use environment variables to specify the datadir, so I switched to hard-coded paths. From cd6371f4a903a2eda0824f31cbccb1da757ebe34 Mon Sep 17 00:00:00 2001 From: qblade Date: Tue, 23 Mar 2021 13:03:54 +0000 Subject: [PATCH] gnu: ekho: use new method to fix datadir * gnu/packages/speech.scm (ekho): use new method to fix datadir --- gnu/packages/speech.scm | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/gnu/packages/speech.scm b/gnu/packages/speech.scm index 687a3c10cf..cd0e3f80e2 100644 --- a/gnu/packages/speech.scm +++ b/gnu/packages/speech.scm @@ -576,10 +576,20 @@ control.") ("libsndfile" ,libsndfile) ("pulseaudio" ,pulseaudio))) (build-system gnu-build-system) - (native-search-paths - (list (search-path-specification - (variable "EKHO_DATA_PATH") - (files '("share/ekho-data"))))) + (arguments + `(#:phases + (modify-phases %standard-phases + (add-after 'configure 'fix-datadir + (lambda* (#:key outputs #:allow-other-keys) + (let* + ((datadir + (string-append + (assoc-ref outputs "out") "/share/ekho-data"))) + (substitute* "src/ekho_dict.cpp" + (("/usr/local/share/ekho-data") + datadir) + (("/usr/share/ekho-data") + datadir)))))))) (home-page "https://eguidedog.net/ekho.php") (synopsis "Chinese text-to-speech software") (description -- 2.30.2