Gentoo Archives: gentoo-commits

From: Anna Vyalkova <cyber+gentoo@×××××.in>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/proj/guru:dev commit in: app-accessibility/rhvoice/
Date: Tue, 07 Dec 2021 04:20:17
Message-Id: 1638850789.f30051c43841ba749a08f9b3e460f077818fdc7a.cybertailor@gentoo
1 commit: f30051c43841ba749a08f9b3e460f077818fdc7a
2 Author: Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
3 AuthorDate: Tue Dec 7 04:16:53 2021 +0000
4 Commit: Anna Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
5 CommitDate: Tue Dec 7 04:19:49 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=f30051c4
7
8 app-accessibility/rhvoice: add 1.6.0
9
10 Signed-off-by: Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq.in>
11
12 app-accessibility/rhvoice/Manifest | 1 +
13 app-accessibility/rhvoice/rhvoice-1.6.0.ebuild | 126 +++++++++++++++++++++++++
14 2 files changed, 127 insertions(+)
15
16 diff --git a/app-accessibility/rhvoice/Manifest b/app-accessibility/rhvoice/Manifest
17 index 79881ad96..13d2330eb 100644
18 --- a/app-accessibility/rhvoice/Manifest
19 +++ b/app-accessibility/rhvoice/Manifest
20 @@ -1 +1,2 @@
21 DIST rhvoice-1.4.2-release.tar.gz 252269229 BLAKE2B 0f5564dcb986eec49bead04b46afe7e5caf8a186cdd23f3c9727ee9e6bdeb4b326d6b9cec3f9cdde78d01286d16f05aad840f67aa44b22ce05b7db85d04f2144 SHA512 edee8fa79fa0f3eecd2bca6a6c4846876cce2fc7b843a481357b536a42485f9524fc64e9e8a6766cbe46bcc2ef9ad0375cab16ad35722895db5697e14234a8de
22 +DIST rhvoice-1.6.0.tar.gz 307395200 BLAKE2B b31110d15dddb4d1607c8b3a24a551876f0612840eb0d668546bbde1929259c84a0188059e1470b90049e6d410c85116d46b0d1059aa3712bae464d8c8cdca48 SHA512 320a773a647af3bd3f6eac21003c7db790c65849baa87f7cc5c2bee874d0ad8074c21ed0962851dd2e0721ecd6b0f52f03a876788e6609275516fe2d1e46905d
23
24 diff --git a/app-accessibility/rhvoice/rhvoice-1.6.0.ebuild b/app-accessibility/rhvoice/rhvoice-1.6.0.ebuild
25 new file mode 100644
26 index 000000000..2918efd80
27 --- /dev/null
28 +++ b/app-accessibility/rhvoice/rhvoice-1.6.0.ebuild
29 @@ -0,0 +1,126 @@
30 +# Copyright 2021 Gentoo Authors
31 +# Distributed under the terms of the GNU General Public License v2
32 +
33 +EAPI=8
34 +
35 +CMAKE_REMOVE_MODULES_LIST=( VersionFromGit )
36 +inherit cmake
37 +
38 +DESCRIPTION="TTS engine with extended languages support (including Russian)"
39 +HOMEPAGE="https://rhvoice.su https://github.com/RHVoice/RHVoice"
40 +SRC_URI="https://github.com/${PN}/${PN}/releases/download/${PV}/${P}.tar.gz"
41 +
42 +AGPL_LANGS=( mk )
43 +CC_SA_LANGS=( pt-BR )
44 +CC_NC_LANGS=( en eo ky ru uk )
45 +NC_LANGS=( ka tt )
46 +LANGS=(
47 + "${AGPL_LANGS[@]}"
48 + "${CC_SA_LANGS[@]}"
49 + "${CC_NC_LANGS[@]}"
50 + "${LGPL2_LANGS[@]}"
51 + "${NC_LANGS[@]}"
52 + sq # LGPL-2.1+
53 +)
54 +
55 +LICENSE="BSD GPL-2 GPL-3+ LGPL-2.1+
56 + $(printf 'l10n_%s? ( AGPL-3 )\n' "${AGPL_LANGS[@]}")
57 + $(printf 'l10n_%s? ( CC-BY-SA-4.0 )\n' "${CC_SA_LANGS[@]}")
58 + $(printf 'l10n_%s? ( CC-BY-NC-ND-4.0 )\n' "${CC_NC_LANGS[@]}")
59 + $(printf 'l10n_%s? ( free-noncomm )\n' "${NC_LANGS[@]}")
60 +"
61 +KEYWORDS="~amd64 ~x86"
62 +IUSE="$(printf 'l10n_%s ' ${LANGS[@]}) ao cli portaudio +pulseaudio +server +speech-dispatcher"
63 +SLOT="0"
64 +REQUIRED_USE="|| ( ao portaudio pulseaudio )"
65 +
66 +DEPEND="
67 + ao? ( media-libs/libao )
68 + portaudio? ( media-libs/portaudio )
69 + pulseaudio? ( media-sound/pulseaudio )
70 + server? (
71 + dev-libs/glib:2[dbus]
72 + dev-libs/libsigc++:2
73 + >=dev-cpp/glibmm-2.66.1:2
74 + )
75 + speech-dispatcher? ( app-accessibility/speech-dispatcher )
76 +"
77 +RDEPEND="${DEPEND}
78 + !dev-libs/hts_engine
79 +"
80 +# TODO: readd dev-libs/rapidxml in ::guru
81 +BDEPEND="
82 + dev-cpp/cli11
83 + dev-libs/utfcpp
84 +"
85 +REQUIRED_USE="|| ( ao portaudio pulseaudio )"
86 +
87 +DOCS=( README.md doc config/dicts )
88 +
89 +delete_voices() {
90 + for voice in "$@"; do
91 + rm -r "data/voices/${voice}" || die
92 + done
93 +}
94 +
95 +src_prepare() {
96 + cmake_src_prepare
97 +
98 + sed "s|/lib/speech-dispatcher-modules|/$(get_libdir)/speech-dispatcher-modules|" \
99 + -i src/sd_module/CMakeLists.txt || die
100 +
101 + # fix dbus service install path
102 + sed "s|/systemd/system||" \
103 + -i src/service/CMakeLists.txt || die
104 +
105 + #sed -e "/set(RAPIDXML_INCLUDE_DIR/d" \
106 + # -i src/third-party/CMakeLists.txt || die
107 + sed "/set(UTF8_INCLUDE_DIR/d" -i src/CMakeLists.txt || die
108 +
109 + # fix build failure
110 + sed 's/ "RHVoice_question_match"//' \
111 + -i src/third-party/mage/CMakeLists.txt || die
112 +
113 + sed -e "/include(VersionFromGit)/d" \
114 + -e "/getVersionFromGit/d" \
115 + -i CMakeLists.txt || die
116 +
117 + use l10n_en || delete_voices alan bdl clb evgeniy-eng lubov slt
118 + use l10n_eo || delete_voices spomenka
119 + use l10n_ka || delete_voices natia
120 + use l10n_ky || delete_voices azamat nazgul
121 + use l10n_mk || delete_voices kiko
122 + use l10n_ru || delete_voices aleksandr aleksandr-hq anna arina artemiy \
123 + elena evgeniy-rus irina mikhail pavel tatiana victoria yuriy
124 + use l10n_sq || delete-voices hana
125 + use l10n_tt || delete_voices talgat
126 + use l10n_uk || delete_voices anatol marianna natalia volodymyr
127 + use l10n_pt-BR || delete_voices Leticia-F123
128 +}
129 +
130 +src_configure() {
131 + local mycmakeargs=(
132 + -Dcommon_doc_dir=/usr/share/doc/${PF}
133 + -DRHVOICE_VERSION=${PV}
134 + -DRHVOICE_VERSION_MAJOR=$(ver_cut 1)
135 + -DWITH_CLI11=ON
136 + # src/CMakeLists.txt
137 + -DBUILD_CLIENT=OFF # deprecated
138 + -DBUILD_UTILS=OFF # fails to build because of bundled tclap
139 + -DBUILD_TESTS=$(usex cli)
140 + -DBUILD_SERVICE=$(usex server)
141 + -DBUILD_SPEECHDISPATCHER_MODULE=$(usex speech-dispatcher)
142 + # src/audio/CMakeLists.txt
143 + -DWITH_LIBAO=$(usex ao)
144 + -DWITH_PULSE=$(usex pulseaudio)
145 + -DWITH_PORTAUDIO=$(usex portaudio)
146 + # src/third-party/CMakeLists.txt
147 + #-DRAPIDXML_INCLUDE_DIR=/usr/include/rapidxml
148 + -DUTF8_INCLUDE_DIR=/usr/include/utf8cpp
149 + # Hardening.cmake: don't mess with flags
150 + -DHARDENING_COMPILE_FLAGS=
151 + -DHARDENING_LINK_FLAGS=
152 + )
153 +
154 + cmake_src_configure
155 +}