From 3822ad7e590ac34fc36119260be2006e155bebaa Mon Sep 17 00:00:00 2001 From: Sebastian Kemper Date: Sun, 21 May 2017 00:31:23 +0200 Subject: [PATCH] freeswitch-stable: Add options to include more libs - added symbols to Config.in to enable additional libs - libs are: freetype, libpng, libyuv (internal), libvpx (internal) - they're not enabled by default Signed-off-by: Sebastian Kemper --- net/freeswitch-stable/Config.in | 24 +++++++++++++++++++ net/freeswitch-stable/Makefile | 12 ++++++---- .../patches/140-libvpx-cross.patch | 11 +++++++++ 3 files changed, 42 insertions(+), 5 deletions(-) create mode 100644 net/freeswitch-stable/patches/140-libvpx-cross.patch diff --git a/net/freeswitch-stable/Config.in b/net/freeswitch-stable/Config.in index f12a62a..5e4f74c 100644 --- a/net/freeswitch-stable/Config.in +++ b/net/freeswitch-stable/Config.in @@ -9,6 +9,12 @@ config FS_STABLE_WITH_DEBUG want to get meaningful backtraces see https://wiki.openwrt.org/doc/devel/debugging for starting points. +config FS_STABLE_WITH_FREETYPE + bool "Compile with FreeType support" + default n + help + Add FreeType support to FreeSWITCH + config FS_STABLE_WITH_LIBEDIT bool "Compile with libedit support" default y @@ -18,6 +24,12 @@ config FS_STABLE_WITH_LIBEDIT with FreeSWITCH (without it it doesn't feel very interactive at all), but it adds additional dependencies (libedit, libncursesw, terminfo). +config FS_STABLE_WITH_LIBYUV + bool "Compile with libyuv support" + default n + help + Add libyuv support to FreeSWITCH + config FS_STABLE_WITH_ODBC bool "Compile with ODBC support" default n @@ -30,12 +42,24 @@ config FS_STABLE_WITH_PGSQL help Enable PostgreSQL support. +config FS_STABLE_WITH_PNG + bool "Compile with PNG support" + default n + help + Add PNG support to FreeSWITCH + config FS_STABLE_WITH_SRTP bool "Enable SRTP" default y help Compile with SRTP support. +config FS_STABLE_WITH_VPX + bool "Compile with VPx support" + default n + help + Compile with VPx video codec support + config FS_STABLE_WITH_ZRTP bool "Enable ZRTP" default n diff --git a/net/freeswitch-stable/Makefile b/net/freeswitch-stable/Makefile index 2fb12a9..3da3163 100644 --- a/net/freeswitch-stable/Makefile +++ b/net/freeswitch-stable/Makefile @@ -70,8 +70,10 @@ FS_STABLE_DEPS_BASE:= \ FS_STABLE_DEPS:= \ $(FS_STABLE_DEPS_BASE) \ + +FS_STABLE_WITH_FREETYPE:libfreetype \ +FS_STABLE_WITH_LIBEDIT:libedit \ +FS_STABLE_WITH_ODBC:unixodbc \ + +FS_STABLE_WITH_PNG:libpng \ +libcurl \ +libpcre \ +libpthread \ @@ -455,8 +457,6 @@ CONFIGURE_ARGS+= \ --srcdir=$(PKG_BUILD_DIR) \ --sysconfdir=/etc \ --disable-dependency-tracking \ - --disable-libvpx \ - --disable-libyuv \ --disable-static \ --disable-system-xmlrpc-c \ --enable-fhs \ @@ -475,17 +475,19 @@ CONFIGURE_ARGS+= \ --with-soundsdir=/usr/share/$(PRG_NAME)/sounds \ --with-storagedir=/tmp/$(PRG_NAME)/storage \ --without-erlang \ - --without-freetype \ - --without-png \ --without-python \ $(call autoconf_bool,CONFIG_FS_STABLE_WITH_LIBEDIT,core-libedit-support) \ $(call autoconf_bool,CONFIG_FS_STABLE_WITH_ODBC,core-odbc-support) \ $(call autoconf_bool,CONFIG_FS_STABLE_WITH_SRTP,srtp) \ $(call autoconf_bool,CONFIG_FS_STABLE_WITH_ZRTP,zrtp) \ $(if $(CONFIG_FS_STABLE_WITH_DEBUG),,--disable-debug) \ + $(if $(CONFIG_FS_STABLE_WITH_FREETYPE),,--without-freetype) \ + $(if $(CONFIG_FS_STABLE_WITH_LIBYUV),,--disable-libyuv) \ $(if $(CONFIG_FS_STABLE_WITH_ODBC),--with-odbc-lib="$(STAGING_DIR)/usr/lib") \ $(if $(CONFIG_FS_STABLE_WITH_ODBC),--with-odbc="$(STAGING_DIR)/usr") \ - $(if $(CONFIG_FS_STABLE_WITH_PGSQL),--enable-core-pgsql-support,--without-pgsql) + $(if $(CONFIG_FS_STABLE_WITH_PGSQL),--enable-core-pgsql-support,--without-pgsql) \ + $(if $(CONFIG_FS_STABLE_WITH_PNG),,--without-png) \ + $(if $(CONFIG_FS_STABLE_WITH_VPX),,--disable-libvpx) define Build/Prepare $(call Build/Prepare/Default) diff --git a/net/freeswitch-stable/patches/140-libvpx-cross.patch b/net/freeswitch-stable/patches/140-libvpx-cross.patch new file mode 100644 index 0000000..98694d2 --- /dev/null +++ b/net/freeswitch-stable/patches/140-libvpx-cross.patch @@ -0,0 +1,11 @@ +--- a/Makefile.am ++++ b/Makefile.am +@@ -550,7 +550,7 @@ libs/libzrtp/libzrtp.a: + 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="$(VISIBILITY_FLAG)" ++ 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="$(VISIBILITY_FLAG)" + + libs/libvpx/libvpx.a: libs/libvpx/Makefile + @cd libs/libvpx && $(MAKE)