initial buildroot for linux 5.15
This commit is contained in:
@@ -0,0 +1,52 @@
|
||||
From 3e8a9e9a1c7eae515eb628778c3c8a04338b3bb3 Mon Sep 17 00:00:00 2001
|
||||
From: "Yann E. MORIN" <yann.morin.1998@free.fr>
|
||||
Date: Tue, 27 Dec 2016 11:21:09 +0100
|
||||
Subject: [PATCH] sounds: do not download and check sha1s
|
||||
|
||||
To validate the sound archives, the corresponding sha1s are also
|
||||
downloaded from the same location, and that download is done at install
|
||||
time.
|
||||
|
||||
However, that poses at least two problems:
|
||||
|
||||
- in Buildroot, we already have validated the downloads with the sha1s
|
||||
anyway, and trying to download anything at install time is not
|
||||
always possible (e.g. for off-line builds);
|
||||
|
||||
- since the download scheme is not secured (plain http), a
|
||||
man-in-the-middle for the sounds will also be able to MITM the
|
||||
download of the sha1s, so there is absolutely no additional safety
|
||||
in doing so.
|
||||
|
||||
So we just do without the sha1 download and checks.
|
||||
|
||||
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
|
||||
---
|
||||
sounds/Makefile | 10 ----------
|
||||
1 file changed, 10 deletions(-)
|
||||
|
||||
diff --git a/sounds/Makefile b/sounds/Makefile
|
||||
index 84d0f45..7a80d56 100644
|
||||
--- a/sounds/Makefile
|
||||
+++ b/sounds/Makefile
|
||||
@@ -100,17 +100,7 @@ ifneq ($(SOUNDS_CACHE_DIR),)
|
||||
if test ! -f "$$(SOUNDS_CACHE_DIR)/$$@"; then \
|
||||
(cd "$$(SOUNDS_CACHE_DIR)"; $$(DOWNLOAD) $$(SOUNDS_URL)/$$@); \
|
||||
fi; \
|
||||
- if test ! -f "$$(SOUNDS_CACHE_DIR)/$$@.sha1"; then \
|
||||
- (cd "$$(SOUNDS_CACHE_DIR)"; $$(DOWNLOAD) $$(SOUNDS_URL)/$$@.sha1); \
|
||||
- fi; \
|
||||
$$(LN) -sf "$$(SOUNDS_CACHE_DIR)/$$@" .; \
|
||||
- $$(LN) -sf "$$(SOUNDS_CACHE_DIR)/$$@.sha1" .; \
|
||||
- $$(SHA1SUM) -c --status $$@.sha1 || \
|
||||
- ( \
|
||||
- rm -f "$$(SOUNDS_CACHE_DIR)/$$@" "$$(SOUNDS_CACHE_DIR)/$$@.sha1" $$@ $$@.sha1; \
|
||||
- echo "Bad checksum: $$@" 1>&2; \
|
||||
- exit 1; \
|
||||
- ) || exit 1; \
|
||||
fi
|
||||
else
|
||||
$(CMD_PREFIX) \
|
||||
--
|
||||
2.7.4
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
From 8996503f6c55e55f326ab11c18278954ad7abaf3 Mon Sep 17 00:00:00 2001
|
||||
From: "Yann E. MORIN" <yann.morin.1998@free.fr>
|
||||
Date: Tue, 27 Dec 2016 11:21:57 +0100
|
||||
Subject: [PATCH] configure: fix detection of libcrypt
|
||||
|
||||
The crypt() function is searched in two locations: -lcrypt and the
|
||||
standard C library.
|
||||
|
||||
The result of the former is stored in the LIBCRYPT 'scheme' while that
|
||||
of the latter is stored in the 'SYSCRYPT' scheme.
|
||||
|
||||
However, the check for mandatory modules looks at the CRYPT 'scheme',
|
||||
and thus concludes that crypt is missing when it was successfully found.
|
||||
|
||||
Fix that by also storing the result of either check in the 'CRYPT'
|
||||
scheme.
|
||||
|
||||
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
|
||||
---
|
||||
configure | 2 ++
|
||||
configure.ac | 2 ++
|
||||
2 files changed, 4 insertions(+)
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 121dd93..d459ff5 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -2406,10 +2406,12 @@ AC_CHECK_FUNC([crypt], [SYSCRYPT=true], [SYSCRYPT=""])
|
||||
if test "x$LIBCRYPT_LIB" != "x" ; then
|
||||
CRYPT_LIB="$LIBCRYPT_LIB"
|
||||
CRYPT_INCLUDE="$LIBCRYPT_INCLUDE"
|
||||
+ PBX_CRYPT=1
|
||||
AC_DEFINE([HAVE_CRYPT], [1], [Define to 1 if you have the 'crypt' function.])
|
||||
elif test "x$SYSCRYPT" != "x" ; then
|
||||
CRYPT_LIB=""
|
||||
CRYPT_INCLUDE=""
|
||||
+ PBX_CRYPT=1
|
||||
AC_DEFINE([HAVE_CRYPT], [1], [Define to 1 if you have the 'crypt' function.])
|
||||
fi
|
||||
|
||||
--
|
||||
2.7.4
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
From 933b2554a40f932571bdbdbb5217cda3e35fd61f Mon Sep 17 00:00:00 2001
|
||||
From: "Yann E. MORIN" <yann.morin.1998@free.fr>
|
||||
Date: Mon, 27 Nov 2017 12:52:52 +0100
|
||||
Subject: [PATCH] build: ensure target directory for modules exists
|
||||
|
||||
Currently, in highly-parallel builds, it is possible that installing
|
||||
modules fails because the target directory does not exist yet.
|
||||
|
||||
We fix that by instructing $(INSTALL) to create the destination directory
|
||||
first.
|
||||
|
||||
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
|
||||
---
|
||||
Makefile.moddir_rules | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/Makefile.moddir_rules b/Makefile.moddir_rules
|
||||
index 59190bece9..b73153a9a5 100644
|
||||
--- a/Makefile.moddir_rules
|
||||
+++ b/Makefile.moddir_rules
|
||||
@@ -110,7 +110,7 @@ clean::
|
||||
|
||||
install:: all
|
||||
@echo "Installing modules from `basename $(CURDIR)`..."
|
||||
- @for x in $(LOADABLE_MODS:%=%.so); do $(INSTALL) -m 755 $$x "$(DESTDIR)$(ASTMODDIR)" ; done
|
||||
+ @for x in $(LOADABLE_MODS:%=%.so); do $(INSTALL) -D -m 755 $$x "$(DESTDIR)$(ASTMODDIR)" ; done
|
||||
ifneq ($(findstring :,$(XMLSTARLET)$(BASH)),:)
|
||||
@if [ -f .moduleinfo ] ; then \
|
||||
declare -A DISABLED_MODS ;\
|
||||
--
|
||||
2.11.0
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
From 05680ea9899c2246c23d11860c2c8e10aa8f80c7 Mon Sep 17 00:00:00 2001
|
||||
From: "Yann E. MORIN" <yann.morin.1998@free.fr>
|
||||
Date: Fri, 1 Dec 2017 11:08:16 +0100
|
||||
Subject: [PATCH] install: samples need the data files
|
||||
|
||||
When installing samples, "sample voicemail" is generated from the
|
||||
already-installed sound files.
|
||||
|
||||
However, when doing the install and the samples at the same time in a
|
||||
parallel install, it is possible that the sound files are not already
|
||||
installed at the time we try to generate the voicemail data.
|
||||
|
||||
Ensure the needed dependency.
|
||||
|
||||
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
|
||||
---
|
||||
Makefile | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/Makefile b/Makefile
|
||||
index f29c07f680..b58f707b61 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -779,7 +779,7 @@ adsi:
|
||||
$(INSTALL) -m 644 "$$x" "$(DESTDIR)$(ASTETCDIR)/`$(BASENAME) $$x`" ; \
|
||||
done
|
||||
|
||||
-samples: adsi
|
||||
+samples: adsi datafiles
|
||||
@echo Installing other config files...
|
||||
$(call INSTALL_CONFIGS,samples,.sample)
|
||||
$(INSTALL) -d "$(DESTDIR)$(ASTSPOOLDIR)/voicemail/default/1234/INBOX"
|
||||
--
|
||||
2.11.0
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
From 9b4070944578336506cd0a76de6f733c72d0ca74 Mon Sep 17 00:00:00 2001
|
||||
From: "Yann E. MORIN" <yann.morin.1998@free.fr>
|
||||
Date: Sat, 13 Oct 2018 11:11:15 +0200
|
||||
Subject: [PATCH] configure: fix detection of re-entrant resolver functions
|
||||
|
||||
Fixes https://issues.asterisk.org/jira/browse/ASTERISK-21795
|
||||
|
||||
uClibc does not provide res_nsearch:
|
||||
asterisk-16.0.0/main/dns.c:506: undefined reference to `res_nsearch'
|
||||
|
||||
Patch coded by Yann E. MORIN:
|
||||
http://lists.busybox.net/pipermail/buildroot/2018-October/232630.html
|
||||
|
||||
Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
|
||||
---
|
||||
configure.ac | 6 +++++-
|
||||
1 file changed, 5 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index dd0c8edd13..ee1ca9ceb6 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -1388,7 +1388,11 @@ AC_LINK_IFELSE(
|
||||
#include <arpa/nameser.h>
|
||||
#endif
|
||||
#include <resolv.h>],
|
||||
- [int foo = res_ninit(NULL);])],
|
||||
+ [
|
||||
+ int foo;
|
||||
+ foo = res_ninit(NULL);
|
||||
+ foo = res_nsearch(NULL, NULL, 0, 0, NULL, 0);
|
||||
+ ])],
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_DEFINE([HAVE_RES_NINIT], 1, [Define to 1 if your system has the re-entrant resolver functions.])
|
||||
AC_SEARCH_LIBS(res_9_ndestroy, resolv)
|
||||
--
|
||||
2.19.1
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
config BR2_PACKAGE_ASTERISK
|
||||
bool "asterisk"
|
||||
depends on BR2_INSTALL_LIBSTDCPP
|
||||
depends on !BR2_STATIC_LIBS # dlfcn.h
|
||||
depends on !BR2_TOOLCHAIN_USES_MUSL
|
||||
depends on BR2_USE_MMU # libedit
|
||||
depends on BR2_TOOLCHAIN_HAS_THREADS
|
||||
depends on BR2_USE_WCHAR # libedit
|
||||
select BR2_PACKAGE_JANSSON
|
||||
select BR2_PACKAGE_LIBCURL
|
||||
select BR2_PACKAGE_LIBEDIT
|
||||
select BR2_PACKAGE_LIBILBC
|
||||
select BR2_PACKAGE_LIBXML2
|
||||
select BR2_PACKAGE_SQLITE
|
||||
select BR2_PACKAGE_UTIL_LINUX
|
||||
select BR2_PACKAGE_UTIL_LINUX_LIBUUID
|
||||
help
|
||||
Asterisk is an open source framework for building
|
||||
communications applications. Asterisk turns an ordinary
|
||||
computer into a communications server. Asterisk powers IP PBX
|
||||
systems, VoIP gateways, conference servers and other custom
|
||||
solutions. It is used by small businesses, large businesses,
|
||||
call centers, carriers and government agencies, worldwide.
|
||||
Asterisk is free and open source.
|
||||
|
||||
http://www.asterisk.org/
|
||||
|
||||
comment "asterisk needs a glibc or uClibc toolchain w/ C++, dynamic library, threads, wchar"
|
||||
depends on BR2_USE_MMU
|
||||
depends on BR2_TOOLCHAIN_USES_MUSL || !BR2_INSTALL_LIBSTDCPP \
|
||||
|| BR2_STATIC_LIBS || !BR2_TOOLCHAIN_HAS_THREADS \
|
||||
|| !BR2_USE_WCHAR
|
||||
@@ -0,0 +1,15 @@
|
||||
# Locally computed
|
||||
sha256 1ba86666072b903e24b5cfef3d6d607d0d090c0fd232429ed410496e8f93ac40 asterisk-16.21.1.tar.gz
|
||||
|
||||
# sha1 from: http://downloads.asterisk.org/pub/telephony/sounds/releases
|
||||
# sha256 locally computed
|
||||
sha1 721c512feaea102700d5bdce952fdc0bb29dc640 asterisk-core-sounds-en-gsm-1.6.1.tar.gz
|
||||
sha256 d79c3d2044d41da8f363c447dfccc140be86b4fcc41b1ca5a60a80da52f24f2d asterisk-core-sounds-en-gsm-1.6.1.tar.gz
|
||||
sha1 f40fd6ea03dfe8d72ada2540b2288bfdc006381d asterisk-moh-opsound-wav-2.03.tar.gz
|
||||
sha256 449fb810d16502c3052fedf02f7e77b36206ac5a145f3dacf4177843a2fcb538 asterisk-moh-opsound-wav-2.03.tar.gz
|
||||
|
||||
# License files, locally computed
|
||||
sha256 82af40ed7f49c08685360811993d9396320842f021df828801d733e8fdc0312f COPYING
|
||||
sha256 ac5571f00e558e3b7c9b3f13f421b874cc12cf4250c4f70094c71544cf486312 main/sha1.c
|
||||
sha256 6215e3ed73c3982a5c6701127d681ec0b9f1121ac78a28805bd93f93c3eb84c0 codecs/speex/speex_resampler.h
|
||||
sha256 ea69cc96ab8a779c180a362377caeada71926897d1b55b980f04d74ba5aaa388 utils/db1-ast/include/db.h
|
||||
@@ -0,0 +1,343 @@
|
||||
################################################################################
|
||||
#
|
||||
# asterisk
|
||||
#
|
||||
################################################################################
|
||||
|
||||
ASTERISK_VERSION = 16.21.1
|
||||
# Use the github mirror: it's an official mirror maintained by Digium, and
|
||||
# provides tarballs, which the main Asterisk git tree (behind Gerrit) does not.
|
||||
ASTERISK_SITE = $(call github,asterisk,asterisk,$(ASTERISK_VERSION))
|
||||
|
||||
ASTERISK_SOUNDS_BASE_URL = http://downloads.asterisk.org/pub/telephony/sounds/releases
|
||||
ASTERISK_EXTRA_DOWNLOADS = \
|
||||
$(ASTERISK_SOUNDS_BASE_URL)/asterisk-core-sounds-en-gsm-1.6.1.tar.gz \
|
||||
$(ASTERISK_SOUNDS_BASE_URL)/asterisk-moh-opsound-wav-2.03.tar.gz
|
||||
|
||||
ASTERISK_LICENSE = GPL-2.0, BSD-3-Clause (SHA1, resample), BSD-4-Clause (db1-ast)
|
||||
ASTERISK_LICENSE_FILES = \
|
||||
COPYING \
|
||||
main/sha1.c \
|
||||
codecs/speex/speex_resampler.h \
|
||||
utils/db1-ast/include/db.h
|
||||
|
||||
ASTERISK_CPE_ID_VENDOR = asterisk
|
||||
ASTERISK_CPE_ID_PRODUCT = open_source
|
||||
ASTERISK_SELINUX_MODULES = asterisk
|
||||
|
||||
# For patches 0002, 0003 and 0005
|
||||
ASTERISK_AUTORECONF = YES
|
||||
ASTERISK_AUTORECONF_OPTS = -Iautoconf -Ithird-party -Ithird-party/pjproject -Ithird-party/jansson
|
||||
|
||||
ASTERISK_DEPENDENCIES = \
|
||||
host-asterisk \
|
||||
jansson \
|
||||
libcurl \
|
||||
libedit \
|
||||
libxml2 \
|
||||
sqlite \
|
||||
util-linux
|
||||
|
||||
# Asterisk wants to run its menuselect tool (a highly tweaked derivative of
|
||||
# kconfig), but builds it using the target tools. So we build it in the host
|
||||
# variant (see below), and copy the full build tree of menuselect.
|
||||
define ASTERISK_COPY_MENUSELECT
|
||||
rm -rf $(@D)/menuselect
|
||||
cp -a $(HOST_ASTERISK_DIR)/menuselect $(@D)/menuselect
|
||||
endef
|
||||
ASTERISK_PRE_CONFIGURE_HOOKS += ASTERISK_COPY_MENUSELECT
|
||||
|
||||
ASTERISK_CONF_OPTS = \
|
||||
--disable-xmldoc \
|
||||
--disable-internal-poll \
|
||||
--disable-asteriskssl \
|
||||
--disable-rpath \
|
||||
--without-bfd \
|
||||
--without-cap \
|
||||
--without-cpg \
|
||||
--without-curses \
|
||||
--without-gtk2 \
|
||||
--without-gmime \
|
||||
--without-hoard \
|
||||
--without-iconv \
|
||||
--without-iksemel \
|
||||
--without-imap \
|
||||
--without-inotify \
|
||||
--without-iodbc \
|
||||
--without-isdnnet \
|
||||
--without-jack \
|
||||
--without-uriparser \
|
||||
--without-kqueue \
|
||||
--without-libedit \
|
||||
--without-libxslt \
|
||||
--without-lua \
|
||||
--without-misdn \
|
||||
--without-mysqlclient \
|
||||
--without-nbs \
|
||||
--without-neon29 \
|
||||
--without-newt \
|
||||
--without-openr2 \
|
||||
--without-osptk \
|
||||
--without-oss \
|
||||
--without-postgres \
|
||||
--without-pjproject \
|
||||
--without-pjproject-bundled \
|
||||
--without-popt \
|
||||
--without-resample \
|
||||
--without-sdl \
|
||||
--without-SDL_image \
|
||||
--without-sqlite \
|
||||
--without-suppserv \
|
||||
--without-tds \
|
||||
--without-termcap \
|
||||
--without-timerfd \
|
||||
--without-tinfo \
|
||||
--without-unbound \
|
||||
--without-unixodbc \
|
||||
--without-vpb \
|
||||
--without-x11 \
|
||||
--with-crypt \
|
||||
--with-jansson \
|
||||
--with-libcurl \
|
||||
--with-ilbc \
|
||||
--with-libxml2 \
|
||||
--with-libedit="$(STAGING_DIR)/usr" \
|
||||
--with-sqlite3="$(STAGING_DIR)/usr" \
|
||||
--with-sounds-cache=$(ASTERISK_DL_DIR)
|
||||
|
||||
# avcodec are from ffmpeg. There is virtually zero chance this could
|
||||
# even work; asterisk is looking for ffmpeg/avcodec.h which has not
|
||||
# been installed in this location since early 2007 (~10 years ago at
|
||||
# the time of this writing).
|
||||
ASTERISK_CONF_OPTS += --without-avcodec
|
||||
|
||||
# asterisk is not compatible with freeswitch spandsp
|
||||
ASTERISK_CONF_OPTS += --without-spandsp
|
||||
|
||||
ASTERISK_CONF_ENV = \
|
||||
ac_cv_file_bridges_bridge_softmix_include_hrirs_h=true \
|
||||
ac_cv_path_CONFIG_LIBXML2=$(STAGING_DIR)/usr/bin/xml2-config
|
||||
|
||||
# Uses __atomic_fetch_add_4
|
||||
ifeq ($(BR2_TOOLCHAIN_HAS_LIBATOMIC),y)
|
||||
ASTERISK_CONF_ENV += LIBS="-latomic"
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_TOOLCHAIN_USES_GLIBC),y)
|
||||
ASTERISK_CONF_OPTS += --with-execinfo
|
||||
else
|
||||
ASTERISK_CONF_OPTS += --without-execinfo
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_LIBGSM),y)
|
||||
ASTERISK_DEPENDENCIES += libgsm
|
||||
ASTERISK_CONF_OPTS += --with-gsm
|
||||
else
|
||||
ASTERISK_CONF_OPTS += --without-gsm
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_ALSA_LIB),y)
|
||||
ASTERISK_DEPENDENCIES += alsa-lib
|
||||
ASTERISK_CONF_OPTS += --with-asound
|
||||
else
|
||||
ASTERISK_CONF_OPTS += --without-asound
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_BLUEZ5_UTILS),y)
|
||||
ASTERISK_DEPENDENCIES += bluez5_utils
|
||||
ASTERISK_CONF_OPTS += --with-bluetooth
|
||||
else
|
||||
ASTERISK_CONF_OPTS += --without-bluetooth
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_LIBICAL),y)
|
||||
ASTERISK_DEPENDENCIES += libical
|
||||
ASTERISK_CONF_OPTS += --with-ical
|
||||
else
|
||||
ASTERISK_CONF_OPTS += --without-ical
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_OPENLDAP),y)
|
||||
ASTERISK_DEPENDENCIES += openldap
|
||||
ASTERISK_CONF_OPTS += --with-ldap
|
||||
else
|
||||
ASTERISK_CONF_OPTS += --without-ldap
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_NEON),y)
|
||||
ASTERISK_DEPENDENCIES += neon
|
||||
ASTERISK_CONF_OPTS += --with-neon
|
||||
ASTERISK_CONF_ENV += \
|
||||
ac_cv_path_CONFIG_NEON=$(STAGING_DIR)/usr/bin/neon-config
|
||||
else
|
||||
ASTERISK_CONF_OPTS += --without-neon
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_NETSNMP),y)
|
||||
ASTERISK_DEPENDENCIES += netsnmp
|
||||
ASTERISK_CONF_OPTS += --with-netsnmp=$(STAGING_DIR)/usr
|
||||
else
|
||||
ASTERISK_CONF_OPTS += --without-netsnmp
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_LIBOGG),y)
|
||||
ASTERISK_DEPENDENCIES += libogg
|
||||
ASTERISK_CONF_OPTS += --with-ogg
|
||||
else
|
||||
ASTERISK_CONF_OPTS += --without-ogg
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_OPUS),y)
|
||||
ASTERISK_DEPENDENCIES += opus
|
||||
ASTERISK_CONF_OPTS += --with-opus
|
||||
else
|
||||
ASTERISK_CONF_OPTS += --without-opus
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_PORTAUDIO),y)
|
||||
ASTERISK_DEPENDENCIES += portaudio
|
||||
ASTERISK_CONF_OPTS += --with-portaudio
|
||||
else
|
||||
ASTERISK_CONF_OPTS += --without-portaudio
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_FREERADIUS_CLIENT),y)
|
||||
ASTERISK_DEPENDENCIES += freeradius-client
|
||||
ASTERISK_CONF_OPTS += --with-radius
|
||||
else
|
||||
ASTERISK_CONF_OPTS += --without-radius
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_DAHDI_LINUX)$(BR2_PACKAGE_DAHDI_TOOLS),yy)
|
||||
ASTERISK_DEPENDENCIES += dahdi-linux dahdi-tools
|
||||
ASTERISK_CONF_OPTS += --with-dahdi --with-tonezone
|
||||
|
||||
ifeq ($(BR2_PACKAGE_LIBPRI),y)
|
||||
ASTERISK_DEPENDENCIES += libpri
|
||||
ASTERISK_CONF_OPTS += --with-pri
|
||||
else
|
||||
ASTERISK_CONF_OPTS += --without-pri
|
||||
endif # PRI
|
||||
|
||||
ifeq ($(BR2_PACKAGE_LIBSS7),y)
|
||||
ASTERISK_DEPENDENCIES += libss7
|
||||
ASTERISK_CONF_OPTS += --with-ss7
|
||||
else
|
||||
ASTERISK_CONF_OPTS += --without-ss7
|
||||
endif # SS7
|
||||
|
||||
else
|
||||
ASTERISK_CONF_OPTS += \
|
||||
--without-dahdi --without-tonezone \
|
||||
--without-pri --without-ss7
|
||||
endif # DAHDI
|
||||
|
||||
ifeq ($(BR2_PACKAGE_OPENSSL),y)
|
||||
ASTERISK_DEPENDENCIES += openssl
|
||||
ASTERISK_CONF_OPTS += --with-ssl
|
||||
else
|
||||
ASTERISK_CONF_OPTS += --without-ssl
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_SPEEX)$(BR2_PACKAGE_SPEEXDSP),yy)
|
||||
ASTERISK_DEPENDENCIES += speex
|
||||
ASTERISK_CONF_OPTS += --with-speex --with-speexdsp
|
||||
else
|
||||
ASTERISK_CONF_OPTS += --without-speex --without-speexdsp
|
||||
endif
|
||||
|
||||
# asterisk needs an openssl-enabled libsrtp
|
||||
ifeq ($(BR2_PACKAGE_LIBSRTP)$(BR2_PACKAGE_OPENSSL)x$(BR2_STATIC_LIBS),yyx)
|
||||
ASTERISK_DEPENDENCIES += libsrtp
|
||||
ASTERISK_CONF_OPTS += --with-srtp
|
||||
else
|
||||
ASTERISK_CONF_OPTS += --without-srtp
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_LIBVORBIS),y)
|
||||
ASTERISK_DEPENDENCIES += libvorbis
|
||||
ASTERISK_CONF_OPTS += --with-vorbis
|
||||
else
|
||||
ASTERISK_CONF_OPTS += --without-vorbis
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_ZLIB),y)
|
||||
ASTERISK_DEPENDENCIES += zlib
|
||||
ASTERISK_CONF_OPTS += --with-z
|
||||
else
|
||||
ASTERISK_CONF_OPTS += --without-z
|
||||
endif
|
||||
|
||||
ASTERISK_DIRS = \
|
||||
ASTVARLIBDIR="/usr/lib/asterisk" \
|
||||
ASTDATADIR="/usr/lib/asterisk" \
|
||||
ASTKEYDIR="/usr/lib/asterisk" \
|
||||
ASTDBDIR="/usr/lib/asterisk"
|
||||
|
||||
ASTERISK_MAKE_OPTS = $(ASTERISK_DIRS)
|
||||
|
||||
# Uses __atomic_fetch_add_4
|
||||
ifeq ($(BR2_TOOLCHAIN_HAS_LIBATOMIC),y)
|
||||
ASTERISK_MAKE_OPTS += ASTLDFLAGS="-latomic"
|
||||
endif
|
||||
|
||||
# Remove default -O3 optimization flag
|
||||
ASTERISK_MAKE_OPTS += OPTIMIZE=""
|
||||
|
||||
ASTERISK_CFLAGS = $(TARGET_CFLAGS)
|
||||
|
||||
ifeq ($(BR2_TOOLCHAIN_HAS_GCC_BUG_93847),y)
|
||||
ASTERISK_CFLAGS += -O0
|
||||
endif
|
||||
|
||||
ASTERISK_CONF_OPTS += CFLAGS="$(ASTERISK_CFLAGS)"
|
||||
|
||||
# We want to install sample configuration files, too.
|
||||
ASTERISK_INSTALL_TARGET_OPTS = \
|
||||
$(ASTERISK_DIRS) \
|
||||
DESTDIR=$(TARGET_DIR) \
|
||||
LDCONFIG=true \
|
||||
install samples
|
||||
|
||||
$(eval $(autotools-package))
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
# This part deals with building the menuselect tool as a host package
|
||||
|
||||
HOST_ASTERISK_DEPENDENCIES = host-pkgconf host-libxml2 host-ncurses
|
||||
HOST_ASTERISK_SUBDIR = menuselect
|
||||
|
||||
HOST_ASTERISK_LICENSE = GPL-2.0
|
||||
HOST_ASTERISK_LICENSE_FILES = COPYING
|
||||
|
||||
# No need to autoreconf for the host variant,
|
||||
# so do not inherit the target setup.
|
||||
HOST_ASTERISK_AUTORECONF = NO
|
||||
|
||||
HOST_ASTERISK_CONF_ENV = CONFIG_LIBXML2=$(HOST_DIR)/bin/xml2-config
|
||||
|
||||
HOST_ASTERISK_CONF_OPTS = \
|
||||
--without-newt \
|
||||
--without-curses \
|
||||
--with-ncurses=$(HOST_DIR)
|
||||
|
||||
# Not an automake package, so does not inherit LDFLAGS et al. from
|
||||
# the configure run.
|
||||
HOST_ASTERISK_MAKE_ENV = $(HOST_CONFIGURE_OPTS)
|
||||
|
||||
# Even though menuselect is an autotools package, it is not an automake
|
||||
# package and does not have an 'install' rule, as asterisk does expect
|
||||
# it to be in a sub-directory of its source tree. We do so by copying
|
||||
# the full menuselect build tree as a pre-configure hook in the target
|
||||
# variant.
|
||||
# However, the sanity checks on host packages are not run on menuselect.
|
||||
# But we still want to catch that menuselect has the proper rpath set,
|
||||
# for example, as it uses host libraries that we do build, like
|
||||
# host-libxml2.
|
||||
# So we do manually install the menuselect tool.
|
||||
define HOST_ASTERISK_INSTALL_CMDS
|
||||
$(INSTALL) -D -m 0755 $(@D)/menuselect/menuselect \
|
||||
$(HOST_DIR)/bin/asterisk-menuselect
|
||||
endef
|
||||
|
||||
$(eval $(host-autotools-package))
|
||||
Reference in New Issue
Block a user