[gentoo-commits] repo/gentoo:master commit in: app-accessibility/speech-tools/, app-accessibility/speech-tools/files/

2022-06-24 Thread Sam James
commit: aa9db8863d577f8e34d67a19dd57c8596c9a5b80
Author: Sam James  gentoo  org>
AuthorDate: Fri Jun 24 23:40:23 2022 +
Commit: Sam James  gentoo  org>
CommitDate: Fri Jun 24 23:40:26 2022 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=aa9db886

app-accessibility/speech-tools: fix build w/ newer ncurses; fix strict-aliasing

Closes: https://bugs.gentoo.org/837800
Closes: https://bugs.gentoo.org/854051
Signed-off-by: Sam James  gentoo.org>

 .../files/speech-tools-2.5.0-drop-curses.patch |  43 ++
 .../files/speech-tools-2.5.0-warnings.patch|  35 +
 .../speech-tools/speech-tools-2.5.0-r1.ebuild  | 150 +
 3 files changed, 228 insertions(+)

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 ..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
+-dnlAC_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 ],
+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 ..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 
+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 *)[0]);
++  memcpy(_sample_rate, [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(),26);
++strncpy(fhdr.date,ctime(),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(),26);
++strncpy(fhdr.progcompdate,ctime(),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 ..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 

[gentoo-commits] repo/gentoo:master commit in: app-accessibility/speech-tools/, app-accessibility/speech-tools/files/

2021-05-10 Thread Miroslav Šulc
commit: 9651ecdd87fa56219abe24f00196dabc5db54102
Author: Miroslav Šulc  gentoo  org>
AuthorDate: Mon May 10 06:38:12 2021 +
Commit: Miroslav Šulc  gentoo  org>
CommitDate: Mon May 10 06:38:12 2021 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9651ecdd

app-accessibility/speech-tools: removed obsolete 2.4-r1

Closes: https://bugs.gentoo.org/685810
Package-Manager: Portage-3.0.18, Repoman-3.0.3
Signed-off-by: Miroslav Šulc  gentoo.org>

 app-accessibility/speech-tools/Manifest|   1 -
 .../speech-tools/files/speech-tools-2.1-gcc7.patch |  20 
 .../speech-tools/speech-tools-2.1-r4.ebuild| 120 -
 3 files changed, 141 deletions(-)

diff --git a/app-accessibility/speech-tools/Manifest 
b/app-accessibility/speech-tools/Manifest
index d618947e53a..359cc88438c 100644
--- a/app-accessibility/speech-tools/Manifest
+++ b/app-accessibility/speech-tools/Manifest
@@ -1,3 +1,2 @@
 DIST speech_tools-2.1-r3-patches.tar.gz 6876 BLAKE2B 
84ddc30de90459f913cc32d4338097feb35dc08c48cbda7fc47a78ee0384668828d7166a5ebb1264272a6c326afd4ff2efdf1d793bb8f33937c09d2c7cd9a2b5
 SHA512 
db4d656a77e3fcfc43447c11b160cf9b45f0c4ec10f2697e4357f0ec86ea56e2841f1b887493a781406975003f5d8065ffbb75eeebb79fcd9873055b52c248e3
-DIST speech_tools-2.1-release.tar.gz 1681999 BLAKE2B 
572e7877e195c098dd2df03cda86fe58b7a55379cd01adcc22faf5e12b8c004e8c006b852cfe88c5c20df4a0e54e357b445050cdb63088edd55714a98e3eda90
 SHA512 
6ef9a7dd01ede152c4dafd0b2037312d62a79d875813d74ea048899a52eee505b93ffbabef9b6c0a1d15aeadb5508fd18a2f392e85276847fe071173aec5db96
 DIST speech_tools-2.5.0-release.tar.gz 1328624 BLAKE2B 
445dd5a5e39c02352a850fd92de5b3852ae382a4bd013dccb3fdd46b0b22ce0bd10d089f9e860ae3d3e73a489b20b7c8b78335e57a49e40ae01b0f4997d55315
 SHA512 
013540a5252efb57633f442143a51bc87aac719dfb46c8f47e750322d19dac9b504f55125462a2ee74a6b0bd2661a63a1fc73a8c3c6d2886e38b136a80447fd7

diff --git a/app-accessibility/speech-tools/files/speech-tools-2.1-gcc7.patch 
b/app-accessibility/speech-tools/files/speech-tools-2.1-gcc7.patch
deleted file mode 100644
index 9e1067fa1dc..000
--- a/app-accessibility/speech-tools/files/speech-tools-2.1-gcc7.patch
+++ /dev/null
@@ -1,20 +0,0 @@
 a/siod/siod.cc
-+++ b/siod/siod.cc
-@@ -459,7 +459,7 @@ char **siod_variable_generator(char *text,int length)
- matches = walloc(char *,siod_llength(lmatches)+1);
- for (l=lmatches,i=0; l; l=cdr(l),i++)
-   matches[i] = wstrdup(PNAME(car(l)));
--matches[i] = '\0';
-+*matches[i] = '\0';
- 
- return matches;
- }
-@@ -498,7 +498,7 @@ char **siod_command_generator (char *text,int length)
- matches = walloc(char *,siod_llength(lmatches)+1);
- for (l=lmatches,i=0; l; l=cdr(l),i++)
-   matches[i] = wstrdup(PNAME(car(l)));
--matches[i] = '\0';
-+*matches[i] = '\0';
- 
- return matches;
- }

diff --git a/app-accessibility/speech-tools/speech-tools-2.1-r4.ebuild 
b/app-accessibility/speech-tools/speech-tools-2.1-r4.ebuild
deleted file mode 100644
index 2f487ae007a..000
--- a/app-accessibility/speech-tools/speech-tools-2.1-r4.ebuild
+++ /dev/null
@@ -1,120 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=5
-
-inherit eutils epatch flag-o-matic multilib 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/${PV}/${MY_P}-release.tar.gz
-
https://dev.gentoo.org/~neurogeek/${PN}/${MY_P}-${PATCHSET}-patches.tar.gz;
-
-LICENSE="FESTIVAL HPND BSD rc regexp-UofT"
-SLOT="0"
-KEYWORDS="~alpha amd64 ~arm ~hppa ~ia64 ~mips ppc ppc64 sparc x86"
-IUSE="nas X"
-
-RDEPEND="
-   nas? ( media-libs/nas )
-   X? ( x11-libs/libX11
-   x11-libs/libXt )
-   >=media-libs/alsa-lib-1.0.20-r1
-   !=sys-libs/ncurses-5.6-r2:0=
-"
-DEPEND="${RDEPEND}
-   virtual/pkgconfig
-"
-
-S="${WORKDIR}/speech_tools"
-
-src_prepare() {
-   EPATCH_SUFFIX="patch"
-   epatch
-
-   sed -i -e 's,{{HORRIBLELIBARCHKLUDGE}},"/usr/$(get_libdir)",' \
-   main/siod_main.cc || die
-
-   #WRT bug #309983
-   sed -i -e "s:\(GCC_SYSTEM_OPTIONS =\).*:\1:" \
-   "${S}"/config/systems/sparc_SunOS5.mak || die
-
-   # Fix underlinking, bug #493204
-   epatch "${FILESDIR}"/${PN}-2.1-underlinking.patch
-
-   # Fix gcc7 build failure, bug #634224
-   epatch "${FILESDIR}"/${PN}-2.1-gcc7.patch
-}
-
-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
-

[gentoo-commits] repo/gentoo:master commit in: app-accessibility/speech-tools/, app-accessibility/speech-tools/files/

2017-10-16 Thread Alexis Ballier
commit: bde1d2d0a2289811e5b499fc279925cb47480ef9
Author: Christian Strahl  gmail  com>
AuthorDate: Sun Oct 15 20:01:41 2017 +
Commit: Alexis Ballier  gentoo  org>
CommitDate: Tue Oct 17 05:47:06 2017 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bde1d2d0

app-accessibility/speech-tools-2.1-r4: fix gcc-7 build, #634224

 .../speech-tools/files/speech-tools-2.1-gcc7.patch |  20 
 .../speech-tools/speech-tools-2.1-r4.ebuild| 120 +
 2 files changed, 140 insertions(+)

diff --git a/app-accessibility/speech-tools/files/speech-tools-2.1-gcc7.patch 
b/app-accessibility/speech-tools/files/speech-tools-2.1-gcc7.patch
new file mode 100644
index 000..9e1067fa1dc
--- /dev/null
+++ b/app-accessibility/speech-tools/files/speech-tools-2.1-gcc7.patch
@@ -0,0 +1,20 @@
+--- a/siod/siod.cc
 b/siod/siod.cc
+@@ -459,7 +459,7 @@ char **siod_variable_generator(char *text,int length)
+ matches = walloc(char *,siod_llength(lmatches)+1);
+ for (l=lmatches,i=0; l; l=cdr(l),i++)
+   matches[i] = wstrdup(PNAME(car(l)));
+-matches[i] = '\0';
++*matches[i] = '\0';
+ 
+ return matches;
+ }
+@@ -498,7 +498,7 @@ char **siod_command_generator (char *text,int length)
+ matches = walloc(char *,siod_llength(lmatches)+1);
+ for (l=lmatches,i=0; l; l=cdr(l),i++)
+   matches[i] = wstrdup(PNAME(car(l)));
+-matches[i] = '\0';
++*matches[i] = '\0';
+ 
+ return matches;
+ }

diff --git a/app-accessibility/speech-tools/speech-tools-2.1-r4.ebuild 
b/app-accessibility/speech-tools/speech-tools-2.1-r4.ebuild
new file mode 100644
index 000..254a17f1544
--- /dev/null
+++ b/app-accessibility/speech-tools/speech-tools-2.1-r4.ebuild
@@ -0,0 +1,120 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+inherit eutils flag-o-matic multilib 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/${PV}/${MY_P}-release.tar.gz
+
https://dev.gentoo.org/~neurogeek/${PN}/${MY_P}-${PATCHSET}-patches.tar.gz;
+
+LICENSE="FESTIVAL HPND BSD rc regexp-UofT"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 
~x86-fbsd"
+IUSE="nas X"
+
+RDEPEND="
+   nas? ( media-libs/nas )
+   X? ( x11-libs/libX11
+   x11-libs/libXt )
+   >=media-libs/alsa-lib-1.0.20-r1
+   !=sys-libs/ncurses-5.6-r2
+"
+DEPEND="${RDEPEND}
+   virtual/pkgconfig
+"
+
+S="${WORKDIR}/speech_tools"
+
+src_prepare() {
+   EPATCH_SUFFIX="patch"
+   epatch
+
+   sed -i -e 's,{{HORRIBLELIBARCHKLUDGE}},"/usr/$(get_libdir)",' \
+   main/siod_main.cc || die
+
+   #WRT bug #309983
+   sed -i -e "s:\(GCC_SYSTEM_OPTIONS =\).*:\1:" \
+   "${S}"/config/systems/sparc_SunOS5.mak || die
+
+   # Fix underlinking, bug #493204
+   epatch "${FILESDIR}"/${PN}-2.1-underlinking.patch
+
+   # Fix gcc7 build failure, bug #634224
+   epatch "${FILESDIR}"/${PN}-2.1-gcc7.patch
+}
+
+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)" 
CXX_OTHER_FLAGS="${CXXFLAGS}" CC_OTHER_FLAGS="${CFLAGS}" \
+   LDFLAGS="${LDFLAGS}"
+}
+
+src_install() {
+   dolib.so lib/libest*.so*
+
+   dodoc "${S}"/README
+   dodoc "${S}"/lib/cstrutt.dtd
+
+   insinto /usr/share/doc/${PF}
+   doins -r lib/example_data
+
+   insinto /usr/share/speech-tools
+   doins -r config base_class
+
+   insinto /usr/share/speech-tools/lib
+   doins -r lib/siod
+
+   cd include || die
+   insinto /usr/include/speech-tools
+   doins -r *
+   dosym ../../include/speech-tools /usr/share/speech-tools/include
+
+   cd ../bin || die
+   for file in *; do
+   [ "${file}" = "Makefile" ] && continue
+   dobin ${file}
+   dstfile="${D}/usr/bin/${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