diff options
Diffstat (limited to 'app-accessibility/speech-tools')
4 files changed, 231 insertions, 0 deletions
diff --git a/app-accessibility/speech-tools/Manifest b/app-accessibility/speech-tools/Manifest index ca476260c8c0..ca78a860e565 100644 --- a/app-accessibility/speech-tools/Manifest +++ b/app-accessibility/speech-tools/Manifest @@ -1,6 +1,9 @@ AUX speech-tools-2.1-underlinking.patch 565 BLAKE2B 1be43841d09fe456874323a02d63253dae37dfe6f6969f7d9941c8a39d0ad9127e8fd1b87f5b6e59fcc505f2c9e2bc988b4f572ccbb01418d11ca0fda88b262d SHA512 4091b64da995f2f859f8debd7c6b7c20bf3a788c91d8aa7651f3c6f89445c9fc60b60923a3056de678ec17faee41839917131b9a3176e53c0afc11e24fe92e47 +AUX speech-tools-2.5.0-drop-curses.patch 1413 BLAKE2B 4fce1450ce3e3067dbe44d9148e1a73137a0aa77736c7e628181d1e69bc3d4d88a7cc55436bfac6312a3c80390742011f74079387362bd6cc2f43f1016609388 SHA512 9e41db0ac2eb15956723b0ea3b6525a6c5ccc3094f2470afee605deccbeda1dcd8f000e6240f0efb08fafdc573974afbc77c8271eedde2e58ac1a6790dd55345 AUX speech-tools-2.5.0-fno-common.patch 1003 BLAKE2B 6b4dcdf205f2e986e659efda4d52c447b0183cc59146ec892b86d360f16fccab0a85667743c6e0f31a07f20983cce604d3202756c16eae4eff2eb88b1079407c SHA512 ae34fadda5f92dfade923af07222c1ed35b8b39bafc7604a86cebd7196888b2cf9a41fe2686e5210a556309a9c2e71076d22e3f56f1ccec0aca3d4a7bd18f3c1 +AUX speech-tools-2.5.0-warnings.patch 1467 BLAKE2B ae91bce60190029ba2850c2649e3f7f116357b2c4f77f90a1ba3176ba43daf732d690e1e0e6ad2820db34417f4732d8c177e2fb25325d4994c29061739f2fc95 SHA512 16911fb73f43cdb9db7d426cc68549077bd53798dadd17965607853886284521f5bfa2632b6888e46eca3b3fe2e5bd27523304aa9305e2a410d5477f46e618d8 DIST speech_tools-2.1-r3-patches.tar.gz 6876 BLAKE2B 84ddc30de90459f913cc32d4338097feb35dc08c48cbda7fc47a78ee0384668828d7166a5ebb1264272a6c326afd4ff2efdf1d793bb8f33937c09d2c7cd9a2b5 SHA512 db4d656a77e3fcfc43447c11b160cf9b45f0c4ec10f2697e4357f0ec86ea56e2841f1b887493a781406975003f5d8065ffbb75eeebb79fcd9873055b52c248e3 DIST speech_tools-2.5.0-release.tar.gz 1328624 BLAKE2B 445dd5a5e39c02352a850fd92de5b3852ae382a4bd013dccb3fdd46b0b22ce0bd10d089f9e860ae3d3e73a489b20b7c8b78335e57a49e40ae01b0f4997d55315 SHA512 013540a5252efb57633f442143a51bc87aac719dfb46c8f47e750322d19dac9b504f55125462a2ee74a6b0bd2661a63a1fc73a8c3c6d2886e38b136a80447fd7 +EBUILD speech-tools-2.5.0-r1.ebuild 3880 BLAKE2B 3c2a99f34808ff4ab91a9d44cb04b38a7455c71ab3c85b6f3ad320e84e83fe9c0e323c65ff3fa417d8046fb217cc5355a58400d4a94f1a53d2c27c61b450c4b4 SHA512 c5cb11cab2b864d60a8707bfe203a448a0e46f50cf0342e911cf4d228eeef5cd7d8c72c531183967657174bab51e59088a1d4b6a05e87ec8c188edf31b8f9510 EBUILD speech-tools-2.5.0.ebuild 3772 BLAKE2B b7a494b2a9cf6e356271c8db84c52394657f9747f9eb84780928ffd5e5476ad66e839ffec8385dbd6a0f58a2a759f05a69bbe10e62ac4ddb10727189517c2ec0 SHA512 d6a809b62fbaaaf3b38e608c0274b516340d14c10f2092a2eb1d5ab7b0a450cfe9e7cf60786bd94ec0598545d024a41b7300e58f7fde78880d8be0f01591595c MISC metadata.xml 483 BLAKE2B b5318b0e97d1e7e19848eeae2b447037e940cda1ca1c7cc4204cbf9d95d52a5fce5430efe94f0d8e3066a974b78d1a8abdc72580b7678ae86e30577e9545f787 SHA512 e7d6f2ccbebfb2ae9bf41577a3b1d902c7d711d5887d9a4233f7c5d42a57915e1874f97676c61d79fb5ececa0e7244f58533c17f098c717712ac274d60c14ee7 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-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 */ diff --git a/app-accessibility/speech-tools/speech-tools-2.5.0-r1.ebuild b/app-accessibility/speech-tools/speech-tools-2.5.0-r1.ebuild new file mode 100644 index 000000000000..76fc1ff30431 --- /dev/null +++ b/app-accessibility/speech-tools/speech-tools-2.5.0-r1.ebuild @@ -0,0 +1,150 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit autotools toolchain-funcs + +MY_P=${P/speech-/speech_} +PATCHSET="r3" + +DESCRIPTION="Speech tools for Festival Text to Speech engine" +HOMEPAGE="http://www.cstr.ed.ac.uk/projects/speech_tools/" +SRC_URI="http://www.festvox.org/packed/festival/$(ver_cut 1-2)/${MY_P}-release.tar.gz + https://dev.gentoo.org/~neurogeek/${PN}/speech_tools-2.1-${PATCHSET}-patches.tar.gz" +S="${WORKDIR}/speech_tools" + +LICENSE="FESTIVAL HPND BSD rc regexp-UofT" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86" +IUSE="nas openmp X" + +RDEPEND=" + media-libs/alsa-lib + sys-libs/ncurses:= + nas? ( media-libs/nas ) + X? ( + x11-libs/libX11 + x11-libs/libXt + ) +" +DEPEND="${RDEPEND}" +BDEPEND="virtual/pkgconfig" + +DOCS=( README.md lib/cstrutt.dtd lib/example_data ) + +PATCHES=( + "${WORKDIR}/patch/02_all_gcc42.patch" + "${WORKDIR}/patch/03_all_GentooLinux.patch" + "${WORKDIR}/patch/05_all_sharedlib.patch" + "${WORKDIR}/patch/06_all_gcc43-include.patch" + "${WORKDIR}/patch/09_all_remove-shared-refs.patch" + "${WORKDIR}/patch/10_all_base_class.patch" + "${WORKDIR}/patch/81_all_etcpath.patch" + "${WORKDIR}/patch/91_all_gentoo-config.patch" + "${WORKDIR}/patch/92_all_ldflags_fix.patch" + "${WORKDIR}/patch/94_all_ncurses_tinfo.patch" + + # Fix underlinking, bug #493204 + "${FILESDIR}/${PN}-2.1-underlinking.patch" + "${FILESDIR}/${PN}-2.5.0-fno-common.patch" + "${FILESDIR}/${PN}-2.5.0-drop-curses.patch" + "${FILESDIR}/${P}-warnings.patch" +) + +pkg_pretend() { + [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp +} + +pkg_setup() { + [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp +} + +src_prepare() { + default + + sed -i -e '/^CXXFLAGS =/s|CC_OTHER_FLAGS|CXX_OTHER_FLAGS|' \ + config/compilers/gcc_defaults.mak || die + + sed -i -e 's,{{HORRIBLELIBARCHKLUDGE}},"/usr/$(get_libdir)",' \ + main/siod_main.cc || die + + # bug #309983 + sed -i -e "s:\(GCC_SYSTEM_OPTIONS =\).*:\1:" \ + "${S}"/config/systems/sparc_SunOS5.mak || die + + sed -i -e "s|\$(OMP_OPTS)|$(use openmp && echo -fopenmp)|g" \ + -e "s|\$(OMP_DEFS)|$(use openmp && echo -DOMP_WAGON=1)|g" \ + -e "/MAKE_SHARED_LIB =/s|-shared|$(use openmp && echo -fopenmp) -shared|" \ + config/compilers/gcc_defaults.mak || die + + eautoreconf +} + +src_configure() { + local CONFIG=config/config.in + + sed -i -e 's/@COMPILERTYPE@/gcc42/' ${CONFIG} || die + + if use nas; then + sed -i -e "s/#.*\(INCLUDE_MODULES += NAS_AUDIO\)/\1/" \ + ${CONFIG} || die + fi + + if ! use X; then + sed -i -e "s/-lX11 -lXt//" config/modules/esd_audio.mak || die + fi + + econf +} + +src_compile() { + emake -j1 \ + CC="$(tc-getCC)" \ + CXX="$(tc-getCXX)" \ + CC_OTHER_FLAGS="${CFLAGS}" \ + CXX_OTHER_FLAGS="${CXXFLAGS}" \ + LDFLAGS="${LDFLAGS}" \ + AR="$(tc-getAR)" \ + RANLIB="$(tc-getRANLIB)" +} + +src_install() { + default + + dolib.so lib/libest*.so* + + insinto /usr/share/speech-tools + doins -r config base_class + + insinto /usr/share/speech-tools/lib + doins -r lib/siod + + mv include speech-tools || die + doheader -r speech-tools + dosym ../../include/speech-tools /usr/share/speech-tools/include + + for file in bin/*; do + [ "${file}" = "bin/Makefile" ] && continue + dobin ${file} + dstfile="${ED}/usr/${file}" + sed -i -e "s:${S}/testsuite/data:/usr/share/speech-tools/testsuite:g" \ + ${dstfile} || die + sed -i -e "s:${S}/bin:/usr/$(get_libdir)/speech-tools:g" \ + ${dstfile} || die + sed -i -e "s:${S}/main:/usr/$(get_libdir)/speech-tools:g" \ + ${dstfile} || die + + # This just changes LD_LIBRARY_PATH + sed -i -e "s:${S}/lib:/usr/$(get_libdir):g" ${dstfile} || die + done + + exeinto /usr/$(get_libdir)/speech-tools + for file in `find main -perm /111 -type f`; do + doexe ${file} + done + + # Remove bcat (only useful for testing on windows, see bug #418301). + rm "${ED}/usr/bin/bcat" || die + rm "${ED}/usr/$(get_libdir)/speech-tools/bcat" || die +} |