这是indexloc提供的服务,不要输入任何密码
Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions packages/pipewire/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,9 @@ TERMUX_PKG_DESCRIPTION="A server and user space API to deal with multimedia pipe
TERMUX_PKG_LICENSE="MIT, LGPL-2.1, LGPL-3.0, GPL-2.0"
TERMUX_PKG_LICENSE_FILE="COPYING, LICENSE"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION="1.2.7"
TERMUX_PKG_REVISION=2
TERMUX_PKG_VERSION="1.4.9"
TERMUX_PKG_SRCURL="https://gitlab.freedesktop.org/pipewire/pipewire/-/archive/${TERMUX_PKG_VERSION}/pipewire-${TERMUX_PKG_VERSION}.tar.bz2"
TERMUX_PKG_SHA256=3c00292f9a419610c9eeb6e45b958d460afb601ecc6894012574a3b9f118616a
TERMUX_PKG_SHA256=e606aa3f6d53ec4c56fe35034d35cadfe0bbea1a5275e4e006dd7d1abaec6b92
TERMUX_PKG_AUTO_UPDATE=true
TERMUX_PKG_DEPENDS="ffmpeg, glib, libc++, liblua54, libopus, libsndfile, libwebrtc-audio-processing, lilv, ncurses, openssl, pulseaudio, readline"

Expand Down
8 changes: 4 additions & 4 deletions packages/pipewire/runtime_dir.patch
Original file line number Diff line number Diff line change
Expand Up @@ -86,12 +86,12 @@

--- a/src/tools/pw-container.c
+++ b/src/tools/pw-container.c
@@ -150,7 +150,7 @@ int main(int argc, char *argv[])
@@ -150,7 +150,7 @@
};
struct spa_error_location loc;
int c, res, listen_fd, close_fd[2];
- char temp[PATH_MAX] = "/tmp/pipewire-XXXXXX";
+ char temp[PATH_MAX] = "@TERMUX_PREFIX@/tmp/pipewire-XXXXXX";
- char temp[] = "/tmp/pipewire-XXXXXX";
+ char temp[] = "@TERMUX_PREFIX@/tmp/pipewire-XXXXXX";
struct sockaddr_un sockaddr = {0};

data.props = pw_properties_new(
26 changes: 26 additions & 0 deletions packages/pipewire/strdupa.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
--- pipewire-1.4.9/spa/plugins/filter-graph/filter-graph.c.orig 2025-11-17 12:09:43.614306994 +0530
+++ pipewire-1.4.9/spa/plugins/filter-graph/filter-graph.c 2025-11-17 12:25:37.989005819 +0530
@@ -34,6 +34,10 @@
#include "audio-plugin.h"
#include "audio-dsp-impl.h"

+#if !defined(strdupa)
+#define strdupa(s) strcpy(alloca(strlen(s) + 1), s)
+#endif
+
#undef SPA_LOG_TOPIC_DEFAULT
#define SPA_LOG_TOPIC_DEFAULT &log_topic
SPA_LOG_TOPIC_DEFINE_STATIC(log_topic, "spa.filter-graph");
--- pipewire-1.4.9/src/modules/network-utils.h.orig 2025-11-17 12:21:52.460494715 +0530
+++ pipewire-1.4.9/src/modules/network-utils.h 2025-11-17 12:24:19.353902408 +0530
@@ -12,6 +12,10 @@
#define ifr_ifindex ifr_index
#endif

+#if !defined(strdupa)
+#define strdupa(s) strcpy(alloca(strlen(s) + 1), s)
+#endif
+
static inline int pw_net_parse_address(const char *address, uint16_t port,
struct sockaddr_storage *addr, socklen_t *len)
{
6 changes: 3 additions & 3 deletions packages/speechd/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@ TERMUX_PKG_HOMEPAGE=https://github.com/brailcom/speechd
TERMUX_PKG_DESCRIPTION="Common interface to speech synthesis"
TERMUX_PKG_LICENSE="LGPL-2.1, GPL-2.0"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION="0.11.5"
TERMUX_PKG_REVISION=2
TERMUX_PKG_SHA256=cc4b388fce40681eaff3545e9cc0642216c13c420d5676a4d28c957ddcb916de
TERMUX_PKG_VERSION="0.12.1"
TERMUX_PKG_SHA256=32a730f6fb5981b9bec7e04f3674fd7d29e54935f46cf6354dbb9ab1f9b23b2d
TERMUX_PKG_SRCURL=https://github.com/brailcom/speechd/archive/${TERMUX_PKG_VERSION}.tar.gz
TERMUX_PKG_DEPENDS="dotconf, espeak, glib, libiconv, libltdl, libsndfile, pulseaudio, python, speechd-data"
TERMUX_PKG_BUILD_DEPENDS="libiconv-static, libsndfile-static"
Expand All @@ -29,6 +28,7 @@ TERMUX_PKG_EXTRA_CONFIGURE_ARGS+="ac_cv_prog_HELP2MAN="
termux_step_pre_configure() {
export am_cv_python_pythondir="${TERMUX_PREFIX}/lib/python${TERMUX_PYTHON_VERSION}/site-packages"
export am_cv_python_pyexecdir="$am_cv_python_pythondir"
LDFLAGS+=" -landroid-posix-semaphore"
./build.sh
}

Expand Down
20 changes: 0 additions & 20 deletions packages/speechd/espeak.patch

This file was deleted.

19 changes: 0 additions & 19 deletions packages/speechd/index_strchr.patch

This file was deleted.

11 changes: 11 additions & 0 deletions packages/speechd/ldflags.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
--- b/src/modules/Makefile.am 2025-05-07 00:38:06.000000000 +0530
+++ speechd-0.12.1/src/modules/Makefile.am 2025-11-16 21:53:44.524566703 +0530
@@ -27,7 +27,7 @@
CLEANFILES = dummy-message.wav

inc_local = -I$(top_srcdir)/include -I$(top_srcdir)/src/common
-LDFLAGS =
+LDFLAGS ?=

if DARWIN_HOST
LDFLAGS += -Wl,-U,_module_speak -Wl,-U,_module_speak_sync
206 changes: 206 additions & 0 deletions packages/speechd/prefix.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,206 @@
--- a/src/api/python/speechd_config/config.py 2025-05-07 00:38:06.000000000 +0530
+++ b/src/api/python/speechd_config/config.py 2025-11-16 17:46:35.462886486 +0530
@@ -205,7 +205,7 @@
report(_("""Hint: Most likely, your Festival server is not running now
or not at the default port %d.

-Try /etc/init.d/festival start or run 'festival --server' from the command line.""" % port))
+Try @TERMUX_PREFIX@/etc/init.d/festival start or run 'festival --server' from the command line.""" % port))
return False
return True

@@ -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" %
@@ -716,13 +716,13 @@
report(_("Warning: You must be root or under sudo to do this.") )
report(_("Starting Speech Dispatcher in system-mode"))

- reply = question(_("Is your system using an /etc/init.d/speech-dispatcher script?"),
+ reply = question(_("Is your system using an @TERMUX_PREFIX@/etc/init.d/speech-dispatcher script?"),
True)
if reply:
report(_("Stopping Speech Dispatcher in case any is running already"))
- os.system("/etc/init.d/speech-dispatcher stop")
- report(_("Starting Speech Dispatcher via /etc/init.d/speech-dispatcher"))
- ret = os.system("/etc/init.d/speech-dispatcher start")
+ os.system("@TERMUX_PREFIX@/etc/init.d/speech-dispatcher stop")
+ report(_("Starting Speech Dispatcher via @TERMUX_PREFIX@/etc/init.d/speech-dispatcher"))
+ ret = os.system("@TERMUX_PREFIX@/etc/init.d/speech-dispatcher start")
if ret:
report(_("Can't start Speech Dispatcher. Exited with status %d" % ret))
return False
--- a/src/clients/spdsend/server.c 2025-05-07 00:38:06.000000000 +0530
+++ b/src/clients/spdsend/server.c 2025-11-16 17:47:32.765820229 +0530
@@ -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/cicero.c 2025-05-07 00:38:06.000000000 +0530
+++ b/src/modules/cicero.c 2025-11-16 17:48:32.666192210 +0530
@@ -134,9 +134,9 @@
{
INIT_SETTINGS_TABLES();
REGISTER_DEBUG();
- MOD_OPTION_1_STR_REG(CiceroExecutable, "/usr/bin/cicero");
+ MOD_OPTION_1_STR_REG(CiceroExecutable, "@TERMUX_PREFIX@/usr/bin/cicero");
MOD_OPTION_1_STR_REG(CiceroExecutableLog,
- "/var/log/speech-dispatcher/cicero-executable.log");
+ "@TERMUX_PREFIX@/var/log/speech-dispatcher/cicero-executable.log");
return 0;
}

--- a/src/modules/festival.c 2025-05-07 00:38:06.000000000 +0530
+++ b/src/modules/festival.c 2025-11-16 18:01:21.818355609 +0530
@@ -577,7 +577,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);
@@ -720,7 +720,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/modules/generic.c 2025-05-07 00:38:06.000000000 +0530
+++ b/src/modules/generic.c 2025-11-16 18:10:45.430906931 +0530
@@ -120,7 +120,7 @@
MOD_OPTION_1_STR_REG(GenericExecuteSynth, "");
MOD_OPTION_1_STR_REG(GenericCmdDependency, "");
MOD_OPTION_1_INT_REG(GenericPortDependency, 0);
- MOD_OPTION_1_STR_REG(GenericSoundIconFolder, "/usr/share/sounds/sound-icons/");
+ MOD_OPTION_1_STR_REG(GenericSoundIconFolder, "@TERMUX_PREFIX@/usr/share/sounds/sound-icons/");

REGISTER_DEBUG();

@@ -475,7 +475,7 @@
if (helper)
tmpdir = g_strdup(helper);
else
- tmpdir = g_strdup("/tmp");
+ tmpdir = g_strdup("@TERMUX_PREFIX@/tmp");

helper = g_get_home_dir();
if (helper)
@@ -648,9 +648,9 @@
exit(EXIT_FAILURE);
} else if (pid == 0) {
// child, execute command
- ret = execl("/bin/bash", "bash", "-c", command, (char *) NULL);
+ ret = execl("@TERMUX_PREFIX@/bin/bash", "bash", "-c", command, (char *) NULL);
// catch missing bash
- DBG("Missing /bin/bash? (ret=%d error=%d) %s", ret, errno, strerror(errno));
+ DBG("Missing @TERMUX_PREFIX@/bin/bash? (ret=%d error=%d) %s", ret, errno, strerror(errno));
exit(EXIT_FAILURE);
} else {
int status;
--- a/src/modules/ibmtts.c 2025-05-07 00:38:06.000000000 +0530
+++ b/src/modules/ibmtts.c 2025-11-16 18:10:52.989800875 +0530
@@ -341,11 +341,11 @@
MOD_OPTION_1_INT_REG(IbmttsUseAbbreviation, 1);
MOD_OPTION_1_STR_REG(IbmttsPunctuationList, "()?");
MOD_OPTION_1_STR_REG(IbmttsDictionaryFolder,
- "/var/opt/IBM/ibmtts/dict");
+ "@TERMUX_PREFIX@/var/opt/IBM/ibmtts/dict");

MOD_OPTION_1_INT_REG(IbmttsAudioChunkSize, 20000);
MOD_OPTION_1_STR_REG(IbmttsSoundIconFolder,
- "/usr/share/sounds/sound-icons/");
+ "@TERMUX_PREFIX@/usr/share/sounds/sound-icons/");

/* Register voices. */
module_register_settings_voices();
--- a/src/modules/ivona.c 2025-05-07 00:38:06.000000000 +0530
+++ b/src/modules/ivona.c 2025-11-16 18:11:17.621986559 +0530
@@ -83,7 +83,7 @@
MOD_OPTION_1_STR_REG(IvonaDelimiters, ".;:,!?");
MOD_OPTION_1_INT_REG(IvonaMinCapLet, 0);
MOD_OPTION_1_STR_REG(IvonaSoundIconPath,
- "/usr/share/sound/sound-icons/");
+ "@TERMUX_PREFIX@/usr/share/sound/sound-icons/");

MOD_OPTION_1_STR_REG(IvonaServerHost, "127.0.0.1");
MOD_OPTION_1_INT_REG(IvonaServerPort, 9123);
--- a/src/modules/dummy-message.txt 2025-05-07 00:38:06.000000000 +0530
+++ b/src/modules/dummy-message.txt 2025-11-16 18:12:16.183172391 +0530
@@ -6,6 +6,6 @@

/run/user/1000something/speech-dispatcher/log/speech-dispatcher.log

-/var/log/speech-dispatcher/speech-dispatcher.log
+@TERMUX_PREFIX@/var/log/speech-dispatcher/speech-dispatcher.log

or in your home in dot speech-dispatcher/log/speech-dispatcher.log
--- a/src/server/options.c 2025-05-07 00:38:06.000000000 +0530
+++ b/src/server/options.c 2025-11-16 18:08:29.956221488 +0530
@@ -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"));
@@ -201,7 +201,7 @@
case 'D':
tmpdir = g_strdup(getenv("TMPDIR"));
if (!tmpdir)
- tmpdir = g_strdup("/tmp");
+ tmpdir = g_strdup("@TERMUX_PREFIX@/tmp");
SpeechdOptions.debug_destination =
g_strdup_printf("%s/speechd-debug", tmpdir);
g_free(tmpdir);
--- a/src/server/speechd.c 2025-05-07 00:38:06.000000000 +0530
+++ b/src/server/speechd.c 2025-11-16 18:08:54.831349350 +0530
@@ -1203,7 +1203,7 @@
g_strdup(SYS_CONF);
else
SpeechdOptions.conf_dir =
- g_strdup("/etc/speech-dispatcher/");
+ g_strdup("@TERMUX_PREFIX@/etc/speech-dispatcher/");
SpeechdOptions.user_conf_dir =
g_build_filename(user_config_dir,
"speech-dispatcher", NULL);
--- a/src/modules/openjtalk.c 2025-05-07 00:38:06.000000000 +0530
+++ b/src/modules/openjtalk.c 2025-11-16 18:23:56.936287975 +0530
@@ -60,9 +60,9 @@
REGISTER_DEBUG();

MOD_OPTION_1_STR_REG(OpenjtalkDictionaryDirectory,
- "/var/lib/mecab/dic/open-jtalk/naist-jdic");
+ "@TERMUX_PREFIX@/var/lib/mecab/dic/open-jtalk/naist-jdic");
MOD_OPTION_1_STR_REG(OpenjtalkVoice,
- "/usr/share/hts-voice/nitech-jp-atr503-m001/nitech_jp_atr503_m001.htsvoice");
+ "@TERMUX_PREFIX@/share/hts-voice/nitech-jp-atr503-m001/nitech_jp_atr503_m001.htsvoice");

DBG("OpenjtalkDictionaryDirectory: %s", OpenjtalkDictionaryDirectory);
DBG("OpenjtalkVoice: %s", OpenjtalkVoice);
@@ -136,7 +136,7 @@
/* Strip SSML (Open JTalk does not support it.) */
char *plain_data = module_strip_ssml(data);

- char template[] = "/tmp/speechd-openjtalk-XXXXXX";
+ char template[] = "@TERMUX_PREFIX@/tmp/speechd-openjtalk-XXXXXX";
umask(0077);
int tmp_fd = mkstemp(template);
if (tmp_fd == -1) {
28 changes: 13 additions & 15 deletions packages/speechd/pthread_cancel-followup.patch
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Mitigates https://github.com/termux/termux-packages/issues/15425
# Mitigates https://github.com/termux/termux-packages/issues/15425

--- a/config/speechd.conf
+++ b/config/speechd.conf
Expand All @@ -13,23 +13,21 @@ Mitigates https://github.com/termux/termux-packages/issues/15425

# -----LOGGING CONFIGURATION-----

--- a/src/api/c/libspeechd.c
+++ b/src/api/c/libspeechd.c
@@ -620,9 +620,11 @@ void spd_close(SPDConnection * connectio
free(connection->td);
}
--- ./src/api/c/libspeechd.c.orig 2025-05-07 00:38:06.000000000 +0530
+++ ./src/api/c/libspeechd.c 2025-11-17 13:45:27.210794201 +0530
@@ -654,7 +654,9 @@

+#ifndef __ANDROID__
/* close the socket */
if (connection->stream != NULL)
fclose(connection->stream);
if (connection->socket >= 0) {
+#ifndef __ANDROID__
close(connection->socket);
+#endif
connection->stream = NULL;

pthread_mutex_unlock(&connection->ssip_mutex);
--- a/src/server/configuration.c
+++ b/src/server/configuration.c
@@ -516,7 +516,7 @@ void load_default_global_set_options()
connection->socket = -1;
connection->stream = NULL;
}
--- ./src/server/configuration.c.orig 2025-05-07 00:38:06.000000000 +0530
+++ ./src/server/configuration.c 2025-11-17 13:46:01.070332858 +0530
@@ -517,7 +517,7 @@
if (!SpeechdOptions.localhost_access_only_set)
SpeechdOptions.localhost_access_only = 1;
if (!SpeechdOptions.server_timeout_set)
Expand Down
12 changes: 0 additions & 12 deletions packages/speechd/speechd.h.patch

This file was deleted.

Loading