espeak: Compile with uClibc++
Several Makefile cleanups. Added PKG_BUILD_PARALLEL for faster compilation. Several size optimizations applied. Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
parent
5049588c46
commit
21e195f657
3 changed files with 42 additions and 16 deletions
|
@ -12,20 +12,22 @@ PKG_RELEASE:=2
|
||||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-source.zip
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-source.zip
|
||||||
PKG_SOURCE_URL:=@SF/espeak
|
PKG_SOURCE_URL:=@SF/espeak
|
||||||
PKG_HASH:=bf9a17673adffcc28ff7ea18764f06136547e97bbd9edf2ec612f09b207f0659
|
PKG_HASH:=bf9a17673adffcc28ff7ea18764f06136547e97bbd9edf2ec612f09b207f0659
|
||||||
|
|
||||||
PKG_LICENSE:=GPL-3.0
|
|
||||||
PKG_LICENSE_FILES:=License.txt
|
|
||||||
PKG_MAINTAINER:=Nicolas Thill <nico@openwrt.org>
|
|
||||||
|
|
||||||
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)-source
|
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)-source
|
||||||
PKG_INSTALL:=1
|
|
||||||
|
|
||||||
|
PKG_MAINTAINER:=
|
||||||
|
PKG_LICENSE:=GPL-3.0-or-later
|
||||||
|
PKG_LICENSE_FILES:=License.txt
|
||||||
|
|
||||||
|
PKG_INSTALL:=1
|
||||||
|
PKG_BUILD_PARALLEL:=1
|
||||||
|
|
||||||
|
include $(INCLUDE_DIR)/uclibc++.mk
|
||||||
include $(INCLUDE_DIR)/package.mk
|
include $(INCLUDE_DIR)/package.mk
|
||||||
|
|
||||||
define Package/espeak
|
define Package/espeak
|
||||||
SECTION:=sound
|
SECTION:=sound
|
||||||
CATEGORY:=Sound
|
CATEGORY:=Sound
|
||||||
DEPENDS:=+libpthread +libstdcpp +portaudio
|
DEPENDS:=$(CXX_DEPENDS) +portaudio
|
||||||
TITLE:=Speech synthesizer
|
TITLE:=Speech synthesizer
|
||||||
URL:=http://espeak.sourceforge.net/
|
URL:=http://espeak.sourceforge.net/
|
||||||
endef
|
endef
|
||||||
|
@ -35,23 +37,26 @@ define Package/espeak/description
|
||||||
other languages.
|
other languages.
|
||||||
endef
|
endef
|
||||||
|
|
||||||
MAKE_FLAGS+= \
|
|
||||||
AUDIO="portaudio" \
|
|
||||||
DATADIR="/usr/share/espeak" \
|
|
||||||
CXXFLAGS="$(TARGET_CFLAGS)" \
|
|
||||||
LDFLAGS="$(TARGET_LDFLAGS)" \
|
|
||||||
|
|
||||||
MAKE_PATH:=./src
|
|
||||||
|
|
||||||
# Use system header for portaudio
|
# Use system header for portaudio
|
||||||
define Build/Prepare
|
define Build/Prepare
|
||||||
$(call Build/Prepare/Default)
|
$(call Build/Prepare/Default)
|
||||||
rm $(PKG_BUILD_DIR)/src/portaudio.h
|
rm $(PKG_BUILD_DIR)/src/portaudio.h
|
||||||
endef
|
endef
|
||||||
|
|
||||||
|
MAKE_FLAGS+= \
|
||||||
|
AUDIO="portaudio" \
|
||||||
|
DATADIR="/usr/share/espeak" \
|
||||||
|
CXXFLAGS="$(TARGET_CXXFLAGS)" \
|
||||||
|
LDFLAGS="$(TARGET_LDFLAGS)" \
|
||||||
|
|
||||||
|
MAKE_PATH:=./src
|
||||||
|
|
||||||
|
TARGET_CXXFLAGS += -std=c++14 -ffunction-sections -fdata-sections -flto
|
||||||
|
TARGET_LDFLAGS += $(FPIC) $(if $(CONFIG_USE_GLIBC),-lm) -Wl,--gc-sections,--as-needed
|
||||||
|
|
||||||
define Package/espeak/install
|
define Package/espeak/install
|
||||||
$(INSTALL_DIR) $(1)/usr/bin
|
$(INSTALL_DIR) $(1)/usr/bin
|
||||||
$(CP) $(PKG_INSTALL_DIR)/usr/bin/espeak $(1)/usr/bin/
|
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/espeak $(1)/usr/bin/
|
||||||
$(INSTALL_DIR) $(1)/usr/lib
|
$(INSTALL_DIR) $(1)/usr/lib
|
||||||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libespeak.so.* $(1)/usr/lib/
|
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libespeak.so.* $(1)/usr/lib/
|
||||||
$(INSTALL_DIR) $(1)/usr/share
|
$(INSTALL_DIR) $(1)/usr/share
|
||||||
|
|
Binary file not shown.
21
sound/espeak/patches/010-uclibcxx.patch
Normal file
21
sound/espeak/patches/010-uclibcxx.patch
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
--- a/src/Makefile
|
||||||
|
+++ b/src/Makefile
|
||||||
|
@@ -83,15 +83,15 @@ libespeak_SOURCES = speak_lib.cpp compiledict.cpp dictionary.cpp intonation.cpp
|
||||||
|
|
||||||
|
SRCS1=$(speak_SOURCES)
|
||||||
|
OBJS1=$(patsubst %.cpp,%.o,$(SRCS1))
|
||||||
|
-LIBS1=-lstdc++ $(LIB_AUDIO) -lpthread $(EXTRA_LIBS)
|
||||||
|
+LIBS1=$(LIB_AUDIO) -lpthread $(EXTRA_LIBS)
|
||||||
|
|
||||||
|
SRCS2=$(libespeak_SOURCES)
|
||||||
|
OBJS2=$(patsubst %.cpp,x_%.o,$(SRCS2))
|
||||||
|
-LIBS2=-lstdc++ $(LIB_AUDIO) -lpthread
|
||||||
|
+LIBS2=$(LIB_AUDIO) -lpthread
|
||||||
|
|
||||||
|
SRCS3 = espeak.cpp
|
||||||
|
OBJS3=$(patsubst %.cpp,%.o,$(SRCS3))
|
||||||
|
-LIBS3=-lstdc++ -L . -lespeak
|
||||||
|
+LIBS3=-L . -lespeak
|
||||||
|
|
||||||
|
CXXFLAGS=-O2
|
||||||
|
|
Loading…
Reference in a new issue