Re: git: d9a1aaa98d16 - main - accessibility/hyprsunset: update to 0.3.1

From: Jan Beich <jbeich_at_FreeBSD.org>
Date: Sat, 02 Aug 2025 08:29:45 UTC
Jan Beich <jbeich@FreeBSD.org> writes:

> Hiroki Tagato <tagattie@FreeBSD.org> writes:
>
>> ++#if defined(_LIBCPP_VERSION) || defined(_LIBCPP_HAS_NO_TIME_ZONE_DATABASE)
>> ++#pragma comment(lib, "date-tz")
>> ++#include <date/tz.h>
>> ++namespace std {
>> ++    namespace chrono {
>> ++        using date::current_zone;
>> ++        using date::zoned_time;
>> ++    }
>> ++}
>> ++#endif
>
> || operand makes it use devel/date even when libc++ supports || current_zone e.g.,
> on Linux (if upstreamed) or FreeBSD >= 13.6/14.3/15.0. hyprlock has similar patch
> but doesn't remove _LIBCPP_VERSION < 190100 part.
>
>   $ cd /usr/ports/x11/hyprlock
>   $ make clean patch BATCH=
>   $ fgrep -hr LIBCPP_VER `make -V WRKSRC`
>   #if defined(_LIBCPP_VERSION) && _LIBCPP_VERSION < 190100 || defined(_LIBCPP_HAS_NO_TIME_ZONE_DATABASE)
>   #if defined(_LIBCPP_VERSION) && _LIBCPP_VERSION < 190100
>   #if defined(_LIBCPP_VERSION) && _LIBCPP_VERSION < 180100

Alternatively, defined(_LIBCPP_VERSION) can be dropped. _LIBCPP_HAS_NO_TIME_ZONE_DATABASE
alone is enough and won't be defined by libstdc++.