diff options
author | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2024-12-04 17:16:17 -0600 |
---|---|---|
committer | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2024-12-04 17:16:17 -0600 |
commit | bcd4bdc07b5b0ed04d01cdc906d76ad94f977402 (patch) | |
tree | 6ffbd8c677076e9804b5c1ef4375d38e8a03eaeb | |
parent | f160dc08c3148f0c343ee087c6725da9b443c4ee (diff) | |
download | packages-bcd4bdc07b5b0ed04d01cdc906d76ad94f977402.tar.gz packages-bcd4bdc07b5b0ed04d01cdc906d76ad94f977402.tar.bz2 packages-bcd4bdc07b5b0ed04d01cdc906d76ad94f977402.tar.xz packages-bcd4bdc07b5b0ed04d01cdc906d76ad94f977402.zip |
user/qt-creator: Add support for LLVM 18
Patches were cherry-picked from upstream.
-rw-r--r-- | user/qt-creator/APKBUILD | 16 | ||||
-rw-r--r-- | user/qt-creator/llvm15.patch | 29 | ||||
-rw-r--r-- | user/qt-creator/llvm16-deux.patch | 45 | ||||
-rw-r--r-- | user/qt-creator/llvm16.patch | 44 | ||||
-rw-r--r-- | user/qt-creator/llvm17.patch | 38 | ||||
-rw-r--r-- | user/qt-creator/llvm18.patch | 30 | ||||
-rw-r--r-- | user/qt-creator/llvm19.patch | 28 |
7 files changed, 228 insertions, 2 deletions
diff --git a/user/qt-creator/APKBUILD b/user/qt-creator/APKBUILD index 57829bbe6..32717276c 100644 --- a/user/qt-creator/APKBUILD +++ b/user/qt-creator/APKBUILD @@ -2,8 +2,8 @@ # Maintainer: A. Wilcox <awilfox@adelielinux.org> pkgname=qt-creator pkgver=4.15.2 -_llvmver=14 -pkgrel=2 +_llvmver=18 +pkgrel=3 pkgdesc="Cross-platform multi-language programming IDE" url="https://doc.qt.io/qtcreator/index.html" arch="all" @@ -16,6 +16,12 @@ makedepends="qt5-qtbase-dev qt5-qtdeclarative-dev qt5-qtserialport-dev subpackages="$pkgname-dev" source="https://download.qt.io/official_releases/qtcreator/${pkgver%.*}/$pkgver/$pkgname-opensource-src-$pkgver.tar.xz llvm13.patch + llvm15.patch + llvm16.patch + llvm16-deux.patch + llvm17.patch + llvm18.patch + llvm19.patch malloc_trim.patch cstdint.patch " @@ -35,5 +41,11 @@ package() { sha512sums="b29d5d97a1faa8d5756069d90c18d6d367e09057b97bd75c774bc2d1e373f9f4dcc24211188259f8d397bb932a65daaacda433bced796fd165654f5c3c621258 qt-creator-opensource-src-4.15.2.tar.xz c38cf1aea69bc52864d5aa4b6fbc01b5e91b1514a616056b270fcccc2744bb418eb93a470462823c05e00e44f44c45d8e26effd8aa72a6817402ddd9a6dd0cc4 llvm13.patch +9bcb1a67ea28fa4b3a9abf120d96c44e9949da083f0010b1a32ff27873e290a419b4994503826ba721587ba9b9bb97eb81c59e9d192e916bcf6430e21b1b7feb llvm15.patch +0a986139b3ba25d4c5430bfde1ca10cb024666150c9dac4eb1b3f5bbf099c4017332745d2277837395b1761fca1f598a1807b6d21342b497d4800bb988236250 llvm16.patch +566307ecbc725863149c2407617ef5d2021c9cd6a5e69a8ccf3f9a7188e27fc77b5cca12e92c35255ce03f925f7e0370412c1f255e03b34dd165abee959d9eec llvm16-deux.patch +be2a3e99e1a7b72d3b8d092edaffc60249efbbe27d5037cebba388d36f0d404e8d109489336c83f684195532eb23d73ea89f57da31b3499a1ee84a86ce3653b7 llvm17.patch +02d0ac36e4c9fd5682d45ef5f040f6ef11c25b3c9a0865cb8a1ef660dfb067a3dbeac1187246da79a506db6c24379b77a7d8510edcf10c9a56c6a9de1b507672 llvm18.patch +ce849abae28a3fd946b490e55cc44f4c19fe3ccf167e936c9e01b7c240c98b7f7af27336549ccbe18995fd2ae81366278a8345f54d3d87127232c06649af0e71 llvm19.patch 7fcb9b293daecc4c0f294d372507db9a6282479c4cf45999446193d9f35552db2532d47dedc9c5666a10855e20d0fe655f0ee0408abca8cc8ffbf121a230960f malloc_trim.patch 7d7a739cf98c1bc4232d9d14334e3c3a319746db931aaad4d441c903351c56869015ce427e2098fbe930d56a2dd433b1869fbbf5a78f91c10a94f5a47a778ea0 cstdint.patch" diff --git a/user/qt-creator/llvm15.patch b/user/qt-creator/llvm15.patch new file mode 100644 index 000000000..a35912171 --- /dev/null +++ b/user/qt-creator/llvm15.patch @@ -0,0 +1,29 @@ +From c7cdd55dea1f30b4d236d532bdadcf36bd174640 Mon Sep 17 00:00:00 2001 +From: Cristian Adam <cristian.adam@qt.io> +Date: Tue, 16 Aug 2022 21:04:39 +0200 +Subject: [PATCH] ClangFormat: Fix build for LLVM 15.0.0 + +This fixes the CMake build of Qt Creator against LLVM 15.0.0 + +Change-Id: Icecd45821091c8c2b565246cb17ce5a6e5c49f36 +Reviewed-by: <github-actions-qt-creator@cristianadam.eu> +Reviewed-by: Christian Kandeler <christian.kandeler@qt.io> +--- + src/plugins/clangformat/CMakeLists.txt | 2 ++ + src/plugins/clangformat/clangformatutils.cpp | 2 ++ + 2 files changed, 4 insertions(+) + +diff --git a/src/plugins/clangformat/clangformatutils.cpp b/src/plugins/clangformat/clangformatutils.cpp +index 230078558e5..973c1050772 100644 +--- a/src/plugins/clangformat/clangformatutils.cpp ++++ b/src/plugins/clangformat/clangformatutils.cpp +@@ -111,7 +111,9 @@ clang::format::FormatStyle qtcStyle() + style.ColumnLimit = 100; + style.CommentPragmas = "^ IWYU pragma:"; + style.CompactNamespaces = false; ++#if LLVM_VERSION_MAJOR < 15 + style.ConstructorInitializerAllOnOneLineOrOnePerLine = false; ++#endif + style.ConstructorInitializerIndentWidth = 4; + style.ContinuationIndentWidth = 4; + style.Cpp11BracedListStyle = true; diff --git a/user/qt-creator/llvm16-deux.patch b/user/qt-creator/llvm16-deux.patch new file mode 100644 index 000000000..00f35016c --- /dev/null +++ b/user/qt-creator/llvm16-deux.patch @@ -0,0 +1,45 @@ +From f4545807defdfb493c1d66a19430a69d81afa40b Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Bj=C3=B6rn=20Sch=C3=A4pers?= <schaepers@kuennecke.com> +Date: Fri, 4 Nov 2022 07:18:50 +0100 +Subject: [PATCH] clang-format: Adapt to LLVM 16 + +Change-Id: I2e35f92db6de10b1e4bf173f0864f0cd893a011f +Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> +Reviewed-by: Christian Kandeler <christian.kandeler@qt.io> +--- + src/plugins/clangformat/clangformatbaseindenter.cpp | 4 ++++ + src/plugins/clangformat/clangformatutils.cpp | 4 ++++ + 2 files changed, 8 insertions(+) + +diff --git a/src/plugins/clangformat/clangformatbaseindenter.cpp b/src/plugins/clangformat/clangformatbaseindenter.cpp +index 7c83c8e43b2..6072082c8c7 100644 +--- a/src/plugins/clangformat/clangformatbaseindenter.cpp ++++ b/src/plugins/clangformat/clangformatbaseindenter.cpp +@@ -55,7 +55,11 @@ void adjustFormatStyleForLineBreak(clang::format::FormatStyle &style, + + // 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; +diff --git a/src/plugins/clangformat/clangformatutils.cpp b/src/plugins/clangformat/clangformatutils.cpp +index dbc4a6a347e..3b2901bcc8b 100644 +--- a/src/plugins/clangformat/clangformatutils.cpp ++++ b/src/plugins/clangformat/clangformatutils.cpp +@@ -64,7 +64,11 @@ clang::format::FormatStyle qtcStyle() + #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; diff --git a/user/qt-creator/llvm16.patch b/user/qt-creator/llvm16.patch new file mode 100644 index 000000000..dc9c53940 --- /dev/null +++ b/user/qt-creator/llvm16.patch @@ -0,0 +1,44 @@ +From e20bdfae4de90401a518135bc22958549dceda66 Mon Sep 17 00:00:00 2001 +From: Christian Stenger <christian.stenger@qt.io> +Date: Tue, 31 Jan 2023 08:11:29 +0100 +Subject: [PATCH] ClangFormat: Adapt to changes in LLVM 16 + +Change-Id: Ia4a2cf21e351095609d8858f1f9355c6607470f3 +Reviewed-by: Christian Kandeler <christian.kandeler@qt.io> +--- + src/plugins/clangformat/clangformatbaseindenter.cpp | 4 ++++ + src/plugins/clangformat/clangformatutils.cpp | 4 ++++ + 2 files changed, 8 insertions(+) + +diff --git a/src/plugins/clangformat/clangformatbaseindenter.cpp b/src/plugins/clangformat/clangformatbaseindenter.cpp +index d61cbf2f1a8..fc08158d2d1 100644 +--- a/src/plugins/clangformat/clangformatbaseindenter.cpp ++++ b/src/plugins/clangformat/clangformatbaseindenter.cpp +@@ -38,7 +38,11 @@ void adjustFormatStyleForLineBreak(clang::format::FormatStyle &style, + #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; +diff --git a/src/plugins/clangformat/clangformatutils.cpp b/src/plugins/clangformat/clangformatutils.cpp +index c7eb900fed5..d1d6bee684b 100644 +--- a/src/plugins/clangformat/clangformatutils.cpp ++++ b/src/plugins/clangformat/clangformatutils.cpp +@@ -152,7 +152,11 @@ clang::format::FormatStyle qtcStyle() + #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; diff --git a/user/qt-creator/llvm17.patch b/user/qt-creator/llvm17.patch new file mode 100644 index 000000000..3e4803bbf --- /dev/null +++ b/user/qt-creator/llvm17.patch @@ -0,0 +1,38 @@ +From 9ad9e49ccf6e0d7f4ba5765cff3af63fbbed60e8 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Bj=C3=B6rn=20Sch=C3=A4pers?= <bjoern@hazardy.de> +Date: Wed, 2 Aug 2023 12:39:13 +0200 +Subject: [PATCH] clang-format: Fix build with LLVM 17 + +Change-Id: Ie6377be3be4a8c785d53f1eceabcc4811db4229d +Reviewed-by: Christian Kandeler <christian.kandeler@qt.io> +--- + src/plugins/clangformat/clangformatutils.cpp | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/src/plugins/clangformat/clangformatutils.cpp b/src/plugins/clangformat/clangformatutils.cpp +index 928d30d241e..1aae91a186f 100644 +--- a/src/plugins/clangformat/clangformatutils.cpp ++++ b/src/plugins/clangformat/clangformatutils.cpp +@@ -165,7 +165,9 @@ clang::format::FormatStyle qtcStyle() + style.SpaceAfterTemplateKeyword = false; + style.SpaceBeforeAssignmentOperators = true; + style.SpaceBeforeParens = FormatStyle::SBPO_ControlStatements; ++#if LLVM_VERSION_MAJOR < 17 + style.SpaceInEmptyParentheses = false; ++#endif + style.SpacesBeforeTrailingComments = 1; + #if LLVM_VERSION_MAJOR >= 13 + style.SpacesInAngles = FormatStyle::SIAS_Never; +@@ -173,8 +175,12 @@ clang::format::FormatStyle qtcStyle() + style.SpacesInAngles = false; + #endif + style.SpacesInContainerLiterals = false; ++#if LLVM_VERSION_MAJOR >= 17 ++ style.SpacesInParens = FormatStyle::SIPO_Never; ++#else + style.SpacesInCStyleCastParentheses = false; + style.SpacesInParentheses = false; ++#endif + style.SpacesInSquareBrackets = false; + addQtcStatementMacros(style); + style.Standard = FormatStyle::LS_Cpp11; diff --git a/user/qt-creator/llvm18.patch b/user/qt-creator/llvm18.patch new file mode 100644 index 000000000..7294dec49 --- /dev/null +++ b/user/qt-creator/llvm18.patch @@ -0,0 +1,30 @@ +From 7457b623125f4bcdb7941769a385cfbfc0dcbf2b Mon Sep 17 00:00:00 2001 +From: hjk <hjk@qt.io> +Date: Fri, 8 Nov 2024 12:50:30 +0100 +Subject: [PATCH] ClangFormat: Fix warning on uninitialized struct member + +Clang 18's AlignConsecutiveStyle has a new bool AlignFunctionPointers member. + +Change-Id: I5d72d9caa4a6e58ffa09674d2d3b976a95ea5dd0 +Reviewed-by: Christian Kandeler <christian.kandeler@qt.io> +--- + src/plugins/clangformat/clangformatutils.cpp | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +--- qt-creator-opensource-src-4.15.2/src/plugins/clangformat/clangformatutils.cpp.old 2024-12-04 16:32:21.224382015 -0600 ++++ qt-creator-opensource-src-4.15.2/src/plugins/clangformat/clangformatutils.cpp 2024-12-04 17:12:21.181020408 -0600 +@@ -51,7 +51,13 @@ + style.Language = FormatStyle::LK_Cpp; + style.AccessModifierOffset = -4; + style.AlignAfterOpenBracket = FormatStyle::BAS_Align; +-#if LLVM_VERSION_MAJOR >= 12 ++#if LLVM_VERSION_MAJOR >= 18 ++ style.AlignConsecutiveAssignments = {false, false, false, false, false, false}; ++ style.AlignConsecutiveDeclarations = {false, false, false, false, false, false}; ++#elif LLVM_VERSION_MAJOR >= 15 ++ style.AlignConsecutiveAssignments = {false, false, false, false, false}; ++ style.AlignConsecutiveDeclarations = {false, false, false, false, false}; ++#elif LLVM_VERSION_MAJOR >= 12 + style.AlignConsecutiveAssignments = FormatStyle::ACS_None; + style.AlignConsecutiveDeclarations = FormatStyle::ACS_None; + #else diff --git a/user/qt-creator/llvm19.patch b/user/qt-creator/llvm19.patch new file mode 100644 index 000000000..7dff56df4 --- /dev/null +++ b/user/qt-creator/llvm19.patch @@ -0,0 +1,28 @@ +From cc9ffdb685119a7c11248f08cf88308927252b85 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Bj=C3=B6rn=20Sch=C3=A4pers?= <bjoern@hazardy.de> +Date: Tue, 30 Apr 2024 16:06:28 +0200 +Subject: [PATCH] ClangFormat: Fix compiliation with LLVM19 + +Change-Id: I4b166da2e477ffd101a5c4b9aa07c710f7698da9 +Reviewed-by: Christian Kandeler <christian.kandeler@qt.io> +--- + src/plugins/clangformat/clangformatbaseindenter.cpp | 4 ++++ + src/plugins/clangformat/llvmfilesystem.h | 6 +++++- + 2 files changed, 9 insertions(+), 1 deletion(-) + +diff --git a/src/plugins/clangformat/clangformatbaseindenter.cpp b/src/plugins/clangformat/clangformatbaseindenter.cpp +index 1d5dc2730c3..b491bd293f1 100644 +--- a/src/plugins/clangformat/clangformatbaseindenter.cpp ++++ b/src/plugins/clangformat/clangformatbaseindenter.cpp +@@ -73,7 +73,11 @@ static void adjustFormatStyleForLineBreak(clang::format::FormatStyle &style, + + static llvm::StringRef clearExtraNewline(llvm::StringRef text) + { ++#if LLVM_VERSION_MAJOR >= 16 ++ while (text.starts_with("\n\n")) ++#else + while (text.startswith("\n\n")) ++#endif + text = text.drop_front(); + return text; + } |