git: 879ed088847d - main - net-im/telegram-desktop: unbreak build on FreeBSD versions with base LLVM < 16

From: Dima Panov <fluffy_at_FreeBSD.org>
Date: Mon, 15 Jan 2024 13:35:30 UTC
The branch main has been updated by fluffy:

URL: https://cgit.FreeBSD.org/ports/commit/?id=879ed088847d8b9adffab39e082ed7d104b0ef3a

commit 879ed088847d8b9adffab39e082ed7d104b0ef3a
Author:     Dima Panov <fluffy@FreeBSD.org>
AuthorDate: 2024-01-15 13:29:18 +0000
Commit:     Dima Panov <fluffy@FreeBSD.org>
CommitDate: 2024-01-15 13:35:24 +0000

    net-im/telegram-desktop: unbreak build on FreeBSD versions with base LLVM < 16
    
    Minimal required LLVM version to build is 16 now.
    
    It is stated on the clang release page, that the proposals for doing these kinds of captures are implemented in Clang16
    
    Error example:
    
    /wrkdirs/overlays/wip/net-im/telegram-desktop/work-qt5/tdesktop-4.14.4-full/Telegram/SourceFiles/window/window_session_controller.cpp
    /wrkdirs/overlays/wip/net-im/telegram-desktop/work-qt5/tdesktop-4.14.4-full/Telegram/SourceFiles/window/window_session_controller.cpp:1249:9: error: reference to local binding 'index' declared in enclosing lambda expression
                                    if (index >= list.size()) {
                                        ^
    /wrkdirs/overlays/wip/net-im/telegram-desktop/work-qt5/tdesktop-4.14.4-full/Telegram/SourceFiles/window/window_session_controller.cpp:1246:29: note: 'index' declared here
                    for (const auto [command, index] : accounts) {
                                              ^
    /wrkdirs/overlays/wip/net-im/telegram-desktop/work-qt5/tdesktop-4.14.4-full/Telegram/SourceFiles/window/window_session_controller.cpp:1252:31: error: reference to local binding 'index' declared in enclosing lambda expression
                                    const auto account = list[index];
                                                              ^
    /wrkdirs/overlays/wip/net-im/telegram-desktop/work-qt5/tdesktop-4.14.4-full/Telegram/SourceFiles/window/window_session_controller.cpp:1246:29: note: 'index' declared here
                    for (const auto [command, index] : accounts) {
                                              ^
    2 errors generated.
    
    Reported by:            Benjamin Takacs <nimaje+fbz@bureaucracy.de>
---
 net-im/telegram-desktop/Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/net-im/telegram-desktop/Makefile b/net-im/telegram-desktop/Makefile
index b298baed427d..6b8d4b3654cc 100644
--- a/net-im/telegram-desktop/Makefile
+++ b/net-im/telegram-desktop/Makefile
@@ -105,8 +105,8 @@ TELEGRAM_API_ID=	601761
 
 .include <bsd.port.options.mk>
 
-.if ${OPSYS} == FreeBSD && ${OSVERSION} >= 1400000 && ${OSVERSION} < 1400079
-USES+=	llvm:max=15,build
+.if ${OPSYS} == FreeBSD && ((${OSVERSION} >= 1400000 && ${OSVERSION} < 1400091) || ${OSVERSION} < 1302507)
+USES+=	llvm:min=16,build
 .else
 USES+=	compiler:c++20-lang
 .endif