espeak: import from OE rev d4f0211e2078d5033ae0dee74664de5520d8392d

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
This commit is contained in:
Martin Jansa 2011-05-29 21:05:30 +02:00 committed by Koen Kooi
parent 2bd740ea57
commit f71254a7ac
3 changed files with 79 additions and 0 deletions

View File

@ -0,0 +1,27 @@
require espeak.inc
inherit native
PACKAGES = "${PN}"
FILES_${PN} = "${layout_datadir}"
PACKAGE_ARCH = "${MACHINE_ARCH}"
TARGET_ARCH = "${MACHINE_ARCH}"
do_compile() {
# Fixing byte order of phoneme data files
cd "${S}/platforms/big_endian"
sed -i '/^ *CC *=/d' Makefile
sed -i 's/\(.*BYTE_ORDER\)/#undef BYTE_ORDER\n#define BYTE_ORDER BIG_ENDIAN\n\1/' espeak-phoneme-data.c
oe_runmake
./espeak-phoneme-data "${S}/espeak-data"
cp -f phondata phonindex phontab "${S}/espeak-data"
}
do_install() {
install -d ${D}${layout_datadir}/espeak-data
install -m 0644 ${S}/espeak-data/phon* ${D}${layout_datadir}/espeak-data
}
SRC_URI[md5sum] = "5c7b292d0537232868b4ac1317d76c02"
SRC_URI[sha256sum] = "77f406c345362185ec4f362bf49f61d202e01ac9b9cd5c14f803195a544ce6d3"

View File

@ -0,0 +1,10 @@
DESCRIPTION = "eSpeak is a compact open source software speech synthesizer"
SECTION = "base"
LICENSE = "GPLv3"
LIC_FILES_CHKSUM = "file://License.txt;md5=cb7a20edb4c9f5f478de6523dcd7362c"
SRC_URI = "${SOURCEFORGE_MIRROR}/espeak/espeak-${PV}-source.zip"
S = "${WORKDIR}/espeak-${PV}-source"
DEPENDS = "portaudio-v19"

View File

@ -0,0 +1,42 @@
require espeak.inc
inherit siteinfo
EXTRA_PHONEMES = '${@base_contains("SITEINFO_ENDIANNESS", "be", "espeak-data (= ${PV})", "", d)}'
RDEPENDS_${PN} = "portaudio-v19 ${EXTRA_PHONEMES}"
SRC_URI[md5sum] = "5c7b292d0537232868b4ac1317d76c02"
SRC_URI[sha256sum] = "77f406c345362185ec4f362bf49f61d202e01ac9b9cd5c14f803195a544ce6d3"
CXXFLAGS += "-DUSE_PORTAUDIO"
TARGET_CC_ARCH += "${LDFLAGS}"
FILES_${PN} += "${datadir}/espeak-data"
do_configure() {
# "speak" binary, a TTS engine, uses portaudio in either APIs V18 or V19, use V19
cp "${S}/src/portaudio19.h" "${S}/src/portaudio.h"
}
do_compile() {
cd src
oe_runmake
}
do_install() {
install -d ${D}${bindir}
install -d ${D}${libdir}
install -d ${D}${includedir}
install -d ${D}${datadir}/espeak-data
# we do not ship "speak" binary though.
install -m 0755 ${S}/src/espeak ${D}${bindir}
install -m 0644 ${S}/src/speak_lib.h ${D}${includedir}
oe_libinstall -so -C src libespeak ${D}${libdir}
if [ "${SITEINFO_ENDIANNESS}" = "be" ] ; then
# the big-endian phon* files are provided by the package espeak-data
rm -f ${S}/espeak-data/phon*
fi
cp -prf ${S}/espeak-data/* ${D}${datadir}/espeak-data
}