devel/hyprutils: Update to 0.12.0

While here, remove upstreamed patches.

Changelog: https://github.com/hyprwm/hyprutils/releases/tag/v0.12.0

Reported by:	GitHub (watch releases)
This commit is contained in:
Hiroki Tagato
2026-04-05 22:04:52 +09:00
parent 46bc93cc44
commit b4a76f0828
4 changed files with 5 additions and 89 deletions
+2 -2
View File
@@ -1,6 +1,6 @@
PORTNAME= hyprutils
DISTVERSIONPREFIX= v
DISTVERSION= 0.11.1
DISTVERSION= 0.12.0
CATEGORIES= devel
MAINTAINER= tagattie@FreeBSD.org
@@ -23,7 +23,7 @@ USE_XORG= pixman
LDFLAGS+= -pthread
PLIST_SUB= SOVERSION_FULL=${DISTVERSION:C/-.*//} \
SOVERSION_MAJOR=10
SOVERSION_MAJOR=11
post-patch:
# Respect PREFIX for system-wide config
+3 -3
View File
@@ -1,3 +1,3 @@
TIMESTAMP = 1774168328
SHA256 (hyprwm-hyprutils-v0.11.1_GH0.tar.gz) = 575a025dd1b85f94c25328469358f7feeba1867fe516189cfb4253543b26714f
SIZE (hyprwm-hyprutils-v0.11.1_GH0.tar.gz) = 58859
TIMESTAMP = 1775393373
SHA256 (hyprwm-hyprutils-v0.12.0_GH0.tar.gz) = d9b495cc8c7602fe54148388fe94892a1337be871267dc5e93f4e719fe6ef8f2
SIZE (hyprwm-hyprutils-v0.12.0_GH0.tar.gz) = 59380
@@ -1,72 +0,0 @@
--- 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
+};
@@ -1,12 +0,0 @@
--- tests/os/Process.cpp.orig 2025-11-25 18:53:32 UTC
+++ tests/os/Process.cpp
@@ -2,6 +2,9 @@
#include <gtest/gtest.h>
+#include <sys/types.h>
+#include <signal.h>
+
using namespace Hyprutils::OS;
TEST(OS, process) {