1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
6 PYTHON_COMPAT=( python3_{6,7} )
8 inherit eutils python-r1
10 DESCRIPTION="Speech synthesis interface"
11 HOMEPAGE="http://www.freebsoft.org/speechd"
12 SRC_URI="http://www.freebsoft.org/pub/projects/speechd/${P}.tar.gz"
16 KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux"
17 IUSE="alsa ao +espeak flite nas pulseaudio python"
19 REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
21 COMMON_DEPEND="python? ( ${PYTHON_DEPS} )
22 >=dev-libs/dotconf-1.3
23 >=dev-libs/glib-2.28:2
25 >=media-libs/libsndfile-1.0.2
26 alsa? ( media-libs/alsa-lib )
27 ao? ( media-libs/libao )
28 espeak? ( app-accessibility/espeak )
29 flite? ( app-accessibility/flite )
30 nas? ( media-libs/nas )
31 pulseaudio? ( media-sound/pulseaudio )"
32 DEPEND="${COMMON_DEPEND}
33 >=dev-util/intltool-0.40.0
35 RDEPEND="${COMMON_DEPEND}
36 python? ( dev-python/pyxdg[${PYTHON_USEDEP}] )"
40 export GIT_CEILING_DIRECTORIES="${WORKDIR}"
49 $(use_with pulseaudio pulse)
52 econf ${myeconfargs[@]}
56 use python && python_copy_sources
62 cd src/api/python || die
64 pyexecdir="$(python_get_sitedir)" \
65 pythondir="$(python_get_sitedir)"
67 python_foreach_impl run_in_build_dir building
72 emake DESTDIR="${D}" install
73 dodoc ANNOUNCE AUTHORS BUGS FAQ NEWS README*
77 cd src/api/python || die
80 pyexecdir="$(python_get_sitedir)" \
81 pythondir="$(python_get_sitedir)" \
84 python_foreach_impl run_in_build_dir installation
85 python_replicate_script "${ED}"/usr/bin/spd-conf
88 find "${D}" -name '*.la' -delete || die
94 ewarn "You have disabled espeak, which is speech-dispatcher's"
95 ewarn "default speech synthesizer."
99 if ! use pulseaudio; then
100 ewarn "You have disabled pulseaudio support."
101 ewarn "pulseaudio is speech-dispatcher's default audio subsystem."
105 if [[ "${editconfig}" == "y" ]]; then
106 ewarn "You must edit ${EROOT}/etc/speech-dispatcher/speechd.conf"
107 ewarn "and make sure the settings there match your system."
110 elog "For festival support, you need to"
111 elog "install app-accessibility/festival-freebsoft-utils."