summaryrefslogtreecommitdiff
path: root/dev-qt/qt-creator/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2020-06-29 11:38:31 +0100
committerV3n3RiX <venerix@redcorelinux.org>2020-06-29 11:38:31 +0100
commit90c88731bd036e5698b281fbc0a5f3aa4c9983ac (patch)
tree83fc5facb6b12be510a37bc3d241cc63e965b13a /dev-qt/qt-creator/files
parentfeb0daf81d888e9160f9f94502de09b66f2a63fd (diff)
gentoo resync : 29.06.2020
Diffstat (limited to 'dev-qt/qt-creator/files')
-rw-r--r--dev-qt/qt-creator/files/qt-creator-4.12.0-dylib-fix.patch84
-rw-r--r--dev-qt/qt-creator/files/qt-creator-4.12.0-libclangformat-ide.patch64
2 files changed, 148 insertions, 0 deletions
diff --git a/dev-qt/qt-creator/files/qt-creator-4.12.0-dylib-fix.patch b/dev-qt/qt-creator/files/qt-creator-4.12.0-dylib-fix.patch
new file mode 100644
index 000000000000..0d4deb2c7956
--- /dev/null
+++ b/dev-qt/qt-creator/files/qt-creator-4.12.0-dylib-fix.patch
@@ -0,0 +1,84 @@
+From 1c5faa6dcf16135ee31252d13766d01536a69405 Mon Sep 17 00:00:00 2001
+From: Peter Levine <plevine457@gmail.com>
+Date: Tue, 5 May 2020 03:45:35 -0400
+Subject: [PATCH] Fix building against clang configured with
+ CLANG_LINK_CLANG_DYLIB
+
+LLVM/Clang upstream only officially supports building shared
+components as a single dynamic library (via
+LLVM_BUILD_LLVM_DYLIB=ON, CLANG_LINK_CLANG_DYLIB=ON, etc..).
+Linux distros like Fedora and Gentoo have followed suit.
+
+Unfortunately, QT-Creator's src/shared/clang/clang_installation.pri
+file assumes clang is built with separate component libraries
+and the build fails.
+
+This change alters the build to check for the existence
+of clang component libraries and, if found, link to them, or
+otherwise to libclang-cpp.
+
+Task-number: QTCREATORBUG-23172
+Change-Id: I17df5822d7aeb471227f21f2cf4a71871d6f9b86
+---
+ src/shared/clang/clang_installation.pri | 35 +++++++++++++++----------
+ 1 file changed, 21 insertions(+), 14 deletions(-)
+
+diff --git a/src/shared/clang/clang_installation.pri b/src/shared/clang/clang_installation.pri
+index 08838838bca..c191c57f1c7 100644
+--- a/src/shared/clang/clang_installation.pri
++++ b/src/shared/clang/clang_installation.pri
+@@ -204,19 +204,6 @@ isEmpty(LLVM_VERSION) {
+ }
+ }
+
+- isEmpty(QTC_CLANG_BUILDMODE_MISMATCH)|!equals(QTC_CLANG_BUILDMODE_MISMATCH, 1) {
+- CLANGFORMAT_MAIN_HEADER = $$LLVM_INCLUDEPATH/clang/Format/Format.h
+- exists($$CLANGFORMAT_MAIN_HEADER) {
+- CLANGFORMAT_LIBS=-lclangFormat -lclangToolingInclusions -lclangToolingCore -lclangRewrite -lclangLex -lclangBasic
+- ALL_CLANG_LIBS=-lclangFormat -lclangToolingInclusions -lclangTooling -lclangToolingCore \
+- -lclangRewrite -lclangIndex -lclangFrontend -lclangParse -lclangSerialization \
+- -lclangSema -lclangEdit -lclangAnalysis -lclangDriver -lclangDynamicASTMatchers \
+- -lclangASTMatchers -lclangAST -lclangLex -lclangBasic
+- win32:CLANGFORMAT_LIBS += -lversion
+- }
+- }
+- win32:ALL_CLANG_LIBS += -lversion
+-
+ LIBCLANG_MAIN_HEADER = $$LLVM_INCLUDEPATH/clang-c/Index.h
+ !exists($$LIBCLANG_MAIN_HEADER) {
+ $$llvmWarningOrError(\
+@@ -237,10 +224,30 @@ isEmpty(LLVM_VERSION) {
+ LIBCLANG_LIBS += $${CLANG_LIB}
+
+ isEmpty(QTC_CLANG_BUILDMODE_MISMATCH)|!equals(QTC_CLANG_BUILDMODE_MISMATCH, 1) {
++ CLANGFORMAT_MAIN_HEADER = $$LLVM_INCLUDEPATH/clang/Format/Format.h
++ exists($$CLANGFORMAT_MAIN_HEADER) {
++ exists($${LLVM_LIBDIR}/libclangFormat.so*)|exists($${LLVM_LIBDIR}/libclangFormat.dylib) {
++ CLANGFORMAT_LIBS=-lclangFormat -lclangToolingInclusions -lclangToolingCore -lclangRewrite -lclangLex -lclangBasic
++ ALL_CLANG_LIBS=-lclangFormat -lclangToolingInclusions -lclangTooling -lclangToolingCore \
++ -lclangRewrite -lclangIndex -lclangFrontend -lclangParse -lclangSerialization \
++ -lclangSema -lclangEdit -lclangAnalysis -lclangDriver -lclangDynamicASTMatchers \
++ -lclangASTMatchers -lclangAST -lclangLex -lclangBasic
++ win32:CLANGFORMAT_LIBS += -lversion
++ win32:ALL_CLANG_LIBS += -lversion
++ } else {
++ CLANGFORMAT_LIBS=-lclang-cpp
++ ALL_CLANG_LIBS=-lclang-cpp
++ }
++ }
++
+ QTC_DISABLE_CLANG_REFACTORING=$$(QTC_DISABLE_CLANG_REFACTORING)
+ isEmpty(QTC_DISABLE_CLANG_REFACTORING) {
+ !contains(QMAKE_DEFAULT_LIBDIRS, $$LLVM_LIBDIR): LIBTOOLING_LIBS = -L$${LLVM_LIBDIR}
+- LIBTOOLING_LIBS += $$CLANGTOOLING_LIBS $$LLVM_STATIC_LIBS
++ exists($${LLVM_LIBDIR}/libclangTooling.so*)|exists($${LLVM_LIBDIR}/libclangTooling.dylib) {
++ LIBTOOLING_LIBS += $$CLANGTOOLING_LIBS $$LLVM_STATIC_LIBS
++ } else {
++ LIBTOOLING_LIBS += -lclang-cpp $$LLVM_STATIC_LIBS
++ }
+ }
+ }
+
+--
+2.26.2
+
diff --git a/dev-qt/qt-creator/files/qt-creator-4.12.0-libclangformat-ide.patch b/dev-qt/qt-creator/files/qt-creator-4.12.0-libclangformat-ide.patch
new file mode 100644
index 000000000000..12c46c89ed0e
--- /dev/null
+++ b/dev-qt/qt-creator/files/qt-creator-4.12.0-libclangformat-ide.patch
@@ -0,0 +1,64 @@
+--- a/src/plugins/clangformat/clangformatbaseindenter.h
++++ b/src/plugins/clangformat/clangformatbaseindenter.h
+@@ -27,7 +27,7 @@
+
+ #include <texteditor/indenter.h>
+
+-#include <clang/Format/Format.h>
++#include <clang/Format/FormatIDE.h>
+
+ namespace ClangFormat {
+
+--- a/src/plugins/clangformat/clangformatconfigwidget.cpp
++++ b/src/plugins/clangformat/clangformatconfigwidget.cpp
+@@ -32,7 +32,7 @@
+ #include "ui_clangformatchecks.h"
+ #include "ui_clangformatconfigwidget.h"
+
+-#include <clang/Format/Format.h>
++#include <clang/Format/FormatIDE.h>
+
+ #include <coreplugin/icore.h>
+ #include <cppeditor/cpphighlighter.h>
+--- a/src/plugins/clangformat/clangformatplugin.cpp
++++ b/src/plugins/clangformat/clangformatplugin.cpp
+@@ -56,7 +56,7 @@
+ #include <texteditor/icodestylepreferences.h>
+ #include <texteditor/texteditorsettings.h>
+
+-#include <clang/Format/Format.h>
++#include <clang/Format/FormatIDE.h>
+
+ #include <utils/algorithm.h>
+
+--- a/src/plugins/clangformat/clangformatutils.h
++++ b/src/plugins/clangformat/clangformatutils.h
+@@ -27,7 +27,7 @@
+
+ #include <coreplugin/id.h>
+ #include <utils/fileutils.h>
+-#include <clang/Format/Format.h>
++#include <clang/Format/FormatIDE.h>
+
+ #include <QFile>
+
+--- a/src/shared/clang/clang_installation.pri
++++ b/src/shared/clang/clang_installation.pri
+@@ -227,7 +227,7 @@
+ CLANGFORMAT_MAIN_HEADER = $$LLVM_INCLUDEPATH/clang/Format/Format.h
+ exists($$CLANGFORMAT_MAIN_HEADER) {
+ exists($${LLVM_LIBDIR}/libclangFormat.so*)|exists($${LLVM_LIBDIR}/libclangFormat.dylib) {
+- CLANGFORMAT_LIBS=-lclangFormat -lclangToolingInclusions -lclangToolingCore -lclangRewrite -lclangLex -lclangBasic
++ CLANGFORMAT_LIBS=-lclangFormatIDE -lclangToolingInclusions -lclangToolingCore -lclangRewrite -lclangLex -lclangBasic
+ ALL_CLANG_LIBS=-lclangFormat -lclangToolingInclusions -lclangTooling -lclangToolingCore \
+ -lclangRewrite -lclangIndex -lclangFrontend -lclangParse -lclangSerialization \
+ -lclangSema -lclangEdit -lclangAnalysis -lclangDriver -lclangDynamicASTMatchers \
+@@ -235,7 +235,7 @@
+ win32:CLANGFORMAT_LIBS += -lversion
+ win32:ALL_CLANG_LIBS += -lversion
+ } else {
+- CLANGFORMAT_LIBS=-lclang-cpp
++ CLANGFORMAT_LIBS=-lclangFormatIDE -lclang-cpp
+ ALL_CLANG_LIBS=-lclang-cpp
+ }
+ }