git: 35831f537cc0 - main - x11-wm/hyprland: unbreak build on -CURRENT after 21724f4bf92e

From: Jan Beich <jbeich_at_FreeBSD.org>
Date: Wed, 02 Apr 2025 14:31:13 UTC
The branch main has been updated by jbeich:

URL: https://cgit.FreeBSD.org/ports/commit/?id=35831f537cc00960c1b832dc58bea8a7c1dbb5d0

commit 35831f537cc00960c1b832dc58bea8a7c1dbb5d0
Author:     Jan Beich <jbeich@FreeBSD.org>
AuthorDate: 2025-04-02 14:01:40 +0000
Commit:     Jan Beich <jbeich@FreeBSD.org>
CommitDate: 2025-04-02 14:29:22 +0000

    x11-wm/hyprland: unbreak build on -CURRENT after 21724f4bf92e
    
    Assertion failed: (!Current->LocalDecls.contains(D) && "Instantiated local in inner and outer scopes"), function InstantiatedLocal, file /usr/local/poudriere/jails/main-i386/usr/src/contrib/llvm-project/clang/lib/Sema/SemaTemplateInstantiate.cpp, line 4418.
    PLEASE submit a bug report to https://bugs.freebsd.org/submit/ and include the crash backtrace, preprocessed source, and associated run script.
    Stack dump:
    0.      Program arguments: /usr/bin/c++ -DAQUAMARINE_VERSION=\"0.8.0\" -DAQUAMARINE_VERSION_MAJOR=0 -DAQUAMARINE_VERSION_MINOR=8 -DAQUAMARINE_VERSION_PATCH=0 -DHAS_EXECINFO -DHYPRCURSOR_VERSION=\"0.1.12\" -DHYPRGRAPHICS_VERSION=\"0.1.2\" -DHYPRLAND_VERSION=\"0.48.1\" -DHYPRLANG_VERSION=\"0.6.0\" -DHYPRUTILS_VERSION=\"0.5.2\" -Dhyprpm_EXPORTS -I/wrkdirs/usr/ports/x11-wm/hyprland/work/Hyprland-0.48.1/subprojects/udis86 -I/wrkdirs/usr/ports/x11-wm/hyprland/work/Hyprland-0.48.1/. -I/wrkdirs/usr/ports/x11-wm/hyprland/work/Hyprland-0.48.1/src -I/wrkdirs/usr/ports/x11-wm/hyprland/work/Hyprland-0.48.1/protocols -isystem /usr/local/include -O2 -pipe -fstack-protector-strong -fno-strict-aliasing -O2 -pipe -fstack-protector-strong -fno-strict-aliasing -DNDEBUG -std=gnu++23 -O3 -Wall -Wextra -Wno-unused-parameter -Wno-unused-value -Wno-missing-field-initializers -Wno-narrowing -Wno-pointer-arith -fmacro-prefix-map=/wrkdirs/usr/ports/x11-wm/hyprland/work/Hyprland-0.48.1/= -DTOML_HEADER_ONLY=0
     -DTOML_SHARED_LIB=1 -Wno-missing-braces -MD -MT hyprpm/CMakeFiles/hyprpm.dir/src/core/PluginManager.cpp.o -MF hyprpm/CMakeFiles/hyprpm.dir/src/core/PluginManager.cpp.o.d -o hyprpm/CMakeFiles/hyprpm.dir/src/core/PluginManager.cpp.o -c /wrkdirs/usr/ports/x11-wm/hyprland/work/Hyprland-0.48.1/hyprpm/src/core/PluginManager.cpp
    1.      /usr/local/include/glaze/reflection/get_name.hpp:65:69: current parser token ';'
    2.      /usr/local/include/glaze/reflection/get_name.hpp:21:1: parsing namespace 'glz'
    3.      /usr/local/include/glaze/reflection/get_name.hpp:63:4: parsing struct/union/class body 'glz::detail::reflect_field'
    4.      /usr/local/include/glaze/reflection/get_name.hpp:48:31: instantiating variable definition 'glz::detail::get_name_impl<0, glz::detail::GLAZE_REFLECTOR>'
    5.      /usr/local/include/glaze/reflection/to_tuple.hpp:1278:22: instantiating function definition 'glz::detail::get_ptr<0U, const glz::detail::GLAZE_REFLECTOR &>'
    [...]
    
    Reported by:    pkg-fallout
---
 x11-wm/hyprland/Makefile | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/x11-wm/hyprland/Makefile b/x11-wm/hyprland/Makefile
index 836bec061d1d..a50b418d067a 100644
--- a/x11-wm/hyprland/Makefile
+++ b/x11-wm/hyprland/Makefile
@@ -100,5 +100,11 @@ update-hash:
 
 .include <bsd.port.mk>
 
+# XXX COMPILER_TYPE is defined after USES was already parsed
+.if "${CHOSEN_COMPILER_TYPE}-${_OSRELEASE:C/.*-//}" == "clang-CURRENT"
+llvm_ARGS=	build
+.include "${USESDIR}/llvm.mk"
+.endif
+
 # XXX Work around !target(makesum)
 makesum:	update-hash