From 4938176da18950f7dec334e83574513ee3fe5c11 Mon Sep 17 00:00:00 2001 From: Sebastian Kemper Date: Tue, 27 Jun 2017 18:20:39 +0200 Subject: [PATCH] freeswitch-stable: Fix mod_pocketsphinx build - The builds currently fail with "undefined reference" errors. Fix that by turning off Pulseaudio support. Also turn of Jack support in case that gets detected in the future. - aarch64 fails because this arch isn't recognized by the pocketsphinx build system. Fix that by running autoreconf in the pocketsphinx build dirs. - Fix CFLAGS while we're here. - Add dep on libsamplerate to mod_pocketsphinx. If it gets detected it will be linked against, there is no switch to prevent that. Signed-off-by: Sebastian Kemper --- net/freeswitch-stable/Makefile | 2 +- .../patches/190-mod_pocketsphinx.patch | 20 +++++++++++++++++++ .../190-mod_pocketsphix-remove-alsa-dep.patch | 11 ---------- 3 files changed, 21 insertions(+), 12 deletions(-) create mode 100644 net/freeswitch-stable/patches/190-mod_pocketsphinx.patch delete mode 100644 net/freeswitch-stable/patches/190-mod_pocketsphix-remove-alsa-dep.patch diff --git a/net/freeswitch-stable/Makefile b/net/freeswitch-stable/Makefile index 9a78dfb..c97fb2b 100644 --- a/net/freeswitch-stable/Makefile +++ b/net/freeswitch-stable/Makefile @@ -957,7 +957,7 @@ $(eval $(call Package/$(PKG_NAME)/Module,opus,Opus,Opus codec support.,+libopus) $(eval $(call Package/$(PKG_NAME)/Module,oreka,Oreka,This module provides media recording with the Oreka cross-platform\naudio stream recording and retrieval system.,)) $(eval $(call Package/$(PKG_NAME)/Module,perl,Perl,This package contains mod_perl for FreeSWITCH.,@PERL_THREADS PACKAGE_$(PKG_NAME)-mod-perl:perl +libdb47 +libgdbm)) $(eval $(call Package/$(PKG_NAME)/Module,png,PNG,Allows playback of video using PNG files.,)) -$(eval $(call Package/$(PKG_NAME)/Module,pocketsphinx,Pocketsphinx,This module allows speech recognition. You might want to install\n$(PKG_NAME)-misc-grammar as well.,)) +$(eval $(call Package/$(PKG_NAME)/Module,pocketsphinx,Pocketsphinx,This module allows speech recognition. You might want to install\n$(PKG_NAME)-misc-grammar as well.,+libsamplerate)) # When libsamplerate is found it'll be linked against, there is no switch to turn it off $(eval $(call Package/$(PKG_NAME)/Module,posix_timer,POSIX timer,Add POSIX timer support.,)) $(eval $(call Package/$(PKG_NAME)/Module,prefix,Prefix match,This module provides a data store with fast lookups by the longest\nprefix match rule.,)) $(eval $(call Package/$(PKG_NAME)/Module,python,Python,Python support module.,+python-light)) diff --git a/net/freeswitch-stable/patches/190-mod_pocketsphinx.patch b/net/freeswitch-stable/patches/190-mod_pocketsphinx.patch new file mode 100644 index 0000000..dd31403 --- /dev/null +++ b/net/freeswitch-stable/patches/190-mod_pocketsphinx.patch @@ -0,0 +1,20 @@ +--- a/src/mod/asr_tts/mod_pocketsphinx/Makefile.am ++++ b/src/mod/asr_tts/mod_pocketsphinx/Makefile.am +@@ -27,7 +27,7 @@ $(SPHINXBASE_DIR): + + $(SPHINXBASE_BUILDDIR)/Makefile: $(SPHINXBASE_DIR) + mkdir -p $(SPHINXBASE_BUILDDIR) +- (cd $(SPHINXBASE_BUILDDIR) && $(DEFAULT_VARS) $(SPHINXBASE_DIR)/configure $(DEFAULT_ARGS) --srcdir=$(SPHINXBASE_DIR) --without-python CFLAGS=) ++ (cd $(SPHINXBASE_BUILDDIR) && sed -i 's|$$(srcdir)/||g' test/regression/Makefile.am && autoreconf -v -f -i -s && $(DEFAULT_VARS) CPPFLAGS="" $(SPHINXBASE_DIR)/configure ac_cv_header_alsa_asoundlib_h=no ac_cv_header_jack_jack_h=no ac_cv_header_pulse_pulseaudio_h=no $(DEFAULT_ARGS) --srcdir=$(SPHINXBASE_DIR) --without-python) + $(TOUCH_TARGET) + + $(SPHINXBASE_BUILDDIR)/buildstamp: $(SPHINXBASE_BUILDDIR)/Makefile +@@ -45,7 +45,7 @@ $(POCKETSPHINX_DIR): + + $(POCKETSPHINX_BUILDDIR)/Makefile: $(POCKETSPHINX_DIR) $(SPHINXBASE_LA) $(SPHINXBASE_LA2) + mkdir -p $(POCKETSPHINX_BUILDDIR) +- (cd $(POCKETSPHINX_BUILDDIR) && $(DEFAULT_VARS) $(POCKETSPHINX_DIR)/configure $(DEFAULT_ARGS) --srcdir=$(POCKETSPHINX_DIR) --without-python --with-sphinxbase=$(SPHINXBASE_DIR) --with-sphinxbase-build=$(SPHINXBASE_BUILDDIR) CFLAGS=-Wno-return-type) ++ (cd $(POCKETSPHINX_BUILDDIR) && autoreconf -v -f -i -s && $(DEFAULT_VARS) CPPFLAGS="" $(POCKETSPHINX_DIR)/configure $(DEFAULT_ARGS) --srcdir=$(POCKETSPHINX_DIR) --without-python --with-sphinxbase=$(SPHINXBASE_DIR) --with-sphinxbase-build=$(SPHINXBASE_BUILDDIR)) + $(TOUCH_TARGET) + + $(POCKETSPHINX_BUILDDIR)/buildstamp: $(POCKETSPHINX_BUILDDIR)/Makefile diff --git a/net/freeswitch-stable/patches/190-mod_pocketsphix-remove-alsa-dep.patch b/net/freeswitch-stable/patches/190-mod_pocketsphix-remove-alsa-dep.patch deleted file mode 100644 index d8e07b4..0000000 --- a/net/freeswitch-stable/patches/190-mod_pocketsphix-remove-alsa-dep.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/src/mod/asr_tts/mod_pocketsphinx/Makefile.am -+++ b/src/mod/asr_tts/mod_pocketsphinx/Makefile.am -@@ -27,7 +27,7 @@ $(SPHINXBASE_DIR): - - $(SPHINXBASE_BUILDDIR)/Makefile: $(SPHINXBASE_DIR) - mkdir -p $(SPHINXBASE_BUILDDIR) -- (cd $(SPHINXBASE_BUILDDIR) && $(DEFAULT_VARS) $(SPHINXBASE_DIR)/configure $(DEFAULT_ARGS) --srcdir=$(SPHINXBASE_DIR) --without-python CFLAGS=) -+ (cd $(SPHINXBASE_BUILDDIR) && $(DEFAULT_VARS) $(SPHINXBASE_DIR)/configure ac_cv_header_alsa_asoundlib_h=no $(DEFAULT_ARGS) --srcdir=$(SPHINXBASE_DIR) --without-python CFLAGS=) - $(TOUCH_TARGET) - - $(SPHINXBASE_BUILDDIR)/buildstamp: $(SPHINXBASE_BUILDDIR)/Makefile -- 2.30.2