kumquat-buildroot/package/espeak/espeak.mk

45 lines
1.4 KiB
Makefile
Raw Normal View History

################################################################################
#
# espeak
#
################################################################################
ESPEAK_VERSION_MAJOR = 1.48
ESPEAK_VERSION = $(ESPEAK_VERSION_MAJOR).04
ESPEAK_SOURCE = espeak-$(ESPEAK_VERSION)-source.zip
ESPEAK_SITE = http://downloads.sourceforge.net/project/espeak/espeak/espeak-$(ESPEAK_VERSION_MAJOR)
ESPEAK_LICENSE = GPL-3.0+
ESPEAK_LICENSE_FILES = License.txt
ifeq ($(BR2_PACKAGE_ESPEAK_AUDIO_BACKEND_ALSA),y)
ESPEAK_AUDIO_BACKEND = portaudio
ESPEAK_DEPENDENCIES += portaudio
endif
ifeq ($(BR2_PACKAGE_ESPEAK_AUDIO_BACKEND_PULSEAUDIO),y)
ESPEAK_AUDIO_BACKEND = pulseaudio
ESPEAK_DEPENDENCIES += pulseaudio
endif
define ESPEAK_EXTRACT_CMDS
$(UNZIP) -d $(@D) $(ESPEAK_DL_DIR)/$(ESPEAK_SOURCE)
mv $(@D)/espeak-$(ESPEAK_VERSION)-source/* $(@D)
$(RM) -r $(@D)/espeak-$(ESPEAK_VERSION)-source
endef
define ESPEAK_CONFIGURE_CMDS
# Buildroot provides portaudio V19, see ReadMe file for more details.
cp $(@D)/src/portaudio19.h $(@D)/src/portaudio.h
endef
define ESPEAK_BUILD_CMDS
$(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/src $(TARGET_CONFIGURE_OPTS) \
AUDIO="$(ESPEAK_AUDIO_BACKEND)" all
endef
define ESPEAK_INSTALL_TARGET_CMDS
package/espeak: fix pulseaudio build Pass $(TARGET_CONFIGURE_OPTS) AUDIO="$(ESPEAK_AUDIO_BACKEND)" to ESPEAK_INSTALL_TARGET_CMDS to avoid the following build failure with pulseaudio raised since the addition of the package in commit 10b6d10009c70262cfb492b2abaa3a091a8fb4aa: >>> espeak 1.48.04 Installing to target PATH="/nvmedata/autobuild/instance-5/output-1/per-package/espeak/host/bin:/nvmedata/autobuild/instance-5/output-1/per-package/espeak/host/sbin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin" /usr/bin/make -j1 -C /nvmedata/autobuild/instance-5/output-1/build/espeak-1.48.04/src DESTDIR="/nvmedata/autobuild/instance-5/output-1/per-package/espeak/target" install make[1]: Entering directory '/nvmedata/autobuild/instance-5/output-1/build/espeak-1.48.04/src' g++ -O2 -DUSE_PORTAUDIO -D PATH_ESPEAK_DATA=\"/usr/share/espeak-data\" -Wall -fPIC -fvisibility=hidden -pedantic \ -I. -D LIBRARY -c -fno-exceptions wave.cpp -o x_wave.o g++ -shared -Wl,-soname,libespeak.so.1 -o libespeak.so \ x_speak_lib.o x_compiledict.o x_dictionary.o x_intonation.o x_readclause.o x_setlengths.o x_numbers.o x_synth_mbrola.o x_synthdata.o x_synthesize.o x_translate.o x_mbrowrap.o x_tr_languages.o x_voices.o x_wavegen.o x_phonemelist.o x_espeak_command.o x_event.o x_fifo.o x_wave.o x_debug.o x_klatt.o x_sonic.o -lstdc++ -lportaudio -lpthread /usr/bin/ld: cannot find -lportaudio Fixes: - http://autobuild.buildroot.org/results/a4a6e3203ad70cd724da8130ee1648141ab39a6a Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com> Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
2022-04-17 23:58:22 +02:00
$(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/src $(TARGET_CONFIGURE_OPTS) \
AUDIO="$(ESPEAK_AUDIO_BACKEND)" DESTDIR="$(TARGET_DIR)" install
endef
$(eval $(generic-package))