Merge pull request #160 from micmac1/master

freeswitch-stable: New PR
This commit is contained in:
Jo-Philipp Wich 2017-06-27 22:21:03 +02:00 committed by GitHub
commit 6421bb89b8
6 changed files with 119 additions and 55 deletions

View file

@ -366,19 +366,19 @@ Library (ESL).
endef
define Package/$(PKG_NAME)-misc-perl-esl/install
$(INSTALL_DIR) $(1)$$(PERL_SITELIB)/ESL
$(INSTALL_DIR) $(1)$(PERL_SITELIB)/ESL
$(INSTALL_DATA) \
$(PKG_INSTALL_DIR)$$(PERL_SITELIB)/ESL.pm \
$(1)$$(PERL_SITELIB)
$(PKG_INSTALL_DIR)$(PERL_SITELIB)/ESL.pm \
$(1)$(PERL_SITELIB)
$(INSTALL_BIN) \
$(PKG_INSTALL_DIR)$$(PERL_SITELIB)/ESL.so \
$(1)$$(PERL_SITELIB)
$(PKG_INSTALL_DIR)$(PERL_SITELIB)/ESL.so \
$(1)$(PERL_SITELIB)
$(INSTALL_DATA) \
$(PKG_INSTALL_DIR)$$(PERL_SITELIB)/ESL/Dispatch.pm \
$(1)$$(PERL_SITELIB)/ESL
$(PKG_INSTALL_DIR)$(PERL_SITELIB)/ESL/Dispatch.pm \
$(1)$(PERL_SITELIB)/ESL
$(INSTALL_DATA) \
$(PKG_INSTALL_DIR)$$(PERL_SITELIB)/ESL/IVR.pm \
$(1)$$(PERL_SITELIB)/ESL
$(PKG_INSTALL_DIR)$(PERL_SITELIB)/ESL/IVR.pm \
$(1)$(PERL_SITELIB)/ESL
endef
define Package/$(PKG_NAME)-misc-python-esl
@ -393,13 +393,13 @@ Library (ESL).
endef
define Package/$(PKG_NAME)-misc-python-esl/install
$(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR)
$(INSTALL_DIR) $(1)$(PYTHON_SITE_DIR)
$(INSTALL_DATA) \
$(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/ESL.py \
$(1)$(PYTHON_PKG_DIR)
$(PKG_INSTALL_DIR)$(PYTHON_SITE_DIR)/ESL.py \
$(1)$(PYTHON_SITE_DIR)
$(INSTALL_BIN) \
$(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/_ESL.so \
$(1)$(PYTHON_PKG_DIR)
$(PKG_INSTALL_DIR)$(PYTHON_SITE_DIR)/_ESL.so \
$(1)$(PYTHON_SITE_DIR)
endef
define Package/$(PKG_NAME)-misc-timezones
@ -497,19 +497,19 @@ ifeq ($(CONFIG_FS_STABLE_WITH_MODCONF),y)
$(call Package/$(PKG_NAME)/install/dir,$$(1)$(FS_STABLE_EXAMPLES_DIR)/mod_$(1),$(PKG_BUILD_DIR)/src/mod/*/mod_$(1)/conf)
endif
ifeq ($(1),perl)
$(INSTALL_DIR) $$(1)$$(PERL_SITELIB)/auto
$(INSTALL_DIR) $$(1)$(PERL_SITELIB)/auto
$(INSTALL_DATA) \
$(PKG_INSTALL_DIR)$(FS_STABLE_PREFIX_DIR)/perl/$(PRG_NAME).pm \
$$(1)$$(PERL_SITELIB)
$$(1)$(PERL_SITELIB)
$(INSTALL_BIN) \
$(PKG_INSTALL_DIR)$(FS_STABLE_PREFIX_DIR)/perl/$(PRG_NAME).so \
$$(1)$$(PERL_SITELIB)/auto
$$(1)$(PERL_SITELIB)/auto
endif
ifeq ($(1),python)
$(INSTALL_DIR) $$(1)$(PYTHON_PKG_DIR)
$(INSTALL_DIR) $$(1)$(PYTHON_SITE_DIR)
$(INSTALL_DATA) \
$(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/$(PRG_NAME).py \
$$(1)$(PYTHON_PKG_DIR)
$(PKG_INSTALL_DIR)$(PYTHON_SITE_DIR)/$(PRG_NAME).py \
$$(1)$(PYTHON_SITE_DIR)
endif
endef
$$(eval $$(call BuildPackage,$(PKG_NAME)-mod-$(1)))
@ -635,15 +635,17 @@ ifneq ($(CONFIG_PACKAGE_$(PKG_NAME)-misc-python-esl)$(CONFIG_PACKAGE_$(PKG_NAME)
$(call include_mk, python-version.mk)
PYTHON_DIR:=$(STAGING_DIR)/usr
PYTHON_INC_DIR:=$(PYTHON_DIR)/include/python$(PYTHON_VERSION)
PYTHON_LDFLAGS:=-lpython$(PYTHON_VERSION) -ldl -lpthread -lm -Xlinker -export-dynamic
PYTHON_PKG_DIR:=$(FS_STABLE_LIB_DIR)/python$(PYTHON_VERSION)/site-packages
PYTHON_SITE_DIR:=$(FS_STABLE_LIB_DIR)/python$(PYTHON_VERSION)/site-packages
CONFIGURE_VARS+= \
_python_sysroot="$(STAGING_DIR)" \
_python_prefix="/usr" \
_python_exec_prefix="/usr"
PYTHON_CFLAGS="-I$(STAGING_DIR)/usr/include/python$(PYTHON_VERSION)" \
PYTHON_LDFLAGS="-lpython$(PYTHON_VERSION) -ldl -lpthread -lm -Xlinker -export-dynamic" \
PYTHON_LIB="python$(PYTHON_VERSION)" \
PYTHON_LIBDIR="$(FS_STABLE_LIB_DIR)" \
PYTHON_SITE_DIR="$(PYTHON_SITE_DIR)"
CONFIGURE_ARGS+= \
--with-python=$(STAGING_DIR_HOSTPKG)/bin/python$(PYTHON_VERSION)
else
@ -754,21 +756,6 @@ define Build/Prepare
$(if $(CONFIG_PACKAGE_$(PKG_NAME)-mod-$(m)),
$(SED) '/mod_$(m)$$$$/s/^#//' $(PKG_BUILD_DIR)/modules.conf))
ifneq ($(CONFIG_PACKAGE_$(PKG_NAME)-misc-python-esl)$(CONFIG_PACKAGE_$(PKG_NAME)-mod-python),)
$(SED) 's|^LOCAL_CFLAGS=.*|LOCAL_CFLAGS=-I$(PYTHON_INC_DIR)|' \
$(PKG_BUILD_DIR)/libs/esl/python/Makefile
$(SED) 's|^LOCAL_LDFLAGS=.*|LOCAL_LDFLAGS=$(PYTHON_LDFLAGS)|' \
$(PKG_BUILD_DIR)/libs/esl/python/Makefile
$(SED) 's|^SITE_DIR=.*|SITE_DIR=$$$$(DESTDIR)$(PYTHON_PKG_DIR)|' \
$(PKG_BUILD_DIR)/libs/esl/python/Makefile
$(SED) 's|^PYTHON_SITE_DIR=.*|PYTHON_SITE_DIR=$(PYTHON_PKG_DIR)|' \
$(PKG_BUILD_DIR)/src/mod/languages/mod_python/Makefile.am
$(SED) 's|@PYTHON_CFLAGS@|-I$(PYTHON_INC_DIR)|' \
$(PKG_BUILD_DIR)/src/mod/languages/mod_python/Makefile.am
$(SED) 's|@PYTHON_LDFLAGS@|$(PYTHON_LDFLAGS)|' \
$(PKG_BUILD_DIR)/src/mod/languages/mod_python/Makefile.am
endif
$(SED) 's|$(FS_STABLE_ANCHOR)|APR_SETVAR(LDFLAGS,$(FS_STABLE_APR_LIBS) $(TARGET_LDFLAGS))|' \
$(PKG_BUILD_DIR)/libs/unimrcp/build/acmacros/apr.m4
@ -957,7 +944,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))

View file

@ -55,3 +55,28 @@
save_CFLAGS="$CFLAGS"
CFLAGS="$PERL_CFLAGS"
@@ -1656,24 +1626,12 @@ then
if test "$python_has_distutils" != "no" ; then
AC_MSG_CHECKING([location of site-packages])
- PYTHON_SITE_DIR="`$PYTHON -c 'from distutils import sysconfig; print(sysconfig.get_python_lib(0));'`"
-
if test -z "$PYTHON_SITE_DIR" ; then
AC_MSG_ERROR([Unable to detect python site-packages path])
- elif test ! -d "$PYTHON_SITE_DIR" ; then
- AC_MSG_ERROR([Path $PYTHON_SITE_DIR returned by python does not exist!])
fi
AC_MSG_RESULT([$PYTHON_SITE_DIR])
AC_SUBST([PYTHON_SITE_DIR], [$PYTHON_SITE_DIR])
- #
- # python distutils found, get settings from python directly
- #
- PYTHON_CFLAGS="`$PYTHON -c 'from distutils import sysconfig; flags = [[\"-I\" + sysconfig.get_python_inc(0), \"-I\" + sysconfig.get_python_inc(1), \" \".join(sysconfig.get_config_var(\"CFLAGS\").split())]]; print(\" \".join(flags));' | sed -e 's/-arch i386//g;s/-arch x86_64//g'`"
- PYTHON_LDFLAGS="`$PYTHON -c 'from distutils import sysconfig; libs = sysconfig.get_config_var(\"LIBS\").split() + sysconfig.get_config_var(\"SYSLIBS\").split(); libs.append(\"-lpython\"+sysconfig.get_config_var(\"VERSION\")); print(\" \".join(libs));'`"
- PYTHON_LIB="`$PYTHON -c 'from distutils import sysconfig; print(\"python\" + sysconfig.get_config_var(\"VERSION\"));'`"
- PYTHON_LIBDIR="`$PYTHON -c 'from distutils import sysconfig; print(sysconfig.get_config_var(\"LIBDIR\"));'`"
-
# handle python being installed into /usr/local
AC_MSG_CHECKING([python libdir])
if test -z "`echo $PYTHON_LIBDIR | grep "/usr/lib"`" ; then

View file

@ -1,6 +1,6 @@
--- a/configure.ac
+++ b/configure.ac
@@ -1959,7 +1959,13 @@ AC_SUBST(OUR_DISABLED_INSTALL_MODS)
@@ -1941,7 +1941,13 @@ AC_SUBST(OUR_DISABLED_INSTALL_MODS)
AC_SUBST(OUR_DISABLED_UNINSTALL_MODS)
AC_SUBST(AM_MAKEFLAGS)

View file

@ -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

View file

@ -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

View file

@ -0,0 +1,43 @@
--- a/libs/esl/python/Makefile
+++ b/libs/esl/python/Makefile
@@ -1,6 +1,4 @@
-LOCAL_CFLAGS=`python ./python-config --includes`
-LOCAL_LDFLAGS=`python ./python-config --ldflags`
-SITE_DIR=$(DESTDIR)/`python -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)"`
+SITE_DIR=$(DESTDIR)/$(PYTHON_SITE_DIR)
all: _ESL.so
@@ -8,10 +6,10 @@ esl_wrap.cpp:
swig2.0 -module ESL -classic -python -c++ -DMULTIPLICITY -threads -I../src/include -o esl_wrap.cpp ../ESL.i
esl_wrap.o: esl_wrap.cpp
- $(CXX) $(CXX_CFLAGS) $(CXXFLAGS) $(LOCAL_CFLAGS) -c esl_wrap.cpp -o esl_wrap.o
+ $(CXX) $(CXX_CFLAGS) $(CXXFLAGS) $(PYTHON_CFLAGS) -c esl_wrap.cpp -o esl_wrap.o
_ESL.so: esl_wrap.o
- $(CXX) $(SOLINK) esl_wrap.o $(MYLIB) $(LOCAL_LDFLAGS) -o _ESL.so -L. $(LIBS)
+ $(CXX) $(SOLINK) esl_wrap.o $(MYLIB) $(PYTHON_LDFLAGS) -o _ESL.so -L. $(LIBS)
install: _ESL.so
mkdir -p $(SITE_DIR)
--- a/libs/esl/Makefile.am
+++ b/libs/esl/Makefile.am
@@ -77,7 +77,7 @@ luamod: $(MYLIB)
$(MAKE) MYLIB="../$(MYLIB)" SOLINK="$(SOLINK)" CFLAGS="-I$(switch_srcdir)/libs/esl/src/include $(SWITCH_AM_CFLAGS)" CXXFLAGS="-I$(switch_srcdir)/libs/esl/src/include $(SWITCH_AM_CXXFLAGS)" CXX_CFLAGS="$(CXX_CFLAGS)" LUA_CFLAGS="$(LUA_CFLAGS)" LUA_LIBS="$(LUA_LIBS)" -C lua
pymod: $(MYLIB)
- $(MAKE) MYLIB="../$(MYLIB)" SOLINK="$(SOLINK)" CFLAGS="-I$(switch_srcdir)/libs/esl/src/include $(SWITCH_AM_CFLAGS)" CXXFLAGS="-I$(switch_srcdir)/libs/esl/src/include $(SWITCH_AM_CXXFLAGS)" CXX_CFLAGS="$(CXX_CFLAGS)" -C python
+ $(MAKE) MYLIB="../$(MYLIB)" SOLINK="$(SOLINK)" CFLAGS="-I$(switch_srcdir)/libs/esl/src/include $(SWITCH_AM_CFLAGS)" CXXFLAGS="-I$(switch_srcdir)/libs/esl/src/include $(SWITCH_AM_CXXFLAGS)" CXX_CFLAGS="$(CXX_CFLAGS)" PYTHON_CFLAGS="$(PYTHON_CFLAGS)" PYTHON_LDFLAGS="$(PYTHON_LDFLAGS)" -C python
tclmod: $(MYLIB)
$(MAKE) MYLIB="../$(MYLIB)" SOLINK="$(SOLINK)" CFLAGS="-I$(switch_srcdir)/libs/esl/src/include $(SWITCH_AM_CFLAGS)" CXXFLAGS="-I$(switch_srcdir)/libs/esl/src/include $(SWITCH_AM_CXXFLAGS)" CXX_CFLAGS="$(CXX_CFLAGS)" -C tcl
@@ -98,7 +98,7 @@ phpmod-install: phpmod
$(MAKE) -C php install
pymod-install: pymod
- $(MAKE) -C python install
+ $(MAKE) PYTHON_SITE_DIR="$(PYTHON_SITE_DIR)" -C python install
rubymod-install: rubymod
$(MAKE) -C ruby install