From: qblade via Guix-patches via <guix-patches@gnu.org>
To: 47355@debbugs.gnu.org
Subject: [bug#47355] ekho use new method to fix datadir
Date: Wed, 24 Mar 2021 01:07:18 +0000 [thread overview]
Message-ID: <oiDwRbkRiKQ62jNg6L9bQ-JVrYEjcXQncETHW8QqGtQDEveqc1C7qihSwBJ-tTtsZ3iAC3cDwvsBRvF-c_n99-LgwStcoFOFPaz513RFQ-s=@protonmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 158 bytes --]
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.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-gnu-ekho-use-new-method-to-fix-datadir.patch --]
[-- Type: text/x-patch; name=0001-gnu-ekho-use-new-method-to-fix-datadir.patch, Size: 1487 bytes --]
From cd6371f4a903a2eda0824f31cbccb1da757ebe34 Mon Sep 17 00:00:00 2001
From: qblade <qblade@protonmail.com>
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
next reply other threads:[~2021-03-24 1:08 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-24 1:07 qblade via Guix-patches via [this message]
2021-10-06 10:47 ` [bug#47355] ekho use new method to fix datadir 宋文武
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='oiDwRbkRiKQ62jNg6L9bQ-JVrYEjcXQncETHW8QqGtQDEveqc1C7qihSwBJ-tTtsZ3iAC3cDwvsBRvF-c_n99-LgwStcoFOFPaz513RFQ-s=@protonmail.com' \
--to=guix-patches@gnu.org \
--cc=47355@debbugs.gnu.org \
--cc=qblade@protonmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).