package/freeswitch: enable video support
PATCH v2 1/1 package/freeswitch: enable video support
---
v2: various changes after review by Thomas:
- removed Config.in option BR2_PACKAGE_FREESWITCH_MODULE_VIDEO
- removed menuconfig
- simplified compilation of bundled libvpx
package/freeswitch/0003-libvpx-cross.patch | 29 +++++++++++++++++++++++++++++ package/freeswitch/Config.in | 2 ++ package/freeswitch/freeswitch.mk | 26 ++++++++++++++++++++++++-- 3 files changed, 55 insertions(+), 2 deletions(-) create mode 100644 package/freeswitch/0003-libvpx-cross.patch
package/freeswitch/0003-libvpx-cross.patch new file +29 -0
@@ -0,0 +1,29 @@ +Fix cross-compiling libvpx + +Freeswitch since version 1.6.7 only uses an in-tree-version of libvpx: +https://freeswitch.org/fisheye/changelog/freeswitch?cs=febe0f8dacea2d2a31902b3dc469be757f8c3c4d + +It is not possible to use an external version of libvpx anymore. +Unfortunately the freeswitch build system has no support for cross- +compiling libvpx so we need to patch Makefile to pass CROSS from +package/freeswitch/freeswitch.mk and add target=generic-gnu as +configure parameter: +https://freeswitch.org/stash/projects/FS/repos/freeswitch/browse/libs/libvpx/README#110 + +And yes, autoreconf is also broken, so we patch Makefile.in instead +of Makefile.am. + +Signed-off-by: Bernd Kuhls <[email protected]> + +diff -uNr freeswitch-1.6.7.org/Makefile.in freeswitch-1.6.7/Makefile.in +--- freeswitch-1.6.7.org/Makefile.in 2016-04-01 18:09:54.000000000 +0200 ++++ freeswitch-1.6.7/Makefile.in 2016-04-22 20:11:37.938961730 +0200 +@@ -3491,7 +3491,7 @@ + cd libs/libzrtp && $(MAKE) + + libs/libvpx/Makefile: +- cd libs/libvpx && CC=$(CC) CXX=$(CXX) CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)" LDFLAGS="$(LDFLAGS)" ./configure --enable-pic --disable-docs --disable-examples --disable-install-bins --disable-install-srcs --disable-unit-tests --extra-cflags="-fvisibility=hidden" ++ cd libs/libvpx && CROSS=$(CROSS) CC=$(CC) CXX=$(CXX) CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)" LDFLAGS="$(LDFLAGS)" ./configure --target=generic-gnu --enable-pic --disable-docs --disable-examples --disable-install-bins --disable-install-srcs --disable-unit-tests --extra-cflags="-fvisibility=hidden" + + libs/libvpx/libvpx.a: libs/libvpx/Makefile + @cd libs/libvpx && $(MAKE)
package/freeswitch/Config.in +2 -0
@@ -5,6 +5,8 @@ config BR2_PACKAGE_FREESWITCH depends on BR2_TOOLCHAIN_HAS_THREADS depends on BR2_USE_MMU # apr, included in freeswitch source depends on BR2_USE_WCHAR # libuuid + select BR2_PACKAGE_FFMPEG_AVRESAMPLE if BR2_PACKAGE_FFMPEG + select BR2_PACKAGE_FFMPEG_SWSCALE if BR2_PACKAGE_FFMPEG select BR2_PACKAGE_LIBCURL select BR2_PACKAGE_JPEG # src/mod/applications/mod_cv/mod_cv.cpp includes
package/freeswitch/freeswitch.mk +24 -2
@@ -69,8 +69,6 @@ FREESWITCH_CONF_ENV += \ ac_cv_gcc_supports_w_no_unused_result=no FREESWITCH_CONF_OPTS = \ - --disable-libvpx \ - --disable-libyuv \ --without-erlang \ --enable-fhs \ --without-python \
@@ -284,4 +282,28 @@ ifeq ($(BR2_PACKAGE_XZ),y) FREESWITCH_DEPENDENCIES += xz endif +ifeq ($(BR2_TOOLCHAIN_GCC_AT_LEAST_4_8)$(BR2_PACKAGE_FFMPEG),yy) +FREESWITCH_LICENSE := $(FREESWITCH_LICENSE) BSD-3c (libvpx, libyuv) +FREESWITCH_LICENSE_FILES += libs/libvpx/LICENSE libs/libyuv/LICENSE +FREESWITCH_CONF_OPTS += --enable-libvpx --enable-libyuv +FREESWITCH_DEPENDENCIES += host-yasm ffmpeg +FREESWITCH_ENABLED_MODULES += applications/mod_av applications/mod_fsv +# needed in addition for patch 0003 for cross-compiling libs/libvpx +ifeq ($(BR2_TOOLCHAIN_EXTERNAL),y) +# host/opt/ext-toolchain/bin/ is not part of $PATH, instead of passing +# GNU_TARGET_NAME we need to pass TOOLCHAIN_EXTERNAL_CROSS which stores +# the full path, needed to avoid build error with external toolchains, +# quote from compile log: +# [AR] libvpx_g.a +# make[3]: x86_64-buildroot-linux-musl-ar: Command not found +# or +# make[3]: sparc64-buildroot-linux-gnu-ar: Command not found +FREESWITCH_MAKE_ENV += CROSS=$(TOOLCHAIN_EXTERNAL_CROSS) +else +FREESWITCH_MAKE_ENV += CROSS=$(GNU_TARGET_NAME)- +endif +else +FREESWITCH_CONF_OPTS += --disable-libvpx --disable-libyuv +endif + $(eval $(autotools-package))
Signature · 1 line
2.8.0.rc3
PATCH v2 1/1 package/freeswitch: enable video support
Hello,
package/freeswitch/freeswitch.mk ifeq ($(BR2_PACKAGE_XZ),y) · line 293
Quoted 3 lines · Bernd Kuhls
package/freeswitch/freeswitch.mk +3
-0+# needed in addition for patch 0003 for cross-compiling libs/libvpx +ifeq ($(BR2_TOOLCHAIN_EXTERNAL),y) +# host/opt/ext-toolchain/bin/ is not part of $PATH, instead of passing
And this is intentional, because you should never call binaries in host/opt/ext-toolchain/bin/.
package/freeswitch/freeswitch.mk ifeq ($(BR2_PACKAGE_XZ),y) · line 304
Quoted 11 lines
package/freeswitch/freeswitch.mk +11
-0+# GNU_TARGET_NAME we need to pass TOOLCHAIN_EXTERNAL_CROSS which stores +# the full path, needed to avoid build error with external toolchains, +# quote from compile log: +# [AR] libvpx_g.a +# make[3]: x86_64-buildroot-linux-musl-ar: Command not found +# or +# make[3]: sparc64-buildroot-linux-gnu-ar: Command not found +FREESWITCH_MAKE_ENV += CROSS=$(TOOLCHAIN_EXTERNAL_CROSS) +else +FREESWITCH_MAKE_ENV += CROSS=$(GNU_TARGET_NAME)- +endif
Have you tried replacing this complicated stuff with just:
FREESWITCH_MAKE_ENV += CROSS=$(TARGET_CROSS)
$(TARGET_CROSS) is already defined properly depending on internal/external.
Could you check if that works and submit an updated version?
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
PATCH v2 1/1 package/freeswitch: enable video support
Bernd, Thomas, All,
On 2016-06-10 00:35 +0200, Thomas Petazzoni spake thusly:
Quoted 22 lines · Bernd Kuhls
package/freeswitch/freeswitch.mk ifeq ($(BR2_PACKAGE_XZ),y) · line 293
Quoted 3 lines
package/freeswitch/freeswitch.mk +3
-0+# needed in addition for patch 0003 for cross-compiling libs/libvpx +ifeq ($(BR2_TOOLCHAIN_EXTERNAL),y) +# host/opt/ext-toolchain/bin/ is not part of $PATH, instead of passingAnd this is intentional, because you should never call binaries in host/opt/ext-toolchain/bin/.
package/freeswitch/freeswitch.mk ifeq ($(BR2_PACKAGE_XZ),y) · line 304
Quoted 11 lines
package/freeswitch/freeswitch.mk +11
-0+# GNU_TARGET_NAME we need to pass TOOLCHAIN_EXTERNAL_CROSS which stores +# the full path, needed to avoid build error with external toolchains, +# quote from compile log: +# [AR] libvpx_g.a +# make[3]: x86_64-buildroot-linux-musl-ar: Command not found +# or +# make[3]: sparc64-buildroot-linux-gnu-ar: Command not found +FREESWITCH_MAKE_ENV += CROSS=$(TOOLCHAIN_EXTERNAL_CROSS) +else +FREESWITCH_MAKE_ENV += CROSS=$(GNU_TARGET_NAME)- +endifHave you tried replacing this complicated stuff with just:
Quoted 6 lines
FREESWITCH_MAKE_ENV += CROSS=$(TARGET_CROSS)$(TARGET_CROSS) is already defined properly depending on internal/external.
Could you check if that works and submit an updated version?
Alternatively, can't we jsut revert that upstream patch you pinted to:
https://freeswitch.org/fisheye/changelog/freeswitch?cs=febe0f8dacea2d2a31902b3dc469be757f8c3c4d
to re-introduce support for an external libvpx?
At best, it would be nice if upstreamed offered the option to support an external one, with a ./configure option:
--with-libvpx={bunddled*,external,/path/to/libvpx/prefix}Hopefully, they are not stubborn, and will listen if we come up with good arguments... ;-)
Regards,
Yann E. MORIN.
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------'
PATCH v2 1/1 package/freeswitch: enable video support
Hi Yann, Thomas, all,
Am Fri, 10 Jun 2016 00:39:14 +0200 schrieb Yann E. MORIN:
Quoted 7 lines
Bernd, Thomas, All,
On 2016-06-10 00:35 +0200, Thomas Petazzoni spake thusly:
Quoted 4 lines
Have you tried replacing this complicated stuff with just:
FREESWITCH_MAKE_ENV += CROSS=$(TARGET_CROSS)
yes, it seems to work, thx. I will sent v3 in a few minutes.
Quoted 2 lines
Alternatively, can't we jsut revert that upstream patch you pinted to:
https://freeswitch.org/fisheye/changelog/freeswitch?cs=febe0f8dacea2d2a31902b3dc469be757f8c3c4d
I doubt that from upstream pov this will make sense.
Quoted 2 lines
Hopefully, they are not stubborn, and will listen if we come up with good arguments... ;-)
http://article.gmane.org/gmane.comp.telephony.freeswitch.user/83701
"Note we are in process of moving this library in tree static to not
use system libs along with vpx due to needs to have much newer versions changing at a much higher rate than system packages."
Regards, Bernd