chiark / gitweb /
libgpg-error: workaround no stdout atexit with constructor prior to N (#1017)
[termux-packages] / packages / espeak / build.sh
1 TERMUX_PKG_HOMEPAGE=https://github.com/espeak-ng/espeak-ng
2 TERMUX_PKG_DESCRIPTION="Compact software speech synthesizer"
3 # Use eSpeak NG as the original eSpeak project is dead.
4 # See https://github.com/espeak-ng/espeak-ng/issues/180
5 # about cross compilation of espeak-ng.
6 TERMUX_PKG_VERSION=1.49.1
7 TERMUX_PKG_SRCURL=https://github.com/espeak-ng/espeak-ng/releases/download/${TERMUX_PKG_VERSION}/espeak-ng-${TERMUX_PKG_VERSION}.tar.gz
8 TERMUX_PKG_SHA256=4502c6e352d587fda326e8a55763e7d7c28b40e82c9c4683258ecc0a339ed0d4
9 TERMUX_PKG_FOLDERNAME=espeak-ng-${TERMUX_PKG_VERSION}
10 TERMUX_PKG_BUILD_IN_SRC=yes
11 TERMUX_PKG_HOSTBUILD=yes
12 # --without-async due to that using pthread_cancel().
13 TERMUX_PKG_EXTRA_CONFIGURE_ARGS="--without-async"
14
15 termux_step_host_build() {
16         cp -Rf $TERMUX_PKG_SRCDIR/* .
17         unset MAKEFLAGS
18         ./configure --prefix=$TERMUX_PREFIX
19         make -j$TERMUX_MAKE_PROCESSES src/{e,}speak-ng
20
21         # Man pages require the ronn ruby program.
22         #make src/espeak-ng.1
23         #cp src/espeak-ng.1 $TERMUX_PREFIX/share/man/man1
24         #(cd $TERMUX_PREFIX/share/man/man1 && ln -s -f espeak-ng.1 espeak.1)
25
26         make install
27 }
28
29 termux_step_make() {
30         # Prevent caching of host build:
31         rm -Rf $TERMUX_PKG_HOSTBUILD_DIR
32         make -j$TERMUX_MAKE_PROCESSES src/{e,}speak-ng
33 }
34
35 termux_step_make_install() {
36         rm $TERMUX_PREFIX/bin/{e,}speak{,-ng}
37         cp src/.libs/espeak-ng $TERMUX_PREFIX/bin/espeak
38         cp src/.libs/libespeak-ng.so $TERMUX_PREFIX/lib/libespeak-ng.so.1.1.49
39 }