Thu May 11 13:30:18 2023 UTC ()
qtcreator: fix build with llvm 16


(nikita)
diff -r1.21 -r1.22 pkgsrc/editors/qtcreator/Makefile
diff -r1.6 -r1.7 pkgsrc/editors/qtcreator/distinfo
diff -r0 -r1.1 pkgsrc/editors/qtcreator/patches/patch-src_plugins_clangformat_clangformatbaseindenter.cpp
diff -r1.1 -r1.2 pkgsrc/editors/qtcreator/patches/patch-src_plugins_clangformat_clangformatutils.cpp

cvs diff -r1.21 -r1.22 pkgsrc/editors/qtcreator/Makefile (expand / switch to unified diff)

--- pkgsrc/editors/qtcreator/Makefile 2023/05/06 19:09:11 1.21
+++ pkgsrc/editors/qtcreator/Makefile 2023/05/11 13:30:17 1.22
@@ -1,18 +1,18 @@ @@ -1,18 +1,18 @@
1# $NetBSD: Makefile,v 1.21 2023/05/06 19:09:11 ryoon Exp $ 1# $NetBSD: Makefile,v 1.22 2023/05/11 13:30:17 nikita Exp $
2 2
3DISTNAME= qt-creator-opensource-src-5.0.3 3DISTNAME= qt-creator-opensource-src-5.0.3
4PKGNAME= ${DISTNAME:S/qt-/qt/:S/-opensource-src//} 4PKGNAME= ${DISTNAME:S/qt-/qt/:S/-opensource-src//}
5PKGREVISION= 11 5PKGREVISION= 12
6CATEGORIES= editors 6CATEGORIES= editors
7MASTER_SITES= http://download.qt.io/official_releases/${PKGBASE}/${PKGVERSION_NOREV:R}/${PKGVERSION_NOREV}/ 7MASTER_SITES= http://download.qt.io/official_releases/${PKGBASE}/${PKGVERSION_NOREV:R}/${PKGVERSION_NOREV}/
8MASTER_SITES+= http://download.qt.io/archive/${PKGBASE}/${PKGVERSION_NOREV:R}/${PKGVERSION_NOREV}/ 8MASTER_SITES+= http://download.qt.io/archive/${PKGBASE}/${PKGVERSION_NOREV:R}/${PKGVERSION_NOREV}/
9EXTRACT_SUFX= .zip 9EXTRACT_SUFX= .zip
10 10
11MAINTAINER= pkgsrc-users@NetBSD.org 11MAINTAINER= pkgsrc-users@NetBSD.org
12HOMEPAGE= https://www.qt.io/ 12HOMEPAGE= https://www.qt.io/
13COMMENT= Cross-platform IDE for Qt and C++ 13COMMENT= Cross-platform IDE for Qt and C++
14LICENSE= gnu-lgpl-v3 14LICENSE= gnu-lgpl-v3
15 15
16USE_LANGUAGES= c c++ 16USE_LANGUAGES= c c++
17USE_LIBTOOL= yes 17USE_LIBTOOL= yes
18USE_TOOLS+= bash perl 18USE_TOOLS+= bash perl

cvs diff -r1.6 -r1.7 pkgsrc/editors/qtcreator/distinfo (expand / switch to unified diff)

--- pkgsrc/editors/qtcreator/distinfo 2022/12/07 16:32:55 1.6
+++ pkgsrc/editors/qtcreator/distinfo 2023/05/11 13:30:17 1.7
@@ -1,8 +1,9 @@ @@ -1,8 +1,9 @@
1$NetBSD: distinfo,v 1.6 2022/12/07 16:32:55 wiz Exp $ 1$NetBSD: distinfo,v 1.7 2023/05/11 13:30:17 nikita Exp $
2 2
3BLAKE2s (qt-creator-opensource-src-5.0.3.zip) = 961dcaa2d6b6e2b739d774f4a7b0090730bad4b5cf5c93a80f28c39caafdd9a3 3BLAKE2s (qt-creator-opensource-src-5.0.3.zip) = 961dcaa2d6b6e2b739d774f4a7b0090730bad4b5cf5c93a80f28c39caafdd9a3
4SHA512 (qt-creator-opensource-src-5.0.3.zip) = 9ba7d7a1b506039460efedc9defe974c06905b5024f3e33de2328dcac335ba58d24c2c73ed2083f40305c4393507d6257ff755e2bfe3692cffd601f50bfce131 4SHA512 (qt-creator-opensource-src-5.0.3.zip) = 9ba7d7a1b506039460efedc9defe974c06905b5024f3e33de2328dcac335ba58d24c2c73ed2083f40305c4393507d6257ff755e2bfe3692cffd601f50bfce131
5Size (qt-creator-opensource-src-5.0.3.zip) = 72614121 bytes 5Size (qt-creator-opensource-src-5.0.3.zip) = 72614121 bytes
6SHA1 (patch-share_share.pro) = e6f9448295a6eeb78b12979684b53ea29649da95 6SHA1 (patch-share_share.pro) = e6f9448295a6eeb78b12979684b53ea29649da95
7SHA1 (patch-src_libs_3rdparty_sqlite_sqlite3.c) = fadde723c6e4fe758d9d66e00e95044755913b92 7SHA1 (patch-src_libs_3rdparty_sqlite_sqlite3.c) = fadde723c6e4fe758d9d66e00e95044755913b92
8SHA1 (patch-src_plugins_clangformat_clangformatutils.cpp) = a91cfd9b3a6bd84dfb82ee51dcf562799b974080 8SHA1 (patch-src_plugins_clangformat_clangformatbaseindenter.cpp) = bb8aed9d0bb7fdbf95a87591f67df4d53a28b7ca
 9SHA1 (patch-src_plugins_clangformat_clangformatutils.cpp) = f3abb993478ea42c59319e111f655acc4687226c

File Added: pkgsrc/editors/qtcreator/patches/patch-src_plugins_clangformat_clangformatbaseindenter.cpp
--- src/plugins/clangformat/clangformatbaseindenter.cpp.orig	2023-05-11 14:22:23.741477809 +0200
+++ src/plugins/clangformat/clangformatbaseindenter.cpp	2023-05-11 14:29:29.745830013 +0200
@@ -47,11 +47,19 @@
 #else
     style.SortIncludes = false;
 #endif
+#if LLVM_VERSION_MAJOR >= 16
+    style.SortUsingDeclarations = clang::format::FormatStyle::SUD_Never;
+#else
     style.SortUsingDeclarations = false;
+#endif
 
     // This is a separate pass, don't do it unless it's the full formatting.
     style.FixNamespaceComments = false;
+#if LLVM_VERSION_MAJOR >= 16
+    style.AlignTrailingComments = {clang::format::FormatStyle::TCAS_Never, 0};
+#else
     style.AlignTrailingComments = false;
+#endif
 
     if (replacementsToKeep == ReplacementsToKeep::IndentAndBefore)
         return;

cvs diff -r1.1 -r1.2 pkgsrc/editors/qtcreator/patches/patch-src_plugins_clangformat_clangformatutils.cpp (expand / switch to unified diff)

--- pkgsrc/editors/qtcreator/patches/patch-src_plugins_clangformat_clangformatutils.cpp 2022/12/07 16:32:55 1.1
+++ pkgsrc/editors/qtcreator/patches/patch-src_plugins_clangformat_clangformatutils.cpp 2023/05/11 13:30:17 1.2
@@ -1,32 +1,56 @@ @@ -1,32 +1,56 @@
1$NetBSD: patch-src_plugins_clangformat_clangformatutils.cpp,v 1.1 2022/12/07 16:32:55 wiz Exp $ 1$NetBSD: patch-src_plugins_clangformat_clangformatutils.cpp,v 1.2 2023/05/11 13:30:17 nikita Exp $
2 2
3Fix build with llvm 15. 3Fix build with llvm 16.
4https://github.com/qt-creator/qt-creator/commit/b97c9494af2d4d6e53bcc87b588f21a4f445ef6f 4https://github.com/qt-creator/qt-creator/commit/b97c9494af2d4d6e53bcc87b588f21a4f445ef6f
5and newer 5and newer
6 6
7--- src/plugins/clangformat/clangformatutils.cpp.orig 2021-11-03 11:14:14.000000000 +0000 7--- src/plugins/clangformat/clangformatutils.cpp.orig 2021-11-03 11:14:14.000000000 +0100
8+++ src/plugins/clangformat/clangformatutils.cpp 8+++ src/plugins/clangformat/clangformatutils.cpp 2023-05-11 15:20:21.554698126 +0200
9@@ -51,7 +51,10 @@ static clang::format::FormatStyle qtcSty 9@@ -51,7 +51,10 @@
10 style.Language = FormatStyle::LK_Cpp; 10 style.Language = FormatStyle::LK_Cpp;
11 style.AccessModifierOffset = -4; 11 style.AccessModifierOffset = -4;
12 style.AlignAfterOpenBracket = FormatStyle::BAS_Align; 12 style.AlignAfterOpenBracket = FormatStyle::BAS_Align;
13-#if LLVM_VERSION_MAJOR >= 12 13-#if LLVM_VERSION_MAJOR >= 12
14+#if LLVM_VERSION_MAJOR >= 15 14+#if LLVM_VERSION_MAJOR >= 15
15+ style.AlignConsecutiveAssignments = {false, false, false, false, false}; 15+ style.AlignConsecutiveAssignments = {false, false, false, false, false};
16+ style.AlignConsecutiveDeclarations = {false, false, false, false, false}; 16+ style.AlignConsecutiveDeclarations = {false, false, false, false, false};
17+#elif LLVM_VERSION_MAJOR >= 12 17+#elif LLVM_VERSION_MAJOR >= 12
18 style.AlignConsecutiveAssignments = FormatStyle::ACS_None; 18 style.AlignConsecutiveAssignments = FormatStyle::ACS_None;
19 style.AlignConsecutiveDeclarations = FormatStyle::ACS_None; 19 style.AlignConsecutiveDeclarations = FormatStyle::ACS_None;
20 #else 20 #else
21@@ -111,7 +114,11 @@ static clang::format::FormatStyle qtcSty 21@@ -64,7 +67,11 @@
 22 #else
 23 style.AlignOperands = true;
 24 #endif
 25+#if LLVM_VERSION_MAJOR >= 16
 26+ style.AlignTrailingComments = {FormatStyle::TCAS_Always, 0};
 27+#else
 28 style.AlignTrailingComments = true;
 29+#endif
 30 style.AllowAllParametersOfDeclarationOnNextLine = true;
 31 #if LLVM_VERSION_MAJOR >= 10
 32 style.AllowShortBlocksOnASingleLine = FormatStyle::SBS_Never;
 33@@ -111,7 +118,11 @@
22 style.ColumnLimit = 100; 34 style.ColumnLimit = 100;
23 style.CommentPragmas = "^ IWYU pragma:"; 35 style.CommentPragmas = "^ IWYU pragma:";
24 style.CompactNamespaces = false; 36 style.CompactNamespaces = false;
25+#if LLVM_VERSION_MAJOR >= 15 37+#if LLVM_VERSION_MAJOR >= 15
26+ style.PackConstructorInitializers = FormatStyle::PCIS_BinPack; 38+ style.PackConstructorInitializers = FormatStyle::PCIS_BinPack;
27+#else 39+#else
28 style.ConstructorInitializerAllOnOneLineOrOnePerLine = false; 40 style.ConstructorInitializerAllOnOneLineOrOnePerLine = false;
29+#endif 41+#endif
30 style.ConstructorInitializerIndentWidth = 4; 42 style.ConstructorInitializerIndentWidth = 4;
31 style.ContinuationIndentWidth = 4; 43 style.ContinuationIndentWidth = 4;
32 style.Cpp11BracedListStyle = true; 44 style.Cpp11BracedListStyle = true;
 45@@ -154,7 +165,11 @@
 46 #else
 47 style.SortIncludes = true;
 48 #endif
 49+#if LLVM_VERSION_MAJOR >= 16
 50+ style.SortUsingDeclarations = FormatStyle::SUD_Lexicographic;
 51+#else
 52 style.SortUsingDeclarations = true;
 53+#endif
 54 style.SpaceAfterCStyleCast = true;
 55 style.SpaceAfterTemplateKeyword = false;
 56 style.SpaceBeforeAssignmentOperators = true;