freeswitch-stable: SWIG updates
authorSebastian Kemper <sebastian_ml@gmx.net>
Sun, 11 Jun 2017 12:24:54 +0000 (14:24 +0200)
committerSebastian Kemper <sebastian_ml@gmx.net>
Sun, 11 Jun 2017 12:24:59 +0000 (14:24 +0200)
- fixed swig location in all Makefiles in libs/esl and src/mod/languages
- forced a reswig for mod_lua as well, like it is already done for
  mod_python
- added patch for mod_lua to properly do the reswig (patch sent
  upstream, too)

Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
net/freeswitch-stable/Makefile
net/freeswitch-stable/patches/160-mod_lua-swig.patch [new file with mode: 0644]

index 714e948e3cecb8455892e1b8aab818de8bb24ba0..d0998c1844abffdde37ad037a9e45fc8df6c2d7b 100644 (file)
@@ -568,16 +568,19 @@ define Build/Prepare
                $(if $(CONFIG_PACKAGE_$(PKG_NAME)-mod-$(m)),
                $(SED) '/mod_$(m)$$$$/s/^#//' $(PKG_BUILD_DIR)/modules.conf))
 
+       find $(PKG_BUILD_DIR)/libs/esl -name Makefile \
+               -exec $(SED) 's|swig2.0|$(STAGING_DIR_HOSTPKG)/bin/swig|' \
+               {} \;
+       find $(PKG_BUILD_DIR)/src/mod/languages -name Makefile.am \
+               -exec $(SED) 's|swig2.0|$(STAGING_DIR_HOSTPKG)/bin/swig|' \
+               {} \;
+
        $(SED) 's|^LOCAL_CFLAGS=.*|LOCAL_CFLAGS=-I$(PYTHON_INC_DIR)|' \
                $(PKG_BUILD_DIR)/libs/esl/python/Makefile
        $(SED) 's|^LOCAL_LDFLAGS=.*|LOCAL_LDFLAGS=$(TARGET_LDFLAGS) -lpython$(PYTHON_VERSION)|' \
                $(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|swig2.0|$(STAGING_DIR_HOSTPKG)/bin/swig|' \
-               $(PKG_BUILD_DIR)/libs/esl/python/Makefile
-       $(SED) 's|swig2.0|$(STAGING_DIR_HOSTPKG)/bin/swig|' \
-               $(PKG_BUILD_DIR)/src/mod/languages/mod_python/Makefile.am
        $(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)|' \
@@ -602,6 +605,7 @@ define Build/Configure
 endef
 
 define Build/Compile
+       $(call Build/Compile/Default,-C $(PKG_BUILD_DIR)/src/mod/languages/mod_lua swigclean)
        $(call Build/Compile/Default,-C $(PKG_BUILD_DIR)/src/mod/languages/mod_python swigclean)
        $(call Build/Compile/Default)
        $(call Build/Compile/Default,-C $(PKG_BUILD_DIR)/libs/esl swigclean pymod)
diff --git a/net/freeswitch-stable/patches/160-mod_lua-swig.patch b/net/freeswitch-stable/patches/160-mod_lua-swig.patch
new file mode 100644 (file)
index 0000000..600823f
--- /dev/null
@@ -0,0 +1,17 @@
+--- a/src/mod/languages/mod_lua/Makefile.am
++++ b/src/mod/languages/mod_lua/Makefile.am
+@@ -24,12 +24,12 @@ if SYSTEM_LUA
+ mod_lua_la_LDFLAGS += $(LUA_LIBS)
+ endif
+-reswig: swigclean lua_wrap
++reswig: swigclean mod_lua_wrap.cpp
+ swigclean: clean
+       rm -f mod_lua_wrap.*
+-lua_wrap: mod_lua_extra.c
++mod_lua_wrap.cpp: mod_lua_extra.c
+       swig2.0 -lua -c++ -I../../../../src/include -oh mod_lua_wrap.h -o mod_lua_wrap.cpp freeswitch.i
+       echo "#include \"mod_lua_extra.c\"" >> mod_lua_wrap.cpp
+       patch -s -p0 -i hack.diff