libsForQt5.qttools: Add LLVM for qdoc
Since our Qt5 packaging uses outputs, we don't need to hide this behind an option like with Qt6.
This commit is contained in:
@@ -1,12 +1,13 @@
|
||||
From 985a5b530e27372a0766ce897c621026928abfbb Mon Sep 17 00:00:00 2001
|
||||
From b54dd2923448f2ae7402cf2364f40337d6c3cb6d Mon Sep 17 00:00:00 2001
|
||||
From: OPNA2608 <opna2608@protonmail.com>
|
||||
Date: Wed, 7 Aug 2024 22:16:42 +0200
|
||||
Date: Wed, 7 Aug 2024 22:47:00 +0200
|
||||
Subject: [PATCH] Patch QT_HOST_DATA references
|
||||
|
||||
---
|
||||
src/linguist/linguist.pro | 2 +-
|
||||
src/qdoc/qdoc.pro | 2 +-
|
||||
src/qtattributionsscanner/qtattributionsscanner.pro | 2 +-
|
||||
2 files changed, 2 insertions(+), 2 deletions(-)
|
||||
3 files changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/src/linguist/linguist.pro b/src/linguist/linguist.pro
|
||||
index 7638c7710..bd8798818 100644
|
||||
@@ -21,6 +22,19 @@ index 7638c7710..bd8798818 100644
|
||||
cmake_linguist_macros_file.input = $$PWD/Qt5LinguistToolsMacros.cmake
|
||||
CMAKE_PACKAGE_VERSION = $$MODULE_VERSION
|
||||
cmake_linguist_config_file.output = $$MODULE_BASE_OUTDIR/lib/cmake/Qt5LinguistTools/Qt5LinguistToolsConfig.cmake
|
||||
diff --git a/src/qdoc/qdoc.pro b/src/qdoc/qdoc.pro
|
||||
index db4b25cf1..19592d50b 100644
|
||||
--- a/src/qdoc/qdoc.pro
|
||||
+++ b/src/qdoc/qdoc.pro
|
||||
@@ -151,7 +151,7 @@ load(qt_build_paths)
|
||||
equals(QMAKE_HOST.os, Windows): CMAKE_BIN_SUFFIX = ".exe"
|
||||
|
||||
cmake_qdoc_config_file.input = $$PWD/Qt5DocToolsConfig.cmake.in
|
||||
-cmake_qdoc_config_version_file.input = $$[QT_HOST_DATA/src]/mkspecs/features/data/cmake/Qt5ConfigVersion.cmake.in
|
||||
+cmake_qdoc_config_version_file.input = @qtbaseDev@/mkspecs/features/data/cmake/Qt5ConfigVersion.cmake.in
|
||||
CMAKE_PACKAGE_VERSION = $$MODULE_VERSION
|
||||
cmake_qdoc_config_file.output = $$MODULE_BASE_OUTDIR/lib/cmake/Qt5DocTools/Qt5DocToolsConfig.cmake
|
||||
cmake_qdoc_config_version_file.output = $$MODULE_BASE_OUTDIR/lib/cmake/Qt5DocTools/Qt5DocToolsConfigVersion.cmake
|
||||
diff --git a/src/qtattributionsscanner/qtattributionsscanner.pro b/src/qtattributionsscanner/qtattributionsscanner.pro
|
||||
index d645a22a9..5d4239f83 100644
|
||||
--- a/src/qtattributionsscanner/qtattributionsscanner.pro
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
From a1fb301a0b9b59f420454be1ebeb05ce0547da2c Mon Sep 17 00:00:00 2001
|
||||
From: OPNA2608 <opna2608@protonmail.com>
|
||||
Date: Fri, 6 Sep 2024 14:20:05 +0200
|
||||
Subject: [PATCH] Patch includedir for libclang main header
|
||||
|
||||
---
|
||||
src/qdoc/configure.pri | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/qdoc/configure.pri b/src/qdoc/configure.pri
|
||||
index 4f3d77603..8fe8bc439 100644
|
||||
--- a/src/qdoc/configure.pri
|
||||
+++ b/src/qdoc/configure.pri
|
||||
@@ -71,7 +71,7 @@ defineTest(qtConfTest_libclang) {
|
||||
LLVM_INSTALL_DIR = $$system("$$candidate --prefix 2>$$QMAKE_SYSTEM_NULL_DEVICE")
|
||||
!isEmpty(LLVM_INSTALL_DIR) {
|
||||
CLANG_INCLUDEPATH = $$system("$$candidate --includedir 2>/dev/null")
|
||||
- LIBCLANG_MAIN_HEADER = $$CLANG_INCLUDEPATH/clang-c/Index.h
|
||||
+ LIBCLANG_MAIN_HEADER = @libclangDev@/include/clang-c/Index.h
|
||||
!exists($$LIBCLANG_MAIN_HEADER) {
|
||||
!isEmpty(LLVM_INSTALL_DIR): \
|
||||
qtLog("Cannot find libclang's main header file, candidate: $${LIBCLANG_MAIN_HEADER}.")
|
||||
@@ -121,7 +121,7 @@ defineTest(qtConfTest_libclang) {
|
||||
return(false)
|
||||
}
|
||||
|
||||
- LIBCLANG_MAIN_HEADER = $$CLANG_INCLUDEPATH/clang-c/Index.h
|
||||
+ LIBCLANG_MAIN_HEADER = @libclangDev@/include/clang-c/Index.h
|
||||
!exists($$LIBCLANG_MAIN_HEADER) {
|
||||
!isEmpty(LLVM_INSTALL_DIR): \
|
||||
qtLog("Cannot find libclang's main header file, candidate: $${LIBCLANG_MAIN_HEADER}.")
|
||||
--
|
||||
2.44.1
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
qtbase,
|
||||
qtdeclarative,
|
||||
substituteAll,
|
||||
llvmPackages,
|
||||
}:
|
||||
|
||||
qtModule {
|
||||
@@ -16,6 +17,11 @@ qtModule {
|
||||
"bin"
|
||||
];
|
||||
|
||||
buildInputs = with llvmPackages; [
|
||||
libclang
|
||||
libllvm
|
||||
];
|
||||
|
||||
propagatedBuildInputs = [
|
||||
qtbase
|
||||
qtdeclarative
|
||||
@@ -27,6 +33,11 @@ qtModule {
|
||||
src = ./qttools-QT_HOST_DATA-refs.patch;
|
||||
qtbaseDev = lib.getDev qtbase;
|
||||
})
|
||||
|
||||
(substituteAll {
|
||||
src = ./qttools-libclang-main-header.patch;
|
||||
libclangDev = lib.getDev llvmPackages.libclang;
|
||||
})
|
||||
];
|
||||
|
||||
devTools = [
|
||||
|
||||
Reference in New Issue
Block a user