buildroot/package/espeak/espeak.mk
Maxime Hadjinlian 514291f39e packages: use new $($PKG)_DL_DIR) variable
Instead of DL_DIR, the package should now use $(PKG)_DL_DIR to ease the
transition into a new directory structure for DL_DIR.

This commit has been generated with the following scripts:

for i in $(find . -iname "*.mk"); do
	if ! grep -q "\$(DL_DIR)" ${i}; then
		continue
	fi
	pkg_name="$(basename $(dirname ${i}))"
	[ "${pkg_name}" = "package" ] && continue
	raw_pkg_name=$(echo ${pkg_name} | tr [a-z] [A-Z] | tr '-' '_')
	pkg_dl_dir="${raw_pkg_name}_DL_DIR"
	sed -i "s/\$(DL_DIR)/\$($pkg_dl_dir)/" ${i}
done

Signed-off-by: Maxime Hadjinlian <maxime.hadjinlian@gmail.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2018-04-02 15:53:53 +02:00

44 lines
1.3 KiB
Makefile

################################################################################
#
# 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
$(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/src DESTDIR="$(TARGET_DIR)" install
endef
$(eval $(generic-package))