From 59f8187afe529efeffdc2f967c451b159da44d5c Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Wed, 19 Apr 2023 05:57:02 +0100 Subject: gentoo auto-resync : 19:04:2023 - 05:57:01 --- app-accessibility/speech-tools/Manifest | 2 + .../files/speech-tools-2.5.0-musl-isnan.patch | 65 +++++++++ .../speech-tools/speech-tools-2.5.0-r2.ebuild | 156 +++++++++++++++++++++ 3 files changed, 223 insertions(+) create mode 100644 app-accessibility/speech-tools/files/speech-tools-2.5.0-musl-isnan.patch create mode 100644 app-accessibility/speech-tools/speech-tools-2.5.0-r2.ebuild (limited to 'app-accessibility/speech-tools') diff --git a/app-accessibility/speech-tools/Manifest b/app-accessibility/speech-tools/Manifest index 830b8125875b..5f2d44ee93b7 100644 --- a/app-accessibility/speech-tools/Manifest +++ b/app-accessibility/speech-tools/Manifest @@ -1,8 +1,10 @@ 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-musl-isnan.patch 1951 BLAKE2B 01cdd30d53f7a095b7f97678ca3282304161667915e198a6b152752a73559474f2d825dd19ffa25c602719115cdae160919bfc365bfc0f1bfeab019dcfe28876 SHA512 51a4e0b0f9ffc73b6c14471c69cc6fcf1c2ea237d256b46b3936ac9589cbeed7978f900e5a129df4cb89ecc444130775a03dda66979587a8b34b2cabcf845851 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 4034 BLAKE2B 1a7fcdb442f26b041060f02c49a869dedb6e05fdbfab57d530a79fb05fd26d1197c4079bfba26446dfc2bab2a4729f9999287d3f2d69efc3c195bddac8bb8a9b SHA512 ed252c93cf41931efbed7e1fa82ab847800b76770e6d653ab1524c18cbe50a607822097d98b44d950d2449a4cfec83c35290a145aa088ebf3d9031aa323d8751 +EBUILD speech-tools-2.5.0-r2.ebuild 4076 BLAKE2B df874fc145f7e60f58389fdc493b633b6aaa72619d49661a4c3ba9c9aeb87f81d1e03e3cd2ee3e8b7578dff855d910f8fa06f2c4b82800701071bebeb6ac99af SHA512 04ee8a2b233799021087459172cb18cd3fc387143ca93faeff543bbe81db6e0d9738f1de4109fb0678ee5418a71e7668c4a2254c854c0e8f99a4fca2889066bc MISC metadata.xml 483 BLAKE2B b5318b0e97d1e7e19848eeae2b447037e940cda1ca1c7cc4204cbf9d95d52a5fce5430efe94f0d8e3066a974b78d1a8abdc72580b7678ae86e30577e9545f787 SHA512 e7d6f2ccbebfb2ae9bf41577a3b1d902c7d711d5887d9a4233f7c5d42a57915e1874f97676c61d79fb5ececa0e7244f58533c17f098c717712ac274d60c14ee7 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/speech-tools-2.5.0-r2.ebuild b/app-accessibility/speech-tools/speech-tools-2.5.0-r2.ebuild new file mode 100644 index 000000000000..649cf3b379e0 --- /dev/null +++ b/app-accessibility/speech-tools/speech-tools-2.5.0-r2.ebuild @@ -0,0 +1,156 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit autotools flag-o-matic toolchain-funcs + +MY_P=${P/speech-/speech_} +PATCHSET="r3" + +DESCRIPTION="Speech tools for Festival Text to Speech engine" +HOMEPAGE="https://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" + "${FILESDIR}/${P}-musl-isnan.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() { + # Lacks prototypes, bug #881863 + append-cflags -std=gnu89 + # Uses 'register' keyword removed in C++17, bug #894184 + append-cxxflags -std=c++14 + + 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 +} -- cgit v1.2.3