summaryrefslogtreecommitdiff
blob: 503c5bd7ea0c217b02066d0edaa43cdc497a7a68 (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
# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=7

if [[ ${PV} == "9999" ]] ; then
	EGIT_REPO_URI="https://github.com/linux-speakup/espeakup.git"
	inherit git-r3
else
	SRC_URI="https://github.com/linux-speakup/espeakup/archive/v${PV}.tar.gz -> ${P}.tar.gz"
	KEYWORDS="~amd64"
fi

inherit linux-info meson

DESCRIPTION="espeakup is a small lightweight connector for espeak and speakup"
HOMEPAGE="https://github.com/williamh/espeakup"

LICENSE="GPL-3"
SLOT="0"
IUSE="man systemd"

COMMON_DEPEND="app-accessibility/espeak-ng[sound]
	media-libs/alsa-lib"
DEPEND="${COMMON_DEPEND}"
RDEPEND="${COMMON_DEPEND}"
BDEPEND="man? ( app-text/ronn-ng )"

CONFIG_CHECK="~SPEAKUP ~SPEAKUP_SYNTH_SOFT"

src_configure() {
	local emesonargs
	emesonargs=(
		$(meson_feature man)
		$(meson_feature systemd)
		)
	meson_src_configure
}

src_install() {
	meson_src_install
	einstalldocs
	newconfd "${FILESDIR}"/espeakup.confd espeakup
	newinitd "${FILESDIR}"/espeakup.initd espeakup
}

pkg_postinst() {
	elog "To get espeakup to start automatically, it is currently recommended"
	elog "that you add it to the default run level, by giving the following"
	elog "command as root."
	elog
	elog "rc-update add espeakup default"
	elog
	elog "You can also set a default voice now for espeakup."
	elog "See /etc/conf.d/espeakup for how to do this."
}