git: bca33966eb93 - main - devel/{,py-}opendht: update 3.1.11 → 3.2.0

From: Yuri Victorovich <yuri_at_FreeBSD.org>
Date: Sun, 25 Aug 2024 08:05:06 UTC
The branch main has been updated by yuri:

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

commit bca33966eb935093972ec6fdffaaf61a9a4ebf5f
Author:     Yuri Victorovich <yuri@FreeBSD.org>
AuthorDate: 2024-08-25 07:24:21 +0000
Commit:     Yuri Victorovich <yuri@FreeBSD.org>
CommitDate: 2024-08-25 08:04:53 +0000

    devel/{,py-}opendht: update 3.1.11 → 3.2.0
    
    Reported by:    portscout
---
 devel/opendht/Makefile                   |  5 ++++-
 devel/opendht/distinfo                   |  6 +++---
 devel/opendht/files/patch-CMakeLists.txt | 19 ++++++++++++++-----
 devel/opendht/files/patch-src_http.cpp   | 22 +++++++++++-----------
 devel/opendht/pkg-plist                  |  2 +-
 devel/py-opendht/Makefile                |  2 +-
 devel/py-opendht/distinfo                |  6 +++---
 7 files changed, 37 insertions(+), 25 deletions(-)

diff --git a/devel/opendht/Makefile b/devel/opendht/Makefile
index 36e6798a7cc3..39947971be6d 100644
--- a/devel/opendht/Makefile
+++ b/devel/opendht/Makefile
@@ -1,6 +1,6 @@
 PORTNAME=	opendht
 DISTVERSIONPREFIX=	v
-DISTVERSION=	3.1.11
+DISTVERSION=	3.2.0
 CATEGORIES=	devel net
 
 MAINTAINER=	yuri@FreeBSD.org
@@ -18,6 +18,7 @@ LIB_DEPENDS=	libargon2.so:security/libargon2 \
 		libfmt.so:devel/libfmt \
 		libhttp_parser.so:www/http-parser \
 		libjsoncpp.so:devel/jsoncpp \
+		libllhttp.so:www/llhttp \
 		libnettle.so:security/nettle \
 		libgnutls.so:security/gnutls
 RUN_DEPENDS=	msgpack-cxx>0:devel/msgpack-cxx
@@ -53,4 +54,6 @@ PUSH_NOTIFICATIONS_CMAKE_BOOL=	OPENDHT_PUSH_NOTIFICATIONS
 
 PORTDOCS=	*
 
+# several tests fail, see https://github.com/savoirfairelinux/opendht/issues/721
+
 .include <bsd.port.mk>
diff --git a/devel/opendht/distinfo b/devel/opendht/distinfo
index 8e069bb8c7bf..32a761fd37d2 100644
--- a/devel/opendht/distinfo
+++ b/devel/opendht/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1712477063
-SHA256 (savoirfairelinux-opendht-v3.1.11_GH0.tar.gz) = ab543cc391824fa1a8b1a593f897c26a033352acff889940c009cb63e49b4f93
-SIZE (savoirfairelinux-opendht-v3.1.11_GH0.tar.gz) = 484353
+TIMESTAMP = 1724551785
+SHA256 (savoirfairelinux-opendht-v3.2.0_GH0.tar.gz) = 019564087f0752a1c09347473c39b2d48e920247f25f68dac235f1e5d6204ea4
+SIZE (savoirfairelinux-opendht-v3.2.0_GH0.tar.gz) = 486853
diff --git a/devel/opendht/files/patch-CMakeLists.txt b/devel/opendht/files/patch-CMakeLists.txt
index a72c690b955e..9e550d4c15b8 100644
--- a/devel/opendht/files/patch-CMakeLists.txt
+++ b/devel/opendht/files/patch-CMakeLists.txt
@@ -1,6 +1,15 @@
---- CMakeLists.txt.orig	2023-09-10 06:15:32 UTC
+--- CMakeLists.txt.orig	2024-08-25 06:24:59 UTC
 +++ CMakeLists.txt
-@@ -99,8 +99,8 @@ if (NOT MSVC)
+@@ -116,7 +116,7 @@ if (NOT MSVC)
+             endif()
+             FetchContent_MakeAvailable(llhttp-local)
+             if (BUILD_SHARED_LIBS)
+-                set(llhttp_target llhttp_shared)
++                set(llhttp_target llhttp)
+             else()
+                 set(llhttp_target llhttp_static)
+             endif()
+@@ -128,8 +128,8 @@ if (NOT MSVC)
          endif()
          if (OPENDHT_PROXY_OPENSSL)
              # https://cmake.org/cmake/help/latest/module/FindOpenSSL.html
@@ -11,12 +20,12 @@
                  message(STATUS "Found OpenSSL ${OPENSSL_VERSION} ${OPENSSL_INCLUDE_DIRS}")
                  set(openssl_lib ", openssl")
              else ()
-@@ -370,7 +370,7 @@ else()
+@@ -405,7 +405,7 @@ else()
          target_link_libraries(opendht PUBLIC PkgConfig::Jsoncpp)
      endif()
      if (OPENDHT_PROXY_OPENSSL)
 -        target_link_libraries(opendht PUBLIC PkgConfig::OPENSSL)
 +        target_link_libraries(opendht PRIVATE ssl)
      endif()
- endif()
- 
+     if (liburing_FOUND)
+         set(iouring_lib ", liburing")
diff --git a/devel/opendht/files/patch-src_http.cpp b/devel/opendht/files/patch-src_http.cpp
index 92fb836b1754..7536ab4efb9c 100644
--- a/devel/opendht/files/patch-src_http.cpp
+++ b/devel/opendht/files/patch-src_http.cpp
@@ -1,15 +1,15 @@
---- src/http.cpp.orig	2022-11-06 06:49:51 UTC
+--- src/http.cpp.orig	2024-08-11 15:44:47 UTC
 +++ src/http.cpp
-@@ -608,9 +608,9 @@ Connection::async_connect(std::vector<asio::ip::tcp::e
-             setsockopt(socket, IPPROTO_TCP, TCP_KEEPALIVE, &start, sizeof(uint32_t));
+@@ -707,9 +707,9 @@ Connection::set_keepalive(uint32_t seconds)
+ #endif
  #else
-             // Linux based systems
--            setsockopt(socket, SOL_TCP, TCP_KEEPIDLE, &start, sizeof(uint32_t));
--            setsockopt(socket, SOL_TCP, TCP_KEEPINTVL, &interval, sizeof(uint32_t));
--            setsockopt(socket, SOL_TCP, TCP_KEEPCNT, &cnt, sizeof(uint32_t));
-+            setsockopt(socket, IPPROTO_TCP, TCP_KEEPIDLE, &start, sizeof(uint32_t));
-+            setsockopt(socket, IPPROTO_TCP, TCP_KEEPINTVL, &interval, sizeof(uint32_t));
-+            setsockopt(socket, IPPROTO_TCP, TCP_KEEPCNT, &cnt, sizeof(uint32_t));
+     // Linux based systems
+-    setsockopt(socket, SOL_TCP, TCP_KEEPIDLE, &seconds, sizeof(uint32_t));
+-    setsockopt(socket, SOL_TCP, TCP_KEEPINTVL, &interval, sizeof(uint32_t));
+-    setsockopt(socket, SOL_TCP, TCP_KEEPCNT, &cnt, sizeof(uint32_t));
++    setsockopt(socket, IPPROTO_TCP, TCP_KEEPIDLE, &seconds, sizeof(uint32_t));
++    setsockopt(socket, IPPROTO_TCP, TCP_KEEPINTVL, &interval, sizeof(uint32_t));
++    setsockopt(socket, IPPROTO_TCP, TCP_KEEPCNT, &cnt, sizeof(uint32_t));
  #endif
  #endif
-         }
+ }
diff --git a/devel/opendht/pkg-plist b/devel/opendht/pkg-plist
index ec26409efde6..720b4c03f310 100644
--- a/devel/opendht/pkg-plist
+++ b/devel/opendht/pkg-plist
@@ -39,6 +39,6 @@ lib/cmake/opendht/opendhtConfig.cmake
 lib/cmake/opendht/opendhtConfigVersion.cmake
 lib/libopendht.so
 lib/libopendht.so.3
-lib/libopendht.so.3.1.11
+lib/libopendht.so.3.2.0
 libdata/pkgconfig/opendht.pc
 share/man/man1/dhtnode.1.gz
diff --git a/devel/py-opendht/Makefile b/devel/py-opendht/Makefile
index 1131a665170a..a69bb85d999b 100644
--- a/devel/py-opendht/Makefile
+++ b/devel/py-opendht/Makefile
@@ -1,6 +1,6 @@
 PORTNAME=	opendht
 DISTVERSIONPREFIX=	v
-DISTVERSION=	3.1.11
+DISTVERSION=	3.2.0
 CATEGORIES=	devel net
 PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
 
diff --git a/devel/py-opendht/distinfo b/devel/py-opendht/distinfo
index 52a4ce6dfce8..9e18387b0e99 100644
--- a/devel/py-opendht/distinfo
+++ b/devel/py-opendht/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1712477291
-SHA256 (savoirfairelinux-opendht-v3.1.11_GH0.tar.gz) = ab543cc391824fa1a8b1a593f897c26a033352acff889940c009cb63e49b4f93
-SIZE (savoirfairelinux-opendht-v3.1.11_GH0.tar.gz) = 484353
+TIMESTAMP = 1724552024
+SHA256 (savoirfairelinux-opendht-v3.2.0_GH0.tar.gz) = 019564087f0752a1c09347473c39b2d48e920247f25f68dac235f1e5d6204ea4
+SIZE (savoirfairelinux-opendht-v3.2.0_GH0.tar.gz) = 486853