You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

65 lines
1.6 KiB

  1. #
  2. # This is free software, licensed under the GNU General Public License v2.
  3. # See /LICENSE for more information.
  4. #
  5. include $(TOPDIR)/rules.mk
  6. PKG_NAME:=espeak
  7. PKG_VERSION:=1.48.04
  8. PKG_RELEASE:=3
  9. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-source.zip
  10. PKG_SOURCE_URL:=@SF/espeak
  11. PKG_HASH:=bf9a17673adffcc28ff7ea18764f06136547e97bbd9edf2ec612f09b207f0659
  12. PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)-source
  13. PKG_MAINTAINER:=
  14. PKG_LICENSE:=GPL-3.0-or-later
  15. PKG_LICENSE_FILES:=License.txt
  16. PKG_INSTALL:=1
  17. PKG_BUILD_PARALLEL:=1
  18. include $(INCLUDE_DIR)/package.mk
  19. define Package/espeak
  20. SECTION:=sound
  21. CATEGORY:=Sound
  22. DEPENDS:=+libstdcpp +portaudio
  23. TITLE:=Speech synthesizer
  24. URL:=http://espeak.sourceforge.net/
  25. endef
  26. define Package/espeak/description
  27. eSpeak is a compact open source software speech synthesizer for English and
  28. other languages.
  29. endef
  30. # Use system header for portaudio
  31. define Build/Prepare
  32. $(call Build/Prepare/Default)
  33. rm $(PKG_BUILD_DIR)/src/portaudio.h
  34. endef
  35. MAKE_FLAGS+= \
  36. AUDIO="portaudio" \
  37. DATADIR="/usr/share/espeak" \
  38. CXXFLAGS="$(TARGET_CXXFLAGS)" \
  39. LDFLAGS="$(TARGET_LDFLAGS)" \
  40. MAKE_PATH:=./src
  41. TARGET_CXXFLAGS += -std=c++14 -ffunction-sections -fdata-sections -flto
  42. TARGET_LDFLAGS += $(FPIC) $(if $(CONFIG_USE_GLIBC),-lm) -Wl,--gc-sections,--as-needed
  43. define Package/espeak/install
  44. $(INSTALL_DIR) $(1)/usr/bin
  45. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/espeak $(1)/usr/bin/
  46. $(INSTALL_DIR) $(1)/usr/lib
  47. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libespeak.so.* $(1)/usr/lib/
  48. $(INSTALL_DIR) $(1)/usr/share
  49. $(CP) $(PKG_INSTALL_DIR)/usr/share/espeak $(1)/usr/share/
  50. endef
  51. $(eval $(call BuildPackage,espeak))