asterisk-13.x: update to 13.8.0, fix several build issues
[feed/telephony.git] / net / asterisk-13.x / patches / 052-musl-libcap.patch
1 diff -rupN asterisk-13.8.0/configure.ac ast13/configure.ac
2 --- asterisk-13.8.0/configure.ac 2016-04-04 14:41:26.398129246 +0200
3 +++ ast13/configure.ac 2016-04-04 14:40:48.421815607 +0200
4 @@ -181,6 +181,9 @@ case "${host_os}" in
5 linux-gnueabi* | linux-gnuspe)
6 OSARCH=linux-gnu
7 ;;
8 + linux-musl*)
9 + OSARCH=linux-musl
10 + ;;
11 kfreebsd*-gnu)
12 OSARCH=kfreebsd-gnu
13 ;;
14 @@ -1373,9 +1376,11 @@ if test "${PBX_BFD}" = "0"; then
15 AST_EXT_LIB_CHECK([BFD], [bfd], [bfd_check_format], [bfd.h], [-ldl -liberty -lz])
16 fi
17
18 -if test "x${OSARCH}" = "xlinux-gnu" ; then
19 +case "${OSARCH}" in
20 +linux*)
21 AST_EXT_LIB_CHECK([CAP], [cap], [cap_from_text], [sys/capability.h])
22 -fi
23 + ;;
24 +esac
25
26 AST_C_DEFINE_CHECK([DAHDI], [DAHDI_RESET_COUNTERS], [dahdi/user.h], [230])
27 AST_C_DEFINE_CHECK([DAHDI], [DAHDI_DEFAULT_MTU_MRU], [dahdi/user.h], [220])
28 diff -rupN asterisk-13.8.0/main/Makefile ast13/main/Makefile
29 --- asterisk-13.8.0/main/Makefile 2016-03-29 21:39:33.000000000 +0200
30 +++ ast13/main/Makefile 2016-04-04 14:40:48.421815607 +0200
31 @@ -45,7 +45,7 @@ AST_LIBS+=$(UUID_LIB)
32 AST_LIBS+=$(CRYPT_LIB)
33 AST_LIBS+=$(AST_CLANG_BLOCKS_LIBS)
34
35 -ifneq ($(findstring $(OSARCH), linux-gnu uclinux linux-uclibc kfreebsd-gnu),)
36 +ifneq ($(findstring $(OSARCH), linux-gnu uclinux linux-uclibc linux-musl kfreebsd-gnu),)
37 ifneq ($(findstring LOADABLE_MODULES,$(MENUSELECT_CFLAGS)),)
38 AST_LIBS+=-ldl
39 endif