freeswitch: bump to 1.10.4 559/head
authorSebastian Kemper <sebastian_ml@gmx.net>
Fri, 7 Aug 2020 19:27:36 +0000 (21:27 +0200)
committerSebastian Kemper <sebastian_ml@gmx.net>
Fri, 7 Aug 2020 19:27:39 +0000 (21:27 +0200)
Upstream split out spandsp as well. But their spandsp "fork" may not be
a drop-in replacement for the regular spandsp. For now we keep it built
into freeswitch via patch.

Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
net/freeswitch/Makefile
net/freeswitch/files/spandsp-flags.patch [new file with mode: 0644]
net/freeswitch/patches/030-fix-configure-ac.patch
net/freeswitch/patches/120-fix-copts.patch
net/freeswitch/patches/140-libvpx-cross.patch
net/freeswitch/patches/400-disable-libcheck.patch [deleted file]
net/freeswitch/patches/420-build-spandsp-intree.patch [new file with mode: 0644]

index dece5c8dce4745ae294f8581bc25f03fabb30d3d..1ce0437d306df6feac493d679d065872a5f71f5d 100644 (file)
@@ -8,13 +8,13 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=freeswitch
-PKG_VERSION:=1.10.3
-PKG_RELEASE:=3
+PKG_VERSION:=1.10.4
+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:=2d7db07a64ee2f19f9b6e3a4ce76fa42e0fe46c29d95edf1b690a3df3729f307
+PKG_HASH:=492d8faae813dc21bda691f8d0c3bead1f541d6df69dba760c9d7bacbed717fc
 
 PKG_CPE_ID:=cpe:/a:freeswitch:freeswitch
 
@@ -266,6 +266,10 @@ define Download/$(1)
   FILE:=$(2)
   URL:=$(3)
   HASH:=$(4)
+  VERSION:=$(5)
+  SUBDIR:=$(6)
+  MIRROR_HASH:=$(7)
+  PROTO:=$(8)
 endef
 $$(eval $$(call Download,$(1)))
 endef
@@ -379,6 +383,7 @@ $(call Package/freeswitch/Default)
          +libspeexdsp \
          +libsqlite3 \
          +libuuid \
+         +sofia-sip \
          +zlib
 endef
 
@@ -723,6 +728,12 @@ FS_SPHINXMODEL_HASH:=dbb5e9fb85000a7cb97d6958a3ef8d77532dc55fc730ac6979705e8645c
 FS_FREERADIUS_CLIENT_FILE:=freeradius-client-1.1.7.tar.gz
 FS_FREERADIUS_CLIENT_HASH:=eada2861b8f4928e3ac6b5bbfe11e92cd6cdcacfce40cae1085e77c1b6add0e9
 
+# spandsp
+FS_SPANDSP_VERSION:=a6266f22591ee6ed1be9282babe4bfdbc50d4b82
+FS_SPANDSP_FILE:=fs-spandsp-$(FS_SPANDSP_VERSION).tar.xz
+FS_SPANDSP_URL:=https://github.com/freeswitch/spandsp.git
+FS_SPANDSP_MIRROR_HASH:=4aa38003c07c05d9030eab93ec3b0b974be03013f9e898b1f053f7306bcfa5c8
+
 ifneq ($(CONFIG_PACKAGE_freeswitch-mod-event-zmq),)
 $(eval $(call Download/files,zmq,$(FS_ZEROMQ_FILE),$(FS_ZEROMQ_URL),$(FS_ZEROMQ_HASH)))
 endif
@@ -737,6 +748,8 @@ ifneq ($(CONFIG_PACKAGE_freeswitch-mod-radius-cdr),)
 $(eval $(call Download/files,freeradius-client,$(FS_FREERADIUS_CLIENT_FILE),$(FS_LIBS_URL),$(FS_FREERADIUS_CLIENT_HASH)))
 endif
 
+$(eval $(call Download/files,fs-spandsp,$(FS_SPANDSP_FILE),$(FS_SPANDSP_URL),,$(FS_SPANDSP_VERSION),spandsp,$(FS_SPANDSP_MIRROR_HASH),git))
+
 # Need to update LDFLAGS for libs/unimrcp, otherwise it will try to link to a
 # different apr/apr-util if found.
 # FS_ANCHOR: string in build/acmacros/apr.m4 that will be replaced
@@ -746,6 +759,10 @@ FS_APR_LIBS:=-L$(PKG_BUILD_DIR)/libs/apr -L$(PKG_BUILD_DIR)/libs/apr-util
 define Build/Prepare
        $(call Build/Prepare/Default)
 
+       xzcat $(DL_DIR)/$(FS_SPANDSP_FILE) | tar -C $(PKG_BUILD_DIR)/libs $(TAR_OPTIONS)
+       $(CP) ./files/spandsp-flags.patch $(PKG_BUILD_DIR)/libs/spandsp
+       cd $(PKG_BUILD_DIR) && $(PATCH) -p1 < libs/spandsp/spandsp-flags.patch
+
        echo '#applications/mod_random' >> $(PKG_BUILD_DIR)/modules.conf
        echo '#codecs/mod_yuv' >> $(PKG_BUILD_DIR)/modules.conf
        echo '#event_handlers/mod_event_test' >> $(PKG_BUILD_DIR)/modules.conf
diff --git a/net/freeswitch/files/spandsp-flags.patch b/net/freeswitch/files/spandsp-flags.patch
new file mode 100644 (file)
index 0000000..37cd250
--- /dev/null
@@ -0,0 +1,18 @@
+--- a/libs/spandsp/configure.ac
++++ b/libs/spandsp/configure.ac
+@@ -21,9 +21,12 @@
+ AC_PREREQ([2.59])
+ AC_INIT([spandsp], [1.99.0])
+
+-CFLAGS="$CFLAGS $CONFIGURE_CFLAGS"
+-CXXFLAGS="$CXXFLAGS $CONFIGURE_CXXFLAGS"
+-LDFLAGS="$LDFLAGS $CONFIGURE_LDFLAGS"
++m4_include(../apr/build/apr_common.m4)
++
++APR_ADDTO(CFLAGS, [$CONFIGURE_CFLAGS])
++APR_ADDTO(CPPFLAGS, [$CONFIGURE_CPPFLAGS])
++APR_ADDTO(CXXFLAGS, [$CONFIGURE_CXXFLAGS])
++APR_ADDTO(LDFLAGS, [$CONFIGURE_LDFLAGS])
+
+ SPANDSP_LT_CURRENT=3
+ SPANDSP_LT_REVISION=0
index fa633e98a490af586026f44be4a320c5b4d7b730..02d2d3046f56f5f1b664812eb7e105dafd175f64 100644 (file)
@@ -40,7 +40,7 @@
  AC_PATH_PROG([PKG_CONFIG], [pkg-config], [no])
  
  case $host in
-@@ -1627,13 +1603,7 @@ AC_CHECK_PROG(PERL,perl,[ac_cv_have_perl
+@@ -1637,13 +1613,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
index 4582de6031cc9bb024f4c843be0ddb58c4438e46..4952da84e028cc4eaebdce58a247e020badde161 100644 (file)
@@ -1,6 +1,6 @@
 --- a/configure.ac
 +++ b/configure.ac
-@@ -2058,7 +2058,12 @@ AC_SUBST(OUR_DISABLED_INSTALL_MODS)
+@@ -2069,7 +2069,12 @@ AC_SUBST(OUR_DISABLED_INSTALL_MODS)
  AC_SUBST(OUR_DISABLED_UNINSTALL_MODS)
  AC_SUBST(AM_MAKEFLAGS)
  
  
  #Set default language
  AC_LANG_C
---- a/libs/sofia-sip/configure.ac
-+++ b/libs/sofia-sip/configure.ac
-@@ -13,9 +13,12 @@ dnl ---------------------------
- dnl update both the version for AC_INIT and the LIBSOFIA_SIP_UA_MAJOR_MINOR
- AC_INIT([sofia-sip], [1.12.10devel])
--CFLAGS="$CFLAGS $CONFIGURE_CFLAGS"
--CXXFLAGS="$CXXFLAGS $CONFIGURE_CXXFLAGS"
--LDFLAGS="$LDFLAGS $CONFIGURE_LDFLAGS"
-+m4_include(../apr/build/apr_common.m4)
-+
-+APR_ADDTO(CFLAGS, [$CONFIGURE_CFLAGS])
-+APR_ADDTO(CPPFLAGS, [$CONFIGURE_CPPFLAGS])
-+APR_ADDTO(CXXFLAGS, [$CONFIGURE_CXXFLAGS])
-+APR_ADDTO(LDFLAGS, [$CONFIGURE_LDFLAGS])
- AC_CONFIG_SRCDIR([libsofia-sip-ua/sip/sofia-sip/sip.h])
- AC_CONFIG_MACRO_DIR([m4])
---- a/libs/spandsp/configure.ac
-+++ b/libs/spandsp/configure.ac
-@@ -21,9 +21,12 @@
- AC_PREREQ([2.59])
- AC_INIT([spandsp], [1.99.0])
--CFLAGS="$CFLAGS $CONFIGURE_CFLAGS"
--CXXFLAGS="$CXXFLAGS $CONFIGURE_CXXFLAGS"
--LDFLAGS="$LDFLAGS $CONFIGURE_LDFLAGS"
-+m4_include(../apr/build/apr_common.m4)
-+
-+APR_ADDTO(CFLAGS, [$CONFIGURE_CFLAGS])
-+APR_ADDTO(CPPFLAGS, [$CONFIGURE_CPPFLAGS])
-+APR_ADDTO(CXXFLAGS, [$CONFIGURE_CXXFLAGS])
-+APR_ADDTO(LDFLAGS, [$CONFIGURE_LDFLAGS])
- SPANDSP_LT_CURRENT=3
- SPANDSP_LT_REVISION=0
 --- a/libs/srtp/configure.ac
 +++ b/libs/srtp/configure.ac
 @@ -3,9 +3,12 @@ AC_INIT(srtp, 1.4.2, mcgrew@cisco.com)
index 15a78c35a525024f950ade978d4b6d401df994bb..86513f2ec26d90bd2ed83fb0a5639dccb2ef83f9 100644 (file)
@@ -1,6 +1,6 @@
 --- a/Makefile.am
 +++ b/Makefile.am
-@@ -587,8 +587,15 @@ libs/libedit/src/.libs/libedit.a:
+@@ -583,8 +583,15 @@ libs/libedit/src/.libs/libedit.a:
  libs/libzrtp/libzrtp.a:
        cd libs/libzrtp && $(MAKE)
  
diff --git a/net/freeswitch/patches/400-disable-libcheck.patch b/net/freeswitch/patches/400-disable-libcheck.patch
deleted file mode 100644 (file)
index 74bd873..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/libs/sofia-sip/configure.ac
-+++ b/libs/sofia-sip/configure.ac
-@@ -250,7 +250,7 @@ SAC_OPENSSL
- SAC_TPORT
- dnl Check is used for testing
--PKG_CHECK_MODULES(CHECK, check >= 0.9.4, have_check="yes", have_check="no")
-+PKG_CHECK_MODULES(CHECK, we_do_not_want_check >= 0.9.4, have_check="yes", have_check="no")
- AM_CONDITIONAL(HAVE_CHECK, test x"$have_check" = "xyes")
- if test x"$have_check" = "xyes"; then
-    AC_DEFINE([HAVE_CHECK], 1, [Define to 1 if check library is available])
diff --git a/net/freeswitch/patches/420-build-spandsp-intree.patch b/net/freeswitch/patches/420-build-spandsp-intree.patch
new file mode 100644 (file)
index 0000000..47b1af5
--- /dev/null
@@ -0,0 +1,162 @@
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -130,7 +130,7 @@ CORE_CFLAGS += -I$(switch_srcdir)/libs/l
+ CORE_CFLAGS += -DSWITCH_HAVE_YUV
+ endif
+ CORE_CFLAGS += -I$(switch_srcdir)/libs/srtp/crypto/include -Ilibs/srtp/crypto/include
+-CORE_CFLAGS += $(SPANDSP_CFLAGS)
++CORE_CFLAGS += -I$(switch_builddir)/libs/spandsp/src -I$(switch_srcdir)/libs/spandsp/src
+ if ENABLE_LIBVPX
+ CORE_CFLAGS += -DSWITCH_HAVE_VPX
+ endif
+@@ -184,10 +184,13 @@ endif
+ ##
+ ## libfreeswitch
+ ##
+-noinst_LTLIBRARIES        =
++noinst_LTLIBRARIES        = libfreeswitch_spandsp.la
+ if ENABLE_LIBYUV
+ noinst_LTLIBRARIES += libfreeswitch_libyuv.la
+ endif
++libfreeswitch_spandsp_la_SOURCES = libs/spandsp/src/plc.c libs/spandsp/src/alloc.c libs/spandsp/src/bit_operations.c
++libfreeswitch_spandsp_la_CFLAGS  = -Ilibs/spandsp/src $(CORE_CFLAGS) $(AM_CFLAGS)
++CORE_LIBS+=libfreeswitch_spandsp.la
+ if ENABLE_LIBYUV
+ libfreeswitch_libyuv_la_SOURCES = \
+@@ -248,7 +251,7 @@ endif
+ lib_LTLIBRARIES                = libfreeswitch.la
+ libfreeswitch_la_CFLAGS  = $(CORE_CFLAGS) $(SQLITE_CFLAGS) $(GUMBO_CFLAGS) $(FVAD_CFLAGS) $(FREETYPE_CFLAGS) $(CURL_CFLAGS) $(PCRE_CFLAGS) $(SPEEX_CFLAGS) $(LIBEDIT_CFLAGS) $(openssl_CFLAGS)  $(AM_CFLAGS) $(TPL_CFLAGS)
+ libfreeswitch_la_LDFLAGS = -version-info 1:0:0 $(AM_LDFLAGS) $(PLATFORM_CORE_LDFLAGS) -no-undefined
+-libfreeswitch_la_LIBADD  = $(CORE_LIBS) $(APR_LIBS) $(SQLITE_LIBS) $(GUMBO_LIBS) $(FVAD_LIBS) $(FREETYPE_LIBS) $(CURL_LIBS) $(PCRE_LIBS) $(SPEEX_LIBS) $(LIBEDIT_LIBS) $(openssl_LIBS) $(PLATFORM_CORE_LIBS) $(TPL_LIBS) $(SPANDSP_LIBS)
++libfreeswitch_la_LIBADD  = $(CORE_LIBS) $(APR_LIBS) $(SQLITE_LIBS) $(GUMBO_LIBS) $(FVAD_LIBS) $(FREETYPE_LIBS) $(CURL_LIBS) $(PCRE_LIBS) $(SPEEX_LIBS) $(LIBEDIT_LIBS) $(openssl_LIBS) $(PLATFORM_CORE_LIBS) $(TPL_LIBS)
+ libfreeswitch_la_DEPENDENCIES = $(BUILT_SOURCES)
+ if HAVE_PNG
+@@ -717,7 +720,9 @@ core-install: core_install
+ clean_core: clean-libLTLIBRARIES
+       rm -f $(libfreeswitch_la_OBJECTS)
++      rm -f $(libfreeswitch_spandsp_la_OBJECTS)
+       rm -f `echo $(libfreeswitch_la_OBJECTS) | sed -e's|.lo|.o|g'`
++      rm -f `echo $(libfreeswitch_spandsp_la_OBJECTS) | sed -e's|.lo|.o|g'`
+ install_core: install-libLTLIBRARIES
+@@ -782,6 +787,12 @@ iks-reconf:
+       cd libs/iksemel && sh ./configure.gnu $(MY_DEFAULT_ARGS)
+       $(MAKE) mod_dingaling-clean
++spandsp-reconf:
++      cd libs/spandsp && $(MAKE) clean || echo
++      cd libs/spandsp && autoreconf -fi
++      cd libs/spandsp && sh ./configure.gnu $(MY_DEFAULT_ARGS)
++      cd libs/spandsp && $(MAKE)
++
+ cluecon:
+       @clear
+       @echo Thank you for updating. This is going to take a while so relax.
+--- a/configure.ac
++++ b/configure.ac
+@@ -703,11 +703,6 @@ PKG_CHECK_MODULES([MARIADB], [libmariadb
+   ])
+ ])
+-PKG_CHECK_MODULES([SPANDSP], [spandsp >= 1.99],[
+-  AM_CONDITIONAL([HAVE_SPANDSP],[true])],[
+-    AC_MSG_ERROR([no usable spandsp; please install spandsp devel package or equivalent])
+-])
+-
+ PKG_CHECK_MODULES([SOFIA_SIP], [sofia-sip-ua >= 1.12.12],[
+   AM_CONDITIONAL([HAVE_SOFIA_SIP],[true])],[
+     AC_MSG_ERROR([no usable sofia-sip; please install sofia-sip-ua devel package or equivalent])
+@@ -2104,6 +2099,7 @@ AC_CONFIG_SUBDIRS([libs/iksemel])
+ AC_CONFIG_SUBDIRS([libs/libdingaling])
+ AC_CONFIG_SUBDIRS([libs/freetdm])
+ AC_CONFIG_SUBDIRS([libs/unimrcp])
++AC_CONFIG_SUBDIRS([libs/spandsp])
+ if test "x${enable_zrtp}" = "xyes"; then
+    AC_CONFIG_SUBDIRS([libs/libzrtp])
+ fi
+--- a/debian/copyright
++++ b/debian/copyright
+@@ -1310,6 +1310,45 @@ Files: libs/js/nsprpub/pr/tests/tmocon.c
+ Copyright: 1998-2004 Netscape Communications Corporation
+ License: MPL-1.1 or GPL-2+
++Files: libs/spandsp/*
++Copyright: 2001-2012, Steve Underwood
++ 2006 Michael Jerris
++ 1991-1997 Silicon Graphics, Inc.
++ 1990-1997 Sam Leffler
++ 1993 CMU
++ 2004, Horizon Wimba, Inc.
++ 1990, 1995  Frank D. Cringle.
++License: LGPL-2.1
++
++Files: libs/spandsp/tests/*
++ libs/spandsp/spandsp-sim/g1050.c
++ libs/spandsp/spandsp-sim/line_model.c
++ libs/spandsp/spandsp-sim/make_line_models.c
++ libs/spandsp/spandsp-sim/spandsp-sim.h
++ libs/spandsp/spandsp-sim/test_utils.c
++ libs/spandsp/src/image_translate.c
++ libs/spandsp/src/make_at_dictionary.c
++ libs/spandsp/src/make_cielab_luts.c
++ libs/spandsp/src/make_math_fixed_tables.c
++ libs/spandsp/src/make_modem_filter.c
++ libs/spandsp/test-data/etsi/fax/generate_etsi_300_242_pages.c
++ libs/spandsp/test-data/itu/fax/generate_dithered_tif.c
++ libs/spandsp/test-data/itu/fax/generate_sized_pages.c
++ libs/spandsp/test-data/itu/fax/generate_striped_pages.c
++Copyright: 2001-2012, Steve Underwood
++License: GPL-2
++
++Files: libs/spandsp/tests/ademco_contactid_tests.c
++ libs/spandsp/tests/regression_tests.sh
++ libs/spandsp/tests/timezone_tests.c
++ libs/spandsp/tests/tsb85_extra_tests.sh
++ libs/spandsp/tests/tsb85_tests.c
++ libs/spandsp/tests/tsb85_tests.sh
++ libs/spandsp/tests/v42bis_tests.sh
++ libs/spandsp/tests/fax_tests.sh
++Copyright: 2001-2012, Steve Underwood
++License: LGPL-2.1
++
+ Files: src/mod/applications/mod_cluechoo/sl.h
+ Copyright: 1993 Toyoda Masashi
+ License: FIXME
+@@ -1402,6 +1441,11 @@ Files: libs/libsndfile/src/G72x/*
+ Copyright: Abandoned, Sun Microsystems, Inc.
+ License: public-domain
++Files: libs/spandsp/src/spandsp/fast_convert.h
++Copyright: 2001-2004 Erik de Castro Lopo <erikd@mega-nerd.com>
++ 2009 Steve Underwood
++License: LGPL-2.1
++
+ Files: libs/libsndfile/*
+  libs/win32/libsndfile/*
+ Copyright: 1999-2009 Erik de Castro Lopo <erikd@mega-nerd.com>
+--- a/src/mod/applications/mod_spandsp/Makefile.am
++++ b/src/mod/applications/mod_spandsp/Makefile.am
+@@ -1,9 +1,17 @@
+ include $(top_srcdir)/build/modmake.rulesam
+ MODNAME=mod_spandsp
++SPANDSP_DIR=$(switch_srcdir)/libs/spandsp
++SPANDSP_BUILDDIR=$(switch_builddir)/libs/spandsp
++SPANDSP_LA=$(SPANDSP_BUILDDIR)/src/libspandsp.la
++
+ mod_LTLIBRARIES = mod_spandsp.la
+ mod_spandsp_la_SOURCES  = mod_spandsp.c udptl.c mod_spandsp_fax.c mod_spandsp_dsp.c mod_spandsp_codecs.c mod_spandsp_modem.c
+ mod_spandsp_la_CFLAGS   = $(AM_CFLAGS) 
+-mod_spandsp_la_CPPFLAGS = $(SPANDSL_CFLAGS) -I.
+-mod_spandsp_la_LIBADD   = $(switch_builddir)/libfreeswitch.la $(SPANDSP_LIBS) -ljpeg -lz -ltiff
++mod_spandsp_la_CPPFLAGS = -I$(SPANDSP_DIR)/src -I$(SPANDSP_BUILDDIR)/src -I.
++mod_spandsp_la_LIBADD   = $(switch_builddir)/libfreeswitch.la $(SPANDSP_LA) $(SPANDSP_LA_JBIG) $(SPANDSP_LA_LZMA) -ljpeg -lz -ltiff
+ mod_spandsp_la_LDFLAGS  = -avoid-version -module -no-undefined -shared
++
++$(SPANDSP_LA): $(SPANDSP_DIR) $(SPANDSP_DIR)/.update
++      cd $(SPANDSP_BUILDDIR) && $(MAKE) CPPFLAGS="$(CPPFLAGS)" CFLAGS="$(CFLAGS)"
++      $(TOUCH_TARGET)