diff --git a/devel/hyprutils/Makefile b/devel/hyprutils/Makefile index bb56ea57ff27..325071599ec3 100644 --- a/devel/hyprutils/Makefile +++ b/devel/hyprutils/Makefile @@ -1,33 +1,33 @@ PORTNAME= hyprutils DISTVERSIONPREFIX= v -DISTVERSION= 0.11.0 +DISTVERSION= 0.11.1 CATEGORIES= devel MAINTAINER= tagattie@FreeBSD.org COMMENT= Hyprland utilities library used across the ecosystem WWW= https://github.com/hyprwm/hyprutils LICENSE= BSD3CLAUSE LICENSE_FILE= ${WRKSRC}/LICENSE BUILD_DEPENDS= googletest>0:devel/googletest USES= cmake:testing compiler:c++11-lib pkgconfig xorg USE_GITHUB= yes GH_ACCOUNT= hyprwm USE_LDCONFIG= yes USE_XORG= pixman LDFLAGS+= -pthread PLIST_SUB= SOVERSION_FULL=${DISTVERSION:C/-.*//} \ SOVERSION_MAJOR=10 post-patch: # Respect PREFIX for system-wide config @${REINPLACE_CMD} 's|/etc|${PREFIX}&|' \ ${WRKSRC}/src/path/Path.cpp .include 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 + #include + ++#if defined(_LIBCPP_VERSION) && _LIBCPP_VERSION < 200000 ++#include ++#include ++#include ++#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) { ++ 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) ++ value = std::strtof(s.c_str(), &endptr); ++ else if constexpr (std::same_as) ++ 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 @@ -1,34 +1,35 @@ include/hyprutils/animation/AnimatedVariable.hpp include/hyprutils/animation/AnimationConfig.hpp include/hyprutils/animation/AnimationManager.hpp include/hyprutils/animation/BezierCurve.hpp include/hyprutils/cli/ArgumentParser.hpp include/hyprutils/cli/Logger.hpp include/hyprutils/i18n/I18nEngine.hpp include/hyprutils/math/Box.hpp include/hyprutils/math/Edges.hpp include/hyprutils/math/Mat3x3.hpp include/hyprutils/math/Misc.hpp include/hyprutils/math/Region.hpp include/hyprutils/math/Vector2D.hpp include/hyprutils/memory/Atomic.hpp include/hyprutils/memory/Casts.hpp include/hyprutils/memory/ImplBase.hpp include/hyprutils/memory/SharedPtr.hpp include/hyprutils/memory/UniquePtr.hpp include/hyprutils/memory/WeakPtr.hpp include/hyprutils/os/File.hpp include/hyprutils/os/FileDescriptor.hpp include/hyprutils/os/Process.hpp 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 include/hyprutils/utils/ScopeGuard.hpp lib/libhyprutils.so lib/libhyprutils.so.%%SOVERSION_FULL%% lib/libhyprutils.so.%%SOVERSION_MAJOR%% libdata/pkgconfig/hyprutils.pc