summaryrefslogtreecommitdiff
path: root/package/espeak/espeak.mk
blob: 734ec30e544c2cd6c61a1d88f39c8c844a0fde1e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
################################################################################
#
# 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 = GPLv3+
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) $(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
	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/src DESTDIR="$(TARGET_DIR)" install
endef

$(eval $(generic-package))