1 # Copyright 1999-2022 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
8 DISABLE_AUTOFORMATTING=1
9 inherit elisp toolchain-funcs readme.gentoo-r1
11 DESCRIPTION="The emacspeak audio desktop"
12 HOMEPAGE="http://emacspeak.sourceforge.net/"
14 if [[ ${PV} == 9999 ]] ; then
15 EGIT_REPO_URI="https://github.com/tvraman/emacspeak.git"
18 SRC_URI="https://github.com/tvraman/emacspeak/releases/download/${PV}/${P}.tar.bz2"
19 KEYWORDS="amd64 ppc x86"
22 LICENSE="GPL-2+ GPL-3+"
26 # Usually need := dep with tcl anyway but in particular, it's needed
27 # here as we do a version check in src_compile and bake in the results.
30 espeak? ( app-accessibility/espeak-ng )
38 As of version 39.0 and later, the /usr/bin/emacspeak
39 shell script has been removed downstream in Gentoo.
40 You should launch emacspeak by another method, for instance
41 by adding the following to your ~/.emacs file:
42 (load "/usr/share/emacs/site-lisp/emacspeak/lisp/emacspeak-setup.el")
45 HTML_DOCS=( etc/ info/ )
58 local tcl_version="$(echo 'puts $tcl_version;exit 0' |tclsh)"
59 if [[ -z ${tcl_version} ]]; then
60 die 'Unable to detect the installed version of dev-lang/tcl.'
63 cd servers/native-espeak || die
64 emake TCL_VERSION="${tcl_version}"
69 emake DESTDIR="${D}" install
72 pushd servers/native-espeak > /dev/null || die
74 emake DESTDIR="${D}" install
75 local orig_serverdir="/usr/share/emacs/site-lisp/emacspeak/servers/native-espeak"
76 local serverfile="${ED}${orig_serverdir}/tclespeak.so"
78 install -Dm755 "${serverfile}" \
79 "${ED}/usr/$(get_libdir)/emacspeak/tclespeak.so" || die
80 rm -f "${serverfile}" || die
82 dosym -r "/usr/$(get_libdir)/emacspeak/tclespeak.so" \
83 "${orig_serverdir}/tclespeak.so"
84 popd > /dev/null || die
87 dodoc README etc/NEWS* etc/COPYRIGHT
90 cd "${ED}"/usr/share/emacs/site-lisp/${PN} || die
91 rm -rf README etc/NEWS* etc/COPYRIGHT install-guide \
93 readme.gentoo_create_doc