Gentoo Archives: gentoo-commits

From: Alexis Ballier <aballier@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-accessibility/speech-tools/, app-accessibility/speech-tools/files/
Date: Tue, 17 Oct 2017 05:47:17
Message-Id: 1508219226.bde1d2d0a2289811e5b499fc279925cb47480ef9.aballier@gentoo
1 commit: bde1d2d0a2289811e5b499fc279925cb47480ef9
2 Author: Christian Strahl <c.a.strahl <AT> gmail <DOT> com>
3 AuthorDate: Sun Oct 15 20:01:41 2017 +0000
4 Commit: Alexis Ballier <aballier <AT> gentoo <DOT> org>
5 CommitDate: Tue Oct 17 05:47:06 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bde1d2d0
7
8 app-accessibility/speech-tools-2.1-r4: fix gcc-7 build, #634224
9
10 .../speech-tools/files/speech-tools-2.1-gcc7.patch | 20 ++++
11 .../speech-tools/speech-tools-2.1-r4.ebuild | 120 +++++++++++++++++++++
12 2 files changed, 140 insertions(+)
13
14 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
15 new file mode 100644
16 index 00000000000..9e1067fa1dc
17 --- /dev/null
18 +++ b/app-accessibility/speech-tools/files/speech-tools-2.1-gcc7.patch
19 @@ -0,0 +1,20 @@
20 +--- a/siod/siod.cc
21 ++++ b/siod/siod.cc
22 +@@ -459,7 +459,7 @@ char **siod_variable_generator(char *text,int length)
23 + matches = walloc(char *,siod_llength(lmatches)+1);
24 + for (l=lmatches,i=0; l; l=cdr(l),i++)
25 + matches[i] = wstrdup(PNAME(car(l)));
26 +- matches[i] = '\0';
27 ++ *matches[i] = '\0';
28 +
29 + return matches;
30 + }
31 +@@ -498,7 +498,7 @@ char **siod_command_generator (char *text,int length)
32 + matches = walloc(char *,siod_llength(lmatches)+1);
33 + for (l=lmatches,i=0; l; l=cdr(l),i++)
34 + matches[i] = wstrdup(PNAME(car(l)));
35 +- matches[i] = '\0';
36 ++ *matches[i] = '\0';
37 +
38 + return matches;
39 + }
40
41 diff --git a/app-accessibility/speech-tools/speech-tools-2.1-r4.ebuild b/app-accessibility/speech-tools/speech-tools-2.1-r4.ebuild
42 new file mode 100644
43 index 00000000000..254a17f1544
44 --- /dev/null
45 +++ b/app-accessibility/speech-tools/speech-tools-2.1-r4.ebuild
46 @@ -0,0 +1,120 @@
47 +# Copyright 1999-2015 Gentoo Foundation
48 +# Distributed under the terms of the GNU General Public License v2
49 +
50 +EAPI="5"
51 +
52 +inherit eutils flag-o-matic multilib toolchain-funcs
53 +
54 +MY_P=${P/speech-/speech_}
55 +PATCHSET="r3"
56 +
57 +DESCRIPTION="Speech tools for Festival Text to Speech engine"
58 +HOMEPAGE="http://www.cstr.ed.ac.uk/projects/speech_tools/"
59 +SRC_URI="http://www.festvox.org/packed/festival/${PV}/${MY_P}-release.tar.gz
60 + https://dev.gentoo.org/~neurogeek/${PN}/${MY_P}-${PATCHSET}-patches.tar.gz"
61 +
62 +LICENSE="FESTIVAL HPND BSD rc regexp-UofT"
63 +SLOT="0"
64 +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd"
65 +IUSE="nas X"
66 +
67 +RDEPEND="
68 + nas? ( media-libs/nas )
69 + X? ( x11-libs/libX11
70 + x11-libs/libXt )
71 + >=media-libs/alsa-lib-1.0.20-r1
72 + !<app-accessibility/festival-1.96_beta
73 + !sys-power/powerman
74 + >=sys-libs/ncurses-5.6-r2
75 +"
76 +DEPEND="${RDEPEND}
77 + virtual/pkgconfig
78 +"
79 +
80 +S="${WORKDIR}/speech_tools"
81 +
82 +src_prepare() {
83 + EPATCH_SUFFIX="patch"
84 + epatch
85 +
86 + sed -i -e 's,{{HORRIBLELIBARCHKLUDGE}},"/usr/$(get_libdir)",' \
87 + main/siod_main.cc || die
88 +
89 + #WRT bug #309983
90 + sed -i -e "s:\(GCC_SYSTEM_OPTIONS =\).*:\1:" \
91 + "${S}"/config/systems/sparc_SunOS5.mak || die
92 +
93 + # Fix underlinking, bug #493204
94 + epatch "${FILESDIR}"/${PN}-2.1-underlinking.patch
95 +
96 + # Fix gcc7 build failure, bug #634224
97 + epatch "${FILESDIR}"/${PN}-2.1-gcc7.patch
98 +}
99 +
100 +src_configure() {
101 + local CONFIG=config/config.in
102 + sed -i -e 's/@COMPILERTYPE@/gcc42/' ${CONFIG} || die
103 + if use nas; then
104 + sed -i -e "s/#.*\(INCLUDE_MODULES += NAS_AUDIO\)/\1/" \
105 + ${CONFIG} || die
106 + fi
107 + if ! use X; then
108 + sed -i -e "s/-lX11 -lXt//" config/modules/esd_audio.mak || die
109 + fi
110 + econf
111 +}
112 +
113 +src_compile() {
114 + emake -j1 CC="$(tc-getCC)" CXX="$(tc-getCXX)" CXX_OTHER_FLAGS="${CXXFLAGS}" CC_OTHER_FLAGS="${CFLAGS}" \
115 + LDFLAGS="${LDFLAGS}"
116 +}
117 +
118 +src_install() {
119 + dolib.so lib/libest*.so*
120 +
121 + dodoc "${S}"/README
122 + dodoc "${S}"/lib/cstrutt.dtd
123 +
124 + insinto /usr/share/doc/${PF}
125 + doins -r lib/example_data
126 +
127 + insinto /usr/share/speech-tools
128 + doins -r config base_class
129 +
130 + insinto /usr/share/speech-tools/lib
131 + doins -r lib/siod
132 +
133 + cd include || die
134 + insinto /usr/include/speech-tools
135 + doins -r *
136 + dosym ../../include/speech-tools /usr/share/speech-tools/include
137 +
138 + cd ../bin || die
139 + for file in *; do
140 + [ "${file}" = "Makefile" ] && continue
141 + dobin ${file}
142 + dstfile="${D}/usr/bin/${file}"
143 + sed -i -e "s:${S}/testsuite/data:/usr/share/speech-tools/testsuite:g" \
144 + ${dstfile} || die
145 + sed -i -e "s:${S}/bin:/usr/$(get_libdir)/speech-tools:g" \
146 + ${dstfile} || die
147 + sed -i -e "s:${S}/main:/usr/$(get_libdir)/speech-tools:g" \
148 + ${dstfile} || die
149 +
150 + # This just changes LD_LIBRARY_PATH
151 + sed -i -e "s:${S}/lib:/usr/$(get_libdir):g" ${dstfile} || die
152 + done
153 +
154 + cd "${S}" || die
155 + exeinto /usr/$(get_libdir)/speech-tools
156 + for file in `find main -perm /111 -type f`; do
157 + doexe ${file}
158 + done
159 +
160 + #Remove /usr/bin/resynth as it is broken. See bug #253556
161 + rm "${D}/usr/bin/resynth" || die
162 +
163 + # Remove bcat (only useful for testing on windows, see bug #418301).
164 + rm "${D}/usr/bin/bcat" || die
165 + rm "${D}/usr/$(get_libdir)/speech-tools/bcat" || die
166 +}