unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: 宋文武 <iyzsong@outlook.com>
To: qblade <qblade@protonmail.com>
Cc: 47355@debbugs.gnu.org
Subject: [bug#47355] ekho use new method to fix datadir
Date: Wed, 06 Oct 2021 18:47:51 +0800	[thread overview]
Message-ID: <TYCP286MB18974DED26CB6C4B9301C183A3B09@TYCP286MB1897.JPNP286.PROD.OUTLOOK.COM> (raw)
In-Reply-To: <oiDwRbkRiKQ62jNg6L9bQ-JVrYEjcXQncETHW8QqGtQDEveqc1C7qihSwBJ-tTtsZ3iAC3cDwvsBRvF-c_n99-LgwStcoFOFPaz513RFQ-s=@protonmail.com> (qblade@protonmail.com's message of "Wed, 24 Mar 2021 01:07:18 +0000")

[-- Attachment #1: Type: text/plain, Size: 606 bytes --]

qblade <qblade@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:

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: ekho.diff --]
[-- Type: text/x-patch, Size: 875 bytes --]

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

[-- Attachment #3: Type: text/plain, Size: 29 bytes --]


What do you think?  Thanks!

      reply	other threads:[~2021-10-06 10:47 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-24  1:07 [bug#47355] ekho use new method to fix datadir qblade via Guix-patches via
2021-10-06 10:47 ` 宋文武 [this message]

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=TYCP286MB18974DED26CB6C4B9301C183A3B09@TYCP286MB1897.JPNP286.PROD.OUTLOOK.COM \
    --to=iyzsong@outlook.com \
    --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).