From 31130ed44131de431e1d8d288dfd55b2c5482d3a Mon Sep 17 00:00:00 2001 From: Jan Beich Date: Mon, 18 Mar 2024 00:34:43 +0100 Subject: x11/hyprcursor: unbreak build with libc++ 16 In file included from libhyprcursor/hyprcursor.cpp:12: ./libhyprcursor/Log.hpp:51:27: error: no member named 'vformat' in namespace 'std' std::cout << std::vformat(fmt, std::make_format_args(args...)) << "\n"; ~~~~~^ ./libhyprcursor/Log.hpp:51:45: error: no member named 'make_format_args' in namespace 'std' std::cout << std::vformat(fmt, std::make_format_args(args...)) << "\n"; ~~~~~^ hyprcursor-util/src/main.cpp:345:41: error: no member named 'format' in namespace 'std' const auto OUT = spawnSync(std::format("rm -f /tmp/hyprcursor-util/* && cd /tmp/hyprcursor-util && xcur2png {} -d /tmp/hyprcursor-util 2>&1", ~~~~~^ hyprcursor-util/src/main.cpp:399:39: error: no member named 'format' in namespace 'std' std::string metaString = std::format("resize_algorithm = {}\n", explicitResizeAlgo == RESIZE_INVALID ? "none" : algoToString(explicitResizeAlgo)); ~~~~~^ hyprcursor-util/src/main.cpp:403:18: error: no member named 'format' in namespace 'std' std::format("hotspot_x = {:.2f}\nhotspot_y = {:.2f}\n\n", (float)entries[0].hotspotX / (float)entries[0].size, (float)entries[0].hotspotY / (float)entries[0].size); ~~~~~^ hyprcursor-util/src/main.cpp:409:32: error: no member named 'format' in namespace 'std' metaString += std::format("define_size = {}, {}, {}\n", entry.size, ENTRYSTEM, entry.delay); ~~~~~^ hyprcursor-util/src/main.cpp:424:32: error: no member named 'format' in namespace 'std' metaString += std::format("define_override = {}\n", xcursor2.path().stem().string()); ~~~~~^ Reported by: pkg-fallout --- x11/hyprcursor/Makefile | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/x11/hyprcursor/Makefile b/x11/hyprcursor/Makefile index 524e18e138fe..b9f4541f1904 100644 --- a/x11/hyprcursor/Makefile +++ b/x11/hyprcursor/Makefile @@ -20,6 +20,12 @@ USE_GNOME= cairo librsvg2 GH_ACCOUNT= hyprwm PLIST_SUB= VERSION=${DISTVERSION:C/-.*//} +# XXX Drop after FreeBSD 14.0 EOL around 2025-03-01 +.if exists(/usr/include/c++/v1/__format/format_functions.h) && \ + !exists(/usr/include/c++/v1/__format/write_escaped.h) +CXXFLAGS+= -fexperimental-library +.endif + post-patch: # Respect PREFIX for icons @${REINPLACE_CMD} 's,/usr/share,${DATADIR:H},' \ -- cgit v1.2.3