summaryrefslogtreecommitdiffstats
path: root/trinity-base/kttsd/kttsd-14.1.0.ebuild
blob: 31c4f6beaaec13d7f8129a7c596bff28699a1035 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
# Copyright 2022-2023 The Trinity Desktop Project
# Distributed under the terms of the GNU General Public License v2

EAPI="8"

TRINITY_MODULE_NAME="tdeaccessibility"
TRINITY_MODULE_TYPE="core"
TRINITY_HANDBOOK="optional"
TRINITY_NEED_ARTS="optional"
TSM_EXTRACT_ALSO="kspeechsink"
inherit trinity-meta-2

DESCRIPTION="TDE text-to-speech subsystem"
if [[ ${PV} != *9999* ]] ; then
	KEYWORDS="~amd64 ~arm64 ~x86"
fi

IUSE="akode +alsa epos festival flite freetts hadifix kate"
REQUIRED_USE="|| ( akode alsa arts )"

DEPEND=" akode? ( ~media-libs/akode-${PV} )
	alsa? ( media-libs/alsa-lib )
	~trinity-base/kcontrol-${PV}"
RDEPEND=" ${DEPEND}
	epos? ( app-accessibility/epos )
	flite? ( app-accessibility/flite )
	freetts? ( app-accessibility/freetts )
	hadifix? ( app-accessibility/mbrola )
	kate? ( trinity-base/kate )"

# Missing dependencies:
# festival? ( app-accessibility/festival )
# hadifix? ( app-accessibility/txt2pho )
# Note: tha flags should me masked

pkg_setup() {
	if use festival; then
		ewarn
		ewarn "app-accessibility/festival was removed from portage. In order to use it"
		ewarn "as your TTS engine you will have to provide the festival binary yourself."
	fi

	if use hadifix; then
		ewarn
		ewarn "Hadifix TTS engine requires txt2pho utility which is not currently in portage."
		ewarn "In order to use Hadifix as your TTS engine you will have to provide the binary yourself."
	fi

	elog "Besides built-in support for several engines kttsd includes generic 'Command'"
	elog "module which may utilize other 3rd-party TTS engines like:"
	elog " - app-accessibility/espeak-ng"
	elog " - app-accessibility/rhvoice"
	elog " - app-accessibility/speech-dispatcher"
	elog "and others. You are welcome to install one of them."

	trinity-meta-2_pkg_setup
}

src_configure() {
	local mycmakeargs=(
		-DWITH_ALSA="$(usex alsa)"
		-DWITH_AKODE="$(usex akode)"
		-DBUILD_KTTSD_FESTIVAL="$(usex festival)"
		-DBUILD_KTTSD_EPOS="$(usex epos)"
		-DBUILD_KTTSD_FLITE="$(usex flite)"
		-DBUILD_KTTSD_FREETTS="$(usex freetts)"
		-DBUILD_KTTSD_HADIFIX=$(usex hadifix)
		-DBUILD_KTTSD_KATE="$(usex kate)"
		-DBUILD_KTTSD_COMMAND=ON
		-DWITH_GSTREAMER=OFF # gstreamer support is not really finished
	)

	trinity-meta-2_src_configure
}