git: 7373204ac90e - main - devel/hyprutils: Update to 0.11.1

From: Hiroki Tagato <tagattie_at_FreeBSD.org>
Date: Sun, 22 Mar 2026 12:03:12 UTC
The branch main has been updated by tagattie:

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

commit 7373204ac90e58028ee59231717d3ee2ef9d249b
Author:     Hiroki Tagato <tagattie@FreeBSD.org>
AuthorDate: 2026-03-22 12:01:58 +0000
Commit:     Hiroki Tagato <tagattie@FreeBSD.org>
CommitDate: 2026-03-22 12:03:03 +0000

    devel/hyprutils: Update to 0.11.1
    
    Changelog: https://github.com/hyprwm/hyprutils/releases/tag/v0.11.1
    
    Reported by:    GitHub (watch releases)
---
 devel/hyprutils/Makefile                           |  2 +-
 devel/hyprutils/distinfo                           |  6 +-
 devel/hyprutils/files/patch-CMakeLists.txt         | 31 ++++++++++
 .../patch-include_hyprutils_string_Numeric.hpp     | 72 ++++++++++++++++++++++
 devel/hyprutils/pkg-plist                          |  1 +
 5 files changed, 108 insertions(+), 4 deletions(-)

diff --git a/devel/hyprutils/Makefile b/devel/hyprutils/Makefile
index bb56ea57ff27..325071599ec3 100644
--- a/devel/hyprutils/Makefile
+++ b/devel/hyprutils/Makefile
@@ -1,6 +1,6 @@
 PORTNAME=	hyprutils
 DISTVERSIONPREFIX=	v
-DISTVERSION=	0.11.0
+DISTVERSION=	0.11.1
 CATEGORIES=	devel
 
 MAINTAINER=	tagattie@FreeBSD.org
diff --git a/devel/hyprutils/distinfo b/devel/hyprutils/distinfo
index 40a92f275cd2..b8404b8f789f 100644
--- a/devel/hyprutils/distinfo
+++ b/devel/hyprutils/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1765267714
-SHA256 (hyprwm-hyprutils-v0.11.0_GH0.tar.gz) = 1f097eb9915081f1b929973701643bcd8581b469c242eae5446275b120a3b229
-SIZE (hyprwm-hyprutils-v0.11.0_GH0.tar.gz) = 55909
+TIMESTAMP = 1774168328
+SHA256 (hyprwm-hyprutils-v0.11.1_GH0.tar.gz) = 575a025dd1b85f94c25328469358f7feeba1867fe516189cfb4253543b26714f
+SIZE (hyprwm-hyprutils-v0.11.1_GH0.tar.gz) = 58859
diff --git a/devel/hyprutils/files/patch-CMakeLists.txt b/devel/hyprutils/files/patch-CMakeLists.txt
new file mode 100644
index 000000000000..60749ec34747
--- /dev/null
+++ b/devel/hyprutils/files/patch-CMakeLists.txt
@@ -0,0 +1,31 @@
+--- CMakeLists.txt.orig	2026-03-19 19:26:04 UTC
++++ CMakeLists.txt
+@@ -62,22 +62,22 @@ if(BUILD_TESTING)
+   file(GLOB_RECURSE TESTFILES CONFIGURE_DEPENDS "tests/*.cpp")
+   add_executable(hyprutils_tests ${TESTFILES})
+ 
+-  target_compile_options(hyprutils_tests PRIVATE --coverage -fsanitize=address)
+-  target_link_options(hyprutils_tests PRIVATE --coverage)
+-  
++  # target_compile_options(hyprutils_tests PRIVATE --coverage -fsanitize=address)
++  # target_link_options(hyprutils_tests PRIVATE --coverage)
++
+   target_include_directories(
+     hyprutils_tests
+     PUBLIC "./include"
+     PRIVATE "./src" "./src/include" "./protocols" "${CMAKE_BINARY_DIR}")
+-  target_link_libraries(hyprutils_tests PRIVATE asan hyprutils GTest::gtest_main
++  target_link_libraries(hyprutils_tests PRIVATE hyprutils GTest::gtest_main
+                                                        PkgConfig::deps)
+   gtest_discover_tests(hyprutils_tests
+     PROPERTIES ENVIRONMENT "ASAN_OPTIONS=detect_leaks=0"
+   )
+ 
+   # Add coverage to hyprutils for test builds
+-  target_compile_options(hyprutils PRIVATE --coverage)
+-  target_link_options(hyprutils PRIVATE --coverage)
++  # target_compile_options(hyprutils PRIVATE --coverage)
++  # target_link_options(hyprutils PRIVATE --coverage)
+ endif()
+ 
+ # Installation
diff --git a/devel/hyprutils/files/patch-include_hyprutils_string_Numeric.hpp b/devel/hyprutils/files/patch-include_hyprutils_string_Numeric.hpp
new file mode 100644
index 000000000000..9e3bb4ca2052
--- /dev/null
+++ b/devel/hyprutils/files/patch-include_hyprutils_string_Numeric.hpp
@@ -0,0 +1,72 @@
+--- include/hyprutils/string/Numeric.hpp.orig	2026-03-22 11:10:17 UTC
++++ include/hyprutils/string/Numeric.hpp
+@@ -5,6 +5,12 @@
+ #include <charconv>
+ #include <concepts>
+ 
++#if defined(_LIBCPP_VERSION) && _LIBCPP_VERSION < 200000
++#include <string>
++#include <cstdlib>
++#include <cerrno>
++#endif
++
+ namespace Hyprutils::String {
+ 
+     enum eNumericParseResult : uint8_t {
+@@ -40,6 +46,47 @@ namespace Hyprutils::String {
+             }
+         }
+ 
++#if defined(_LIBCPP_VERSION) && _LIBCPP_VERSION < 200000
++        // libc++ < 20 does not implement std::from_chars for floating point types
++        if constexpr (std::floating_point<T>) {
++            std::string_view ts = sv;
++            if (ts.starts_with('+') || ts.starts_with('-'))
++                ts.remove_prefix(1);
++            if (ts.size() >= 2 && ts[0] == '0' && (ts[1] == 'x' || ts[1] == 'X'))
++                return std::unexpected(NUMERIC_PARSE_GARBAGE);
++
++            std::string s{sv};
++            char*       endptr = nullptr;
++            errno              = 0;
++
++            if constexpr (std::same_as<T, float>)
++                value = std::strtof(s.c_str(), &endptr);
++            else if constexpr (std::same_as<T, double>)
++                value = std::strtod(s.c_str(), &endptr);
++            else
++                value = std::strtold(s.c_str(), &endptr);
++
++            if (endptr == s.c_str())
++                return std::unexpected(NUMERIC_PARSE_BAD);
++            if (errno == ERANGE)
++                return std::unexpected(NUMERIC_PARSE_OUT_OF_RANGE);
++            if (endptr != s.c_str() + s.size())
++                return std::unexpected(NUMERIC_PARSE_GARBAGE);
++
++            return value;
++        } else {
++            const auto [ptr, ec] = std::from_chars(sv.data(), sv.data() + sv.size(), value);
++
++            if (ec == std::errc::invalid_argument)
++                return std::unexpected(NUMERIC_PARSE_BAD);
++            if (ec == std::errc::result_out_of_range)
++                return std::unexpected(NUMERIC_PARSE_OUT_OF_RANGE);
++            if (ptr != sv.data() + sv.size())
++                return std::unexpected(NUMERIC_PARSE_GARBAGE);
++
++            return value;
++        }
++#else
+         const auto [ptr, ec] = std::from_chars(sv.data(), sv.data() + sv.size(), value);
+ 
+         if (ec == std::errc::invalid_argument)
+@@ -50,5 +97,6 @@ namespace Hyprutils::String {
+             return std::unexpected(NUMERIC_PARSE_GARBAGE);
+ 
+         return value;
++#endif
+     }
+-};
+\ No newline at end of file
++};
diff --git a/devel/hyprutils/pkg-plist b/devel/hyprutils/pkg-plist
index a95dea8b9aa9..a5d5bf3eda56 100644
--- a/devel/hyprutils/pkg-plist
+++ b/devel/hyprutils/pkg-plist
@@ -24,6 +24,7 @@ include/hyprutils/path/Path.hpp
 include/hyprutils/signal/Listener.hpp
 include/hyprutils/signal/Signal.hpp
 include/hyprutils/string/ConstVarList.hpp
+include/hyprutils/string/Numeric.hpp
 include/hyprutils/string/String.hpp
 include/hyprutils/string/VarList.hpp
 include/hyprutils/string/VarList2.hpp