diff --git a/net/brynet/Makefile b/net/brynet/Makefile index 582577373686..87b322f6c0d3 100644 --- a/net/brynet/Makefile +++ b/net/brynet/Makefile @@ -1,28 +1,27 @@ PORTNAME= brynet DISTVERSIONPREFIX= v -DISTVERSION= 1.12.1-4 -DISTVERSIONSUFFIX= -g2e7d54d +DISTVERSION= 1.12.2 CATEGORIES= net devel MAINTAINER= yuri@FreeBSD.org COMMENT= Header-only cross-platform C++ TCP network library WWW= https://github.com/IronsDu/brynet LICENSE= MIT LICENSE_FILE= ${WRKSRC}/LICENSE USES= cmake:testing compiler:c++17-lang USE_GITHUB= yes GH_ACCOUNT= IronsDu CMAKE_OFF= brynet_BUILD_EXAMPLES brynet_BUILD_TESTS CMAKE_TESTING_ON= brynet_BUILD_TESTS # tests are built but not run, see https://github.com/IronsDu/brynet/issues/130 NO_BUILD= yes NO_ARCH= yes pre-patch: @${FIND} ${WRKSRC} -name "*.hpp" | ${XARGS} ${REINPLACE_CMD} -i '' -e 's/defined BRYNET_PLATFORM_DARWIN/& || defined BRYNET_PLATFORM_FREEBSD/' .include diff --git a/net/brynet/distinfo b/net/brynet/distinfo index f6e96e136ec6..f8523f8fc4a7 100644 --- a/net/brynet/distinfo +++ b/net/brynet/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1667801389 -SHA256 (IronsDu-brynet-v1.12.1-4-g2e7d54d_GH0.tar.gz) = cde787bf10b9496b2af04d89d10d79a466d9bd14cde5cf495e6f70c1d4cf9210 -SIZE (IronsDu-brynet-v1.12.1-4-g2e7d54d_GH0.tar.gz) = 232439 +TIMESTAMP = 1671417565 +SHA256 (IronsDu-brynet-v1.12.2_GH0.tar.gz) = b8b740cae39804d1e7037866046321065856c0ea9f565d26f67aeccc7ccd3d51 +SIZE (IronsDu-brynet-v1.12.2_GH0.tar.gz) = 232522 diff --git a/net/brynet/files/patch-include_brynet_base_Platform.hpp b/net/brynet/files/patch-include_brynet_base_Platform.hpp deleted file mode 100644 index 4c178deab84e..000000000000 --- a/net/brynet/files/patch-include_brynet_base_Platform.hpp +++ /dev/null @@ -1,11 +0,0 @@ ---- include/brynet/base/Platform.hpp.orig 2022-11-07 05:36:34 UTC -+++ include/brynet/base/Platform.hpp -@@ -5,6 +5,8 @@ - #pragma comment(lib, "ws2_32") - #elif defined __APPLE_CC__ || defined __APPLE__ - #define BRYNET_PLATFORM_DARWIN -+#elif defined __FreeBSD__ -+#define BRYNET_PLATFORM_FREEBSD - #else - #define BRYNET_PLATFORM_LINUX - #endif diff --git a/net/brynet/files/patch-include_brynet_net_CurrentThread.hpp b/net/brynet/files/patch-include_brynet_net_CurrentThread.hpp deleted file mode 100644 index 9b31c50db90a..000000000000 --- a/net/brynet/files/patch-include_brynet_net_CurrentThread.hpp +++ /dev/null @@ -1,31 +0,0 @@ ---- include/brynet/net/CurrentThread.hpp.orig 2022-11-07 05:56:13 UTC -+++ include/brynet/net/CurrentThread.hpp -@@ -23,7 +23,11 @@ namespace brynet { namespace net { namespace current_t - #ifdef BRYNET_PLATFORM_WINDOWS - using THREAD_ID_TYPE = DWORD; - #elif defined BRYNET_PLATFORM_LINUX || defined BRYNET_PLATFORM_DARWIN || defined BRYNET_PLATFORM_FREEBSD -+# if defined BRYNET_PLATFORM_FREEBSD -+using THREAD_ID_TYPE = pthread_t; -+# else - using THREAD_ID_TYPE = int; -+# endif - #endif - - static THREAD_ID_TYPE& tid() -@@ -41,12 +45,16 @@ static THREAD_ID_TYPE& tid() - #elif defined BRYNET_PLATFORM_LINUX - cachedTid = static_cast(::syscall(SYS_gettid)); - #elif defined BRYNET_PLATFORM_DARWIN || defined BRYNET_PLATFORM_FREEBSD -+# if defined BRYNET_PLATFORM_FREEBSD -+ cachedTid = pthread_self(); -+# else - // warning: 'syscall' is deprecated: - // first deprecated in macOS 10.12 - syscall(2) is unsupported; - // please switch to a supported interface. - uint64_t tid64; - pthread_threadid_np(NULL, &tid64); - cachedTid = (pid_t) tid64; -+# endif - #endif - } - diff --git a/net/brynet/files/patch-include_brynet_net_EventLoop.hpp b/net/brynet/files/patch-include_brynet_net_EventLoop.hpp deleted file mode 100644 index 26ead00fbb2b..000000000000 --- a/net/brynet/files/patch-include_brynet_net_EventLoop.hpp +++ /dev/null @@ -1,14 +0,0 @@ ---- include/brynet/net/EventLoop.hpp.orig 2022-11-07 05:58:53 UTC -+++ include/brynet/net/EventLoop.hpp -@@ -72,7 +72,11 @@ class EventLoop : public brynet::base::NonCopyable (pu - mIsInBlock = true; - - reAllocEventSize(1024); -+#if defined BRYNET_PLATFORM_FREEBSD -+ mSelfThreadID = nullptr; -+#else - mSelfThreadID = -1; -+#endif - mTimer = std::make_shared(); - mSelfThreadIDIsInitialized.store(false); - }