qtcreator: fix build with llvm 16
This commit is contained in:
parent
60e8b4000d
commit
62820df7f2
4 changed files with 57 additions and 10 deletions
|
@ -1,8 +1,8 @@
|
|||
# $NetBSD: Makefile,v 1.21 2023/05/06 19:09:11 ryoon Exp $
|
||||
# $NetBSD: Makefile,v 1.22 2023/05/11 13:30:17 nikita Exp $
|
||||
|
||||
DISTNAME= qt-creator-opensource-src-5.0.3
|
||||
PKGNAME= ${DISTNAME:S/qt-/qt/:S/-opensource-src//}
|
||||
PKGREVISION= 11
|
||||
PKGREVISION= 12
|
||||
CATEGORIES= editors
|
||||
MASTER_SITES= http://download.qt.io/official_releases/${PKGBASE}/${PKGVERSION_NOREV:R}/${PKGVERSION_NOREV}/
|
||||
MASTER_SITES+= http://download.qt.io/archive/${PKGBASE}/${PKGVERSION_NOREV:R}/${PKGVERSION_NOREV}/
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
$NetBSD: distinfo,v 1.6 2022/12/07 16:32:55 wiz Exp $
|
||||
$NetBSD: distinfo,v 1.7 2023/05/11 13:30:17 nikita Exp $
|
||||
|
||||
BLAKE2s (qt-creator-opensource-src-5.0.3.zip) = 961dcaa2d6b6e2b739d774f4a7b0090730bad4b5cf5c93a80f28c39caafdd9a3
|
||||
SHA512 (qt-creator-opensource-src-5.0.3.zip) = 9ba7d7a1b506039460efedc9defe974c06905b5024f3e33de2328dcac335ba58d24c2c73ed2083f40305c4393507d6257ff755e2bfe3692cffd601f50bfce131
|
||||
Size (qt-creator-opensource-src-5.0.3.zip) = 72614121 bytes
|
||||
SHA1 (patch-share_share.pro) = e6f9448295a6eeb78b12979684b53ea29649da95
|
||||
SHA1 (patch-src_libs_3rdparty_sqlite_sqlite3.c) = fadde723c6e4fe758d9d66e00e95044755913b92
|
||||
SHA1 (patch-src_plugins_clangformat_clangformatutils.cpp) = a91cfd9b3a6bd84dfb82ee51dcf562799b974080
|
||||
SHA1 (patch-src_plugins_clangformat_clangformatbaseindenter.cpp) = bb8aed9d0bb7fdbf95a87591f67df4d53a28b7ca
|
||||
SHA1 (patch-src_plugins_clangformat_clangformatutils.cpp) = f3abb993478ea42c59319e111f655acc4687226c
|
||||
|
|
|
@ -0,0 +1,22 @@
|
|||
--- 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;
|
|
@ -1,12 +1,12 @@
|
|||
$NetBSD: patch-src_plugins_clangformat_clangformatutils.cpp,v 1.1 2022/12/07 16:32:55 wiz Exp $
|
||||
$NetBSD: patch-src_plugins_clangformat_clangformatutils.cpp,v 1.2 2023/05/11 13:30:17 nikita Exp $
|
||||
|
||||
Fix build with llvm 15.
|
||||
Fix build with llvm 16.
|
||||
https://github.com/qt-creator/qt-creator/commit/b97c9494af2d4d6e53bcc87b588f21a4f445ef6f
|
||||
and newer
|
||||
|
||||
--- src/plugins/clangformat/clangformatutils.cpp.orig 2021-11-03 11:14:14.000000000 +0000
|
||||
+++ src/plugins/clangformat/clangformatutils.cpp
|
||||
@@ -51,7 +51,10 @@ static clang::format::FormatStyle qtcSty
|
||||
--- src/plugins/clangformat/clangformatutils.cpp.orig 2021-11-03 11:14:14.000000000 +0100
|
||||
+++ src/plugins/clangformat/clangformatutils.cpp 2023-05-11 15:20:21.554698126 +0200
|
||||
@@ -51,7 +51,10 @@
|
||||
style.Language = FormatStyle::LK_Cpp;
|
||||
style.AccessModifierOffset = -4;
|
||||
style.AlignAfterOpenBracket = FormatStyle::BAS_Align;
|
||||
|
@ -18,7 +18,19 @@ and newer
|
|||
style.AlignConsecutiveAssignments = FormatStyle::ACS_None;
|
||||
style.AlignConsecutiveDeclarations = FormatStyle::ACS_None;
|
||||
#else
|
||||
@@ -111,7 +114,11 @@ static clang::format::FormatStyle qtcSty
|
||||
@@ -64,7 +67,11 @@
|
||||
#else
|
||||
style.AlignOperands = true;
|
||||
#endif
|
||||
+#if LLVM_VERSION_MAJOR >= 16
|
||||
+ style.AlignTrailingComments = {FormatStyle::TCAS_Always, 0};
|
||||
+#else
|
||||
style.AlignTrailingComments = true;
|
||||
+#endif
|
||||
style.AllowAllParametersOfDeclarationOnNextLine = true;
|
||||
#if LLVM_VERSION_MAJOR >= 10
|
||||
style.AllowShortBlocksOnASingleLine = FormatStyle::SBS_Never;
|
||||
@@ -111,7 +118,11 @@
|
||||
style.ColumnLimit = 100;
|
||||
style.CommentPragmas = "^ IWYU pragma:";
|
||||
style.CompactNamespaces = false;
|
||||
|
@ -30,3 +42,15 @@ and newer
|
|||
style.ConstructorInitializerIndentWidth = 4;
|
||||
style.ContinuationIndentWidth = 4;
|
||||
style.Cpp11BracedListStyle = true;
|
||||
@@ -154,7 +165,11 @@
|
||||
#else
|
||||
style.SortIncludes = true;
|
||||
#endif
|
||||
+#if LLVM_VERSION_MAJOR >= 16
|
||||
+ style.SortUsingDeclarations = FormatStyle::SUD_Lexicographic;
|
||||
+#else
|
||||
style.SortUsingDeclarations = true;
|
||||
+#endif
|
||||
style.SpaceAfterCStyleCast = true;
|
||||
style.SpaceAfterTemplateKeyword = false;
|
||||
style.SpaceBeforeAssignmentOperators = true;
|
||||
|
|
Loading…
Reference in a new issue