3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/applications/audio/espeak/espeakedit-configurable-sox-path.patch
Bjørn Forsman 4597903ce9 espeakedit: version bump 1.46.02 -> 1.48.03 (and add to channel)
The one-liner gcc buildPhase doesn't work anymore, so I'm using upstream
Makefile instead. The Makefile needs a tiny patch to work (not nixpkgs
specific).

Also fixup path to 'sox' and espeak-data/ (runtime deps) by providing
full paths.

TODO:
Uhm, seems like espeakedit still wants espeak-data/ in $HOME, even
thought I've told it to use $espeak/share/espeak-data. Have to contact
upstream to get this fixed.

Workaround:
  cp -r $(nix-build -A espeak)/share/espeak-data ~
  chmod +w ~/espeak-data
2014-07-22 21:33:25 +02:00

28 lines
1.3 KiB
Diff

Make the path to 'sox' configurable by marking it '@sox@' (easy to match with sed).
Author: Bjørn Forsman
diff -uNr espeakedit-1.48.03.orig/src/compiledata.cpp espeakedit-1.48.03/src/compiledata.cpp
--- espeakedit-1.48.03.orig/src/compiledata.cpp 2014-03-04 17:48:11.000000000 +0100
+++ espeakedit-1.48.03/src/compiledata.cpp 2014-07-22 16:38:50.261388452 +0200
@@ -1884,7 +1884,7 @@
fname2 = msg;
}
- sprintf(command,"sox \"%s%s.wav\" -r %d -c1 -t wav %s\n",path_source,fname2,samplerate_native, fname_temp);
+ sprintf(command,"@sox@ \"%s%s.wav\" -r %d -c1 -t wav %s\n",path_source,fname2,samplerate_native, fname_temp);
if(system(command) != 0)
{
failed = 1;
diff -uNr espeakedit-1.48.03.orig/src/readclause.cpp espeakedit-1.48.03/src/readclause.cpp
--- espeakedit-1.48.03.orig/src/readclause.cpp 2014-03-04 17:48:11.000000000 +0100
+++ espeakedit-1.48.03/src/readclause.cpp 2014-07-22 16:38:37.190440504 +0200
@@ -892,7 +892,7 @@
if((fd_temp = mkstemp(fname_temp)) >= 0)
{
close(fd_temp);
- sprintf(command,"sox \"%s\" -r %d -c1 -t wav %s\n", fname, samplerate, fname_temp);
+ sprintf(command,"@sox@ \"%s\" -r %d -c1 -t wav %s\n", fname, samplerate, fname_temp);
if(system(command) == 0)
{
fname = fname_temp;