git: b3cfd4f7da41 - main - net/bctoolbox: Update version 5.2.94=>5.4.2

From: Muhammad Moinur Rahman <bofh_at_FreeBSD.org>
Date: Thu, 27 Mar 2025 09:17:56 UTC
The branch main has been updated by bofh:

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

commit b3cfd4f7da4133ba5a5d73a5fb28c27bf52249b6
Author:     Muhammad Moinur Rahman <bofh@FreeBSD.org>
AuthorDate: 2025-03-26 17:53:41 +0000
Commit:     Muhammad Moinur Rahman <bofh@FreeBSD.org>
CommitDate: 2025-03-27 09:17:01 +0000

    net/bctoolbox: Update version 5.2.94=>5.4.2
    
    Changelog: https://gitlab.linphone.org/BC/public/bctoolbox/-/tags/5.4.2
    
    Sponsored by:   Cybermancer Infosec
---
 net/bctoolbox/Makefile                       | 17 ++++++++---------
 net/bctoolbox/distinfo                       |  6 +++---
 net/bctoolbox/files/patch-src-CMakeLists.txt | 10 ----------
 net/bctoolbox/files/patch-src-utils-port.c   | 12 ++++++------
 net/bctoolbox/pkg-plist                      | 25 +++++++++++--------------
 5 files changed, 28 insertions(+), 42 deletions(-)

diff --git a/net/bctoolbox/Makefile b/net/bctoolbox/Makefile
index 847c7fb2583f..299cf7427450 100644
--- a/net/bctoolbox/Makefile
+++ b/net/bctoolbox/Makefile
@@ -1,6 +1,5 @@
 PORTNAME=	bctoolbox
-DISTVERSION=	5.2.94
-PORTREVISION=	1
+DISTVERSION=	5.4.2
 CATEGORIES=	net
 
 MAINTAINER=	bofh@FreeBSD.org
@@ -10,14 +9,11 @@ WWW=		https://gitlab.linphone.org/BC/public/bctoolbox
 LICENSE=	GPLv3
 LICENSE_FILE=	${WRKSRC}/LICENSE.txt
 
-DEPRECATED=	Depends on expired security/mbedtls2
-EXPIRATION_DATE=2025-03-31
+IGNORE_FreeBSD_13=	is not supported on systems with OpenSSL 1.1.1
 
-BUILD_DEPENDS=	mbedtls2>=2.3.0_2:security/mbedtls2
-LIB_DEPENDS=	libbcunit.so:devel/bcunit \
-	libmbedtls.so:security/mbedtls2
+BUILD_DEPENDS=	${LOCALBASE}/lib/libbcunit.a:devel/bcunit
 
-USES=		cmake compiler:c++17-lang
+USES=		cmake compiler:c++17-lang ssl
 USE_GITLAB=	yes
 GL_SITE=	https://gitlab.linphone.org/BC
 GL_ACCOUNT=	public
@@ -25,9 +21,12 @@ USE_LDCONFIG=	yes
 
 CMAKE_ARGS=	-DENABLE_STATIC=NO -DENABLE_STRICT=NO \
 		-DCMAKE_PREFIX_PATH=${LOCALBASE} \
-		-DCMAKE_SKIP_INSTALL_RPATH=ON
+		-DCMAKE_SKIP_INSTALL_RPATH=ON \
+		-DENABLE_MBEDTLS=OFF -DENABLE_OPENSSL=ON \
+		-DENABLE_UNIT_TESTS=OFF
 
 CFLAGS+=	-DHAVE_ARC4RANDOM
+LDFLAGS+=		-lpthread
 
 post-patch:
 	@${REINPLACE_CMD} '/clock_gettime/d' ${WRKSRC}/CMakeLists.txt
diff --git a/net/bctoolbox/distinfo b/net/bctoolbox/distinfo
index 24e299e612e2..6b5aa119ed34 100644
--- a/net/bctoolbox/distinfo
+++ b/net/bctoolbox/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1690557275
-SHA256 (bctoolbox-5.2.94.tar.bz2) = d4e81d6e7aeb19e0d2bb4f7aa0645273469507cf1f3ab66ae742f39944cd2503
-SIZE (bctoolbox-5.2.94.tar.bz2) = 159511
+TIMESTAMP = 1743002376
+SHA256 (bctoolbox-5.4.2.tar.bz2) = c81ec178f267bc8bd459fe5631df222aefa9b3f458db06bdd30ee81deffc79cc
+SIZE (bctoolbox-5.4.2.tar.bz2) = 170953
diff --git a/net/bctoolbox/files/patch-src-CMakeLists.txt b/net/bctoolbox/files/patch-src-CMakeLists.txt
deleted file mode 100644
index b4d9b84b2737..000000000000
--- a/net/bctoolbox/files/patch-src-CMakeLists.txt
+++ /dev/null
@@ -1,10 +0,0 @@
---- src/CMakeLists.txt.orig	2023-03-14 19:53:03 UTC
-+++ src/CMakeLists.txt
-@@ -195,6 +195,7 @@ if(ENABLE_SHARED)
- 			)
- 		endif()
- 	endif()
-+	target_link_libraries(bctoolbox PRIVATE execinfo)
- 	if(HAVE_LIBRT)
- 		target_link_libraries(bctoolbox PRIVATE rt)
- 	endif()
diff --git a/net/bctoolbox/files/patch-src-utils-port.c b/net/bctoolbox/files/patch-src-utils-port.c
index fed17d6fe56c..eb3461925b68 100644
--- a/net/bctoolbox/files/patch-src-utils-port.c
+++ b/net/bctoolbox/files/patch-src-utils-port.c
@@ -1,6 +1,6 @@
---- src/utils/port.c.orig	2023-03-14 19:53:03 UTC
+--- src/utils/port.c.orig	2025-03-11 08:53:26 UTC
 +++ src/utils/port.c
-@@ -371,7 +371,7 @@ void bctbx_set_self_thread_name(const char *name){
+@@ -361,7 +361,7 @@ void bctbx_set_self_thread_name(const char *name) {
  	prctl(PR_SET_NAME, name, NULL, NULL, NULL);
  #elif TARGET_OS_MAC
  	pthread_setname_np(name);
@@ -9,12 +9,12 @@
  	bctbx_warning("bctbx_set_self_thread_name(): not implemented on this platform.");
  #endif
  }
-@@ -1642,7 +1642,7 @@ void bctbx_sockaddr_remove_nat64_mapping(const struct 
+@@ -1639,7 +1639,7 @@ void bctbx_sockaddr_remove_nat64_mapping(const struct 
  		if (htonl(0x0064ff9b) ==
  #ifdef _MSC_VER
- 			((in6->sin6_addr.u.Word[0] << 16) & in6->sin6_addr.u.Word[1])
+ 		    ((in6->sin6_addr.u.Word[0] << 16) & in6->sin6_addr.u.Word[1])
 -#elif __APPLE__
 +#elif __APPLE__ || __FreeBSD__
- 			in6->sin6_addr.__u6_addr.__u6_addr32[0]
+ 		    in6->sin6_addr.__u6_addr.__u6_addr32[0]
  #else
- 			in6->sin6_addr.s6_addr32[0]
+ 		    in6->sin6_addr.s6_addr32[0]
diff --git a/net/bctoolbox/pkg-plist b/net/bctoolbox/pkg-plist
index 55fcbc4866d4..e57f4fc25e36 100644
--- a/net/bctoolbox/pkg-plist
+++ b/net/bctoolbox/pkg-plist
@@ -1,4 +1,3 @@
-bin/bctoolbox_tester
 include/bctoolbox/charconv.h
 include/bctoolbox/compiler.h
 include/bctoolbox/crypto.h
@@ -19,18 +18,16 @@ include/bctoolbox/vconnect.h
 include/bctoolbox/vfs.h
 include/bctoolbox/vfs_encrypted.hh
 include/bctoolbox/vfs_standard.h
-lib/libbctoolbox.so
-lib/libbctoolbox.so.1
-lib/libbctoolbox-tester.so
-lib/libbctoolbox-tester.so.1
+lib/libbctoolbox.a
+lib/libbctoolbox-tester.a
 libdata/pkgconfig/bctoolbox.pc
 libdata/pkgconfig/bctoolbox-tester.pc
-%%DATADIR%%/cmake/ConfigureSpecfile.cmake
-%%DATADIR%%/cmake/MakeArchive.cmake
-%%DATADIR%%/cmake/bctoolboxCMakeUtils.cmake
-%%DATADIR%%/cmake/bctoolboxConfig.cmake
-%%DATADIR%%/cmake/bctoolboxConfigVersion.cmake
-%%DATADIR%%/cmake/bctoolboxTargets-%%CMAKE_BUILD_TYPE%%.cmake
-%%DATADIR%%/cmake/bctoolboxTargets.cmake
-%%DATADIR%%/cmake/BcGitVersion.cmake
-%%DATADIR%%/cmake/gitversion.h.in
+share/BCToolbox/cmake/ConfigureSpecfile.cmake
+share/BCToolbox/cmake/MakeArchive.cmake
+share/BCToolbox/cmake/BCToolboxCMakeUtils.cmake
+share/BCToolbox/cmake/BCToolboxConfig.cmake
+share/BCToolbox/cmake/BCToolboxConfigVersion.cmake
+share/BCToolbox/cmake/BCToolboxTargets-%%CMAKE_BUILD_TYPE%%.cmake
+share/BCToolbox/cmake/BCToolboxTargets.cmake
+share/BCToolbox/cmake/BCGitVersion.cmake
+share/BCToolbox/cmake/gitversion.h.in