blob: 273fe340e329f2d2cef8ddfaa9e40c87543e3682 [file] [log] [blame]
Patrick Williamsb48b7b42016-08-17 15:04:38 -05001require espeak.inc
2inherit siteinfo
3
4EXTRA_PHONEMES = '${@bb.utils.contains("SITEINFO_ENDIANNESS", "be", "espeak-data (= ${PV})", "", d)}'
5RDEPENDS_${PN} = "portaudio-v19 ${EXTRA_PHONEMES}"
6
7SRC_URI[md5sum] = "5c7b292d0537232868b4ac1317d76c02"
8SRC_URI[sha256sum] = "77f406c345362185ec4f362bf49f61d202e01ac9b9cd5c14f803195a544ce6d3"
9
10CXXFLAGS += "-DUSE_PORTAUDIO"
11TARGET_CC_ARCH += "${LDFLAGS}"
12
13FILES_${PN} += "${datadir}/espeak-data"
14
15do_configure() {
16 # "speak" binary, a TTS engine, uses portaudio in either APIs V18 or V19, use V19
17 cp "${S}/src/portaudio19.h" "${S}/src/portaudio.h"
18}
19
20do_compile() {
21 cd src
22 oe_runmake
23}
24
25do_install() {
26 install -d ${D}${bindir}
27 install -d ${D}${libdir}
28 install -d ${D}${includedir}/espeak
29 install -d ${D}${datadir}/espeak-data
30
31 # we do not ship "speak" binary though.
32 install -m 0755 ${S}/src/espeak ${D}${bindir}
33 install -m 0644 ${S}/src/speak_lib.h ${D}${includedir}/espeak/
34 ln -sf espeak/espeak.h ${D}${includedir}/
35 oe_libinstall -so -C src libespeak ${D}${libdir}
36
37 if [ "${SITEINFO_ENDIANNESS}" = "be" ] ; then
38 # the big-endian phon* files are provided by the package espeak-data
39 rm -f ${S}/espeak-data/phon*
40 fi
41
42 cp -prf ${S}/espeak-data/* ${D}${datadir}/espeak-data
43 chown -R root:root ${D}${datadir}/espeak-data
44}