PRG_NAME:=freeswitch
PKG_NAME:=$(PRG_NAME)-stable
PKG_VERSION:=1.10.2
-PKG_RELEASE:=3
+PKG_RELEASE:=4
PKG_MAINTAINER:=Sebastian Kemper <sebastian_ml@gmx.net>
PKG_SOURCE:=$(PRG_NAME)-$(PKG_VERSION).-release.tar.xz
PKG_BUILD_DEPENDS:= \
libjpeg \
tiff \
- perl/host \
- python/host
+ perl/host
PKG_FIXUP:=autoreconf
portaudio_stream \
posix_timer \
prefix \
- python \
radius_cdr \
random \
raven \
CONFIG_PACKAGE_$(PKG_LIBFTDM)-ftmod-libpri \
CONFIG_PACKAGE_$(PKG_LIBFTDM)-ftmod-pritap \
CONFIG_PACKAGE_$(PKG_NAME)-misc-perl-esl \
- CONFIG_PACKAGE_$(PKG_NAME)-misc-python-esl \
CONFIG_SOFT_FLOAT
include $(INCLUDE_DIR)/uclibc++.mk
FS_STABLE_PERL_FEED:=$(TOPDIR)/feeds/packages/lang/perl
-include $(TOPDIR)/feeds/packages/lang/python/python-host.mk
include $(FS_STABLE_PERL_FEED)/perlver.mk
PERL_SITELIB:=/usr/lib/perl$(PERL_MAJOR)/$(PERL_VERSION2)
$(FS_STABLE_PERL_FEED)/files/base.config | \
sed "s/^libs=//;s/'//g")
-FS_STABLE_PYTHON_SITE_DIR:=$(FS_STABLE_LIB_DIR)/python$(PYTHON_VERSION)/site-packages
-
define Download/files
define Download/$(1)
FILE:=$(2)
$(1)$(PERL_SITELIB)/ESL
endef
-define Package/$(PKG_NAME)-misc-python-esl
-$(call Package/$(PKG_NAME)/Default)
- TITLE:=Python ESL
- DEPENDS:=$(PKG_NAME) +PACKAGE_$(PKG_NAME)-misc-python-esl:python-light
-endef
-
-define Package/$(PKG_NAME)-misc-python-esl/description
-This package contains the Python binding for FreeSWITCH's Event Socket
-Library (ESL).
-endef
-
-define Package/$(PKG_NAME)-misc-python-esl/install
- $(INSTALL_DIR) $(1)$(FS_STABLE_PYTHON_SITE_DIR)
- $(INSTALL_BIN) \
- $(PKG_INSTALL_DIR)$(FS_STABLE_PYTHON_SITE_DIR)/_ESL.so \
- $(1)$(FS_STABLE_PYTHON_SITE_DIR)
- $(INSTALL_DATA) \
- $(PKG_INSTALL_DIR)$(FS_STABLE_PYTHON_SITE_DIR)/ESL.py \
- $(1)$(FS_STABLE_PYTHON_SITE_DIR)
-endef
-
define Package/$(PKG_NAME)-misc-timezones
$(call Package/$(PKG_NAME)/Default)
TITLE:=Timezones file
$(PKG_INSTALL_DIR)/usr/perl/$(PRG_NAME).pm \
$$(1)$(PERL_SITELIB)
endif
-ifeq ($(1),python)
- $(INSTALL_DIR) $$(1)$(FS_STABLE_PYTHON_SITE_DIR)
- $(INSTALL_DATA) \
- $(PKG_INSTALL_DIR)$(FS_STABLE_PYTHON_SITE_DIR)/$(PRG_NAME).py \
- $$(1)$(FS_STABLE_PYTHON_SITE_DIR)
-endif
endef
$$(eval $$(call BuildPackage,$(PKG_NAME)-mod-$(subst _,-,$(1))))
endef
--with-dbdir=/tmp/$(PRG_NAME)/db \
--with-imagesdir=$(FS_STABLE_IMAGES_DIR) \
--with-logfiledir=/tmp/$(PRG_NAME)/log \
+ --with-python=no \
--with-recordingsdir=/tmp/$(PRG_NAME)/recordings \
--with-storagedir=/tmp/$(PRG_NAME)/storage \
$(call autoconf_bool,CONFIG_FS_STABLE_WITH_DEBUG,debug) \
$(if $(CONFIG_PACKAGE_$(PKG_LIBFTDM)-ftmod-libpri),--with-libpri="$(STAGING_DIR)/usr",--without-libpri) \
$(if $(CONFIG_PACKAGE_$(PKG_LIBFTDM)-ftmod-pritap),--with-pritap,--without-pritap)
-ifneq ($(CONFIG_PACKAGE_$(PKG_NAME)-misc-python-esl)$(CONFIG_PACKAGE_$(PKG_NAME)-mod-python),)
-CONFIGURE_ARGS+= \
- --with-python=$(STAGING_DIR_HOSTPKG)/bin/python$(PYTHON_VERSION)
-else
-CONFIGURE_ARGS+= \
- --with-python=no
-endif
-
ifeq ($(CONFIG_PACKAGE_$(PKG_NAME)-mod-erlang-event)$(CONFIG_PACKAGE_$(PKG_NAME)-mod-kazoo),)
CONFIGURE_ARGS+= \
--with-erlang=no
ac_cv_prog_PERL=false
endif
-ifneq ($(CONFIG_PACKAGE_$(PKG_NAME)-misc-python-esl)$(CONFIG_PACKAGE_$(PKG_NAME)-mod-python),)
-CONFIGURE_VARS+= \
- PYTHON_CFLAGS="-I$(STAGING_DIR)/usr/include/python$(PYTHON_VERSION)" \
- PYTHON_LDFLAGS="-lpython$(PYTHON_VERSION)" \
- PYTHON_LIB="python$(PYTHON_VERSION)" \
- PYTHON_LIBDIR="$(FS_STABLE_LIB_DIR)" \
- PYTHON_SITE_DIR="$(FS_STABLE_PYTHON_SITE_DIR)"
-endif
-
# mod_radius_cdr runs configure in libs/freeradius-client. Let
# freeradius-client know /dev/urandom is available on target devices.
MAKE_VARS+= \
ifneq ($(CONFIG_PACKAGE_$(PKG_NAME)-misc-perl-esl),)
$(call Build/Compile/Default,-C $(PKG_BUILD_DIR)/libs/esl perlmod)
endif
-ifneq ($(CONFIG_PACKAGE_$(PKG_NAME)-misc-python-esl),)
- $(call Build/Compile/Default,-C $(PKG_BUILD_DIR)/libs/esl pymod)
-endif
endef
define Build/Install
ifneq ($(CONFIG_PACKAGE_$(PKG_NAME)-misc-perl-esl),)
$(call Build/Compile/Default,-C $(PKG_BUILD_DIR)/libs/esl DESTDIR=$(PKG_INSTALL_DIR) perlmod-install)
endif
-ifneq ($(CONFIG_PACKAGE_$(PKG_NAME)-misc-python-esl),)
- $(call Build/Install/Default,-C $(PKG_BUILD_DIR)/libs/esl pymod-install)
-endif
endef
define Build/InstallDev/$(PKG_LIBFTDM)
$(eval $(call BuildPackage,$(PKG_LIBFTDM)))
$(eval $(call BuildPackage,$(PKG_NAME)))
$(eval $(call BuildPackage,$(PKG_NAME)-misc-perl-esl))
-$(eval $(call BuildPackage,$(PKG_NAME)-misc-python-esl))
$(eval $(call BuildPackage,$(PKG_NAME)-misc-timezones))
################################
$(eval $(call Package/$(PKG_NAME)/Module,portaudio_stream,Portaudio streaming,Stream from an external audio source for Music on Hold.,+portaudio))
$(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))
$(eval $(call Package/$(PKG_NAME)/Module,radius_cdr,Radius CDR,Radius Call Detail Record handler.,))
$(eval $(call Package/$(PKG_NAME)/Module,random,Entropy,This module extracts entropy from FreeSWITCH and feeds it into\n/dev/random.,))
$(eval $(call Package/$(PKG_NAME)/Module,raven,Raven logging,Adds support for logging to Raven instances.,))
save_CFLAGS="$CFLAGS"
CFLAGS="$PERL_CFLAGS"
-@@ -1724,24 +1694,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
+++ /dev/null
---- 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:
- swig3.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