GNU bug report logs - #47355
ekho use new method to fix datadir

Previous Next

Package: guix-patches;

Reported by: qblade <qblade <at> protonmail.com>

Date: Wed, 24 Mar 2021 01:08:01 UTC

Severity: normal

To reply to this bug, email your comments to 47355 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#47355; Package guix-patches. (Wed, 24 Mar 2021 01:08:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to qblade <qblade <at> protonmail.com>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Wed, 24 Mar 2021 01:08:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: qblade <qblade <at> protonmail.com>
To: Guix-patches <guix-patches <at> gnu.org>
Subject: ekho use new method to fix datadir
Date: Wed, 24 Mar 2021 01:07:18 +0000
[Message part 1 (text/plain, inline)]
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.
[0001-gnu-ekho-use-new-method-to-fix-datadir.patch (text/x-patch, attachment)]

Information forwarded to guix-patches <at> gnu.org:
bug#47355; Package guix-patches. (Wed, 06 Oct 2021 10:47:02 GMT) Full text and rfc822 format available.

Message #8 received at 47355 <at> debbugs.gnu.org (full text, mbox):

From: 宋文武 <iyzsong <at> outlook.com>
To: qblade <qblade <at> protonmail.com>
Cc: 47355 <at> debbugs.gnu.org
Subject: Re: bug#47355: ekho use new method to fix datadir
Date: Wed, 06 Oct 2021 18:47:51 +0800
[Message part 1 (text/plain, inline)]
qblade <qblade <at> protonmail.com> writes:

> 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.

Hello, I see that while the environment variable EKHO_DATA_PATH is
working fine, hard-coded it may be better.  Also there is a
`-DEKHO_DATA_PATH='"$(datadir)/ekho-data"'` in its Makefile.am, which
should work out-of-the-box without any flags, envs or patching, but it
doesn't...  I'll raise an issue on ekho later for this.

In the meanwhile, we can use this, which is a little better than
patching:
[ekho.diff (text/x-patch, inline)]
diff --git a/gnu/packages/speech.scm b/gnu/packages/speech.scm
index cbc46b32b4..10a4f3fa76 100644
--- a/gnu/packages/speech.scm
+++ b/gnu/packages/speech.scm
@@ -579,10 +579,12 @@ 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
+     '(#:configure-flags
+       (let* ((datadir (string-append (assoc-ref %outputs "out") "/share"))
+              (ekhodatadir (string-append datadir "/ekho-data")))
+         (list (simple-format #f "CXXFLAGS=-DEKHO_DATA_PATH='\"~a\"'"
+                              ekhodatadir)))))
     (home-page "https://eguidedog.net/ekho.php")
     (synopsis "Chinese text-to-speech software")
     (description
[Message part 3 (text/plain, inline)]
What do you think?  Thanks!

This bug report was last modified 3 years and 250 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.