diff options
Diffstat (limited to 'app-accessibility/speech-tools/files')
3 files changed, 143 insertions, 0 deletions
diff --git a/app-accessibility/speech-tools/files/speech-tools-2.5.0-drop-curses.patch b/app-accessibility/speech-tools/files/speech-tools-2.5.0-drop-curses.patch new file mode 100644 index 000000000000..30b5448e820a --- /dev/null +++ b/app-accessibility/speech-tools/files/speech-tools-2.5.0-drop-curses.patch @@ -0,0 +1,43 @@ +We already force in the correct detection via another patch and this +logic (being dropped in this patch) assumes no -ltinfo. + +https://bugs.gentoo.org/837800 +--- a/configure.in ++++ b/configure.in +@@ -42,12 +42,6 @@ AC_CHECK_TOOL(AR, ar) + + AC_C_BIGENDIAN + +-AC_CHECK_LIB(ncurses, tputs, [TERMCAPLIB=-lncurses], [TERMCAPLIB=-lcurses]) +-dnl if test "$TERMCAPLIB" != "-ltermcap"; then +-dnl AC_CHECK_LIB(termcap, tputs, [TERMCAPLIB=-ltermcap], [TERMCAPLIB=-lncurses]) +-dnl +-AC_SUBST(TERMCAPLIB) +- + dnl Which version of GCC do we have here + COMPILERTYPE=gcc + AC_TRY_COMPILE([#include <stdio.h>], +diff --git a/config/config.in b/config/config.in +index c7a268a..6c7f16a 100644 +--- a/config/config.in ++++ b/config/config.in +@@ -98,7 +98,6 @@ LINUXAUDIO = @LINUXAUDIO@ + ## It may not work under all systems, so may be optionally omitted. + INCLUDE_MODULES += EDITLINE + +-TERMCAPLIB = @TERMCAPLIB@ + # speech recognition + #INCLUDE_MODULES += ASR + +diff --git a/config/modules/editline.mak b/config/modules/editline.mak +index fe83c37..2d48b39 100644 +--- a/config/modules/editline.mak ++++ b/config/modules/editline.mak +@@ -43,7 +43,6 @@ INCLUDE_EDITLINE=1 + MOD_DESC_EDITLINE=Use editline for command line editing and history + + IO_DEFINES += -DSUPPORT_EDITLINE $(MODULE_EDITLINE_OPTIONS:%=-DEDITLINE_%) +-MODULE_LIBS += $(TERMCAPLIB) + + ifeq ($(DIRNAME),siod) + CSRCS := $(CSRCS) el_complete.c editline.c el_sys_unix.c diff --git a/app-accessibility/speech-tools/files/speech-tools-2.5.0-musl-isnan.patch b/app-accessibility/speech-tools/files/speech-tools-2.5.0-musl-isnan.patch new file mode 100644 index 000000000000..da0077313abd --- /dev/null +++ b/app-accessibility/speech-tools/files/speech-tools-2.5.0-musl-isnan.patch @@ -0,0 +1,65 @@ +See https://bugs.openjdk.org/browse/JDK-8178689 for some analysis - we can +safely replace the deprecated/obsolete isnanf (which musl doesn't immplement) +with isnan. + +https://bugs.gentoo.org/896170 +https://bugs.gentoo.org/829344 +--- a/intonation/tilt/tilt_utils.cc ++++ b/intonation/tilt/tilt_utils.cc +@@ -133,7 +133,7 @@ float rfc_to_t_tilt(EST_Features &e) + { + float t_tilt; + t_tilt = (rfc_to_a_tilt(e) + rfc_to_d_tilt(e)) / 2; +- if (isnanf(t_tilt)) ++ if (isnan(t_tilt)) + t_tilt = 0.0; + return t_tilt; + } +--- a/sigpr/pda/smooth_pda.cc ++++ b/sigpr/pda/smooth_pda.cc +@@ -112,7 +112,7 @@ void smooth_portion(EST_Track &c, EST_Features &op) + + for (i = 0; i < c.num_frames(); ++i) + { // occasionally NaNs result... +- if (isnanf(a[i])) ++ if (isnan(a[i])) + { + c.set_break(i); + c.a(i) = 0.0; +--- a/sigpr/sigpr_frame.cc ++++ b/sigpr/sigpr_frame.cc +@@ -314,7 +314,7 @@ void lpc2cep(const EST_FVector &lpc, EST_FVector &cep) + for (n = 0; n < cep.length(); n++) + { + // check if NaN -- happens on some frames of silence +- if (isnanf(cep[n]) ) cep[n] = 0.0; ++ if (isnan(cep[n]) ) cep[n] = 0.0; + + if (cep[n] > MAX_ABS_CEPS){ + cerr << "WARNING : cepstral coeff " << n << " was " << +--- a/stats/confusion.cc ++++ b/stats/confusion.cc +@@ -138,7 +138,7 @@ void print_confusion(const EST_FMatrix &a, EST_StrStr_KVL &list, + cout.precision(3); + cout.setf(ios::right); + // cout.setf(ios::fixed, ios::floatfield); +- if (isnanf(correct(i))) ++ if (isnan(correct(i))) + cout << endl; + else + cout << correct(i) << endl; +--- a/include/EST_math.h ++++ b/include/EST_math.h +@@ -81,12 +81,6 @@ extern "C" { + #define isnanf(X) isnan(X) + #endif + +-/* Linux (and presumably Hurd too as Linux is GNU libc based) */ +-/* Sorry I haven't confirmed this cpp symbol yet */ +-#if defined(linux) +-#define isnanf(X) __isnanf(X) +-#endif +- + /* OS/2 with gcc EMX */ + #if defined(__EMX__) + #define isnanf(X) isnan(X) diff --git a/app-accessibility/speech-tools/files/speech-tools-2.5.0-warnings.patch b/app-accessibility/speech-tools/files/speech-tools-2.5.0-warnings.patch new file mode 100644 index 000000000000..4242700e6c2d --- /dev/null +++ b/app-accessibility/speech-tools/files/speech-tools-2.5.0-warnings.patch @@ -0,0 +1,35 @@ +https://github.com/festvox/speech_tools/commit/4b677d6f3bc560248da369a86d5f2ec17c116da5 +(Just the strict aliasing hunk.) + +From 4b677d6f3bc560248da369a86d5f2ec17c116da5 Mon Sep 17 00:00:00 2001 +From: Sergio Oller <sergioller@gmail.com> +Date: Sat, 29 Aug 2020 19:14:47 +0200 +Subject: [PATCH] Compile with gcc-9 without warnings (-Wall) + +--- a/speech_class/esps_utils.cc ++++ b/speech_class/esps_utils.cc +@@ -1050,7 +1050,7 @@ enum EST_read_status read_esps_hdr(esps_hdr *uhdr,FILE *fd) + hdr->field_name[0] = wstrdup("samples"); + fseek(fd,hdr->hdr_size,SEEK_SET); + /* In this cases its just in the header as a float */ +- sd_sample_rate = *((float *)(void *)&fhdr.fil4[0]); ++ memcpy(&sd_sample_rate, &fhdr.fil4[0], sizeof(float)); + add_fea_d(hdr,"record_freq",0,(double)sd_sample_rate); + *uhdr = hdr; + return format_ok; +@@ -1215,11 +1215,13 @@ enum EST_write_status write_esps_hdr(esps_hdr hdr,FILE *fd) + fhdr.thirteen = 13; /* must be for luck */ + fhdr.sdr_size = 0; + fhdr.magic = ESPS_MAGIC; +- strncpy(fhdr.date,ctime(&tx),26); ++ strncpy(fhdr.date,ctime(&tx),25); ++ fhdr.date[25] = 0; + sprintf(fhdr.version,"1.91"); /* that's what all the others have */ + sprintf(fhdr.prog,"EDST"); + sprintf(fhdr.vers,"0.1"); +- strncpy(fhdr.progcompdate,ctime(&tx),26); ++ strncpy(fhdr.progcompdate,ctime(&tx),25); ++ fhdr.progcompdate[25] = 0; + fhdr.num_samples = hdr->num_records; + fhdr.filler = 0; + /* in each record */ |