Merge pull request #569 from micmac1/fs_cleanups
authormicmac1 <sebastian_ml@gmx.net>
Tue, 8 Sep 2020 21:03:56 +0000 (23:03 +0200)
committerGitHub <noreply@github.com>
Tue, 8 Sep 2020 21:03:56 +0000 (23:03 +0200)
freeswitch: cleanups

net/freeswitch/Makefile
net/freeswitch/patches/410-mod_rayo_enable-f-no-common-compilation.patch [new file with mode: 0644]
net/freeswitch/patches/410-rayo-gcc10.patch [deleted file]

index 37d26a00ae685d45dda83b8683e2dccb04f85e1d..29f38bffb3a5ab506d910d305975b2ad79399d79 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=freeswitch
 PKG_VERSION:=1.10.5
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 PKG_MAINTAINER:=Sebastian Kemper <sebastian_ml@gmx.net>
 
 PKG_SOURCE:=freeswitch-$(PKG_VERSION).-release.tar.xz
@@ -24,8 +24,7 @@ PKG_BUILD_DEPENDS:=perl/host
 
 PKG_FIXUP:=autoreconf
 
-# With mod_ssml and mod_rayo enabled the parallel compiles always failed
-PKG_BUILD_PARALLEL:=0
+PKG_BUILD_PARALLEL:=1
 PKG_INSTALL:=1
 
 PKG_LICENSE:= \
@@ -270,6 +269,10 @@ endef
 $$(eval $$(call Download,$(1)))
 endef
 
+define Package/freeswitch/enable/plugin
+       $(SED) '/$(1)$$$$/s/^#//' $(PKG_BUILD_DIR)/modules.conf
+endef
+
 define Package/freeswitch/install/bin
        $(INSTALL_DIR) $(1)$(FS_BIN_DIR)
        $(INSTALL_BIN) $(PKG_INSTALL_DIR)$(FS_BIN_DIR)/$(2) \
@@ -757,27 +760,36 @@ define Build/Configure
        $(SED) '/^#/!s/^/#/' $(PKG_BUILD_DIR)/modules.conf
        $(foreach m,$(FS_MOD_AVAILABLE),
                $(if $(CONFIG_PACKAGE_freeswitch-mod-$(subst _,-,$(m))),
-               $(SED) '/mod_$(m)$$$$/s/^#//' $(PKG_BUILD_DIR)/modules.conf))
+               $(call Package/freeswitch/enable/plugin,mod_$(m))))
+
+# Some of the dependencies that necessitate below hacks are documented in
+# src/mod/Makefile.am.
 
 # Hack for misc-grammar - needs mod_pocketsphinx to provide grammar files
 ifneq ($(CONFIG_PACKAGE_freeswitch-misc-grammar),)
-ifeq ($(CONFIG_PACKAGE_freeswitch-mod-pocketsphinx),)
-       $(SED) '/mod_pocketsphinx$$$$/s/^#//' $(PKG_BUILD_DIR)/modules.conf
-endif
+       $(call Package/freeswitch/enable/plugin,mod_pocketsphinx)
 endif
 
 # Hack for mod_gsmopen - it has a build-time dep on mod_spandsp
 ifneq ($(CONFIG_PACKAGE_freeswitch-mod-gsmopen),)
-ifeq ($(CONFIG_PACKAGE_freeswitch-mod-spandsp),)
-       $(SED) '/mod_spandsp$$$$/s/^#//' $(PKG_BUILD_DIR)/modules.conf
+       $(call Package/freeswitch/enable/plugin,mod_spandsp)
 endif
+
+# Hack for mod_rayo - it has a build-time dep on mod_dingaling
+ifneq ($(CONFIG_PACKAGE_freeswitch-mod-rayo),)
+       $(call Package/freeswitch/enable/plugin,mod_dingaling)
+endif
+
+# Hack for mod_ssml - it has a build-time dep on mod_rayo. And mod_rayo needs
+# mod_dingaling :)
+ifneq ($(CONFIG_PACKAGE_freeswitch-mod-ssml),)
+       $(call Package/freeswitch/enable/plugin,mod_rayo)
+       $(call Package/freeswitch/enable/plugin,mod_dingaling)
 endif
 
 # Hack for mod_unimrcp - it has a build-time dep on mod_sofia
 ifneq ($(CONFIG_PACKAGE_freeswitch-mod-unimrcp),)
-ifeq ($(CONFIG_PACKAGE_freeswitch-mod-sofia),)
-       $(SED) '/mod_sofia$$$$/s/^#//' $(PKG_BUILD_DIR)/modules.conf
-endif
+       $(call Package/freeswitch/enable/plugin,mod_sofia)
 endif
 
        $(call Build/Configure/Default)
diff --git a/net/freeswitch/patches/410-mod_rayo_enable-f-no-common-compilation.patch b/net/freeswitch/patches/410-mod_rayo_enable-f-no-common-compilation.patch
new file mode 100644 (file)
index 0000000..0c4986e
--- /dev/null
@@ -0,0 +1,20 @@
+commit 9c01bd4c78c678e989ac77522145d3bd46352f6f
+Author: Ciprian <ciprian.dosoftei@gmail.com>
+Date:   Tue Sep 1 12:13:28 2020 -0400
+
+    [mod_rayo] Enable -fno-common compilation
+
+diff --git a/src/mod/event_handlers/mod_rayo/iks_helpers.h b/src/mod/event_handlers/mod_rayo/iks_helpers.h
+index e221abe390..b98dbf5be6 100644
+--- a/src/mod/event_handlers/mod_rayo/iks_helpers.h
++++ b/src/mod/event_handlers/mod_rayo/iks_helpers.h
+@@ -51,8 +51,7 @@ struct xmpp_error {
+ #undef XMPP_ERROR
+ #define XMPP_ERROR(def_name, name, type) \
+-      SWITCH_DECLARE(const struct xmpp_error) def_name##_val; \
+-      SWITCH_DECLARE(const struct xmpp_error *) def_name;
++      extern const struct xmpp_error *def_name;
+ #include "xmpp_errors.def"
+ /* See RFC-3920 XMPP core for error definitions */
diff --git a/net/freeswitch/patches/410-rayo-gcc10.patch b/net/freeswitch/patches/410-rayo-gcc10.patch
deleted file mode 100644 (file)
index a9b9b98..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
---- a/src/mod/event_handlers/mod_rayo/Makefile.am
-+++ b/src/mod/event_handlers/mod_rayo/Makefile.am
-@@ -8,7 +8,7 @@ IKS_LA=$(IKS_BUILDDIR)/src/libiksemel.la
- noinst_LTLIBRARIES = librayomod.la
- librayomod_la_SOURCES = mod_rayo.c iks_helpers.c nlsml.c rayo_components.c rayo_cpa_component.c rayo_cpa_detector.c rayo_elements.c rayo_fax_components.c
- librayomod_la_SOURCES += rayo_input_component.c rayo_output_component.c rayo_prompt_component.c rayo_record_component.c sasl.c srgs.c xmpp_streams.c rayo_exec_component.c
--librayomod_la_CFLAGS = $(AM_CFLAGS) -I$(switch_builddir)/libs/iksemel/include $(PCRE_CFLAGS)
-+librayomod_la_CFLAGS = $(AM_CFLAGS) -I$(switch_builddir)/libs/iksemel/include $(PCRE_CFLAGS) -fcommon
- mod_LTLIBRARIES = mod_rayo.la
- mod_rayo_la_SOURCES  = 
-@@ -25,7 +25,7 @@ $(IKS_LA): $(IKS_BUILDDIR) $(IKS_DIR) $(
- noinst_PROGRAMS = test/test_iks test/test_nlsml test/test_srgs
- test_test_iks_SOURCES = test/test_iks.c
--test_test_iks_CFLAGS = $(AM_CFLAGS) -I. -I$(switch_builddir)/libs/iksemel/include $(PCRE_CFLAGS) -DSWITCH_TEST_BASE_DIR_FOR_CONF=\"${abs_builddir}/test\" -DSWITCH_TEST_BASE_DIR_OVERRIDE=\"${abs_builddir}/test\"
-+test_test_iks_CFLAGS = $(AM_CFLAGS) -I. -I$(switch_builddir)/libs/iksemel/include $(PCRE_CFLAGS) -DSWITCH_TEST_BASE_DIR_FOR_CONF=\"${abs_builddir}/test\" -DSWITCH_TEST_BASE_DIR_OVERRIDE=\"${abs_builddir}/test\" -fcommon
- test_test_iks_LDFLAGS = $(AM_LDFLAGS) -avoid-version -no-undefined $(freeswitch_LDFLAGS) $(switch_builddir)/libfreeswitch.la $(CORE_LIBS) $(APR_LIBS)
- test_test_iks_LDADD = librayomod.la $(IKS_LA) $(PCRE_LIBS)