From patchwork Sun Apr 17 15:24:23 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bernd Kuhls X-Patchwork-Id: 611455 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ozlabs.org (Postfix) with ESMTP id 3qnw8p4smGz9t3g for ; Mon, 18 Apr 2016 01:26:02 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id DD6FE91B3B; Sun, 17 Apr 2016 15:26:01 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id xTs4C7AraX7k; Sun, 17 Apr 2016 15:25:55 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id D237991220; Sun, 17 Apr 2016 15:25:25 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id C93741C1F52 for ; Sun, 17 Apr 2016 15:25:01 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id C37F28C5FD for ; Sun, 17 Apr 2016 15:25:01 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 6mtgQIlommlG for ; Sun, 17 Apr 2016 15:24:58 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mailout11.t-online.de (mailout11.t-online.de [194.25.134.85]) by whitealder.osuosl.org (Postfix) with ESMTPS id 5CDEB88ADA for ; Sun, 17 Apr 2016 15:24:58 +0000 (UTC) Received: from fwd15.aul.t-online.de (fwd15.aul.t-online.de [172.20.27.63]) by mailout11.t-online.de (Postfix) with SMTP id 3284F2D9FBB for ; Sun, 17 Apr 2016 17:24:56 +0200 (CEST) Received: from fli4l.lan.fli4l (GcAhjUZSrhHoXybxsglNzNFuazbJjvGFkfTrD-Bgzn+IlcY7O3iwMu-vmvWCue9wEo@[84.191.213.191]) by fwd15.t-online.de with (TLSv1:ECDHE-RSA-AES256-SHA encrypted) esmtp id 1aroZA-0xS8bQ0; Sun, 17 Apr 2016 17:24:52 +0200 Received: from mahler.lan.fli4l ([192.168.1.1]:42030 helo=kuhls.lan.fli4l) by fli4l.lan.fli4l with esmtp (Exim 4.87) (envelope-from ) id 1aroZ9-0000vq-B4; Sun, 17 Apr 2016 17:24:51 +0200 From: Bernd Kuhls To: buildroot@buildroot.org Date: Sun, 17 Apr 2016 17:24:23 +0200 Message-Id: <1460906689-29900-2-git-send-email-bernd.kuhls@t-online.de> X-Mailer: git-send-email 2.8.0.rc3 In-Reply-To: <1460906689-29900-1-git-send-email-bernd.kuhls@t-online.de> References: <1460906689-29900-1-git-send-email-bernd.kuhls@t-online.de> X-ID: GcAhjUZSrhHoXybxsglNzNFuazbJjvGFkfTrD-Bgzn+IlcY7O3iwMu-vmvWCue9wEo X-TOI-MSGID: 85efc11f-ada4-4d9d-a080-57eef6b50fcb Cc: Bernd Kuhls Subject: [Buildroot] [PATCH v15 01/27] package/freeswitch: new package X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" This commit adds freeswitch without any configured modules and with a minimal set of non-optional dependencies. All other dependencies and modules will be added by further patches in this series. PLease note that freeswitch source repo bundles some libraries which are also available as buildroot packages. The freeswitch build system does not allow to use system libraries in these cases: apr, apr-util, libsrtp, libvpx, libyuv, sofia-sip, tiff The reason are patches to these packages by the freeswitch project which are not yet upstream. There is an open JIRA report for this situation: https://freeswitch.org/jira/si/jira.issueviews:issue-html/FS-353/FS-353.html More historic infos can be found here: http://article.gmane.org/gmane.comp.telephony.freeswitch.devel/2715 https://freeswitch.org/the-missing-link/ In the 1.6.7 version bump libvpx & libyuv were also moved in-tree: https://freeswitch.org/stash/projects/FS/repos/freeswitch/commits/febe0f8dacea2d2a31902b3dc469be757f8c3c4d https://freeswitch.org/stash/projects/FS/repos/freeswitch/commits/44da905b4f6b3b35e94b4948fb70dec7b5071ded Signed-off-by: Bernd Kuhls --- package/Config.in | 1 + package/freeswitch/0001-zrtp.patch | 33 +++++++++++++ package/freeswitch/Config.in | 27 +++++++++++ package/freeswitch/freeswitch.hash | 2 + package/freeswitch/freeswitch.mk | 97 ++++++++++++++++++++++++++++++++++++++ 5 files changed, 160 insertions(+) create mode 100644 package/freeswitch/0001-zrtp.patch create mode 100644 package/freeswitch/Config.in create mode 100644 package/freeswitch/freeswitch.hash create mode 100644 package/freeswitch/freeswitch.mk diff --git a/package/Config.in b/package/Config.in index bcfe13b..3ed5d1d 100644 --- a/package/Config.in +++ b/package/Config.in @@ -1381,6 +1381,7 @@ endif source "package/fcgiwrap/Config.in" source "package/fmc/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-zrtp.patch b/package/freeswitch/0001-zrtp.patch new file mode 100644 index 0000000..c1cdeed --- /dev/null +++ b/package/freeswitch/0001-zrtp.patch @@ -0,0 +1,33 @@ +Fix PowerPC detection (needs __linux__) and add aarch64 support. + +Patch sent upstream: https://freeswitch.org/jira/browse/FS-8746 + +Signed-off-by: Bernd Kuhls + +diff -uNr freeswitch-1.6.6.org/libs/libzrtp/include/zrtp_config.h freeswitch-1.6.6/libs/libzrtp/include/zrtp_config.h +--- freeswitch-1.6.6.org/libs/libzrtp/include/zrtp_config.h 2016-01-12 17:32:36.000000000 +0100 ++++ freeswitch-1.6.6/libs/libzrtp/include/zrtp_config.h 2016-01-16 14:09:17.830860603 +0100 +@@ -21,7 +21,7 @@ + # define ZRTP_PLATFORM ZP_ANDROID + # elif defined(__FreeBSD__) + # define ZRTP_PLATFORM ZP_BSD +-# elif defined(linux) || defined(__linux) ++# elif defined(linux) || defined(__linux__) + # include + # define ZRTP_PLATFORM ZP_LINUX + # elif defined(__MACOSX__) || defined (__APPLE__) || defined (__MACH__) +@@ -88,7 +88,13 @@ + */ + #define ZRTP_BYTE_ORDER ZBO_BIG_ENDIAN + +-#elif defined(ARM) || defined(_ARM_) || defined(ARMV4) || defined(__arm__) ++#elif defined(__AARCH64EB__) ++/* ++ * aarch64, big endian ++ */ ++#define ZRTP_BYTE_ORDER ZBO_BIG_ENDIAN ++ ++#elif defined(ARM) || defined(_ARM_) || defined(ARMV4) || defined(__arm__) || defined(__AARCH64EL__) + /* + * ARM, default to little endian + */ diff --git a/package/freeswitch/Config.in b/package/freeswitch/Config.in new file mode 100644 index 0000000..3824a09 --- /dev/null +++ b/package/freeswitch/Config.in @@ -0,0 +1,27 @@ +config BR2_PACKAGE_FREESWITCH + bool "freeswitch" + depends on BR2_INSTALL_LIBSTDCPP + depends on !BR2_STATIC_LIBS # apr, included in freeswitch source + 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_LIBCURL + select BR2_PACKAGE_JPEG + select BR2_PACKAGE_OPENSSL + select BR2_PACKAGE_PCRE + select BR2_PACKAGE_SPEEX + select BR2_PACKAGE_SQLITE + 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++, dynamic library, threads, wchar" + depends on BR2_USE_MMU + depends on !BR2_INSTALL_LIBSTDCPP || BR2_STATIC_LIBS \ + || !BR2_TOOLCHAIN_HAS_THREADS || !BR2_USE_WCHAR diff --git a/package/freeswitch/freeswitch.hash b/package/freeswitch/freeswitch.hash new file mode 100644 index 0000000..31915cd --- /dev/null +++ b/package/freeswitch/freeswitch.hash @@ -0,0 +1,2 @@ +# From http://files.freeswitch.org/freeswitch-releases/freeswitch-1.6.7.tar.xz.sha256 +sha256 9c7ca2d39985fdc39659054179465540e926880f032f855c0df74d6eec41a794 freeswitch-1.6.7.tar.xz diff --git a/package/freeswitch/freeswitch.mk b/package/freeswitch/freeswitch.mk new file mode 100644 index 0000000..4b9e956 --- /dev/null +++ b/package/freeswitch/freeswitch.mk @@ -0,0 +1,97 @@ +################################################################################ +# +# freeswitch +# +################################################################################ + +FREESWITCH_VERSION = 1.6.7 +FREESWITCH_SOURCE = freeswitch-$(FREESWITCH_VERSION).tar.xz +FREESWITCH_SITE = http://files.freeswitch.org/freeswitch-releases +FREESWITCH_LICENSE = MPLv1.1, \ + GPLv3+ with font exception (fonts), \ + Apache-2.0 (apr, apr-util) \ + LGPLv2+ (sofia-sip), \ + LGPLv2.1, GPLv2 (spandsp), \ + BSD-3c (libsrtp), \ + tiff license + +FREESWITCH_LICENSE_FILES = \ + COPYING \ + libs/apr/LICENSE \ + libs/apr-util/LICENSE \ + libs/sofia-sip/COPYING \ + libs/sofia-sip/COPYRIGHTS \ + libs/spandsp/COPYING \ + libs/srtp/LICENSE \ + libs/tiff-4.0.2/COPYRIGHT + +# required dependencies +FREESWITCH_DEPENDENCIES = \ + host-pkgconf \ + jpeg \ + libcurl \ + openssl \ + pcre \ + speex \ + sqlite \ + util-linux \ + zlib + +# freeswitch comes with pre-enabled modules, since we want to control +# the modules ourselves reset the upstream configuration +define FREESWITCH_RESET_MODULES + > $(@D)/modules.conf +endef +FREESWITCH_PRE_CONFIGURE_HOOKS += FREESWITCH_RESET_MODULES + +# 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 freeswitch/configure.ac, line 258+ +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 + +# build breaks with -Werror enabled +FREESWITCH_CONF_ENV += \ + ac_cv_gcc_supports_w_no_unused_result=no + +FREESWITCH_CONF_OPTS = \ + --disable-core-libedit-support \ + --disable-core-odbc-support \ + --disable-libvpx \ + --disable-libyuv \ + --without-erlang \ + --enable-fhs \ + --without-python \ + --disable-system-xmlrpc-c + +# zrtp supports a limited set of archs, sparc support is also broken due +# to a broken ld call by gcc, see libs/libzrtp/include/zrtp_config.h +ifeq ($(BR2_i386)$(BR2_arm)$(BR2_armeb)$(BR2_aarch64)$(BR2_aarch64_be)$(BR2_mips)$(BR2_mipsel)$(BR2_mips64)$(BR2_mips64el)$(BR2_powerpc)$(BR2_powerpc64)$(BR2_powerpcle)$(BR2_x86_64),y) +FREESWITCH_LICENSE_FILES += libs/libzrtp/src/zrtp_legal.c +FREESWITCH_CONF_OPTS += --enable-zrtp +else +FREESWITCH_CONF_OPTS += --disable-zrtp +endif + +$(eval $(autotools-package))