git: d6a4b03cc357 - main - net/belle-sip: Update version 1.6.3=>5.1.32

From: Muhammad Moinur Rahman <bofh_at_FreeBSD.org>
Date: Wed, 15 Jun 2022 16:49:45 UTC
The branch main has been updated by bofh:

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

commit d6a4b03cc35791f60731bb8b21861ad90f9dd856
Author:     Muhammad Moinur Rahman <bofh@FreeBSD.org>
AuthorDate: 2022-06-15 16:46:52 +0000
Commit:     Muhammad Moinur Rahman <bofh@FreeBSD.org>
CommitDate: 2022-06-15 16:46:52 +0000

    net/belle-sip: Update version 1.6.3=>5.1.32
    
    - Update MASTER_SITES
    - Update LICENSE_FILE
    
    PR:             264680
    Reported by:    vvd@unislabs.com
    Relnotes: https://gitlab.linphone.org/BC/public/belle-sip/-/tags/5.1.32
---
 net/belle-sip/Makefile                             | 27 ++++++++------------
 net/belle-sip/distinfo                             |  8 +++---
 .../files/patch-src-belle_sip_headers_impl.c       | 19 +++++++-------
 .../files/patch-src_belle__sip__internal.h         |  4 +--
 net/belle-sip/files/patch-src_dns.c                | 10 --------
 net/belle-sip/files/patch-src_dns_dns.c            | 29 ++++++++++++++++++++++
 net/belle-sip/pkg-plist                            | 13 ++++++----
 7 files changed, 62 insertions(+), 48 deletions(-)

diff --git a/net/belle-sip/Makefile b/net/belle-sip/Makefile
index 5d7d89c93a03..2fdacd158025 100644
--- a/net/belle-sip/Makefile
+++ b/net/belle-sip/Makefile
@@ -1,33 +1,28 @@
 PORTNAME=	belle-sip
-PORTVERSION=	1.6.3
+PORTVERSION=	5.1.32
 CATEGORIES=	net java
-MASTER_SITES=	https://www.linphone.org/releases/sources/belle-sip/ \
-		http://www.antlr3.org/download/:source2
-DISTFILES=	${DISTNAME}${EXTRACT_SUFX} \
-		antlr-3.4-complete.jar:source2
-EXTRACT_ONLY=	${DISTNAME}${EXTRACT_SUFX}
+MASTER_SITES=	https://gitlab.linphone.org/BC/public/${PORTNAME}/-/archive/${PORTVERSION}/
 
 MAINTAINER=	bofh@FreeBSD.org
 COMMENT=	SIP (RFC 3261) implementation written in C
 
 LICENSE=	GPLv2+
-LICENSE_FILE=	${WRKSRC}/COPYING
+LICENSE_FILE=	${WRKSRC}/LICENSE.txt
 
 LIB_DEPENDS=	libantlr3c.so:devel/libantlr3c \
-		libbctoolbox.so:net/bctoolbox
+		libbctoolbox.so:net/bctoolbox \
+		libbelr.so:textproc/belr
 
-USES=		cmake cpe
+USES=		cmake cpe tar:bz2
 CPE_VENDOR=	linphone
 USE_JAVA=	yes
-USE_LDCONFIG=	yes
-
-CMAKE_ARGS=	-DENABLE_STATIC=NO -DENABLE_STRICT=NO -DENABLE_TESTS=NO \
-		-DANTLR3_JAR_PATH:FILEPATH=${WRKDIR}/antlr3.jar
 JAVA_BUILD=	jre
-WRKSRC=		${WRKDIR}/${DISTNAME}-0
+USE_LDCONFIG=	yes
 
-post-extract:
-	@${CP} ${DISTDIR}/antlr-3.4-complete.jar ${WRKDIR}/antlr3.jar
+CMAKE_ARGS=	-DCMAKE_PREFIX_PATH=${LOCALBASE} \
+		-DENABLE_STATIC=NO \
+		-DENABLE_STRICT=NO \
+		-DENABLE_TESTS=NO
 
 post-patch:
 	@${REINPLACE_CMD} '/clock_gettime/d' ${WRKSRC}/CMakeLists.txt
diff --git a/net/belle-sip/distinfo b/net/belle-sip/distinfo
index dbadde2f8d91..908def37d6b8 100644
--- a/net/belle-sip/distinfo
+++ b/net/belle-sip/distinfo
@@ -1,5 +1,3 @@
-TIMESTAMP = 1506002640
-SHA256 (belle-sip-1.6.3.tar.gz) = 3f3807078b177e50a5ed97aaf8d7f6e77532df3205153e1b2957f557df9ba568
-SIZE (belle-sip-1.6.3.tar.gz) = 610200
-SHA256 (antlr-3.4-complete.jar) = 9d3e866b610460664522520f73b81777b5626fb0a282a5952b9800b751550bf7
-SIZE (antlr-3.4-complete.jar) = 2388361
+TIMESTAMP = 1655298787
+SHA256 (belle-sip-5.1.32.tar.bz2) = 877153308e6e284e078b9f395d67270c001da41b186a839b2f679c4cf6600104
+SIZE (belle-sip-5.1.32.tar.bz2) = 3430809
diff --git a/net/belle-sip/files/patch-src-belle_sip_headers_impl.c b/net/belle-sip/files/patch-src-belle_sip_headers_impl.c
index cf9490bf0c1a..cd486881507c 100644
--- a/net/belle-sip/files/patch-src-belle_sip_headers_impl.c
+++ b/net/belle-sip/files/patch-src-belle_sip_headers_impl.c
@@ -1,7 +1,7 @@
---- src/belle_sip_headers_impl.c.orig	2016-08-11 09:23:59 UTC
+--- src/belle_sip_headers_impl.c.orig	2022-05-18 04:20:06 UTC
 +++ src/belle_sip_headers_impl.c
-@@ -1672,11 +1672,6 @@ BELLESIP_EXPORT time_t belle_sip_header_
- 	char tmp2[16] ={0};
+@@ -1873,11 +1873,6 @@ BELLESIP_EXPORT time_t belle_sip_header_date_get_time(
+ 	char tmp2[17] ={0};
  	int i,j;
  	time_t seconds;
 -#if defined(BELLE_SIP_WINDOWS_UNIVERSAL) || defined(BELLE_SIP_MSC_VER_GREATER_19)
@@ -10,17 +10,16 @@
 -	time_t adjust_timezone;
 -#endif
  
- 
  	/* time headers are in GMT as spec says */
-@@ -1698,26 +1693,12 @@ BELLESIP_EXPORT time_t belle_sip_header_
- 	return (time_t)-1;
+ 	sscanf(obj->date,"%3c,%d %16s %d %d:%d:%d",tmp1,&ret.tm_mday,tmp2,
+@@ -1899,25 +1894,11 @@ success:
  success:
  	ret.tm_isdst=0;
--
+ 
 -#if TARGET_IPHONE_SIMULATOR
 -	/* 'timezone' is buggy on iOS simulator, use the timegm() function to convert to UTC timestamp
 -	   and discard the adjust timezone value */
- 	seconds = timegm(&ret);
+-	seconds = timegm(&ret);
 -	adjust_timezone = 0;
 -#else
 -	seconds = mktime(&ret);
@@ -31,7 +30,7 @@
 -#endif
 -#endif
 -
- 	if (seconds==(time_t)-1){
+ 	if (seconds==(time_t)-1) {
 -		belle_sip_error("mktime() failed: %s",strerror(errno));
 +		belle_sip_error("timegm() failed: %s",strerror(errno));
  		return (time_t)-1;
@@ -40,4 +39,4 @@
 +	return seconds;
  }
  
- BELLESIP_EXPORT void belle_sip_header_date_set_time(belle_sip_header_date_t *obj, const time_t *utc_time){
+ BELLESIP_EXPORT void belle_sip_header_date_set_time(belle_sip_header_date_t *obj, const time_t *utc_time) {
diff --git a/net/belle-sip/files/patch-src_belle__sip__internal.h b/net/belle-sip/files/patch-src_belle__sip__internal.h
index 51f8eddcda66..761204be2fa1 100644
--- a/net/belle-sip/files/patch-src_belle__sip__internal.h
+++ b/net/belle-sip/files/patch-src_belle__sip__internal.h
@@ -1,6 +1,6 @@
---- src/belle_sip_internal.h.orig	2015-10-19 11:43:47 UTC
+--- src/belle_sip_internal.h.orig	2022-05-18 04:20:06 UTC
 +++ src/belle_sip_internal.h
-@@ -23,6 +23,7 @@
+@@ -25,6 +25,7 @@
  #include <stdio.h>
  #include <sys/types.h>
  #include <errno.h>
diff --git a/net/belle-sip/files/patch-src_dns.c b/net/belle-sip/files/patch-src_dns.c
deleted file mode 100644
index 1b7070ae4b69..000000000000
--- a/net/belle-sip/files/patch-src_dns.c
+++ /dev/null
@@ -1,10 +0,0 @@
---- src/dns.c.orig	2015-10-19 11:43:47 UTC
-+++ src/dns.c
-@@ -4345,6 +4345,7 @@ int dns_resconf_loadfromresolv(struct dn
- 	union res_sockaddr_union addresses[3];
- 	int i,error;
- 
-+	memset(&res, 0, sizeof(res));
- 	if ((error = res_ninit(&res))) {
- 		return error;
- 	}
diff --git a/net/belle-sip/files/patch-src_dns_dns.c b/net/belle-sip/files/patch-src_dns_dns.c
new file mode 100644
index 000000000000..1d0afcd3c7c4
--- /dev/null
+++ b/net/belle-sip/files/patch-src_dns_dns.c
@@ -0,0 +1,29 @@
+--- src/dns/dns.c.orig	2022-06-15 16:24:13 UTC
++++ src/dns/dns.c
+@@ -5012,7 +5012,7 @@ static int guess_scope_id(void){
+ 	struct ifaddrs *ifp;
+ 	struct ifaddrs *ifpstart;
+ 	int scope_id = -1;
+-	
++
+ 	if (getifaddrs(&ifpstart) < 0) {
+ 		return -1;
+ 	}
+@@ -5035,7 +5035,7 @@ static int guess_scope_id(void){
+ 		}
+ 	}
+ 	freeifaddrs(ifpstart);
+-	
++
+ 	return scope_id;
+ }
+ 
+@@ -5044,7 +5044,7 @@ int dns_resconf_loadfromresolv(struct dns_resolv_conf 
+ 	union res_sockaddr_union addresses[3];
+ 	int i,error,write_index;
+ 
+-
++    memset(&res, 0, sizeof(res));
+ 	if ((error = res_ninit(&res))) {
+ 		return error;
+ 	}
diff --git a/net/belle-sip/pkg-plist b/net/belle-sip/pkg-plist
index edce3a9205d7..de6d9cb1fc1e 100644
--- a/net/belle-sip/pkg-plist
+++ b/net/belle-sip/pkg-plist
@@ -14,8 +14,10 @@ include/belle-sip/list.h
 include/belle-sip/listener.h
 include/belle-sip/listeningpoint.h
 include/belle-sip/mainloop.h
+include/belle-sip/mdns_register.h
 include/belle-sip/message.h
 include/belle-sip/object.h
+include/belle-sip/object++.hh
 include/belle-sip/parameters.h
 include/belle-sip/provider.h
 include/belle-sip/refresher.h
@@ -27,9 +29,10 @@ include/belle-sip/types.h
 include/belle-sip/utils.h
 include/belle-sip/wakelock.h
 lib/libbellesip.so
-lib/libbellesip.so.0
+lib/libbellesip.so.1
 libdata/pkgconfig/belle-sip.pc
-share/BelleSIP/cmake/BelleSIPConfig.cmake
-share/BelleSIP/cmake/BelleSIPConfigVersion.cmake
-share/BelleSIP/cmake/BelleSIPTargets-%%CMAKE_BUILD_TYPE%%.cmake
-share/BelleSIP/cmake/BelleSIPTargets.cmake
+lib/cmake/BelleSIP/BelleSIPConfig.cmake
+lib/cmake/BelleSIP/BelleSIPConfigVersion.cmake
+lib/cmake/BelleSIP/BelleSIPTargets-%%CMAKE_BUILD_TYPE%%.cmake
+lib/cmake/BelleSIP/BelleSIPTargets.cmake
+share/belr/grammars/sdp_grammar