blob: 57e30f07107955d4ede9db7e1583849c842976d4 [file] [log] [blame]
Brad Bishopd7bf8c12018-02-25 22:55:05 -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
7CXXFLAGS += "-DUSE_PORTAUDIO"
8TARGET_CC_ARCH += "${LDFLAGS}"
9
10FILES_${PN} += "${datadir}/espeak-data"
11
12do_configure() {
13 # "speak" binary, a TTS engine, uses portaudio in either APIs V18 or V19, use V19
14 cp "${S}/src/portaudio19.h" "${S}/src/portaudio.h"
15}
16
17do_compile() {
18 cd src
19 oe_runmake
20}
21
22do_install() {
23 install -d ${D}${bindir}
24 install -d ${D}${libdir}
25 install -d ${D}${includedir}/espeak
26 install -d ${D}${datadir}/espeak-data
27
28 # we do not ship "speak" binary though.
29 install -m 0755 ${S}/src/espeak ${D}${bindir}
30 install -m 0644 ${S}/src/speak_lib.h ${D}${includedir}/espeak/
31 ln -sf espeak/espeak.h ${D}${includedir}/
32 oe_libinstall -so -C src libespeak ${D}${libdir}
33
34 if [ "${SITEINFO_ENDIANNESS}" = "be" ] ; then
35 # the big-endian phon* files are provided by the package espeak-data
36 rm -f ${S}/espeak-data/phon*
37 fi
38
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080039 cp -R --no-dereference --preserve=mode,links ${S}/espeak-data/* ${D}${datadir}/espeak-data
Brad Bishopd7bf8c12018-02-25 22:55:05 -050040}