Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 25 Feb 2026 15:38:04 +0000
From:      Vladimir Druzenko <vvd@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: 3ac123c7054e - main - net/asterisk20: Add MP3 Decoder Code for Format_MP3 support
Message-ID:  <699f175c.252e9.ceef08e@gitrepo.freebsd.org>

index | next in thread | raw e-mail

The branch main has been updated by vvd:

URL: https://cgit.FreeBSD.org/ports/commit/?id=3ac123c7054e7dfa71dfcfa0ecb5134f99d588c5

commit 3ac123c7054e7dfa71dfcfa0ecb5134f99d588c5
Author:     Vladimir Druzenko <vvd@FreeBSD.org>
AuthorDate: 2026-02-25 15:36:57 +0000
Commit:     Vladimir Druzenko <vvd@FreeBSD.org>
CommitDate: 2026-02-25 15:37:46 +0000

    net/asterisk20: Add MP3 Decoder Code for Format_MP3 support
    
    Format_MP3, used to play MP3 encoded voicemail and music on hold, relies
    on decoder library files that are not included in the main Asterisk
    distribution.
    
    PR:             292715
    Tested by:      Marek Zarychta <zarychtam@plan-b.pwste.edu.pl>
    Approved by:    Oleksandr Kryvulia <o.kryvulia@flex-it.com.ua>
    Co-authored-by: Justin T. Gibbs <gibbs@FreeBSD.org>
---
 net/asterisk20/Makefile                                 | 14 +++++++++++++-
 net/asterisk20/distinfo                                 |  4 +++-
 net/asterisk20/files/extra-patch-addons_mp3_interface.c |  8 ++++++++
 3 files changed, 24 insertions(+), 2 deletions(-)

diff --git a/net/asterisk20/Makefile b/net/asterisk20/Makefile
index 74d4c0befc75..558a0e972ce1 100644
--- a/net/asterisk20/Makefile
+++ b/net/asterisk20/Makefile
@@ -1,5 +1,6 @@
 PORTNAME=	asterisk
 DISTVERSION=	20.18.2
+PORTREVISION=	1
 CATEGORIES=	net
 MASTER_SITES=	https://downloads.asterisk.org/pub/telephony/%SUBDIR%/:DEFAULT,g729
 MASTER_SITE_SUBDIR=	asterisk/ \
@@ -145,7 +146,12 @@ LUA_CONFIGURE_WITH=	lua
 LUA_CFLAGS=		-I${LUA_INCDIR}
 LUA_LDFLAGS=		-L${LUA_LIBDIR}
 
+MP3PLAYER_MASTER_SITES=	LOCAL/vvd:mp3
+MP3PLAYER_DISTFILES=	${PORTNAME}-mp3-204${EXTRACT_SUFX}:mp3
+MP3PLAYER_EXTRACT_ONLY=	${PORTNAME}-mp3-204${EXTRACT_SUFX}
 MP3PLAYER_RUN_DEPENDS=	mpg123:audio/mpg123
+MP3PLAYER_EXTRA_PATCHES=	${PATCHDIR}/extra-patch-addons_mp3_interface.c
+MP3PLAYER_VARS=		WRKSRC_MP3=${WRKDIR}/${PORTNAME}-mp3-204
 
 MYSQL_LIB_DEPENDS=	libzstd.so:archivers/zstd \
 			libunwind.so:devel/libunwind
@@ -225,7 +231,7 @@ PJSIP_VERSION=	2.15.1
 .include <bsd.port.pre.mk>
 
 .if ${OPSYS} == FreeBSD && ${OSVERSION} < 1500026
-EXTRA_PATCHES=	${PATCHDIR}/extra-patch-third-party_pjproject_Makefile
+EXTRA_PATCHES+=	${PATCHDIR}/extra-patch-third-party_pjproject_Makefile
 .endif
 
 .if (${OPSYS} == FreeBSD && ${OSVERSION} >= 1400092 && ${SSL_DEFAULT} == base) || \
@@ -274,6 +280,9 @@ post-extract-G729-on:
 	${CP} ${DISTDIR}/${DIST_SUBDIR}/${ASTERISK_CORE_G729_SOUNDS} ${WRKSRC}/sounds
 	${CP} ${DISTDIR}/${DIST_SUBDIR}/${ASTERISK_MOH_G729_SOUNDS} ${WRKSRC}/sounds
 
+post-extract-MP3PLAYER-on:
+	${MV} ${WRKSRC_MP3} ${WRKSRC}/addons/mp3
+
 post-extract-OPUS-on:
 	${CP} ${WRKSRC_opus}/include/asterisk/* ${WRKSRC}/include/asterisk
 	${CP} ${WRKSRC_opus}/codecs/* ${WRKSRC}/codecs
@@ -312,6 +321,9 @@ post-configure-GEOLOCATION-off:
 post-configure-MACRO-on:
 	@cd ${WRKSRC} && ./menuselect/menuselect --enable app_macro menuselect.makeopts
 
+post-configure-MP3PLAYER-on:
+	@cd ${WRKSRC} && ./menuselect/menuselect --enable format_mp3 menuselect.makeopts
+
 post-configure-MYSQL-on:
 	@cd ${WRKSRC} && ./menuselect/menuselect --enable res_config_mysql menuselect.makeopts
 
diff --git a/net/asterisk20/distinfo b/net/asterisk20/distinfo
index 39457abda14c..8aadd4d8d08a 100644
--- a/net/asterisk20/distinfo
+++ b/net/asterisk20/distinfo
@@ -1,10 +1,12 @@
-TIMESTAMP = 1771750967
+TIMESTAMP = 1771771771
 SHA256 (asterisk/asterisk-20.18.2.tar.gz) = 247e47727856b113ad520f3142225b3b7e526e1ba471fb7d546bc0fa4a734592
 SIZE (asterisk/asterisk-20.18.2.tar.gz) = 28633144
 SHA256 (asterisk/asterisk-core-sounds-en-g729-1.6.tar.gz) = b49dec15e07bb9bff6af0da3a07180651a38ef54d3ea54a3f20c35f081ed8714
 SIZE (asterisk/asterisk-core-sounds-en-g729-1.6.tar.gz) = 1557798
 SHA256 (asterisk/asterisk-moh-opsound-g729-2.03.tar.gz) = 0147ca9a97f0c550227aacb7793499057c4d2c64e021c95f93722f27d5549585
 SIZE (asterisk/asterisk-moh-opsound-g729-2.03.tar.gz) = 1103000
+SHA256 (asterisk/asterisk-mp3-204.tar.gz) = 721a6745e5f4bce8bbf5e3caca44ad1da22d2a368d3aa69cca70a0d6633dd907
+SIZE (asterisk/asterisk-mp3-204.tar.gz) = 26529
 SHA256 (asterisk/traud-asterisk-opus-83e1b458c77e0e287adeca494eeb79edb077b0ff_GH0.tar.gz) = 572a3c956371ed62b44a4bcd973db10eb4c84f3040cf7156e3acfad3b6bf3ded
 SIZE (asterisk/traud-asterisk-opus-83e1b458c77e0e287adeca494eeb79edb077b0ff_GH0.tar.gz) = 24044
 SHA256 (asterisk/pjsip-pjproject-2.15.1_GH0.tar.gz) = 8f3bd99caf003f96ed8038b8a36031eb9d8cd9eaea1eaff7e01c2eef6bd55706
diff --git a/net/asterisk20/files/extra-patch-addons_mp3_interface.c b/net/asterisk20/files/extra-patch-addons_mp3_interface.c
new file mode 100644
index 000000000000..37ca090e52f1
--- /dev/null
+++ b/net/asterisk20/files/extra-patch-addons_mp3_interface.c
@@ -0,0 +1,8 @@
+--- addons/mp3/interface.c.orig	2014-09-26 15:56:47 UTC
++++ addons/mp3/interface.c
+@@ -1,4 +1,5 @@
+ #define WRAP_LIBC_MALLOC
++#define ASTMM_LIBC ASTMM_REDIRECT
+ #include "asterisk.h"
+ #include "asterisk/logger.h"
+ 


home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?699f175c.252e9.ceef08e>