git: a80e46e547fc - main - net-im/tox: upgrade to v0.2.18

From: Thierry Thomas <thierry_at_FreeBSD.org>
Date: Wed, 20 Apr 2022 16:37:19 UTC
The branch main has been updated by thierry:

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

commit a80e46e547fc776013cb45d592b20f9e65229d3a
Author:     Thierry Thomas <thierry@FreeBSD.org>
AuthorDate: 2022-04-20 11:44:52 +0000
Commit:     Thierry Thomas <thierry@FreeBSD.org>
CommitDate: 2022-04-20 16:37:14 +0000

    net-im/tox: upgrade to v0.2.18
    
    Release notes at <https://github.com/TokTok/c-toxcore/releases/tag/v0.2.18>.
    
    Note: an optimization (increase the size of the send and receive UDP
    buffers) has been disabled, because it caused failure. Waiting for a
    better solution.
---
 net-im/tox/Makefile                      | 11 +++++------
 net-im/tox/distinfo                      |  8 +++++---
 net-im/tox/files/patch-toxcore_network.c | 18 ++++++++++++++++++
 3 files changed, 28 insertions(+), 9 deletions(-)

diff --git a/net-im/tox/Makefile b/net-im/tox/Makefile
index 10cc3a70e5ef..c646564b8d15 100644
--- a/net-im/tox/Makefile
+++ b/net-im/tox/Makefile
@@ -1,7 +1,7 @@
 # Created by: Thierry Thomas <thierry@pompo.net>
 
 PORTNAME=	toxcore
-PORTVERSION=	0.2.17
+PORTVERSION=	0.2.18
 DISTVERSIONPREFIX=	v
 PORTEPOCH=	1
 CATEGORIES=	net-im net-p2p
@@ -14,7 +14,6 @@ LICENSE=	GPLv3
 BUILD_DEPENDS=	checkmk:devel/check			\
 		gtest:sysutils/coreutils
 LIB_DEPENDS=	libvpx.so:multimedia/libvpx		\
-		libmsgpackc.so:devel/msgpack		\
 		libsndfile.so:audio/libsndfile		\
 		libportaudio.so:audio/portaudio		\
 		libsodium.so:security/libsodium		\
@@ -23,11 +22,11 @@ LIB_DEPENDS=	libvpx.so:multimedia/libvpx		\
 TEST_DEPENDS=	opencv_visualisation:graphics/opencv
 #TEST_DEPENDS=	libopencv_core.so:graphics/opencv
 
-CONFLICTS=	toxcore-legacy-0.1.*
-
 USE_GITHUB=	yes
-GH_ACCOUNT=	TokTok
-GH_PROJECT=	c-toxcore
+GH_ACCOUNT=	TokTok camgunz:cmp
+GH_PROJECT=	c-toxcore cmp:cmp
+GH_TAGNAME=	4c3737d1a172ee74d2b35b5fd6865d1fe9dac7af:cmp
+GH_SUBDIR=	third_party/cmp:cmp
 
 CPE_VENDOR=	toktok
 
diff --git a/net-im/tox/distinfo b/net-im/tox/distinfo
index bb4af6a4ef06..d3b2bdf7edfa 100644
--- a/net-im/tox/distinfo
+++ b/net-im/tox/distinfo
@@ -1,3 +1,5 @@
-TIMESTAMP = 1646598591
-SHA256 (TokTok-c-toxcore-v0.2.17_GH0.tar.gz) = d9cdf5d690fe8e217dcaba5b988fb943bbe7bda919a2fde6d9506df047e5f4cb
-SIZE (TokTok-c-toxcore-v0.2.17_GH0.tar.gz) = 560639
+TIMESTAMP = 1650443954
+SHA256 (TokTok-c-toxcore-v0.2.18_GH0.tar.gz) = 1fba883638fd18985fd41acd35fed198c2cdd6e91651eb1c3fe602b610b535fe
+SIZE (TokTok-c-toxcore-v0.2.18_GH0.tar.gz) = 613087
+SHA256 (camgunz-cmp-4c3737d1a172ee74d2b35b5fd6865d1fe9dac7af_GH0.tar.gz) = a13a479f747854b990cee074cdc7a7309ec6e025059b7213b9ca311860de1b02
+SIZE (camgunz-cmp-4c3737d1a172ee74d2b35b5fd6865d1fe9dac7af_GH0.tar.gz) = 40334
diff --git a/net-im/tox/files/patch-toxcore_network.c b/net-im/tox/files/patch-toxcore_network.c
new file mode 100644
index 000000000000..eda52d4414f8
--- /dev/null
+++ b/net-im/tox/files/patch-toxcore_network.c
@@ -0,0 +1,18 @@
+--- toxcore/network.c.orig	2022-04-18 18:12:07 UTC
++++ toxcore/network.c
+@@ -1063,6 +1063,7 @@ Networking_Core *new_networking_ex(
+      */
+     int n = 1024 * 1024 * 2;
+ 
++#if !defined(__FreeBSD__)
+     if (net_setsockopt(ns, temp->sock, SOL_SOCKET, SO_RCVBUF, &n, sizeof(n)) != 0) {
+         LOGGER_ERROR(log, "failed to set socket option %d", SO_RCVBUF);
+     }
+@@ -1070,6 +1071,7 @@ Networking_Core *new_networking_ex(
+     if (net_setsockopt(ns, temp->sock, SOL_SOCKET, SO_SNDBUF, &n, sizeof(n)) != 0) {
+         LOGGER_ERROR(log, "failed to set socket option %d", SO_SNDBUF);
+     }
++#endif
+ 
+     /* Enable broadcast on socket */
+     int broadcast = 1;