Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 1 | require espeak.inc |
| 2 | inherit siteinfo |
| 3 | |
| 4 | EXTRA_PHONEMES = '${@bb.utils.contains("SITEINFO_ENDIANNESS", "be", "espeak-data (= ${PV})", "", d)}' |
| 5 | RDEPENDS_${PN} = "portaudio-v19 ${EXTRA_PHONEMES}" |
| 6 | |
| 7 | CXXFLAGS += "-DUSE_PORTAUDIO" |
| 8 | TARGET_CC_ARCH += "${LDFLAGS}" |
| 9 | |
| 10 | FILES_${PN} += "${datadir}/espeak-data" |
| 11 | |
| 12 | do_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 | |
| 17 | do_compile() { |
| 18 | cd src |
| 19 | oe_runmake |
| 20 | } |
| 21 | |
| 22 | do_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 Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 39 | cp -R --no-dereference --preserve=mode,links ${S}/espeak-data/* ${D}${datadir}/espeak-data |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 40 | } |