summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Kemper <sebastian_ml@gmx.net>2021-10-30 22:08:16 +0200
committerSebastian Kemper <sebastian_ml@gmx.net>2021-11-07 23:21:46 +0100
commit0ca47d2ef130fccbbabcc705629ddcfc53464e75 (patch)
treed06416bc6087293c60fe2e537e5eec1e810d6048
parented2719867150a9bfc85bf41dff52ef8443820f2a (diff)
freeswitch: bump to 1.10.7
- freetdm is now external - added the freeswitch library to InstallDev in preparation for freetdm package - various fixes related to general build - patches refreshed Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net> (cherry picked from commit 4ab96a18799a8d185a748d0b239b5701f33562c8) freeswitch: add python3 support Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net> (cherry picked from commit 652d110b2f7ab2ce50e612186ff220f8b2a7b8e0) freeswitch: fix 230-mod_radius_cdr.patch This is a patch in a patch. It may happen that the patch was already applied previously, so this amends the patch line to continue if the patch doesn't apply. It also sets the direction to forward-only. Also removes two trailing whitespace warnings. Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net> (cherry picked from commit 3fafe1afac304cc96a3ff941dcff46c72d504530) freeswitch: only include python3-version.mk We're just interested in the version, no need to include more than that. Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net> (cherry picked from commit 42574d54d4e864adeb4b00364069c963a685338d) freeswitch: don't check for distutils We're not using distutils, so don't check for it. This fixes #704. Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net> (cherry picked from commit eb145cd014cc210c3a41f4341e139b1f9bda407d) freeswitch: update 480-fix-libyuv-dependency.patch Update the patch with the version that actually was applied upstream. No functional change. Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net> (cherry picked from commit 6004044dc0cd2aa434d75b195d1669f428acc9b7) freeswitch: add missing item to PKG_CONFIG_DEPENDS Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net> (cherry picked from commit ebcdcb35477383eb4409bce14868a57ec9820cba)
-rw-r--r--net/freeswitch/Makefile173
-rw-r--r--net/freeswitch/patches/030-fix-configure-ac.patch2
-rw-r--r--net/freeswitch/patches/120-fix-copts.patch4
-rw-r--r--net/freeswitch/patches/140-libvpx-cross.patch2
-rw-r--r--net/freeswitch/patches/230-mod_radius_cdr.patch6
-rw-r--r--net/freeswitch/patches/280-tone-down-freetdm-COMP_VENDOR_CFLAGS.patch11
-rw-r--r--net/freeswitch/patches/290-fix-mod_freetdm-copts.patch8
-rw-r--r--net/freeswitch/patches/330-do-not-install-freetdm-twice.patch10
-rw-r--r--net/freeswitch/patches/370-procd-compat.patch2
-rw-r--r--net/freeswitch/patches/420-switch_rtp-report-undeclared.patch11
-rw-r--r--net/freeswitch/patches/430-mod_opusfile-format-error.patch20
-rw-r--r--net/freeswitch/patches/460-remove-python-configure-checks.patch46
-rw-r--r--net/freeswitch/patches/470-esl-python.patch43
-rw-r--r--net/freeswitch/patches/480-fix-libyuv-dependency.patch118
14 files changed, 314 insertions, 142 deletions
diff --git a/net/freeswitch/Makefile b/net/freeswitch/Makefile
index 640475e..ef31114 100644
--- a/net/freeswitch/Makefile
+++ b/net/freeswitch/Makefile
@@ -8,13 +8,13 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=freeswitch
-PKG_VERSION:=1.10.6
-PKG_RELEASE:=2
+PKG_VERSION:=1.10.7
+PKG_RELEASE:=1
PKG_MAINTAINER:=Sebastian Kemper <sebastian_ml@gmx.net>
PKG_SOURCE:=freeswitch-$(PKG_VERSION).-release.tar.xz
PKG_SOURCE_URL:=https://files.freeswitch.org/releases/freeswitch
-PKG_HASH:=9a08d4e184e6d715e1c12c43a0f901597151752ef236f0a37e40996272b5c38d
+PKG_HASH:=0919bddc2ea9cab2e4944314e71637bea9dd4f40d510722a74ea032104594c41
PKG_CPE_ID:=cpe:/a:freeswitch:freeswitch
@@ -115,7 +115,6 @@ FS_MOD_AVAILABLE:= \
fail2ban \
fifo \
format_cdr \
- freetdm \
fsk \
fsv \
g723_1 \
@@ -152,6 +151,7 @@ FS_MOD_AVAILABLE:= \
portaudio_stream \
posix_timer \
prefix \
+ python3 \
radius_cdr \
random \
raven \
@@ -218,16 +218,15 @@ PKG_CONFIG_DEPENDS:= \
CONFIG_FS_WITH_DEBUG \
CONFIG_FS_WITH_FREETYPE \
CONFIG_FS_WITH_LIBYUV \
+ CONFIG_FS_WITH_MODCONF \
CONFIG_FS_WITH_ODBC \
CONFIG_FS_WITH_PNG \
CONFIG_FS_WITH_SRTP \
CONFIG_FS_WITH_VPX \
CONFIG_FS_WITH_ZRTP \
CONFIG_LIBC \
- CONFIG_PACKAGE_libfreetdm \
- CONFIG_PACKAGE_libfreetdm-ftmod-libpri \
- CONFIG_PACKAGE_libfreetdm-ftmod-pritap \
CONFIG_PACKAGE_freeswitch-misc-perl-esl \
+ CONFIG_PACKAGE_freeswitch-misc-python3-esl \
CONFIG_SOFT_FLOAT
include $(INCLUDE_DIR)/uclibc++.mk
@@ -248,6 +247,7 @@ endif
FS_PERL_FEED:=$(TOPDIR)/feeds/packages/lang/perl
+include $(TOPDIR)/feeds/packages/lang/python/python3-version.mk
include $(FS_PERL_FEED)/perlver.mk
PERL_SITELIB:=/usr/lib/perl$(PERL_MAJOR)/$(PERL_VERSION2)
@@ -256,6 +256,8 @@ FS_PERL_LIBS:=$(shell grep "^libs=" \
$(FS_PERL_FEED)/files/base.config | \
sed "s/^libs=//;s/'//g")
+FS_PYTHON3_SITE_DIR:=$(FS_LIB_DIR)/python$(PYTHON3_VERSION)/site-packages
+
define Download/files
define Download/$(1)
FILE:=$(2)
@@ -291,12 +293,6 @@ define Package/freeswitch/install/dir
done
endef
-define Package/libfreetdm/install/ftmod
- $(INSTALL_DIR) $(1)$(FS_MOD_DIR)
- $(INSTALL_BIN) $(PKG_INSTALL_DIR)$(FS_MOD_DIR)/ftmod_$(2).so \
- $(1)$(FS_MOD_DIR)
-endef
-
define Package/freeswitch/install/lib
$(INSTALL_DIR) $(1)$(FS_LIB_DIR)
$(CP) $(PKG_INSTALL_DIR)$(FS_LIB_DIR)/$(2).so.* \
@@ -313,45 +309,6 @@ define Package/freeswitch/config
source "$(SOURCE)/Config.in"
endef
-define Package/libfreetdm/Default
- SECTION:=libs
- CATEGORY:=Libraries
- SUBMENU:=Telephony
- URL:=https://www.freeswitch.org
-endef
-
-define Package/libfreetdm
-$(call Package/libfreetdm/Default)
- DEPENDS:=
- TITLE:=TDM signaling and media API
- MENU:=1
- URL:=https://www.freeswitch.org
-endef
-
-define Package/libfreetdm/description
-Provides a unified interface to hardware TDM cards and SS7 stacks.
-endef
-
-define Package/libfreetdm/install
-$(call Package/freeswitch/install/lib,$(1),libfreetdm)
-endef
-
-define Package/libfreetdm/FTModule
-define Package/libfreetdm-ftmod-$(subst _,-,$(1))
-$(call Package/libfreetdm/Default)
- DEPENDS:=libfreetdm \
- $(patsubst +%,+PACKAGE_libfreetdm-ftmod-$(subst _,-,$(1)):%,$(4))
- TITLE:=$(2) FreeTDM module
-endef
-define Package/libfreetdm-ftmod-$(subst _,-,$(1))/description
-$(subst \n,$(newline),$(3))
-endef
-define Package/libfreetdm-ftmod-$(subst _,-,$(1))/install
-$(call Package/libfreetdm/install/ftmod,$$(1),$(1))
-endef
-$$(eval $$(call BuildPackage,libfreetdm-ftmod-$(subst _,-,$(1))))
-endef
-
define Package/freeswitch/Default
SUBMENU:=Telephony
SECTION:=net
@@ -473,6 +430,27 @@ define Package/freeswitch-misc-perl-esl/install
$(1)$(PERL_SITELIB)/ESL
endef
+define Package/freeswitch-misc-python3-esl
+$(call Package/freeswitch/Default)
+ TITLE:=Python3 ESL
+ DEPENDS:=freeswitch +PACKAGE_freeswitch-misc-python3-esl:python3-light
+endef
+
+define Package/freeswitch-misc-python3-esl/description
+This package contains the Python3 binding for FreeSWITCH's Event Socket
+Library (ESL).
+endef
+
+define Package/freeswitch-misc-python3-esl/install
+ $(INSTALL_DIR) $(1)$(FS_PYTHON3_SITE_DIR)
+ $(INSTALL_BIN) \
+ $(PKG_INSTALL_DIR)$(FS_PYTHON3_SITE_DIR)/_ESL.so \
+ $(1)$(FS_PYTHON3_SITE_DIR)
+ $(INSTALL_DATA) \
+ $(PKG_INSTALL_DIR)$(FS_PYTHON3_SITE_DIR)/ESL.py \
+ $(1)$(FS_PYTHON3_SITE_DIR)
+endef
+
define Package/freeswitch-misc-timezones
$(call Package/freeswitch/Default)
TITLE:=Timezones file
@@ -570,6 +548,12 @@ ifeq ($(1),perl)
$(PKG_INSTALL_DIR)/usr/perl/freeswitch.pm \
$$(1)$(PERL_SITELIB)
endif
+ifeq ($(1),python3)
+ $(INSTALL_DIR) $$(1)$(FS_PYTHON3_SITE_DIR)
+ $(INSTALL_DATA) \
+ $(PKG_INSTALL_DIR)$(FS_PYTHON3_SITE_DIR)/freeswitch.py \
+ $$(1)$(FS_PYTHON3_SITE_DIR)
+endif
endef
$$(eval $$(call BuildPackage,freeswitch-mod-$(subst _,-,$(1))))
endef
@@ -615,9 +599,15 @@ CONFIGURE_ARGS+= \
$(if $(CONFIG_FS_WITH_FREETYPE),,--without-freetype) \
$(if $(CONFIG_FS_WITH_ODBC),--with-odbc-lib="$(STAGING_DIR)$(FS_LIB_DIR)") \
$(if $(CONFIG_FS_WITH_ODBC),--with-odbc="$(STAGING_DIR)/usr") \
- $(if $(CONFIG_FS_WITH_PNG),,--without-png) \
- $(if $(CONFIG_PACKAGE_libfreetdm-ftmod-libpri),--with-libpri="$(STAGING_DIR)/usr",--without-libpri) \
- $(if $(CONFIG_PACKAGE_libfreetdm-ftmod-pritap),--with-pritap,--without-pritap)
+ $(if $(CONFIG_FS_WITH_PNG),,--without-png)
+
+ifneq ($(CONFIG_PACKAGE_freeswitch-misc-python3-esl)$(CONFIG_PACKAGE_freeswitch-mod-python3),)
+CONFIGURE_ARGS+= \
+ --with-python3=$(STAGING_DIR_HOST)/bin/python3
+else
+CONFIGURE_ARGS+= \
+ --with-python3=no
+endif
ifeq ($(CONFIG_PACKAGE_freeswitch-mod-erlang-event)$(CONFIG_PACKAGE_freeswitch-mod-kazoo),)
CONFIGURE_ARGS+= \
@@ -690,6 +680,15 @@ CONFIGURE_VARS+= \
ac_cv_prog_PERL=false
endif
+ifneq ($(CONFIG_PACKAGE_freeswitch-misc-python3-esl)$(CONFIG_PACKAGE_freeswitch-mod-python3),)
+CONFIGURE_VARS+= \
+ PYTHON3_CFLAGS="-I$(STAGING_DIR)/usr/include/python$(PYTHON3_VERSION)" \
+ PYTHON3_LDFLAGS="-lpython$(PYTHON3_VERSION)" \
+ PYTHON3_LIB="python$(PYTHON3_VERSION)" \
+ PYTHON3_LIBDIR="$(FS_LIB_DIR)" \
+ PYTHON3_SITE_DIR="$(FS_PYTHON3_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+= \
@@ -811,61 +810,41 @@ ifneq ($(CONFIG_PACKAGE_freeswitch-mod-radius-cdr),)
$(CP) $(DL_DIR)/$(FS_FREERADIUS_CLIENT_FILE) $(PKG_BUILD_DIR)/libs
endif
-# Compile FreeTDM first
-ifneq ($(CONFIG_PACKAGE_libfreetdm),)
- $(call Build/Compile/Default,-C $(PKG_BUILD_DIR)/libs/freetdm)
-endif
-ifneq ($(CONFIG_PACKAGE_freeswitch),)
$(call Build/Compile/Default)
-endif
+
ifneq ($(CONFIG_PACKAGE_freeswitch-misc-perl-esl),)
$(call Build/Compile/Default,-C $(PKG_BUILD_DIR)/libs/esl perlmod)
endif
+ifneq ($(CONFIG_PACKAGE_freeswitch-misc-python3-esl),)
+ $(call Build/Compile/Default,-C $(PKG_BUILD_DIR)/libs/esl py3mod)
+endif
endef
define Build/Install
-# Again, FreeTDM first
-ifneq ($(CONFIG_PACKAGE_libfreetdm),)
- $(call Build/Install/Default,-C $(PKG_BUILD_DIR)/libs/freetdm install)
-endif
-ifneq ($(CONFIG_PACKAGE_freeswitch),)
$(call Build/Install/Default)
-endif
ifneq ($(CONFIG_PACKAGE_freeswitch-misc-perl-esl),)
$(call Build/Compile/Default,-C $(PKG_BUILD_DIR)/libs/esl DESTDIR=$(PKG_INSTALL_DIR) perlmod-install)
endif
+ifneq ($(CONFIG_PACKAGE_freeswitch-misc-python3-esl),)
+ $(call Build/Install/Default,-C $(PKG_BUILD_DIR)/libs/esl py3mod-install)
+endif
endef
-define Build/InstallDev/libfreetdm
- $(INSTALL_DIR) $(1)/usr/include
- $(INSTALL_DATA) \
- $(PKG_INSTALL_DIR)$(FS_PKGCONFIG_DIR)/freetdm.pc \
+define Build/InstallDev
+ $(INSTALL_DIR) $(1)$(FS_INCLUDES_DIR) $(1)$(FS_LIB_DIR) \
$(1)$(FS_PKGCONFIG_DIR)
- $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/include/*.h $(1)/usr/include
-endef
-
-define Build/InstallDev/freeswitch
- $(INSTALL_DIR) $(1)$(FS_INCLUDES_DIR)
$(INSTALL_DATA) $(PKG_INSTALL_DIR)$(FS_INCLUDES_DIR)/*.h \
$(1)$(FS_INCLUDES_DIR)
$(INSTALL_DATA) \
$(PKG_INSTALL_DIR)$(FS_PKGCONFIG_DIR)/freeswitch.pc \
$(1)$(FS_PKGCONFIG_DIR)
+ $(CP) $(PKG_INSTALL_DIR)$(FS_LIB_DIR)/libfreeswitch.so* \
+ $(1)$(FS_LIB_DIR)
endef
-define Build/InstallDev
- $(INSTALL_DIR) $(1)$(FS_PKGCONFIG_DIR)
-ifneq ($(CONFIG_PACKAGE_libfreetdm),)
- $(call Build/InstallDev/libfreetdm,$(1))
-endif
-ifneq ($(CONFIG_PACKAGE_freeswitch),)
- $(call Build/InstallDev/freeswitch,$(1))
-endif
-endef
-
-$(eval $(call BuildPackage,libfreetdm))
$(eval $(call BuildPackage,freeswitch))
$(eval $(call BuildPackage,freeswitch-misc-perl-esl))
+$(eval $(call BuildPackage,freeswitch-misc-python3-esl))
$(eval $(call BuildPackage,freeswitch-misc-timezones))
################################
@@ -884,22 +863,6 @@ $(eval $(call Package/freeswitch/Example,testing))
$(eval $(call Package/freeswitch/Example,vanilla))
################################
-# FreeTDM modules
-# Params:
-# 1 - Package subname
-# 2 - Package title
-# 3 - Module description
-# 4 - Module dependencies
-################################
-
-$(eval $(call Package/libfreetdm/FTModule,analog,Analog,Offers generic FXO/FXS support for any type of card supported by FreeTDM.,))
-$(eval $(call Package/libfreetdm/FTModule,analog_em,Analog EM,Offers generic E&M signaling for any type of card supported by FreeTDM.,))
-$(eval $(call Package/libfreetdm/FTModule,libpri,LibPRI,Offers support for PRI lines using the open source libpri stack for any\ntype of card supported by FreeTDM. Supports both PRI and BRI signalling.,+libpri @!aarch64))
-$(eval $(call Package/libfreetdm/FTModule,pritap,PRI tapping,This module is used to tap PRI lines.,+libfreetdm-ftmod-libpri))
-$(eval $(call Package/libfreetdm/FTModule,skel,Skeleton,ftmod_skel is an example module.,))
-$(eval $(call Package/libfreetdm/FTModule,zt,DAHDI I/O,This module supports the DAHDI interface. The DAHDI interface is used by\nseveral hardware vendors.,))
-
-################################
# FreeSWITCH language files
# Params:
# 1 - Language code
@@ -984,7 +947,6 @@ $(eval $(call Package/freeswitch/Module,expr,Expr,This module adds expr support
$(eval $(call Package/freeswitch/Module,fail2ban,Fail2ban logging,Provides support for Fail2ban logging.,))
$(eval $(call Package/freeswitch/Module,fifo,FIFO,This module adds a first-in first-out queue system.,))
$(eval $(call Package/freeswitch/Module,format_cdr,Multiformat CDR,A superset of mod_json_cdr and mod_xml_cdr.,))
-$(eval $(call Package/freeswitch/Module,freetdm,FreeTDM endpoint,This module is the glue between FreeSWITCH and FreeTDM.,+libfreetdm))
$(eval $(call Package/freeswitch/Module,fsk,FSK,This module adds frequency-shift keying support which can be used to\nsend and receive caller ID.,))
$(eval $(call Package/freeswitch/Module,fsv,FSV,This module provides dialplan applications for recording and playing\nvideos.,))
$(eval $(call Package/freeswitch/Module,g723_1,G.723.1 passthrough,G.723.1 codec passthrough.,))
@@ -1021,6 +983,7 @@ $(eval $(call Package/freeswitch/Module,portaudio,Portaudio,Voice through a loca
$(eval $(call Package/freeswitch/Module,portaudio_stream,Portaudio streaming,Stream from an external audio source for Music on Hold.,+portaudio))
$(eval $(call Package/freeswitch/Module,posix_timer,POSIX timer,Add POSIX timer support.,))
$(eval $(call Package/freeswitch/Module,prefix,Prefix match,This module provides a data store with fast lookups by the longest\nprefix match rule.,))
+$(eval $(call Package/freeswitch/Module,python3,Python3,Python3 support module.,+python3-light))
$(eval $(call Package/freeswitch/Module,radius_cdr,Radius CDR,Radius Call Detail Record handler.,))
$(eval $(call Package/freeswitch/Module,random,Entropy,This module extracts entropy from FreeSWITCH and feeds it into\n/dev/random.,))
$(eval $(call Package/freeswitch/Module,raven,Raven logging,Adds support for logging to Raven instances.,))
@@ -1069,7 +1032,7 @@ $(eval $(call Package/freeswitch/Module,translate,Number translation,This module
$(eval $(call Package/freeswitch/Module,tts_commandline,TTS command-line,Run a command-line and play the output file.,))
$(eval $(call Package/freeswitch/Module,unimrcp,UniMRCP,Allows communication with Media Resource Control Protocol servers.,))
$(eval $(call Package/freeswitch/Module,valet_parking,Valet parking,This module implements the valet call parking strategy.,))
-$(eval $(call Package/freeswitch/Module,verto,Verto,Verto signaling protocol.,))
+$(eval $(call Package/freeswitch/Module,verto,Verto,Verto signaling protocol.,+libks))
$(eval $(call Package/freeswitch/Module,video_filter,Video filter chromakey,This module provides a media bug for chromakey functionality.,))
$(eval $(call Package/freeswitch/Module,vmd,Voicemail detection,This module detects voicemail beeps.,))
$(eval $(call Package/freeswitch/Module,voicemail,Voicemail,This module provides a voicemail system.,))
diff --git a/net/freeswitch/patches/030-fix-configure-ac.patch b/net/freeswitch/patches/030-fix-configure-ac.patch
index 2f260bd..09782c2 100644
--- a/net/freeswitch/patches/030-fix-configure-ac.patch
+++ b/net/freeswitch/patches/030-fix-configure-ac.patch
@@ -40,7 +40,7 @@
AC_PATH_PROG([PKG_CONFIG], [pkg-config], [no])
case $host in
-@@ -1643,13 +1619,7 @@ AC_CHECK_PROG(PERL,perl,[ac_cv_have_perl
+@@ -1660,13 +1636,7 @@ AC_CHECK_PROG(PERL,perl,[ac_cv_have_perl
# -a "x$ac_cv_have_EXTERN_h" != "xno"
if test "x$ac_cv_have_perl" != "xno"; then
diff --git a/net/freeswitch/patches/120-fix-copts.patch b/net/freeswitch/patches/120-fix-copts.patch
index d7ad1fc..29fd4b5 100644
--- a/net/freeswitch/patches/120-fix-copts.patch
+++ b/net/freeswitch/patches/120-fix-copts.patch
@@ -1,6 +1,6 @@
--- a/configure.ac
+++ b/configure.ac
-@@ -2075,7 +2075,12 @@ AC_SUBST(OUR_DISABLED_INSTALL_MODS)
+@@ -2263,7 +2263,12 @@ AC_SUBST(OUR_DISABLED_INSTALL_MODS)
AC_SUBST(OUR_DISABLED_UNINSTALL_MODS)
AC_SUBST(AM_MAKEFLAGS)
@@ -84,7 +84,7 @@
AC_LANG_C
--- a/libs/srtp/configure.ac
+++ b/libs/srtp/configure.ac
-@@ -3,9 +3,12 @@ AC_INIT(srtp, 1.4.2, mcgrew@cisco.com)
+@@ -3,9 +3,12 @@ AC_INIT(srtp, 2.4.0, mcgrew@cisco.com)
AC_CONFIG_AUX_DIR(build)
AM_INIT_AUTOMAKE
diff --git a/net/freeswitch/patches/140-libvpx-cross.patch b/net/freeswitch/patches/140-libvpx-cross.patch
index 86513f2..9cf1c3f 100644
--- a/net/freeswitch/patches/140-libvpx-cross.patch
+++ b/net/freeswitch/patches/140-libvpx-cross.patch
@@ -1,6 +1,6 @@
--- a/Makefile.am
+++ b/Makefile.am
-@@ -583,8 +583,15 @@ libs/libedit/src/.libs/libedit.a:
+@@ -585,8 +585,15 @@ libs/libedit/src/.libs/libedit.a:
libs/libzrtp/libzrtp.a:
cd libs/libzrtp && $(MAKE)
diff --git a/net/freeswitch/patches/230-mod_radius_cdr.patch b/net/freeswitch/patches/230-mod_radius_cdr.patch
index bde050f..b6645d4 100644
--- a/net/freeswitch/patches/230-mod_radius_cdr.patch
+++ b/net/freeswitch/patches/230-mod_radius_cdr.patch
@@ -5,7 +5,7 @@
$(RADCLIENT_BUILDDIR)/Makefile: $(RADCLIENT_DIR)
mkdir -p $(RADCLIENT_BUILDDIR)
- cd $(RADCLIENT_BUILDDIR) && $(DEFAULT_VARS) $(RADCLIENT_DIR)/configure $(DEFAULT_ARGS) --srcdir=$(RADCLIENT_DIR)
-+ cd $(RADCLIENT_BUILDDIR) && patch -p1 < ../../src/mod/event_handlers/mod_radius_cdr/freeradius-client-1.1.6-configure-in.diff && autoreconf -v -f -i -s && $(DEFAULT_VARS) CFLAGS+="-Wno-cpp" $(RADCLIENT_DIR)/configure $(DEFAULT_ARGS) --srcdir=$(RADCLIENT_DIR)
++ cd $(RADCLIENT_BUILDDIR) && patch -N -p1 < ../../src/mod/event_handlers/mod_radius_cdr/freeradius-client-1.1.6-configure-in.diff || echo "Assuming patch was applied previously" && autoreconf -v -f -i -s && $(DEFAULT_VARS) CFLAGS="${CFLAGS} -Wno-cpp" $(RADCLIENT_DIR)/configure $(DEFAULT_ARGS) --srcdir=$(RADCLIENT_DIR)
$(TOUCH_TARGET)
$(RADCLIENT_LA): $(RADCLIENT_BUILDDIR)/Makefile
@@ -17,7 +17,7 @@
+@@ -234,13 +234,11 @@ AC_LINK_IFELSE([AC_LANG_PROGRAM([
+ enable_getrandom=getentropy],
+ [AC_MSG_RESULT(no)])
-+
++
+-AC_MSG_CHECKING([for /dev/urandom])
+-if test -c /dev/urandom
+-then
@@ -31,5 +31,5 @@
++if test $ac_cv_dev_urandom = yes; then
++ AC_DEFINE(HAVE_DEV_URANDOM)
+ fi
-+
++
+ AC_ARG_WITH([nettle], [AS_HELP_STRING([--with-nettle],
diff --git a/net/freeswitch/patches/280-tone-down-freetdm-COMP_VENDOR_CFLAGS.patch b/net/freeswitch/patches/280-tone-down-freetdm-COMP_VENDOR_CFLAGS.patch
deleted file mode 100644
index 7e29e94..0000000
--- a/net/freeswitch/patches/280-tone-down-freetdm-COMP_VENDOR_CFLAGS.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/libs/freetdm/configure.ac
-+++ b/libs/freetdm/configure.ac
-@@ -88,7 +88,7 @@ AC_ARG_ENABLE([enable_64],
-
- case "${ax_cv_c_compiler_vendor}" in
- gnu)
-- COMP_VENDOR_CFLAGS="-ffast-math -Wall -Werror -Wunused-variable -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -O0"
-+ COMP_VENDOR_CFLAGS="-ffast-math -Wall -Wunused-variable -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes"
- ;;
- sun)
- COMP_VENDOR_CFLAGS="-xc99=all -mt -xCC -xvpara"
diff --git a/net/freeswitch/patches/290-fix-mod_freetdm-copts.patch b/net/freeswitch/patches/290-fix-mod_freetdm-copts.patch
deleted file mode 100644
index 0cde4d1..0000000
--- a/net/freeswitch/patches/290-fix-mod_freetdm-copts.patch
+++ /dev/null
@@ -1,8 +0,0 @@
---- a/libs/freetdm/mod_freetdm/Makefile.in
-+++ b/libs/freetdm/mod_freetdm/Makefile.in
-@@ -1,4 +1,4 @@
--FT_CFLAGS=@CFLAGS@ @COMP_VENDOR_CFLAGS@ @DEFS@
-+FT_CFLAGS=@COMP_VENDOR_CFLAGS@ @DEFS@
-
- BASE=../../..
- FT_DIR=..
diff --git a/net/freeswitch/patches/330-do-not-install-freetdm-twice.patch b/net/freeswitch/patches/330-do-not-install-freetdm-twice.patch
deleted file mode 100644
index a81d60b..0000000
--- a/net/freeswitch/patches/330-do-not-install-freetdm-twice.patch
+++ /dev/null
@@ -1,10 +0,0 @@
---- a/libs/freetdm/mod_freetdm/Makefile.in
-+++ b/libs/freetdm/mod_freetdm/Makefile.in
-@@ -15,7 +15,6 @@ $(FTLA): $(FT_DIR)/.update
- cd $(FT_DIR) && $(MAKE)
-
- local_install:
-- cd $(FT_DIR) && $(MAKE) install
- [ -f $(DESTDIR)@confdir@/autoload_configs/freetdm.conf.xml ] || cp -f $(FT_DIR)/conf/freetdm.conf.xml $(DESTDIR)@confdir@/autoload_configs
-
- local_clean:
diff --git a/net/freeswitch/patches/370-procd-compat.patch b/net/freeswitch/patches/370-procd-compat.patch
index 5bab0f2..bdc212b 100644
--- a/net/freeswitch/patches/370-procd-compat.patch
+++ b/net/freeswitch/patches/370-procd-compat.patch
@@ -1,6 +1,6 @@
--- a/src/switch_console.c
+++ b/src/switch_console.c
-@@ -1051,10 +1051,12 @@ static void *SWITCH_THREAD_FUNC console_
+@@ -1052,10 +1052,12 @@ static void *SWITCH_THREAD_FUNC console_
while (running) {
int32_t arg = 0;
diff --git a/net/freeswitch/patches/420-switch_rtp-report-undeclared.patch b/net/freeswitch/patches/420-switch_rtp-report-undeclared.patch
new file mode 100644
index 0000000..bf6a868
--- /dev/null
+++ b/net/freeswitch/patches/420-switch_rtp-report-undeclared.patch
@@ -0,0 +1,11 @@
+--- a/src/switch_rtp.c
++++ b/src/switch_rtp.c
+@@ -2155,7 +2155,7 @@ static void switch_send_rtcp_event(switc
+ switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, header, value);
+ snprintf(header, sizeof(header), "Source-Lost");
+ #if SWITCH_BYTE_ORDER == __BIG_ENDIAN
+- tmpLost = report->lost; /* signed 24bit will extended signess to int32_t automatically */
++ tmpLost = rtcp_report_block->lost; /* signed 24bit will extended signess to int32_t automatically */
+ #else
+ tmpLost = ntohl(rtcp_report_block->lost)>>8;
+ tmpLost = tmpLost | ((tmpLost & 0x00800000) ? 0xff000000 : 0x00000000); /* ...and signess compensation */
diff --git a/net/freeswitch/patches/430-mod_opusfile-format-error.patch b/net/freeswitch/patches/430-mod_opusfile-format-error.patch
new file mode 100644
index 0000000..c2a60ef
--- /dev/null
+++ b/net/freeswitch/patches/430-mod_opusfile-format-error.patch
@@ -0,0 +1,20 @@
+--- a/src/mod/formats/mod_opusfile/mod_opusfile.c
++++ b/src/mod/formats/mod_opusfile/mod_opusfile.c
+@@ -930,7 +930,7 @@ static int decode_stream_cb(void *dconte
+ if (globals.debug) {
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "[OGG/OPUS Stream Decode] decode CB called: context: %p data: %p packet_len: %d\n",
+ (void *)context, data, nbytes);
+- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "[OGG/OPUS Stream Decode] decode_stream_cb(): switch_thread_self(): %lx\n", switch_thread_self());
++ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "[OGG/OPUS Stream Decode] decode_stream_cb(): switch_thread_self(): %lx\n", (unsigned long)(intptr_t)switch_thread_self());
+ }
+
+ switch_mutex_lock(context->ogg_mutex);
+@@ -973,7 +973,7 @@ static void *SWITCH_THREAD_FUNC read_str
+ int buffered_ogg_bytes;
+
+ if (globals.debug) {
+- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "[OGG/OPUS Stream Decode] read_stream_thread(): switch_thread_self(): 0x%lx\n", switch_thread_self());
++ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "[OGG/OPUS Stream Decode] read_stream_thread(): switch_thread_self(): 0x%lx\n", (unsigned long)(intptr_t)switch_thread_self());
+ }
+ switch_thread_rwlock_rdlock(context->rwlock);
+ switch_mutex_lock(context->ogg_mutex);
diff --git a/net/freeswitch/patches/460-remove-python-configure-checks.patch b/net/freeswitch/patches/460-remove-python-configure-checks.patch
new file mode 100644
index 0000000..79f8e26
--- /dev/null
+++ b/net/freeswitch/patches/460-remove-python-configure-checks.patch
@@ -0,0 +1,46 @@
+--- a/configure.ac
++++ b/configure.ac
+@@ -1853,36 +1853,24 @@ then
+ fi
+ AC_MSG_RESULT([$PYTHON3_VER])
+
+- AC_MSG_CHECKING([for python3 distutils])
+- python3_result="`$PYTHON3 -c 'import distutils;' 2>&1`"
+- if test -z "$python3_result" ; then
++ #AC_MSG_CHECKING([for python3 distutils])
++ #python3_result="`$PYTHON3 -c 'import distutils;' 2>&1`"
++ #if test -z "$python3_result" ; then
+ python3_has_distutils="yes"
+- else
+- python3_has_distutils="no"
+- fi
+- AC_MSG_RESULT([$python3_has_distutils])
++ #else
++ # python3_has_distutils="no"
++ #fi
++ #AC_MSG_RESULT([$python3_has_distutils])
+
+ if test "$python3_has_distutils" != "no" ; then
+ AC_MSG_CHECKING([location of python3 site-packages])
+
+- PYTHON3_SITE_DIR="`$PYTHON3 -c 'from distutils import sysconfig; print(sysconfig.get_python_lib(0));'`"
+-
+ if test -z "$PYTHON3_SITE_DIR" ; then
+ AC_MSG_ERROR([Unable to detect python3 site-packages path])
+- elif test ! -d "$PYTHON3_SITE_DIR" ; then
+- AC_MSG_ERROR([Path $PYTHON3_SITE_DIR returned by python3 does not exist!])
+ fi
+ AC_MSG_RESULT([$PYTHON3_SITE_DIR])
+ AC_SUBST([PYTHON3_SITE_DIR], [$PYTHON3_SITE_DIR])
+
+- #
+- # python3 distutils found, get settings from python3 directly
+- #
+- PYTHON3_CFLAGS="`$PYTHON3 -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'`"
+- PYTHON3_LDFLAGS="`$PYTHON3 -c 'from distutils import sysconfig; ldver = sysconfig.get_config_var(\"LDVERSION\"); libs = sysconfig.get_config_var(\"LIBS\").split() + sysconfig.get_config_var(\"SYSLIBS\").split(); libs.append(\"-lpython\" + [[ldver,sysconfig.get_config_var(\"VERSION\")]][[ldver==None]]); print(\" \".join(libs));'`"
+- PYTHON3_LIB="`$PYTHON3 -c 'from distutils import sysconfig; ldver = sysconfig.get_config_var(\"LDVERSION\"); print(\"python\" + [[ldver,sysconfig.get_config_var(\"VERSION\")]][[ldver==None]]);'`"
+- PYTHON3_LIBDIR="`$PYTHON3 -c 'from distutils import sysconfig; print(sysconfig.get_config_var(\"LIBDIR\"));'`"
+-
+ # handle python3 being installed into /usr/local
+ AC_MSG_CHECKING([python3 libdir])
+ if test -z "`echo $PYTHON3_LIBDIR | grep "/usr/lib"`" ; then
diff --git a/net/freeswitch/patches/470-esl-python.patch b/net/freeswitch/patches/470-esl-python.patch
new file mode 100644
index 0000000..a02dc09
--- /dev/null
+++ b/net/freeswitch/patches/470-esl-python.patch
@@ -0,0 +1,43 @@
+--- a/libs/esl/Makefile.am
++++ b/libs/esl/Makefile.am
+@@ -82,7 +82,7 @@ pymod: $(MYLIB)
+ $(MAKE) PYTHON=$(PYTHON) 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
+
+ py3mod: $(MYLIB)
+- $(MAKE) PYTHON3=$(PYTHON3) 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 python3
++ $(MAKE) PYTHON3=$(PYTHON3) 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)" PYTHON3_CFLAGS="$(PYTHON3_CFLAGS)" PYTHON3_LDFLAGS="$(PYTHON3_LDFLAGS)" -C python3
+
+ 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
+@@ -106,7 +106,7 @@ pymod-install: pymod
+ $(MAKE) PYTHON=$(PYTHON) -C python install
+
+ py3mod-install: py3mod
+- $(MAKE) PYTHON3=$(PYTHON3) -C python3 install
++ $(MAKE) PYTHON3=$(PYTHON3) PYTHON3_SITE_DIR="$(PYTHON3_SITE_DIR)" -C python3 install
+
+ rubymod-install: rubymod
+ $(MAKE) -C ruby install
+--- a/libs/esl/python3/Makefile
++++ b/libs/esl/python3/Makefile
+@@ -1,6 +1,4 @@
+-LOCAL_CFLAGS=`$(PYTHON3) ./python-config --includes`
+-LOCAL_LDFLAGS=`$(PYTHON3) ./python-config --ldflags`
+-SITE_DIR=$(DESTDIR)/`$(PYTHON3) -c "from distutils.sysconfig import get_python_lib; print (get_python_lib(1))"`
++SITE_DIR=$(DESTDIR)/$(PYTHON3_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) $(PYTHON3_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) $(PYTHON3_LDFLAGS) -o _ESL.so -L. $(LIBS)
+
+ install: _ESL.so
+ mkdir -p $(SITE_DIR)
diff --git a/net/freeswitch/patches/480-fix-libyuv-dependency.patch b/net/freeswitch/patches/480-fix-libyuv-dependency.patch
new file mode 100644
index 0000000..0dbc19e
--- /dev/null
+++ b/net/freeswitch/patches/480-fix-libyuv-dependency.patch
@@ -0,0 +1,118 @@
+commit a2ce46c6fde38d6ac54a8a2ee1a5b391e2ed2071
+Author: Sebastian Kemper <sebastian_ml@gmx.net>
+Date: Mon Nov 1 09:59:09 2021 +0100
+
+ [core] fix "--disable-libyuv"
+
+ Recent changes made it impossible to compile freeswitch without libyuv
+ support.
+
+ src/switch_core_video.c: In function 'switch_img_read_from_file':
+ src/switch_core_video.c:3139:4: error: implicit declaration of function 'RAWToI420' [-Werror=implicit-function-declaration]
+ RAWToI420(data, width * 3,
+ ^
+ src/switch_core_video.c:3148:4: error: implicit declaration of function 'ABGRToARGB' [-Werror=implicit-function-declaration]
+ ABGRToARGB(data, width * 4, img->planes[SWITCH_PLANE_PACKED], img->stride[SWITCH_PLANE_PACKED], width, height);
+ ^
+
+ Fix this my adding/moving the checks for "SWITCH_HAVE_YUV".
+
+ Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
+
+--- a/src/switch_core_video.c
++++ b/src/switch_core_video.c
+@@ -3116,6 +3116,7 @@ SWITCH_DECLARE(switch_status_t) switch_i
+
+ SWITCH_DECLARE(switch_image_t *) switch_img_read_from_file(const char* file_name, switch_img_fmt_t img_fmt)
+ {
++#ifdef SWITCH_HAVE_YUV
+ int width = 0, height = 0, channels = 0;
+ int comp = STBI_rgb;
+ unsigned char *data = NULL;
+@@ -3155,12 +3156,16 @@ SWITCH_DECLARE(switch_image_t *) switch_
+ } else if (data) {
+ stbi_image_free(data);
+ }
++#endif
+
+ return NULL;
+ }
+
+ SWITCH_DECLARE(switch_status_t) switch_img_write_to_file(switch_image_t *img, const char* file_name, int quality)
+ {
++#ifndef SWITCH_HAVE_YUV
++ return SWITCH_STATUS_FALSE;
++#else
+ int comp = STBI_rgb;
+ unsigned char *data = NULL;
+ const char *ext = strrchr(file_name, '.');
+@@ -3217,6 +3222,7 @@ SWITCH_DECLARE(switch_status_t) switch_i
+ free(data);
+
+ return ret ? SWITCH_STATUS_SUCCESS : SWITCH_STATUS_FALSE;
++#endif
+ }
+
+ typedef struct data_url_context_s {
+@@ -3224,14 +3230,19 @@ typedef struct data_url_context_s {
+ char **urlP;
+ } data_url_context_t;
+
++#ifdef SWITCH_HAVE_YUV
+ static void data_url_write_func(void *context, void *data, int size)
+ {
+ switch_buffer_t *buffer = (switch_buffer_t *)context;
+ switch_buffer_write(buffer, data, size);
+ }
++#endif
+
+ SWITCH_DECLARE(switch_status_t) switch_img_data_url(switch_image_t *img, char **urlP, const char *type, int quality)
+ {
++#ifndef SWITCH_HAVE_YUV
++ return SWITCH_STATUS_FALSE;
++#else
+ int comp = STBI_rgb;
+ unsigned char *data = NULL;
+ int stride_in_bytes = 0;
+@@ -3300,6 +3311,7 @@ SWITCH_DECLARE(switch_status_t) switch_i
+ switch_buffer_destroy(&buffer);
+
+ return ret ? SWITCH_STATUS_SUCCESS : SWITCH_STATUS_FALSE;
++#endif /* SWITCH_HAVE_YUV */
+ }
+
+
+--- a/tests/unit/switch_core_video.c
++++ b/tests/unit/switch_core_video.c
+@@ -48,6 +48,7 @@ FST_CORE_BEGIN("./conf")
+ }
+ FST_TEARDOWN_END()
+
++#ifdef SWITCH_HAVE_YUV
+ FST_TEST_BEGIN(data_url_test)
+ {
+ char *data_url = NULL;
+@@ -88,6 +89,7 @@ FST_CORE_BEGIN("./conf")
+ unlink(argb_filename);
+ }
+ FST_TEST_END()
++#endif /* SWITCH_HAVE_YUV */
+
+ FST_TEST_BEGIN(img_patch)
+ {
+@@ -239,6 +241,7 @@ FST_CORE_BEGIN("./conf")
+ }
+ FST_TEST_END()
+
++#ifdef SWITCH_HAVE_YUV
+ FST_TEST_BEGIN(stb_data_url)
+ {
+ switch_image_t *img = switch_img_alloc(NULL, SWITCH_IMG_FMT_I420, 120, 60, 1);
+@@ -321,6 +324,7 @@ FST_CORE_BEGIN("./conf")
+ unlink(jpg_write_filename);
+ }
+ FST_TEST_END()
++#endif /* SWITCH_HAVE_YUV */
+ }
+ FST_SUITE_END()
+ }