freeswitch-stable: Misc fixes
authorSebastian Kemper <sebastian_ml@gmx.net>
Sat, 24 Jun 2017 19:05:26 +0000 (21:05 +0200)
committerSebastian Kemper <sebastian_ml@gmx.net>
Sat, 24 Jun 2017 19:10:04 +0000 (21:10 +0200)
- compile fix for mod_av added, without it the build errors out
  (warnings turned to errors). It's still labelled @BROKEN, but once
  OpenWrt's ffmpeg maintainers add libavresample to libffmpeg-full
  (PR #4490) it should work.
- disable Erlang detection if mod_erlang_event is not selected (build
  dep on Erlang unfortunately has to stay)

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

index b8152d40f022740c04bdf03dfdd5090acf29e21e..6c980659018ff4ae8dbc37b2c35c7f64d918f0f1 100644 (file)
@@ -574,6 +574,11 @@ CONFIGURE_ARGS+= \
 endif
 # Python setup end
 
+ifeq ($(CONFIG_PACKAGE_$(PKG_NAME)-mod-erlang_event),)
+CONFIGURE_ARGS+= \
+       --with-erlang=no
+endif
+
 CONFIGURE_ARGS+= \
        --build=$(GNU_HOST_NAME) \
        --host=$(GNU_TARGET_NAME) \
@@ -740,7 +745,7 @@ $(eval $(call Package/$(PKG_NAME)/Module,abstraction,API abstraction,This module
 $(eval $(call Package/$(PKG_NAME)/Module,alsa,ALSA endpoint,ALSA endpoint module.,+alsa-lib))
 $(eval $(call Package/$(PKG_NAME)/Module,amr,AMR passthrough,Passthrough AMR codec support.,))
 $(eval $(call Package/$(PKG_NAME)/Module,amrwb,AMR wideband passthrough,Passthrough AMR wideband codec support.,))
-$(eval $(call Package/$(PKG_NAME)/Module,av,AV,Video codec and format support via FFmpeg.,+libffmpeg-full @BROKEN))
+$(eval $(call Package/$(PKG_NAME)/Module,av,AV,Video codec and format support via FFmpeg.,+libffmpeg-full @BROKEN)) # libffmpeg-full doesn't provide avresample
 $(eval $(call Package/$(PKG_NAME)/Module,avmd,Voicemail detection,This module attempts to determine when a voicemail system has answered\nthe call.,))
 $(eval $(call Package/$(PKG_NAME)/Module,basic,BASIC,BASIC module for FreeSWITCH.,))
 $(eval $(call Package/$(PKG_NAME)/Module,bert,BERT,Line testing tool.,))
diff --git a/net/freeswitch-stable/patches/160-mod_av.patch b/net/freeswitch-stable/patches/160-mod_av.patch
new file mode 100644 (file)
index 0000000..bcdad89
--- /dev/null
@@ -0,0 +1,11 @@
+--- a/src/mod/applications/mod_av/Makefile.am
++++ b/src/mod/applications/mod_av/Makefile.am
+@@ -5,7 +5,7 @@ if HAVE_AVFORMAT
+ mod_LTLIBRARIES = mod_av.la
+ mod_av_la_SOURCES  = mod_av.c avformat.c avcodec.c
+-mod_av_la_CFLAGS   = $(AM_CFLAGS) $(AVFORMAT_CFLAGS) $(AVCODEC_CFLAGS) $(SWSCALE_CFLAGS) $(AVUTIL_CFLAGS) $(AVRESAMPLE_CFALGS)
++mod_av_la_CFLAGS   = $(AM_CFLAGS) $(AVFORMAT_CFLAGS) $(AVCODEC_CFLAGS) $(SWSCALE_CFLAGS) $(AVUTIL_CFLAGS) $(AVRESAMPLE_CFLAGS) -Wno-deprecated-declarations
+ mod_av_la_LIBADD   = $(switch_builddir)/libfreeswitch.la $(AVFORMAT_LIBS) $(AVCODEC_LIBS) $(SWSCALE_LIBS)  $(AVUTIL_LIBS) $(AVRESAMPLE_LIBS)
+ mod_av_la_LDFLAGS  = -avoid-version -module -no-undefined -shared -lm -lz