termux-packages/packages/speechd/tmpdir.patch

368 lines
15 KiB
Diff

--- a/config/modules/baratinoo.conf 2022-04-15 04:49:54.305384622 +0000
+++ b/config/modules/baratinoo.conf 2022-04-15 14:12:51.719383602 +0000
@@ -38,7 +38,7 @@
# DebugFile specifies the file where the debugging information
# should be stored (note that the log is overwritten each time
# the module starts)
-# DebugFile "/tmp/debug-baratinoo"
+# DebugFile "@TERMUX_PREFIX@/tmp/debug-baratinoo"
# Copyright (C) 2017 Colomban Wendling <cwendling@hypra.fr>
--- a/config/modules/festival.conf 2022-04-15 04:49:54.321385739 +0000
+++ b/config/modules/festival.conf 2022-04-15 14:12:51.730383586 +0000
@@ -70,7 +70,7 @@
# If FestivalDebugSaveOutput is set to 1, it writes the produced sound tracks
-# to /tmp/debug-festival-*.snd before it says them. You can later browse them
+# to @TERMUX_PREFIX@/tmp/debug-festival-*.snd before it says them. You can later browse them
# for debugging purposes. They are numbered in order starting from 0.
# FestivalDebugSaveOutput 0
--- a/config/modules/flite.conf 2022-04-15 04:49:54.321385739 +0000
+++ b/config/modules/flite.conf 2022-04-15 14:12:51.734383580 +0000
@@ -12,7 +12,7 @@
# DebugFile specifies the file where the debugging information
# should be stored (note that the log is overwritten each time
# the module starts)
-# DebugFile "/tmp/debug-flite"
+# DebugFile "@TERMUX_PREFIX@/tmp/debug-flite"
# Copyright (C) 2003-2008 Brailcom, o.p.s
--- a/config/modules/ibmtts.conf 2022-04-15 04:49:54.321385739 +0000
+++ b/config/modules/ibmtts.conf 2022-04-15 14:12:51.737383576 +0000
@@ -11,7 +11,7 @@
# should be stored (note that the log is overwritten each time
# the module starts)
-# DebugFile "/tmp/debug-ibmtts"
+# DebugFile "@TERMUX_PREFIX@/tmp/debug-ibmtts"
# The number of samples returned by IBM TTS.
--- a/config/modules/ivona.conf 2022-04-15 04:49:54.321385739 +0000
+++ b/config/modules/ivona.conf 2022-04-15 14:12:51.741383570 +0000
@@ -14,7 +14,7 @@
# DebugFile specifies the file where the debugging information
# should be stored (note that the log is overwritten each time
# the module starts)
-# DebugFile "/tmp/debug-ivona"
+# DebugFile "@TERMUX_PREFIX@/tmp/debug-ivona"
# IvonaMinCapLet overrides DefaultCapLetRecognition. Set to:
# 1 for "icon" - play icon even if default is "none"
--- a/config/modules/llia_phon-generic.conf 2022-04-15 04:49:54.322385808 +0000
+++ b/config/modules/llia_phon-generic.conf 2022-04-15 14:12:51.745383564 +0000
@@ -15,7 +15,7 @@
# DebugFile specifies the file where the debugging information
# should be stored (note that the log is overwritten each time
# the module starts)
-# DebugFile "/tmp/debug-llia-phon-generic"
+# DebugFile "@TERMUX_PREFIX@/tmp/debug-llia-phon-generic"
# GenericExecuteSynth is the shell command that should be
# executed in order to say some message. This command must
--- a/config/modules/swift-generic.conf 2022-04-15 04:49:54.322385808 +0000
+++ b/config/modules/swift-generic.conf 2022-04-15 14:12:51.751383555 +0000
@@ -27,7 +27,7 @@
# can modify this value, see other parameters).
# The command can be split into more lines, if necessary, using '\'.
GenericExecuteSynth \
- "printf %s \'$DATA\' >/tmp/swift-speak.txt && /opt/swift/bin/swift -p speech/rate=$RATE,speech/pitch/shift=$PITCH,tts/content-type=text/plain,tts/text-encoding=utf-8,config/default-voice=$VOICE -f /tmp/swift-speak.txt -o /tmp/swift-speak.wav&& $PLAY_COMMAND /tmp/swift-speak.wav"
+ "printf %s \'$DATA\' >@TERMUX_PREFIX@/tmp/swift-speak.txt && /opt/swift/bin/swift -p speech/rate=$RATE,speech/pitch/shift=$PITCH,tts/content-type=text/plain,tts/text-encoding=utf-8,config/default-voice=$VOICE -f @TERMUX_PREFIX@/tmp/swift-speak.txt -o @TERMUX_PREFIX@/tmp/swift-speak.wav&& $PLAY_COMMAND @TERMUX_PREFIX@/tmp/swift-speak.wav"
GenericCmdDependency "/opt/swift/bin/swift"
GenericSoundIconFolder "/usr/share/sounds/sound-icons/"
--- a/config/modules/voxin.conf 2022-04-15 04:49:54.322385808 +0000
+++ b/config/modules/voxin.conf 2022-04-15 14:12:51.754383550 +0000
@@ -11,7 +11,7 @@
# should be stored (note that the log is overwritten each time
# the module starts)
-# DebugFile "/tmp/debug-ibmtts"
+# DebugFile "@TERMUX_PREFIX@/tmp/debug-ibmtts"
# The number of samples returned by IBM TTS.
--- a/doc/speech-dispatcher-cs.html 2022-04-15 04:49:54.322385808 +0000
+++ b/doc/speech-dispatcher-cs.html 2022-04-15 14:12:51.783383507 +0000
@@ -871,7 +871,7 @@
</p><div class="example">
<pre class="example">GenericExecuteSynth \
&quot;epos-say -o --language $LANG --voice $VOICE --init_f $PITCH --init_t $RATE \
-\&quot;$DATA\&quot; | sed -e s+unknown.*$++ &gt;/tmp/epos-said.wav &amp;&amp; play /tmp/epos-said.wav &gt;/dev/null&quot;
+\&quot;$DATA\&quot; | sed -e s+unknown.*$++ &gt;@TERMUX_PREFIX@/tmp/epos-said.wav &amp;&amp; play @TERMUX_PREFIX@/tmp/epos-said.wav &gt;/dev/null&quot;
</pre></div>
</dd></dl>
--- a/doc/speech-dispatcher-cs.texi 2022-04-15 04:49:54.323385878 +0000
+++ b/doc/speech-dispatcher-cs.texi 2022-04-15 14:12:51.789383498 +0000
@@ -744,7 +744,7 @@
@example
GenericExecuteSynth \
"epos-say -o --language $LANG --voice $VOICE --init_f $PITCH --init_t $RATE \
-\"$DATA\" | sed -e s+unknown.*$++ >/tmp/epos-said.wav && play /tmp/epos-said.wav >/dev/null"
+\"$DATA\" | sed -e s+unknown.*$++ >@TERMUX_PREFIX@/tmp/epos-said.wav && play @TERMUX_PREFIX@/tmp/epos-said.wav >/dev/null"
@end example
@end defvr
--- a/doc/speech-dispatcher.html 2022-04-15 04:49:54.323385878 +0000
+++ b/doc/speech-dispatcher.html 2022-04-15 14:12:51.794383491 +0000
@@ -574,8 +574,8 @@
</p>
<div class="example">
<pre class="example">killall -u `whoami` speech-dispatcher
-speech-dispatcher -c unix_socket -S /tmp/my.sock
-SPEECHD_ADDRESS=unix_socket:/tmp/my.sock spd-say &quot;test&quot;
+speech-dispatcher -c unix_socket -S @TERMUX_PREFIX@/tmp/my.sock
+SPEECHD_ADDRESS=unix_socket:@TERMUX_PREFIX@/tmp/my.sock spd-say &quot;test&quot;
</pre></div>
<hr>
@@ -1007,7 +1007,7 @@
</p><div class="example">
<pre class="example">GenericExecuteSynth \
&quot;epos-say -o --language $LANG --voice $VOICE --init_f $PITCH --init_t $RATE \
-\&quot;$DATA\&quot; | sed -e s+unknown.*$++ &gt;/tmp/epos-said.wav &amp;&amp; play /tmp/epos-said.wav &gt;/dev/null&quot;
+\&quot;$DATA\&quot; | sed -e s+unknown.*$++ &gt;@TERMUX_PREFIX@/tmp/epos-said.wav &amp;&amp; play @TERMUX_PREFIX@/tmp/epos-said.wav &gt;/dev/null&quot;
</pre></div>
</dd></dl>
@@ -1436,7 +1436,7 @@
<p>Examples of valid address lines are:
</p><div class="example">
<pre class="example">unix_socket
-unix_socket:/tmp/test.sock
+unix_socket:@TERMUX_PREFIX@/tmp/test.sock
inet_socket
inet_socket:192.168.0.34
inet_socket:192.168.0.34:6563
--- a/doc/speech-dispatcher.texi 2022-04-15 04:49:54.323385878 +0000
+++ b/doc/speech-dispatcher.texi 2022-04-15 14:12:51.804383476 +0000
@@ -528,8 +528,8 @@
@example
killall -u `whoami` speech-dispatcher
-speech-dispatcher -c unix_socket -S /tmp/my.sock
-SPEECHD_ADDRESS=unix_socket:/tmp/my.sock spd-say "test"
+speech-dispatcher -c unix_socket -S @TERMUX_PREFIX@/tmp/my.sock
+SPEECHD_ADDRESS=unix_socket:@TERMUX_PREFIX@/tmp/my.sock spd-say "test"
@end example
@node Troubleshooting, Configuration, Running, User's Documentation
@@ -911,7 +911,7 @@
@example
GenericExecuteSynth \
"epos-say -o --language $LANG --voice $VOICE --init_f $PITCH --init_t $RATE \
-\"$DATA\" | sed -e s+unknown.*$++ >/tmp/epos-said.wav && play /tmp/epos-said.wav >/dev/null"
+\"$DATA\" | sed -e s+unknown.*$++ >@TERMUX_PREFIX@/tmp/epos-said.wav && play @TERMUX_PREFIX@/tmp/epos-said.wav >/dev/null"
@end example
@end defvr
@@ -1261,7 +1261,7 @@
Examples of valid address lines are:
@example
unix_socket
-unix_socket:/tmp/test.sock
+unix_socket:@TERMUX_PREFIX@/tmp/test.sock
inet_socket
inet_socket:192.168.0.34
inet_socket:192.168.0.34:6563
--- a/po/cs.po 2022-04-15 04:49:54.441394110 +0000
+++ b/po/cs.po 2022-04-15 14:12:52.126382997 +0000
@@ -144,7 +144,7 @@
#: src/server/options.c:110
#, c-format
-msgid "if TMPDIR is exported, otherwise to /tmp/%s\n"
+msgid "if TMPDIR is exported, otherwise to @TERMUX_PREFIX@/tmp/%s\n"
msgstr ""
#: src/server/options.c:113 src/clients/say/options.c:169
--- a/po/de.po 2022-04-15 04:49:54.441394110 +0000
+++ b/po/de.po 2022-04-15 14:12:52.130382991 +0000
@@ -144,8 +144,8 @@
#: src/server/options.c:110
#, c-format
-msgid "if TMPDIR is exported, otherwise to /tmp/%s\n"
-msgstr "falls TMPDIR exportiert wurde, andernfalls nach /tmp/%s\n"
+msgid "if TMPDIR is exported, otherwise to @TERMUX_PREFIX@/tmp/%s\n"
+msgstr "falls TMPDIR exportiert wurde, andernfalls nach @TERMUX_PREFIX@/tmp/%s\n"
#: src/server/options.c:113 src/clients/say/options.c:169
#, c-format
--- a/po/eo.po 2022-04-15 04:49:54.441394110 +0000
+++ b/po/eo.po 2022-04-15 14:12:52.133382987 +0000
@@ -130,8 +130,8 @@
#: src/server/options.c:110
#, c-format
-msgid "if TMPDIR is exported, otherwise to /tmp/%s\n"
-msgstr "se la medivariablo TMPDIR ekzistas, alie en /tmp/%s\n"
+msgid "if TMPDIR is exported, otherwise to @TERMUX_PREFIX@/tmp/%s\n"
+msgstr "se la medivariablo TMPDIR ekzistas, alie en @TERMUX_PREFIX@/tmp/%s\n"
#: src/server/options.c:113 src/clients/say/options.c:169
#, c-format
--- a/po/fr.po 2022-04-15 04:49:54.441394110 +0000
+++ b/po/fr.po 2022-04-15 14:12:52.136382982 +0000
@@ -130,8 +130,8 @@
#: src/server/options.c:110
#, c-format
-msgid "if TMPDIR is exported, otherwise to /tmp/%s\n"
-msgstr "si TMPDIR est exporté, sinon dans /tmp/%s\n"
+msgid "if TMPDIR is exported, otherwise to @TERMUX_PREFIX@/tmp/%s\n"
+msgstr "si TMPDIR est exporté, sinon dans @TERMUX_PREFIX@/tmp/%s\n"
#: src/server/options.c:113 src/clients/say/options.c:169
#, c-format
--- a/po/hu.po 2022-04-15 04:49:54.441394110 +0000
+++ b/po/hu.po 2022-04-15 14:12:52.140382976 +0000
@@ -144,7 +144,7 @@
#: src/server/options.c:110
#, c-format
-msgid "if TMPDIR is exported, otherwise to /tmp/%s\n"
+msgid "if TMPDIR is exported, otherwise to @TERMUX_PREFIX@/tmp/%s\n"
msgstr ""
#: src/server/options.c:113 src/clients/say/options.c:169
--- a/po/nb_NO.po 2022-04-15 04:49:54.441394110 +0000
+++ b/po/nb_NO.po 2022-04-15 14:12:52.147382966 +0000
@@ -131,8 +131,8 @@
#: src/server/options.c:110
#, fuzzy, c-format
-msgid "if TMPDIR is exported, otherwise to /tmp/%s\n"
-msgstr "Hvis TMPDIR eksporteres, ellers til /tmp/%s\n"
+msgid "if TMPDIR is exported, otherwise to @TERMUX_PREFIX@/tmp/%s\n"
+msgstr "Hvis TMPDIR eksporteres, ellers til @TERMUX_PREFIX@/tmp/%s\n"
#: src/server/options.c:113 src/clients/say/options.c:169
#, c-format
--- a/po/pt_BR.po 2022-04-15 04:49:54.441394110 +0000
+++ b/po/pt_BR.po 2022-04-15 14:12:52.151382960 +0000
@@ -131,8 +131,8 @@
#: src/server/options.c:110
#, c-format
-msgid "if TMPDIR is exported, otherwise to /tmp/%s\n"
-msgstr "se TMPDIR for exportado; senão para /tmp/%s\n"
+msgid "if TMPDIR is exported, otherwise to @TERMUX_PREFIX@/tmp/%s\n"
+msgstr "se TMPDIR for exportado; senão para @TERMUX_PREFIX@/tmp/%s\n"
#: src/server/options.c:113 src/clients/say/options.c:169
#, c-format
--- a/po/pt.po 2022-04-15 04:49:54.441394110 +0000
+++ b/po/pt.po 2022-04-15 14:12:52.155382954 +0000
@@ -130,8 +130,8 @@
#: src/server/options.c:110
#, c-format
-msgid "if TMPDIR is exported, otherwise to /tmp/%s\n"
-msgstr "se TMPDIR for exportado; senão para /tmp/%s\n"
+msgid "if TMPDIR is exported, otherwise to @TERMUX_PREFIX@/tmp/%s\n"
+msgstr "se TMPDIR for exportado; senão para @TERMUX_PREFIX@/tmp/%s\n"
#: src/server/options.c:113 src/clients/say/options.c:169
#, c-format
--- a/po/ru.po 2022-04-15 04:49:54.441394110 +0000
+++ b/po/ru.po 2022-04-15 14:12:52.159382948 +0000
@@ -129,7 +129,7 @@
#: src/server/options.c:110
#, c-format
-msgid "if TMPDIR is exported, otherwise to /tmp/%s\n"
+msgid "if TMPDIR is exported, otherwise to @TERMUX_PREFIX@/tmp/%s\n"
msgstr ""
#: src/server/options.c:113 src/clients/say/options.c:169
--- a/po/speech-dispatcher.pot 2022-04-15 04:49:54.441394110 +0000
+++ b/po/speech-dispatcher.pot 2022-04-15 14:12:52.162382944 +0000
@@ -126,7 +126,7 @@
#: src/server/options.c:110
#, c-format
-msgid "if TMPDIR is exported, otherwise to /tmp/%s\n"
+msgid "if TMPDIR is exported, otherwise to @TERMUX_PREFIX@/tmp/%s\n"
msgstr ""
#: src/server/options.c:113 src/clients/say/options.c:169
--- a/src/api/c/libspeechd.c 2022-04-15 04:49:54.445394389 +0000
+++ b/src/api/c/libspeechd.c 2022-04-15 14:12:52.176382923 +0000
@@ -239,7 +239,7 @@
{
#ifdef LIBSPEECHD_DEBUG
if (!spd_debug) {
- spd_debug = fopen("/tmp/libspeechd.log", "w");
+ spd_debug = fopen("@TERMUX_PREFIX@/tmp/libspeechd.log", "w");
if (spd_debug == NULL)
SPD_FATAL("COULDN'T ACCES FILE INTENDED FOR DEBUG");
--- a/src/api/python/speechd_config/config.py 2022-04-15 04:49:54.446394459 +0000
+++ b/src/api/python/speechd_config/config.py 2022-04-15 14:12:52.195382894 +0000
@@ -464,7 +464,7 @@
if 'TMPDIR' in os.environ:
tmpdir = os.environ['TMPDIR']
else:
- tmpdir = "/tmp/"
+ tmpdir = "@TERMUX_PREFIX@/tmp/"
debugdir_path = os.path.join(tmpdir, "speechd-debug")
date = datetime.date.today()
debugarchive_path = os.path.join(tmpdir, "speechd-debug-%d-%d-%d.tar.gz" %
--- a/src/clients/spdsend/server.c 2022-04-15 04:49:54.446394459 +0000
+++ b/src/clients/spdsend/server.c 2022-04-15 14:12:52.225382849 +0000
@@ -340,7 +340,7 @@
static const char *server_socket_name()
{
char *name;
- if (asprintf(&name, "/tmp/spdsend-server.%s", login_name()) < 0)
+ if (asprintf(&name, "@TERMUX_PREFIX@/tmp/spdsend-server.%s", login_name()) < 0)
system_error("memory allocation");
return name;
}
--- a/src/modules/festival.c 2022-04-15 04:49:54.448394598 +0000
+++ b/src/modules/festival.c 2022-04-15 14:12:52.249382814 +0000
@@ -347,7 +347,7 @@
/* TODO: Solve this */
// DBG("Removing junk files in tmp/");
- // system("rm -f /tmp/est* 2> /dev/null");
+ // system("rm -f @TERMUX_PREFIX@/tmp/est* 2> /dev/null");
return 0;
}
@@ -575,7 +575,7 @@
char filename_debug
[256];
sprintf(filename_debug,
- "/tmp/debug-festival-%d.snd",
+ "@TERMUX_PREFIX@/tmp/debug-festival-%d.snd",
debug_count++);
save_FT_Wave_snd(fwave,
filename_debug);
@@ -716,7 +716,7 @@
if (FestivalDebugSaveOutput) {
char filename_debug[256];
sprintf(filename_debug,
- "/tmp/debug-festival-%d.snd",
+ "@TERMUX_PREFIX@/tmp/debug-festival-%d.snd",
debug_count++);
save_FT_Wave_snd(fwave, filename_debug);
}
--- a/src/server/options.c 2022-04-15 04:49:54.443394249 +0000
+++ b/src/server/options.c 2022-04-15 14:12:52.299382739 +0000
@@ -107,7 +107,7 @@
printf(_("Output debugging information into $TMPDIR/%s\n"),
"speechd-debug");
printf(" ");
- printf(_("if TMPDIR is exported, otherwise to /tmp/%s\n"),
+ printf(_("if TMPDIR is exported, otherwise to @TERMUX_PREFIX@/tmp/%s\n"),
"speechd-debug");
printf(" -h, --help ");
printf(_("Print this info\n"));