| 1 | Description: integrate opus module with asterisk build routines |
| 2 | Original patch adapted by Jonas Smedegaard to fit Debian packaging, |
| 3 | and to remove original patch file to help detect later upstream changes. |
| 4 | Author: Sean Bright <[email protected]> |
| 5 | Author: Alexander Traud <[email protected]> |
| 6 | Author: Jonas Smedegaard <[email protected]> |
| 7 | Source: https://github.com/traud/asterisk-opus/blob/asterisk-13.7/asterisk.patch |
| 8 | Forwarded: not-needed |
| 9 | Last-Update: 2023-08-27 |
| 10 | --- |
| 11 | This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ |
| 12 | --- a/build_tools/menuselect-deps.in |
| 13 | +++ b/build_tools/menuselect-deps.in |
| 14 | @@ -44,6 +44,7 @@ |
| 15 | NEON29=@PBX_NEON29@ |
| 16 | OGG=@PBX_OGG@ |
| 17 | OPUS=@PBX_OPUS@ |
| 18 | +OPUSENC=@PBX_OPUSENC@ |
| 19 | OPUSFILE=@PBX_OPUSFILE@ |
| 20 | PGSQL=@PBX_PGSQL@ |
| 21 | PJPROJECT=@PBX_PJPROJECT@ |
| 22 | --- a/configure.ac |
| 23 | +++ b/configure.ac |
| 24 | @@ -598,6 +598,7 @@ |
| 25 | AST_EXT_LIB_SETUP([OGG], [OGG], [ogg]) |
| 26 | AST_EXT_LIB_SETUP([OPENR2], [MFR2], [openr2]) |
| 27 | AST_EXT_LIB_SETUP([OPUS], [Opus], [opus]) |
| 28 | +AST_EXT_LIB_SETUP([OPUSENC], [Opusenc], [opusenc]) |
| 29 | AST_EXT_LIB_SETUP([OPUSFILE], [Opusfile], [opusfile]) |
| 30 | AST_EXT_LIB_SETUP([PGSQL], [PostgreSQL], [postgres]) |
| 31 | AST_EXT_LIB_SETUP([BEANSTALK], [Beanstalk Job Queue], [beanstalk]) |
| 32 | @@ -2644,6 +2645,7 @@ |
| 33 | if test -z "$__opus_include" -o x"$__opus_include" = x" " ; then |
| 34 | __opus_include=-I/usr/include/opus |
| 35 | fi |
| 36 | +AST_PKG_CONFIG_CHECK(OPUSENC, libopusenc) |
| 37 | AST_EXT_LIB_CHECK([OPUSFILE], [opusfile], [op_open_callbacks], [opus/opusfile.h], [], [$__opus_include]) |
| 38 | |
| 39 | for ver in ${LUA_VERSIONS:-5.4 5.3 5.2 5.1}; do |
| 40 | --- a/makeopts.in |
| 41 | +++ b/makeopts.in |
| 42 | @@ -230,6 +230,9 @@ |
| 43 | OPUS_INCLUDE=@OPUS_INCLUDE@ |
| 44 | OPUS_LIB=@OPUS_LIB@ |
| 45 | |
| 46 | +OPUSENC_INCLUDE=@OPUSENC_INCLUDE@ |
| 47 | +OPUSENC_LIB=@OPUSENC_LIB@ |
| 48 | + |
| 49 | OPUSFILE_INCLUDE=@OPUSFILE_INCLUDE@ |
| 50 | OPUSFILE_LIB=@OPUSFILE_LIB@ |
| 51 | |
| 52 | --- a/formats/Makefile |
| 53 | +++ b/formats/Makefile |
| 54 | @@ -11,6 +11,8 @@ |
| 55 | |
| 56 | -include $(ASTTOPDIR)/menuselect.makeopts $(ASTTOPDIR)/menuselect.makedeps |
| 57 | |
| 58 | +_ASTCFLAGS+=-DASTERISK_VERSION_NUM=${ASTERISKVERSIONNUM} |
| 59 | + |
| 60 | MODULE_PREFIX=format |
| 61 | MENUSELECT_CATEGORY=FORMATS |
| 62 | MENUSELECT_DESCRIPTION=Format Interpreters |
| 63 | --- a/Xopus/asterisk.patch |
| 64 | +++ /dev/null |
| 65 | @@ -1,37 +0,0 @@ |
| 66 | ---- a/build_tools/menuselect-deps.in |
| 67 | -+++ b/build_tools/menuselect-deps.in |
| 68 | -@@ -44,2 +44,3 @@ |
| 69 | - OPUS=@PBX_OPUS@ |
| 70 | -+OPUSENC=@PBX_OPUSENC@ |
| 71 | - OPUSFILE=@PBX_OPUSFILE@ |
| 72 | ---- a/configure.ac |
| 73 | -+++ b/configure.ac |
| 74 | -@@ -523,2 +523,3 @@ |
| 75 | - AST_EXT_LIB_SETUP([OPUS], [Opus], [opus]) |
| 76 | -+AST_EXT_LIB_SETUP([OPUSENC], [Opusenc], [opusenc]) |
| 77 | - AST_EXT_LIB_SETUP([OPUSFILE], [Opusfile], [opusfile]) |
| 78 | -@@ -2524,2 +2525,3 @@ |
| 79 | - fi |
| 80 | -+AST_PKG_CONFIG_CHECK(OPUSENC, libopusenc) |
| 81 | - AST_EXT_LIB_CHECK([OPUSFILE], [opusfile], [op_open_callbacks], [opus/opusfile.h], [], [$__opus_include]) |
| 82 | ---- a/makeopts.in |
| 83 | -+++ b/makeopts.in |
| 84 | -@@ -228,6 +228,9 @@ |
| 85 | - OPUS_INCLUDE=@OPUS_INCLUDE@ |
| 86 | - OPUS_LIB=@OPUS_LIB@ |
| 87 | - |
| 88 | -+OPUSENC_INCLUDE=@OPUSENC_INCLUDE@ |
| 89 | -+OPUSENC_LIB=@OPUSENC_LIB@ |
| 90 | -+ |
| 91 | - OPUSFILE_INCLUDE=@OPUSFILE_INCLUDE@ |
| 92 | - OPUSFILE_LIB=@OPUSFILE_LIB@ |
| 93 | - |
| 94 | ---- formats/Makefile |
| 95 | -+++ formats/Makefile |
| 96 | -@@ -12,4 +12,6 @@ |
| 97 | - -include $(ASTTOPDIR)/menuselect.makeopts $(ASTTOPDIR)/menuselect.makedeps |
| 98 | - |
| 99 | -+_ASTCFLAGS+=-DASTERISK_VERSION_NUM=${ASTERISKVERSIONNUM} |
| 100 | -+ |
| 101 | - MODULE_PREFIX=format |
| 102 | - MENUSELECT_CATEGORY=FORMATS |