freeswitch-stable: Fix mod_pocketsphinx build
authorSebastian Kemper <sebastian_ml@gmx.net>
Tue, 27 Jun 2017 16:20:39 +0000 (18:20 +0200)
committerSebastian Kemper <sebastian_ml@gmx.net>
Tue, 27 Jun 2017 16:27:47 +0000 (18:27 +0200)
- 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 <sebastian_ml@gmx.net>
net/freeswitch-stable/Makefile
net/freeswitch-stable/patches/190-mod_pocketsphinx.patch [new file with mode: 0644]
net/freeswitch-stable/patches/190-mod_pocketsphix-remove-alsa-dep.patch [deleted file]

index 9a78dfbf799b9562680b4d63edc5570af15e575a..c97fb2bc3d7098cb6744d98f7e6abbc74a061919 100644 (file)
@@ -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 (file)
index 0000000..dd31403
--- /dev/null
@@ -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 (file)
index d8e07b4..0000000
+++ /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