Message ID | 1439317015-8031-11-git-send-email-bernd.kuhls@t-online.de |
---|---|
State | Superseded |
Headers | show |
Dear Bernd Kuhls, Thanks for this submission. A quite complicated software, it seems. You submitted Asterisk a while ago, and now Freeswitch. Did you give up on Asterisk packaging? Some comments below. On Tue, 11 Aug 2015 20:16:55 +0200, Bernd Kuhls wrote: > diff --git a/package/freeswitch/0001-cross_git.patch b/package/freeswitch/0001-cross_git.patch > new file mode 100644 > index 0000000..3ef1be7 > --- /dev/null > +++ b/package/freeswitch/0001-cross_git.patch > @@ -0,0 +1,11 @@ Missing description + SoB. > +--- freeswitch.git/configure.ac.orig 2015-02-24 18:15:49.000000000 +0100 > ++++ freeswitch.git/configure.ac 2015-02-24 19:17:15.857077515 +0100 > +@@ -379,7 +379,7 @@ > + elif test "x${ax_cv_c_compiler_vendor}" = "xgnu" ; then > + APR_ADDTO(SWITCH_AM_CFLAGS, -fPIC) > + APR_ADDTO(SWITCH_AM_CXXFLAGS, -fPIC) > +- if test "$ac_cv_gcc_supports_w_no_unused_result" = yes; then > ++ if test "$ac_cv_gcc_supports_w_no_unused_result" = xyes; then This looks wrong: there is no "x" in the left hand side of the test. Should this be: if test "$ac...." = "yes" ; then instead? > diff --git a/package/freeswitch/0002-jpeg.patch b/package/freeswitch/0002-jpeg.patch > new file mode 100644 > index 0000000..26094a0 > --- /dev/null > +++ b/package/freeswitch/0002-jpeg.patch > @@ -0,0 +1,24 @@ > +Fix jpeg detection > + > +Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de> > + > +diff -uNr freeswitch_video2-b8b6acf33efe64aebbd939dd7281d6b6cd8fc2f4.org/configure.ac freeswitch_video2-b8b6acf33efe64aebbd939dd7281d6b6cd8fc2f4/configure.ac > +--- freeswitch_video2-b8b6acf33efe64aebbd939dd7281d6b6cd8fc2f4.org/configure.ac 2015-05-23 05:18:56.000000000 +0200 > ++++ freeswitch_video2-b8b6acf33efe64aebbd939dd7281d6b6cd8fc2f4/configure.ac 2015-05-25 14:15:20.360156247 +0200 > +@@ -783,6 +783,8 @@ > + APR_ADDTO([PLATFORM_CORE_LIBS], [-lz]) > + fi > + > ++AC_CHECK_LIB(jpeg, jpeg_std_error,, AC_MSG_ERROR([no usable libjpeg; please install libjpeg devel package or equivalent])) > ++ > + PKG_CHECK_MODULES([YUV], [libyuv >= 0.0.1280], > + [AC_MSG_RESULT([yes]);AM_CONDITIONAL([HAVE_YUV],[true])], > + [AC_MSG_RESULT([no]);AM_CONDITIONAL([HAVE_YUV],[false])]) > +@@ -797,7 +799,6 @@ > + > + save_LIBS="$LIBS" > + LIBS= > +-AC_CHECK_LIB(jpeg, jpeg_std_error,, AC_MSG_ERROR([no usable libjpeg; please install libjpeg devel package or equivalent])) Why is this fixing exactly? > diff --git a/package/freeswitch/Config.in b/package/freeswitch/Config.in > new file mode 100644 > index 0000000..35aa5f9 > --- /dev/null > +++ b/package/freeswitch/Config.in > @@ -0,0 +1,58 @@ > +config BR2_PACKAGE_FREESWITCH > + bool "freeswitch" > + depends on BR2_INSTALL_LIBSTDCPP > + depends on BR2_TOOLCHAIN_HAS_THREADS > + depends on BR2_USE_MMU # apr, included in freeswitch source > + depends on BR2_USE_WCHAR # util-linux > + depends on !BR2_STATIC_LIBS # apr, included in freeswitch source No way of using an external apr library? There are some use_system_apr / use_system_aprutil variables in configure.ac that seem to indicate that it might be possible. > + depends on !BR2_aarch64 Why ? > + # Triggers the _gp link issue in nios2 > + depends on !BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_NIOSII201305 > + depends on !BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_NIOSII201405 > + select BR2_PACKAGE_LIBBROADVOICE > + select BR2_PACKAGE_LIBCODEC2 > + select BR2_PACKAGE_FFMPEG > + select BR2_PACKAGE_FFMPEG_AVRESAMPLE > + select BR2_PACKAGE_FFMPEG_SWSCALE > + select BR2_PACKAGE_FREETYPE > + select BR2_PACKAGE_IMAGEMAGICK > + select BR2_PACKAGE_LIBBROADVOICE > + select BR2_PACKAGE_LIBCURL > + select BR2_PACKAGE_LIBEDIT > + select BR2_PACKAGE_LIBG7221 > + select BR2_PACKAGE_LIBILBC > + select BR2_PACKAGE_LIBJPEG > + select BR2_PACKAGE_LIBLDNS > + select BR2_PACKAGE_LIBOPENH264 if BR2_PACKAGE_LIBOPENH264_ARCH_SUPPORTS So it's optional, so why make it mandatory on architectures that are part of BR2_PACKAGE_LIBOPENH264_ARCH_SUPPORTS ? > + select BR2_PACKAGE_LIBPNG > + select BR2_PACKAGE_LIBSILK > + select BR2_PACKAGE_LIBSNDFILE > + select BR2_PACKAGE_LIBSOUNDTOUCH > + select BR2_PACKAGE_LIBVPX > + select BR2_PACKAGE_LIBYAML > + select BR2_PACKAGE_LIBYUV > + select BR2_PACKAGE_LUA > + select BR2_PACKAGE_OPENCV > + select BR2_PACKAGE_OPENSSL > + select BR2_PACKAGE_OPUS > + select BR2_PACKAGE_PCRE > + select BR2_PACKAGE_PORTAUDIO > + select BR2_PACKAGE_SPEEX > + select BR2_PACKAGE_SQLITE > + select BR2_PACKAGE_UNIXODBC > + select BR2_PACKAGE_UTIL_LINUX > + select BR2_PACKAGE_UTIL_LINUX_LIBUUID > + select BR2_PACKAGE_ZLIB Are you sure all these dependencies are mandatory? For example ODBC support seems to be optional. Yaml seems to be optional as well, etc. > +FREESWITCH_VERSION = 7cf1238137d8876a1a34d28a54d60d328c44d895 > +FREESWITCH_SITE = https://freeswitch.org/stash/scm/fs/freeswitch.git > +FREESWITCH_SITE_METHOD = git > +FREESWITCH_LICENSE = MPL v1.1 > +FREESWITCH_LICENSE_FILES = COPYING The license file is docs/COPYING. > +FREESWITCH_DEPENDENCIES = \ > + $(if $(BR2_PACKAGE_ALSA_LIB),alsa-lib) \ > + ffmpeg \ > + freetype \ > + host-pkgconf \ > + imagemagick \ > + libbroadvoice \ > + libcodec2 \ > + libcurl \ > + libedit \ > + libg7221 \ > + libilbc \ > + libjpeg \ > + libldns \ > + libopenh264 \ > + libpng \ > + libsilk \ > + libsndfile \ > + libsoundtouch \ > + libvpx \ > + libyaml \ > + libyuv \ > + lua \ > + $(if $(BR2_PACKAGE_MYSQL),mysql) \ > + opencv \ > + openssl \ > + opus \ > + pcre \ > + portaudio \ > + speex \ > + sqlite \ > + unixodbc \ > + util-linux \ > + zlib Please try to make more of these optional. > + > +ifeq ($(BR2_PACKAGE_PYTHON),y) > +FREESWITCH_DEPENDENCIES += python > +else > +FREESWITCH_CONF_OPTS += --without-python > +endif Pass --with-python when python is enabled. > +define FREESWITCH_BOOTSTRAP > + cd $(@D) && $(TARGET_MAKE_ENV) ./bootstrap.sh > +endef > +FREESWITCH_POST_PATCH_HOOKS += FREESWITCH_BOOTSTRAP If you don't use AUTORECONF = YES, then you need to manually add host-autoconf, host-automake and host-libtool in the package dependencies. > + > +# Deactivate a module. Has no effect if it does not exits. > +define freeswitch-module-deactivate # module-name > + $(SED) '/$1/s/^/#/' $(@D)/modules.conf > +endef This macro is not used anywhere. > + > +# Activate a module. Has no effect if it does not exits. > +define freeswitch-module-activate # module-name > + $(SED) '/$1/s/^#//' $(@D)/modules.conf > +endef Why not using something like the KCONFIG_ENABLE_OPT mechanism, so that it can be used both for modules listed in modules.conf as comment, and modules not listed (such as mod_openh264). > +define FREESWITCH_ENABLE_MODULES > + $(call freeswitch-module-activate,mod_av) > + $(call freeswitch-module-activate,mod_avmd) > + $(call freeswitch-module-activate,mod_blacklist) > + $(call freeswitch-module-activate,mod_bv) > + $(call freeswitch-module-activate,mod_callcenter) > + $(call freeswitch-module-activate,mod_cidlookup) > + $(call freeswitch-module-activate,mod_codec2) > + $(call freeswitch-module-activate,mod_curl) > + $(call freeswitch-module-activate,mod_directory) > + $(call freeswitch-module-activate,mod_easyroute) > + $(call freeswitch-module-activate,mod_esl) > + $(call freeswitch-module-activate,mod_fsk) > + $(call freeswitch-module-activate,mod_ilbc) > + $(call freeswitch-module-activate,mod_imagick) > + $(call freeswitch-module-activate,mod_isac) > + $(call freeswitch-module-activate,mod_lcr) > + $(call freeswitch-module-activate,mod_portaudio) > + $(call freeswitch-module-activate,mod_rtc) > + $(call freeswitch-module-activate,mod_say_de) > + $(call freeswitch-module-activate,mod_silk) > + $(call freeswitch-module-activate,mod_snom) > + $(call freeswitch-module-activate,mod_soundtouch) > + $(call freeswitch-module-activate,mod_spy) > + $(call freeswitch-module-activate,mod_stress) > + $(call freeswitch-module-activate,mod_verto) > + $(call freeswitch-module-activate,mod_vpx) > + echo "codecs/mod_openh264" >> $(@D)/modules.conf > +endef > +FREESWITCH_PRE_CONFIGURE_HOOKS += FREESWITCH_ENABLE_MODULES Maybe: FREESWITCH_ENABLED_MODULES = \ av avmd blacklist bv .... vpx $(foreach mod,$(FREESWITCH_ENABLED_MODULES),\ $(call freeswitch-module-activate,mod_$(mod))$(sep)) > +FREESWITCH_CONF_OPTS += \ > + --without-erlang \ > + --enable-fhs \ > + --with-odbc=$(STAGING_DIR)/usr \ > + --enable-zrtp Please put the "mandatory" configuration options before the "optional" ones (the ones about Python). Thanks! Thomas
Hi Thomas, Thomas Petazzoni <thomas.petazzoni-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8 @public.gmane.org> wrote in news:20150829154103.62b721ce@free- electrons.com: > Dear Bernd Kuhls, > > Thanks for this submission. A quite complicated software, it seems. You > submitted Asterisk a while ago, and now Freeswitch. Did you give up on > Asterisk packaging? yes, because I could not find an easy-to-use zrtp solution for Asterisk while Freeswitch contains this out-of-the-box. Because you showed interest in Asterisk I kept that patches in patchwork, I will not continue to work on them. With freeswitch I am already conducting first runtime tests on my uClibc-based system with good results, audio only so far. >> +++ b/package/freeswitch/0001-cross_git.patch >> @@ -0,0 +1,11 @@ > > Missing description + SoB. Will be added in v2, thanks. >> +--- freeswitch.git/configure.ac.orig 2015-02-24 18:15:49.000000000 +0100 >> ++++ freeswitch.git/configure.ac 2015-02-24 19:17:15.857077515 +0100 >> +@@ -379,7 +379,7 @@ >> + elif test "x${ax_cv_c_compiler_vendor}" = "xgnu" ; then >> + APR_ADDTO(SWITCH_AM_CFLAGS, -fPIC) >> + APR_ADDTO(SWITCH_AM_CXXFLAGS, -fPIC) >> +- if test "$ac_cv_gcc_supports_w_no_unused_result" = yes; then >> ++ if test "$ac_cv_gcc_supports_w_no_unused_result" = xyes; then > > This looks wrong: there is no "x" in the left hand side of the test. > Should this be: > > if test "$ac...." = "yes" ; then > > instead? No, this is a bad hack because the test is positive, but following the if- clause breaks compilation so I broke the comparison ;) >> ++AC_CHECK_LIB(jpeg, jpeg_std_error,, AC_MSG_ERROR([no usable libjpeg; please install libjpeg devel package or equivalent])) >> ++ >> + PKG_CHECK_MODULES([YUV], [libyuv >= 0.0.1280], >> + [AC_MSG_RESULT([yes]);AM_CONDITIONAL([HAVE_YUV],[true])], >> + [AC_MSG_RESULT([no]);AM_CONDITIONAL([HAVE_YUV],[false])]) >> +@@ -797,7 +799,6 @@ >> + >> + save_LIBS="$LIBS" >> + LIBS= >> +-AC_CHECK_LIB(jpeg, jpeg_std_error,, AC_MSG_ERROR([no usable libjpeg; please install libjpeg devel package or equivalent])) > > Why is this fixing exactly? libyuv has an optional jpeg dependency, freeswitch configure misses -ljpeg when searching for libyuv and therefore assumes libyuv is missing. When freeswitch first searches for libjpeg, -ljpeg will be added to PKG_CHECK_MODULES([YUV]. I have to send this patch upstream. >> + depends on !BR2_STATIC_LIBS # apr, included in freeswitch source > > No way of using an external apr library? There are some > use_system_apr / use_system_aprutil variables in configure.ac that seem > to indicate that it might be possible. Not with my skills, sorry ;) Freeswitch contains local patches for apr to add function "apr_pool_mutex_set" and aprutil to add function "apr_queue_pop_timeout", I failed to port these patches to current libapr/libaprutil packages. >> + depends on !BR2_aarch64 > > Why ? I don´t remember, have to check. I created the base of this packages over six months ago..., but I am sure there was a reason ;) >> + select BR2_PACKAGE_LIBOPENH264 if BR2_PACKAGE_LIBOPENH264 _ARCH_SUPPORTS > > So it's optional, so why make it mandatory on architectures that are > part of BR2_PACKAGE_LIBOPENH264_ARCH_SUPPORTS ? > [...] >> + select BR2_PACKAGE_ZLIB > > Are you sure all these dependencies are mandatory? For example ODBC > support seems to be optional. Yaml seems to be optional as well, etc. I am aware that most packages are optional dependencies, I was too lazy to implement Kconfig module selections at this stage because my focus is on getting as many packages compiled as possible to spot problems. I even have a local patch to get vlc (and therefore freeswitch´s mod_vlc) compiled with uclibc, still have to release it ;) I know uClibc-ng will be the new default in 2015.08 but atm I have to focus on uClibc until the fli4l projects incorporates a newer buildroot version. >> +FREESWITCH_LICENSE_FILES = COPYING > > The license file is docs/COPYING. Will be added in v2, thanks. >> +FREESWITCH_DEPENDENCIES = \ [...] > > Please try to make more of these optional. Ok, but some freeswitch modules depend on each other and each of them can bring in their own external dependencies. It will take some time to sort things out. >> +ifeq ($(BR2_PACKAGE_PYTHON),y) >> +FREESWITCH_DEPENDENCIES += python >> +else >> +FREESWITCH_CONF_OPTS += --without-python >> +endif > > Pass --with-python when python is enabled. Will be added in v2, thanks. >> +define FREESWITCH_BOOTSTRAP >> + cd $(@D) && $(TARGET_MAKE_ENV) ./bootstrap.sh >> +endef >> +FREESWITCH_POST_PATCH_HOOKS += FREESWITCH_BOOTSTRAP > > If you don't use AUTORECONF = YES, then you need to manually add > host-autoconf, host-automake and host-libtool in the package > dependencies. Will be added in v2, thanks. >> +# Deactivate a module. Has no effect if it does not exits. >> +define freeswitch-module-deactivate # module-name >> + $(SED) '/$1/s/^/#/' $(@D)/modules.conf >> +endef > > This macro is not used anywhere. I kept it for the case when I need to deactivate a module enabled in the default configuration. >> + >> +# Activate a module. Has no effect if it does not exits. >> +define freeswitch-module-activate # module-name >> + $(SED) '/$1/s/^#//' $(@D)/modules.conf >> +endef > > Why not using something like the KCONFIG_ENABLE_OPT mechanism, so that > it can be used both for modules listed in modules.conf as comment, and > modules not listed (such as mod_openh264). I will have a look. >> +define FREESWITCH_ENABLE_MODULES [...] > > Maybe: > > FREESWITCH_ENABLED_MODULES = \ > av avmd blacklist bv .... vpx > > $(foreach mod,$(FREESWITCH_ENABLED_MODULES),\ > $(call freeswitch-module-activate,mod_$(mod))$(sep)) LGTM. >> +FREESWITCH_CONF_OPTS += \ >> + --without-erlang \ >> + --enable-fhs \ >> + --with-odbc=$(STAGING_DIR)/usr \ >> + --enable-zrtp > > Please put the "mandatory" configuration options before the "optional" > ones (the ones about Python). Will be added in v2, thanks. Regards, Bernd
diff --git a/package/Config.in b/package/Config.in index 627c5b1..ac10e84 100644 --- a/package/Config.in +++ b/package/Config.in @@ -1223,6 +1223,7 @@ endif source "package/fmc/Config.in" source "package/foomatic-filters/Config.in" source "package/fping/Config.in" + source "package/freeswitch/Config.in" source "package/gesftpserver/Config.in" source "package/gutenprint/Config.in" source "package/hans/Config.in" diff --git a/package/freeswitch/0001-cross_git.patch b/package/freeswitch/0001-cross_git.patch new file mode 100644 index 0000000..3ef1be7 --- /dev/null +++ b/package/freeswitch/0001-cross_git.patch @@ -0,0 +1,11 @@ +--- freeswitch.git/configure.ac.orig 2015-02-24 18:15:49.000000000 +0100 ++++ freeswitch.git/configure.ac 2015-02-24 19:17:15.857077515 +0100 +@@ -379,7 +379,7 @@ + elif test "x${ax_cv_c_compiler_vendor}" = "xgnu" ; then + APR_ADDTO(SWITCH_AM_CFLAGS, -fPIC) + APR_ADDTO(SWITCH_AM_CXXFLAGS, -fPIC) +- if test "$ac_cv_gcc_supports_w_no_unused_result" = yes; then ++ if test "$ac_cv_gcc_supports_w_no_unused_result" = xyes; then + APR_ADDTO(SWITCH_AM_CFLAGS, -Werror) + fi + if test "${enable_64}" = "yes"; then diff --git a/package/freeswitch/0002-jpeg.patch b/package/freeswitch/0002-jpeg.patch new file mode 100644 index 0000000..26094a0 --- /dev/null +++ b/package/freeswitch/0002-jpeg.patch @@ -0,0 +1,24 @@ +Fix jpeg detection + +Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de> + +diff -uNr freeswitch_video2-b8b6acf33efe64aebbd939dd7281d6b6cd8fc2f4.org/configure.ac freeswitch_video2-b8b6acf33efe64aebbd939dd7281d6b6cd8fc2f4/configure.ac +--- freeswitch_video2-b8b6acf33efe64aebbd939dd7281d6b6cd8fc2f4.org/configure.ac 2015-05-23 05:18:56.000000000 +0200 ++++ freeswitch_video2-b8b6acf33efe64aebbd939dd7281d6b6cd8fc2f4/configure.ac 2015-05-25 14:15:20.360156247 +0200 +@@ -783,6 +783,8 @@ + APR_ADDTO([PLATFORM_CORE_LIBS], [-lz]) + fi + ++AC_CHECK_LIB(jpeg, jpeg_std_error,, AC_MSG_ERROR([no usable libjpeg; please install libjpeg devel package or equivalent])) ++ + PKG_CHECK_MODULES([YUV], [libyuv >= 0.0.1280], + [AC_MSG_RESULT([yes]);AM_CONDITIONAL([HAVE_YUV],[true])], + [AC_MSG_RESULT([no]);AM_CONDITIONAL([HAVE_YUV],[false])]) +@@ -797,7 +799,6 @@ + + save_LIBS="$LIBS" + LIBS= +-AC_CHECK_LIB(jpeg, jpeg_std_error,, AC_MSG_ERROR([no usable libjpeg; please install libjpeg devel package or equivalent])) + + AC_CHECK_LIB(jbig, jbg_enc_out, have_libjbig=yes, have_libjbig=no) + if test "x$have_libjbig" = "xyes" ; then diff --git a/package/freeswitch/Config.in b/package/freeswitch/Config.in new file mode 100644 index 0000000..35aa5f9 --- /dev/null +++ b/package/freeswitch/Config.in @@ -0,0 +1,58 @@ +config BR2_PACKAGE_FREESWITCH + bool "freeswitch" + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_USE_MMU # apr, included in freeswitch source + depends on BR2_USE_WCHAR # util-linux + depends on !BR2_STATIC_LIBS # apr, included in freeswitch source + depends on !BR2_aarch64 + # Triggers the _gp link issue in nios2 + depends on !BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_NIOSII201305 + depends on !BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_NIOSII201405 + select BR2_PACKAGE_LIBBROADVOICE + select BR2_PACKAGE_LIBCODEC2 + select BR2_PACKAGE_FFMPEG + select BR2_PACKAGE_FFMPEG_AVRESAMPLE + select BR2_PACKAGE_FFMPEG_SWSCALE + select BR2_PACKAGE_FREETYPE + select BR2_PACKAGE_IMAGEMAGICK + select BR2_PACKAGE_LIBBROADVOICE + select BR2_PACKAGE_LIBCURL + select BR2_PACKAGE_LIBEDIT + select BR2_PACKAGE_LIBG7221 + select BR2_PACKAGE_LIBILBC + select BR2_PACKAGE_LIBJPEG + select BR2_PACKAGE_LIBLDNS + select BR2_PACKAGE_LIBOPENH264 if BR2_PACKAGE_LIBOPENH264_ARCH_SUPPORTS + select BR2_PACKAGE_LIBPNG + select BR2_PACKAGE_LIBSILK + select BR2_PACKAGE_LIBSNDFILE + select BR2_PACKAGE_LIBSOUNDTOUCH + select BR2_PACKAGE_LIBVPX + select BR2_PACKAGE_LIBYAML + select BR2_PACKAGE_LIBYUV + select BR2_PACKAGE_LUA + select BR2_PACKAGE_OPENCV + select BR2_PACKAGE_OPENSSL + select BR2_PACKAGE_OPUS + select BR2_PACKAGE_PCRE + select BR2_PACKAGE_PORTAUDIO + select BR2_PACKAGE_SPEEX + select BR2_PACKAGE_SQLITE + select BR2_PACKAGE_UNIXODBC + select BR2_PACKAGE_UTIL_LINUX + select BR2_PACKAGE_UTIL_LINUX_LIBUUID + select BR2_PACKAGE_ZLIB + help + FreeSWITCH is a scalable open source cross-platform telephony + platform designed to route and interconnect popular communication + protocols using audio, video, text or any other form of media. + + https://www.freeswitch.org + +comment "freeswitch needs a toolchain w/ C++, wchar, threads" + depends on BR2_USE_MMU + depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS || !BR2_USE_WCHAR + depends on !BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_NIOSII201305 + depends on !BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_NIOSII201405 + depends on !BR2_aarch64 diff --git a/package/freeswitch/freeswitch.mk b/package/freeswitch/freeswitch.mk new file mode 100644 index 0000000..cb6e881 --- /dev/null +++ b/package/freeswitch/freeswitch.mk @@ -0,0 +1,133 @@ +################################################################################ +# +# freeswitch +# +################################################################################ + +FREESWITCH_VERSION = 7cf1238137d8876a1a34d28a54d60d328c44d895 +FREESWITCH_SITE = https://freeswitch.org/stash/scm/fs/freeswitch.git +FREESWITCH_SITE_METHOD = git +FREESWITCH_LICENSE = MPL v1.1 +FREESWITCH_LICENSE_FILES = COPYING + +FREESWITCH_DEPENDENCIES = \ + $(if $(BR2_PACKAGE_ALSA_LIB),alsa-lib) \ + ffmpeg \ + freetype \ + host-pkgconf \ + imagemagick \ + libbroadvoice \ + libcodec2 \ + libcurl \ + libedit \ + libg7221 \ + libilbc \ + libjpeg \ + libldns \ + libopenh264 \ + libpng \ + libsilk \ + libsndfile \ + libsoundtouch \ + libvpx \ + libyaml \ + libyuv \ + lua \ + $(if $(BR2_PACKAGE_MYSQL),mysql) \ + opencv \ + openssl \ + opus \ + pcre \ + portaudio \ + speex \ + sqlite \ + unixodbc \ + util-linux \ + zlib + +ifeq ($(BR2_PACKAGE_PYTHON),y) +FREESWITCH_DEPENDENCIES += python +else +FREESWITCH_CONF_OPTS += --without-python +endif + +define FREESWITCH_BOOTSTRAP + cd $(@D) && $(TARGET_MAKE_ENV) ./bootstrap.sh +endef +FREESWITCH_POST_PATCH_HOOKS += FREESWITCH_BOOTSTRAP + +# Deactivate a module. Has no effect if it does not exits. +define freeswitch-module-deactivate # module-name + $(SED) '/$1/s/^/#/' $(@D)/modules.conf +endef + +# Activate a module. Has no effect if it does not exits. +define freeswitch-module-activate # module-name + $(SED) '/$1/s/^#//' $(@D)/modules.conf +endef + +define FREESWITCH_ENABLE_MODULES + $(call freeswitch-module-activate,mod_av) + $(call freeswitch-module-activate,mod_avmd) + $(call freeswitch-module-activate,mod_blacklist) + $(call freeswitch-module-activate,mod_bv) + $(call freeswitch-module-activate,mod_callcenter) + $(call freeswitch-module-activate,mod_cidlookup) + $(call freeswitch-module-activate,mod_codec2) + $(call freeswitch-module-activate,mod_curl) + $(call freeswitch-module-activate,mod_directory) + $(call freeswitch-module-activate,mod_easyroute) + $(call freeswitch-module-activate,mod_esl) + $(call freeswitch-module-activate,mod_fsk) + $(call freeswitch-module-activate,mod_ilbc) + $(call freeswitch-module-activate,mod_imagick) + $(call freeswitch-module-activate,mod_isac) + $(call freeswitch-module-activate,mod_lcr) + $(call freeswitch-module-activate,mod_portaudio) + $(call freeswitch-module-activate,mod_rtc) + $(call freeswitch-module-activate,mod_say_de) + $(call freeswitch-module-activate,mod_silk) + $(call freeswitch-module-activate,mod_snom) + $(call freeswitch-module-activate,mod_soundtouch) + $(call freeswitch-module-activate,mod_spy) + $(call freeswitch-module-activate,mod_stress) + $(call freeswitch-module-activate,mod_verto) + $(call freeswitch-module-activate,mod_vpx) + echo "codecs/mod_openh264" >> $(@D)/modules.conf +endef +FREESWITCH_PRE_CONFIGURE_HOOKS += FREESWITCH_ENABLE_MODULES + +FREESWITCH_CONF_OPTS += \ + --without-erlang \ + --enable-fhs \ + --with-odbc=$(STAGING_DIR)/usr \ + --enable-zrtp + +# we neither need host-perl nor host-php +FREESWITCH_CONF_ENV += \ + ac_cv_prog_PERL=false \ + ac_cv_have_perl=no \ + ac_cv_prog_PHP=false \ + ac_cv_have_php=no \ + ac_cv_prog_PHP_CONFIG=false \ + ac_cv_have_php_config=no + +# copied from configure.ac, line 233+ +FREESWITCH_CONF_ENV += \ + ac_cv_file__dev_ptmx=yes \ + ac_cv_va_copy=yes \ + ac_cv_file__dev_urandom=yes \ + ac_cv_func_realloc_0_nonnull=yes \ + ac_cv_func_malloc_0_nonnull=yes \ + ac_cv_func_setpgrp_void=yes \ + ac_cv_file__dev_zero=yes \ + apr_cv_tcp_nodelay_with_cork=yes \ + ac_cv_file_dbd_apr_dbd_mysql_c=no \ + ac_cv_sizeof_ssize_t=4 \ + apr_cv_mutex_recursive=yes \ + ac_cv_func_pthread_rwlock_init=yes \ + apr_cv_type_rwlock_t=yes \ + apr_cv_process_shared_works=yes \ + apr_cv_mutex_robust_shared=yes + +$(eval $(autotools-package))
Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de> --- package/Config.in | 1 + package/freeswitch/0001-cross_git.patch | 11 +++ package/freeswitch/0002-jpeg.patch | 24 ++++++ package/freeswitch/Config.in | 58 ++++++++++++++ package/freeswitch/freeswitch.mk | 133 ++++++++++++++++++++++++++++++++ 5 files changed, 227 insertions(+) create mode 100644 package/freeswitch/0001-cross_git.patch create mode 100644 package/freeswitch/0002-jpeg.patch create mode 100644 package/freeswitch/Config.in create mode 100644 package/freeswitch/freeswitch.mk