git: 7aa69c618b14 - main - net/asterisk-chan_sccp: Update 4.3.3 => 4.3.5.20231205 (4.3.5 with several patches after release)

From: Vladimir Druzenko <vvd_at_FreeBSD.org>
Date: Fri, 08 Aug 2025 23:06:23 UTC
The branch main has been updated by vvd:

URL: https://cgit.FreeBSD.org/ports/commit/?id=7aa69c618b1491817cd4dc1e74ce9fb55935ed82

commit 7aa69c618b1491817cd4dc1e74ce9fb55935ed82
Author:     Vladimir Druzenko <vvd@FreeBSD.org>
AuthorDate: 2025-08-08 22:57:10 +0000
Commit:     Vladimir Druzenko <vvd@FreeBSD.org>
CommitDate: 2025-08-08 22:57:10 +0000

    net/asterisk-chan_sccp: Update 4.3.3 => 4.3.5.20231205 (4.3.5 with several patches after release)
    
    Changelogs:
    https://github.com/chan-sccp/chan-sccp/releases/tag/v4.3.4
    https://github.com/chan-sccp/chan-sccp/releases/tag/v4.3.5
    https://github.com/chan-sccp/chan-sccp/compare/v4.3.5...2e21051
    
    Improve port:
    - Add flavors asterisk20 and asterisk22.
    - Set default flavor to asterisk22.
    - Fix dependencies.
    - Fix warnings from portclippy.
    - Parameterize CONFLICTS_INSTALL.
    
    PR:             288423
    Approved by:    Diederik de Groot <ddegroot@talon.nl> (maintainer, timeout 2 weeks)
---
 net/asterisk-chan_sccp/Makefile                    | 34 +++++++-----------
 net/asterisk-chan_sccp/distinfo                    |  6 ++--
 net/asterisk-chan_sccp/files/patch-src_define.h    |  4 +--
 .../files/patch-src_pbx__impl_ast116_ast116.c      | 41 ++++++++++++++++++++++
 4 files changed, 59 insertions(+), 26 deletions(-)

diff --git a/net/asterisk-chan_sccp/Makefile b/net/asterisk-chan_sccp/Makefile
index a9efae0693e4..991dd2eb0291 100644
--- a/net/asterisk-chan_sccp/Makefile
+++ b/net/asterisk-chan_sccp/Makefile
@@ -1,7 +1,6 @@
 PORTNAME=	chan_sccp
 DISTVERSIONPREFIX=	v
-DISTVERSION=	4.3.3
-PORTREVISION=	2
+DISTVERSION=	4.3.5.20231205
 CATEGORIES=	net
 PKGNAMEPREFIX=	asterisk-
 
@@ -12,38 +11,35 @@ WWW=		https://sourceforge.net/projects/chan-sccp-b/
 LICENSE=	GPLv1
 LICENSE_FILE=	${WRKSRC}/COPYING
 
-FLAVORS=	asterisk18
-FLAVOR?=	${FLAVORS:[1]}
-
 LIB_DEPENDS=	libltdl.so:devel/libltdl
 
-USES=		autoreconf:2.69 compiler:c11 gettext-tools iconv libtool \
-		localbase ssl
+FLAVORS=	asterisk18 asterisk20 asterisk22
+FLAVOR?=	${FLAVORS:[3]}
+
+${FLAVOR}_PKGNAMEPREFIX=	${FLAVOR}-
+${FLAVOR}_BUILD_DEPENDS=	asterisk:net/${FLAVOR}
+${FLAVOR}_RUN_DEPENDS=		asterisk:net/${FLAVOR}
 
+USES=		autoreconf:2.69 compiler:c11 gettext-tools iconv:wchar_t \
+		libtool ssl
 USE_GITHUB=	yes
 GH_ACCOUNT=	chan-sccp
 GH_PROJECT=	chan-sccp
+GH_TAGNAME=	2e2105182824dc0ffda40f607290eb309d03a963
 
 GNU_CONFIGURE=	yes
 CONFIGURE_ARGS=	--enable-advanced-functions \
-		--with-hash-size=3001 \
-		${ICONV_CONFIGURE_ARG}
+		--with-hash-size=3001
 INSTALL_TARGET=	install-strip
+CFLAGS+=	-D_ASTERISK_VERSION=${FLAVOR:C|([a-zA-Z]+)||}
 
-CPPFLAGS+=	-I${ICONV_INCLUDE_PATH}
-LDFLAGS+=	-L${LOCALBASE}/lib \
-		${ICONV_LIB}
+CONFLICTS_INSTALL=	${FLAVORS:N${FLAVOR}:C|(.+)|\1-${PORTNAME}|}
 
 PLIST_FILES=	etc/asterisk/sccp.conf.annotated \
 		"@sample etc/asterisk/sccp.conf.sample" \
 		lib/asterisk/modules/chan_sccp.so \
 		share/asterisk/documentation/thirdparty/chan_sccp-en_US.xml
 
-asterisk18_PKGNAMEPREFIX=	asterisk18-
-asterisk18_CONFLICTS_INSTALL=	asterisk13-chan_sccp asterisk16-chan_sccp
-asterisk18_BUILD_DEPENDS=	asterisk:net/asterisk18
-asterisk18_RUN_DEPENDS=		asterisk:net/asterisk18
-
 OPTIONS_DEFINE=			CONFERENCE VIDEO
 OPTIONS_DEFAULT=		CONFERENCE VIDEO
 CONFERENCE_DESC=		Enable Conference Support
@@ -52,10 +48,6 @@ VIDEO_DESC=			Enable Video Support
 CONFERENCE_CONFIGURE_ENABLE=	conference
 VIDEO_CONFIGURE_ENABLE=		video
 
-.if ${FLAVOR} == asterisk18
-CONFIGURE_ARGS+=		--with-asterisk-version=18
-.endif
-
 post-install:
 	@${MKDIR} ${STAGEDIR}${PREFIX}/etc/asterisk
 	${INSTALL_DATA} ${WRKSRC}/conf/sccp.conf \
diff --git a/net/asterisk-chan_sccp/distinfo b/net/asterisk-chan_sccp/distinfo
index ec80554d7202..194acd42c70d 100644
--- a/net/asterisk-chan_sccp/distinfo
+++ b/net/asterisk-chan_sccp/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1603703805
-SHA256 (chan-sccp-chan-sccp-v4.3.3_GH0.tar.gz) = 970961c2b7128e840c09e3ce994bc109c9526e81a90ffbc72b6e6bffe860ad82
-SIZE (chan-sccp-chan-sccp-v4.3.3_GH0.tar.gz) = 1677723
+TIMESTAMP = 1753333333
+SHA256 (chan-sccp-chan-sccp-v4.3.5.20231205-2e2105182824dc0ffda40f607290eb309d03a963_GH0.tar.gz) = 696b52d91147c0ee921f38a3f24de8359ccbd7622f264a2d1aa6c67a742162dc
+SIZE (chan-sccp-chan-sccp-v4.3.5.20231205-2e2105182824dc0ffda40f607290eb309d03a963_GH0.tar.gz) = 1677691
diff --git a/net/asterisk-chan_sccp/files/patch-src_define.h b/net/asterisk-chan_sccp/files/patch-src_define.h
index 5b2d175fb693..ce1846d7b7d7 100644
--- a/net/asterisk-chan_sccp/files/patch-src_define.h
+++ b/net/asterisk-chan_sccp/files/patch-src_define.h
@@ -1,6 +1,6 @@
---- src/define.h.orig	2020-10-24 14:42:40 UTC
+--- src/define.h.orig	2021-12-29 10:49:04 UTC
 +++ src/define.h
-@@ -98,10 +98,10 @@ SCCP_LINE unsigned long long ___bswap_64(unsigned long
+@@ -96,10 +96,10 @@ SCCP_LINE unsigned long long ___bswap_64(unsigned long
  #    define htolel(x) (uint16_t)(x)
  #    define htoles(x) (uint16_t)(x)
  #  else
diff --git a/net/asterisk-chan_sccp/files/patch-src_pbx__impl_ast116_ast116.c b/net/asterisk-chan_sccp/files/patch-src_pbx__impl_ast116_ast116.c
new file mode 100644
index 000000000000..57d4afa24dd5
--- /dev/null
+++ b/net/asterisk-chan_sccp/files/patch-src_pbx__impl_ast116_ast116.c
@@ -0,0 +1,41 @@
+--- src/pbx_impl/ast116/ast116.c.orig	2021-12-29 10:49:04 UTC
++++ src/pbx_impl/ast116/ast116.c
+@@ -3063,10 +3063,12 @@ DECLARE_PBX_CHANNEL_STRGET(name)
+     DECLARE_PBX_CHANNEL_STRGET(linkedid)
+     DECLARE_PBX_CHANNEL_STRGET(context)
+     DECLARE_PBX_CHANNEL_STRSET(context)
++#if _ASTERISK_VERSION < 21
+     DECLARE_PBX_CHANNEL_STRGET(macroexten)
+     DECLARE_PBX_CHANNEL_STRSET(macroexten)
+     DECLARE_PBX_CHANNEL_STRGET(macrocontext)
+     DECLARE_PBX_CHANNEL_STRSET(macrocontext)
++#endif
+     DECLARE_PBX_CHANNEL_STRGET(call_forward)
+     DECLARE_PBX_CHANNEL_STRSET(call_forward)
+ 
+@@ -3534,10 +3536,12 @@ const PbxInterface iPbx = {
+ 	setChannelExten: sccp_astwrap_set_channel_exten,
+ 	getChannelContext: sccp_astwrap_get_channel_context,
+ 	setChannelContext: sccp_astwrap_set_channel_context,
++#if _ASTERISK_VERSION < 21
+ 	getChannelMacroExten: sccp_astwrap_get_channel_macroexten,
+ 	setChannelMacroExten: sccp_astwrap_set_channel_macroexten,
+ 	getChannelMacroContext: sccp_astwrap_get_channel_macrocontext,
+ 	setChannelMacroContext: sccp_astwrap_set_channel_macrocontext,
++#endif
+ 	getChannelCallForward: sccp_astwrap_get_channel_call_forward,
+ 	setChannelCallForward: sccp_astwrap_set_channel_call_forward,
+ 
+@@ -3685,10 +3689,12 @@ const PbxInterface iPbx = {
+ 	.setChannelExten = sccp_astwrap_set_channel_exten,
+ 	.getChannelContext = sccp_astwrap_get_channel_context,
+ 	.setChannelContext = sccp_astwrap_set_channel_context,
++#if _ASTERISK_VERSION < 21
+ 	.getChannelMacroExten = sccp_astwrap_get_channel_macroexten,
+ 	.setChannelMacroExten = sccp_astwrap_set_channel_macroexten,
+ 	.getChannelMacroContext = sccp_astwrap_get_channel_macrocontext,
+ 	.setChannelMacroContext = sccp_astwrap_set_channel_macrocontext,
++#endif
+ 	.getChannelCallForward = sccp_astwrap_get_channel_call_forward,
+ 	.setChannelCallForward = sccp_astwrap_set_channel_call_forward,
+