diff --git a/devel/hyprwire/Makefile b/devel/hyprwire/Makefile index 1452cb73f3e6..b26b8a477843 100644 --- a/devel/hyprwire/Makefile +++ b/devel/hyprwire/Makefile @@ -1,41 +1,40 @@ PORTNAME= hyprwire DISTVERSIONPREFIX= v -DISTVERSION= 0.3.0 -PORTREVISION= 1 +DISTVERSION= 0.3.1 CATEGORIES= devel MAINTAINER= tagattie@FreeBSD.org COMMENT= Fast and consistent wire protocol for IPC WWW= https://github.com/hyprwm/hyprwire LICENSE= BSD3CLAUSE LICENSE_FILE= ${WRKSRC}/LICENSE LIB_DEPENDS= libhyprutils.so:devel/hyprutils \ libffi.so:devel/libffi \ libpugixml.so:textproc/pugixml USES= cmake:testing compiler:c++11-lib pkgconfig USE_GITHUB= yes GH_ACCOUNT= hyprwm LDFLAGS+= -pthread PLIST_SUB= SOVERSION_FULL=${DISTVERSION} \ SOVERSION_MAJOR=3 PORTDOCS= README.md OPTIONS_DEFINE= DOCS # XXX Drop after FreeBSD 13.5 EOL around 2026-04-30 # https://cgit.freebsd.org/src/commit/?id=af93fea71038 .if !exists(/usr/include/sys/timerfd.h) LIB_DEPENDS+= libepoll-shim.so:devel/libepoll-shim .endif post-install-DOCS-on: @${MKDIR} ${STAGEDIR}${DOCSDIR} ${INSTALL_MAN} ${PORTDOCS:S|^|${WRKSRC}/|} ${STAGEDIR}${DOCSDIR} .include diff --git a/devel/hyprwire/distinfo b/devel/hyprwire/distinfo index 553e4286223e..2a0869c16933 100644 --- a/devel/hyprwire/distinfo +++ b/devel/hyprwire/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1770709987 -SHA256 (hyprwm-hyprwire-v0.3.0_GH0.tar.gz) = ba3ff4b82620209d5680ce0e771d0f2c41f78cdb96d5d84fa66e4f0709ca8de6 -SIZE (hyprwm-hyprwire-v0.3.0_GH0.tar.gz) = 41897 +TIMESTAMP = 1777364511 +SHA256 (hyprwm-hyprwire-v0.3.1_GH0.tar.gz) = 92a673d40ae6a7d66fbcd0a34ec071e026e17eaeeb0040c3375e4b2a80dba737 +SIZE (hyprwm-hyprwire-v0.3.1_GH0.tar.gz) = 53928 diff --git a/devel/hyprwire/files/patch-CMakeLists.txt b/devel/hyprwire/files/patch-CMakeLists.txt new file mode 100644 index 000000000000..b24638ab6612 --- /dev/null +++ b/devel/hyprwire/files/patch-CMakeLists.txt @@ -0,0 +1,19 @@ +--- CMakeLists.txt.orig 2026-04-25 23:30:02 UTC ++++ CMakeLists.txt +@@ -144,14 +144,14 @@ if(BUILD_TESTING) + file(GLOB_RECURSE TESTFILES CONFIGURE_DEPENDS "tests/unit/*.cpp") + add_executable(hyprwire_tests ${TESTFILES}) + +- target_compile_options(hyprwire_tests PRIVATE --coverage -fsanitize=address) ++ target_compile_options(hyprwire_tests PRIVATE --coverage) + target_link_options(hyprwire_tests PRIVATE --coverage) + + target_include_directories( + hyprwire_tests + PUBLIC "./include" + PRIVATE "./src" "./src/include" "./protocols" "${CMAKE_BINARY_DIR}") +- target_link_libraries(hyprwire_tests PRIVATE asan hyprwire GTest::gtest_main ++ target_link_libraries(hyprwire_tests PRIVATE hyprwire GTest::gtest_main + PkgConfig::deps) + gtest_discover_tests(hyprwire_tests + PROPERTIES ENVIRONMENT "ASAN_OPTIONS=detect_leaks=0" diff --git a/devel/hyprwire/files/patch-src_core_server_ServerClient.cpp b/devel/hyprwire/files/patch-src_core_server_ServerClient.cpp index aa05dfaec6dd..2d3f6f2ee9d8 100644 --- a/devel/hyprwire/files/patch-src_core_server_ServerClient.cpp +++ b/devel/hyprwire/files/patch-src_core_server_ServerClient.cpp @@ -1,45 +1,45 @@ ---- src/core/server/ServerClient.cpp.orig 2026-02-04 11:08:13 UTC +--- src/core/server/ServerClient.cpp.orig 2026-04-25 23:30:02 UTC +++ src/core/server/ServerClient.cpp -@@ -13,6 +13,11 @@ +@@ -15,6 +15,11 @@ #include #include +#if defined(__FreeBSD__) +#include +#include +#endif + using namespace Hyprwire; CServerClient::CServerClient(int fd) : m_fd(fd) { -@@ -31,19 +36,29 @@ void CServerClient::dispatchFirstPoll() { +@@ -37,19 +42,29 @@ void CServerClient::dispatchFirstPoll() { // get peer's pid -#if defined(__OpenBSD__) +#if defined(__FreeBSD__) + struct xucred cred; +#elif defined(__OpenBSD__) struct sockpeercred cred; #else ucred cred; #endif socklen_t len = sizeof(cred); +#if defined(__FreeBSD__) + if (getsockopt(m_fd.get(), SOL_SOCKET, LOCAL_PEERCRED, &cred, &len) == -1) { +#else if (getsockopt(m_fd.get(), SOL_SOCKET, SO_PEERCRED, &cred, &len) == -1) { +#endif TRACE(Debug::log(TRACE, "dispatchFirstPoll: failed to get pid")); return; } +#if defined(__FreeBSD__) + m_pid = cred.cr_pid; +#else m_pid = cred.pid; +#endif } void CServerClient::sendMessage(const IMessage& message) {