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.

66 lines
1.7 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:=2
  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)/uclibc++.mk
  19. include $(INCLUDE_DIR)/package.mk
  20. define Package/espeak
  21. SECTION:=sound
  22. CATEGORY:=Sound
  23. DEPENDS:=$(CXX_DEPENDS) +portaudio
  24. TITLE:=Speech synthesizer
  25. URL:=http://espeak.sourceforge.net/
  26. endef
  27. define Package/espeak/description
  28. eSpeak is a compact open source software speech synthesizer for English and
  29. other languages.
  30. endef
  31. # Use system header for portaudio
  32. define Build/Prepare
  33. $(call Build/Prepare/Default)
  34. rm $(PKG_BUILD_DIR)/src/portaudio.h
  35. endef
  36. MAKE_FLAGS+= \
  37. AUDIO="portaudio" \
  38. DATADIR="/usr/share/espeak" \
  39. CXXFLAGS="$(TARGET_CXXFLAGS)" \
  40. LDFLAGS="$(TARGET_LDFLAGS)" \
  41. MAKE_PATH:=./src
  42. TARGET_CXXFLAGS += -std=c++14 -ffunction-sections -fdata-sections -flto
  43. TARGET_LDFLAGS += $(FPIC) $(if $(CONFIG_USE_GLIBC),-lm) -Wl,--gc-sections,--as-needed
  44. define Package/espeak/install
  45. $(INSTALL_DIR) $(1)/usr/bin
  46. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/espeak $(1)/usr/bin/
  47. $(INSTALL_DIR) $(1)/usr/lib
  48. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libespeak.so.* $(1)/usr/lib/
  49. $(INSTALL_DIR) $(1)/usr/share
  50. $(CP) $(PKG_INSTALL_DIR)/usr/share/espeak $(1)/usr/share/
  51. endef
  52. $(eval $(call BuildPackage,espeak))