summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Levine <plevine457@gmail.com>2020-05-18 23:16:47 -0400
committerJason A. Donenfeld <zx2c4@gentoo.org>2020-06-25 01:11:07 -0600
commitc7eeefaef05e0014713eef90e3ff50f21f11346d (patch)
tree308bccd4cfe841cb8215877a56fb6b4598bdcc1b /dev-qt/qt-creator
parentdev-libs/libclangformat-ide: Add libclangformat-ide:{9,10} (diff)
downloadgentoo-c7eeefaef05e0014713eef90e3ff50f21f11346d.tar.gz
gentoo-c7eeefaef05e0014713eef90e3ff50f21f11346d.tar.bz2
gentoo-c7eeefaef05e0014713eef90e3ff50f21f11346d.zip
dev-qt/qt-creator: Build against dev-libs/libclangformat-ide
Build against a patched libclangFormat in the correct slot for a fully functional clangformat plugin. Package-Manager: Portage-2.3.99, Repoman-2.3.22 Signed-off-by: Peter Levine <plevine457@gmail.com> Signed-off-by: Jason A. Donenfeld <zx2c4@gentoo.org>
Diffstat (limited to 'dev-qt/qt-creator')
-rw-r--r--dev-qt/qt-creator/files/qt-creator-4.12.0-libclangformat-ide.patch64
-rw-r--r--dev-qt/qt-creator/qt-creator-9999.ebuild14
2 files changed, 74 insertions, 4 deletions
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
+ }
+ }
diff --git a/dev-qt/qt-creator/qt-creator-9999.ebuild b/dev-qt/qt-creator/qt-creator-9999.ebuild
index 3f09133f6ee3..ff58c169e4e0 100644
--- a/dev-qt/qt-creator/qt-creator-9999.ebuild
+++ b/dev-qt/qt-creator/qt-creator-9999.ebuild
@@ -68,8 +68,10 @@ CDEPEND="
kde-frameworks/syntax-highlighting:5
clang? (
|| (
- sys-devel/clang:10
- sys-devel/clang:9
+ ( sys-devel/clang:10
+ dev-libs/libclangformat-ide:10 )
+ ( sys-devel/clang:9
+ dev-libs/libclangformat-ide:9 )
)
<sys-devel/clang-$((LLVM_MAX_SLOT + 1)):=
)
@@ -110,10 +112,14 @@ for x in ${PLOCALES}; do
done
unset x
-PATCHES=( "${FILESDIR}"/${PN}-4.12.0-dylib-fix.patch )
+PATCHES=(
+ "${FILESDIR}"/${PN}-4.12.0-dylib-fix.patch
+ "${FILESDIR}"/${PN}-4.12.0-libclangformat-ide.patch
+)
llvm_check_deps() {
- has_version -d "sys-devel/clang:${LLVM_SLOT}"
+ has_version -d "sys-devel/clang:${LLVM_SLOT}" && \
+ has_version -d "dev-libs/libclangformat-ide:${LLVM_SLOT}"
}
pkg_setup() {