[neon/qt6/qtcreator/Neon/unstable] debian/patches: more fedora patches

Carlos De Maine null at kde.org
Tue Aug 22 02:35:14 BST 2023


Git commit 2ce6379a367f72b8b30631db788d0e575f1a67f7 by Carlos De Maine.
Committed on 22/08/2023 at 03:35.
Pushed by carlosdem into branch 'Neon/unstable'.

more fedora patches

A  +42   -0    debian/patches/qt-creator-clangformat.patch
A  +21   -0    debian/patches/qt-creator-debuginfod.patch
A  +10   -0    debian/patches/qt-creator_desktop.patch
A  +12   -0    debian/patches/qt-creator_ninja-build.patch
M  +15   -2    debian/patches/series

https://invent.kde.org/neon/qt6/qtcreator/-/commit/2ce6379a367f72b8b30631db788d0e575f1a67f7

diff --git a/debian/patches/qt-creator-clangformat.patch b/debian/patches/qt-creator-clangformat.patch
new file mode 100644
index 0000000..39dbf0b
--- /dev/null
+++ b/debian/patches/qt-creator-clangformat.patch
@@ -0,0 +1,42 @@
+diff -rupN --no-dereference qt-creator-opensource-src-11.0.2/cmake/FindClang.cmake qt-creator-opensource-src-11.0.2-new/cmake/FindClang.cmake
+--- qt-creator-opensource-src-11.0.2/cmake/FindClang.cmake	2023-08-14 03:53:08.000000000 +0200
++++ qt-creator-opensource-src-11.0.2-new/cmake/FindClang.cmake	2023-08-15 13:35:51.063970577 +0200
+@@ -2,9 +2,16 @@ find_package(Clang CONFIG)
+ 
+ option(CLANGTOOLING_LINK_CLANG_DYLIB "Force linking of Clang tooling against clang-cpp" NO)
+ 
+-set(CLANG_FORMAT_LIB clangFormat)
+ if (TARGET clang-cpp AND CLANGTOOLING_LINK_CLANG_DYLIB)
+   set(CLANG_FORMAT_LIB clang-cpp)
++else()
++  set(CLANG_FORMAT_INC_DIR "." CACHE STRING "Base path to clang includes")
++  set(CLANG_FORMAT_LIB_DIR "." CACHE STRING "Base path to clang libs")
++  foreach(lib in LIST clangFormat clangToolingCore clangRewrite clangLex clangBasic clangToolingInclusions)
++    add_library(${lib} STATIC IMPORTED)
++    set_property(TARGET ${lib} PROPERTY IMPORTED_LOCATION ${CLANG_FORMAT_LIB_DIR}/lib${lib}.a)
++  endforeach()
++  set(QTC_CLANG_BUILDMODE_MATCH ON)
+ endif()
+ 
+ if (WIN32 AND TARGET clangTooling)
+diff -rupN --no-dereference qt-creator-opensource-src-11.0.2/src/plugins/clangformat/CMakeLists.txt qt-creator-opensource-src-11.0.2-new/src/plugins/clangformat/CMakeLists.txt
+--- qt-creator-opensource-src-11.0.2/src/plugins/clangformat/CMakeLists.txt	2023-08-14 03:53:09.000000000 +0200
++++ qt-creator-opensource-src-11.0.2-new/src/plugins/clangformat/CMakeLists.txt	2023-08-15 13:35:51.063970577 +0200
+@@ -1,6 +1,6 @@
+ add_qtc_plugin(ClangFormat
+-  CONDITION TARGET ${CLANG_FORMAT_LIB} AND LLVM_PACKAGE_VERSION VERSION_GREATER_EQUAL 10.0.0 AND (QTC_CLANG_BUILDMODE_MATCH OR CLANGTOOLING_LINK_CLANG_DYLIB)
+-  DEPENDS Utils Qt::Widgets ${CLANG_FORMAT_LIB}
++  CONDITION TARGET clangFormat AND (QTC_CLANG_BUILDMODE_MATCH OR CLANGTOOLING_LINK_CLANG_DYLIB)
++  DEPENDS Utils Qt::Widgets clangFormat clangToolingCore clangRewrite clangLex clangBasic clangToolingInclusions
+   PLUGIN_DEPENDS Core TextEditor CppEditor ProjectExplorer
+   SOURCES
+     clangformatbaseindenter.cpp clangformatbaseindenter.h
+@@ -20,7 +20,7 @@ add_qtc_plugin(ClangFormat
+ 
+ if(TARGET ClangFormat)
+   # "system" includes, so warnings are ignored
+-  target_include_directories(ClangFormat SYSTEM PRIVATE "${CLANG_INCLUDE_DIRS}")
++  target_include_directories(ClangFormat BEFORE PRIVATE "${CLANG_FORMAT_INC_DIR}")
+ endif()
+ 
+ if(MSVC AND TARGET ClangFormat)
\ No newline at end of file
diff --git a/debian/patches/qt-creator-debuginfod.patch b/debian/patches/qt-creator-debuginfod.patch
new file mode 100644
index 0000000..acd4e2f
--- /dev/null
+++ b/debian/patches/qt-creator-debuginfod.patch
@@ -0,0 +1,21 @@
+diff -rupN --no-dereference qt-creator-opensource-src-11.0.2/cmake/Findelfutils.cmake qt-creator-opensource-src-11.0.2-new/cmake/Findelfutils.cmake
+--- qt-creator-opensource-src-11.0.2/cmake/Findelfutils.cmake	2023-08-14 03:53:08.000000000 +0200
++++ qt-creator-opensource-src-11.0.2-new/cmake/Findelfutils.cmake	2023-08-15 13:35:49.591930302 +0200
+@@ -32,7 +32,7 @@ find_path(ELFUTILS_INCLUDE_DIR
+     "${ELFUTILS_INSTALL_DIR}" ENV ELFUTILS_INSTALL_DIR "${CMAKE_PREFIX_PATH}"
+ )
+ 
+-foreach(lib dw elf eu_compat)
++foreach(lib dw elf eu_compat debuginfod)
+   find_library(ELFUTILS_LIB_${lib}
+     NAMES ${lib}
+     PATH_SUFFIXES lib
+@@ -48,7 +48,7 @@ find_package_handle_standard_args(elfuti
+ )
+ 
+ if(elfutils_FOUND)
+-  foreach(lib dw elf)
++  foreach(lib dw elf debuginfod)
+     if (NOT TARGET elfutils::${lib})
+       add_library(elfutils::${lib} UNKNOWN IMPORTED)
+       set_target_properties(elfutils::${lib}
\ No newline at end of file
diff --git a/debian/patches/qt-creator_desktop.patch b/debian/patches/qt-creator_desktop.patch
new file mode 100644
index 0000000..0573c0f
--- /dev/null
+++ b/debian/patches/qt-creator_desktop.patch
@@ -0,0 +1,10 @@
+diff -rupN --no-dereference qt-creator-opensource-src-11.0.2/share/applications/org.qt-project.qtcreator.desktop qt-creator-opensource-src-11.0.2-new/share/applications/org.qt-project.qtcreator.desktop
+--- qt-creator-opensource-src-11.0.2/share/applications/org.qt-project.qtcreator.desktop	2023-08-14 03:53:08.000000000 +0200
++++ qt-creator-opensource-src-11.0.2-new/share/applications/org.qt-project.qtcreator.desktop	2023-08-15 13:35:46.600834824 +0200
+@@ -8,5 +8,5 @@ Icon=QtProject-qtcreator
+ StartupWMClass=qtcreator
+ Terminal=false
+ Categories=Development;IDE;Qt;
+-MimeType= text/x-c++src;text/x-c++hdr;text/x-xsrc;application/x-designer;application/vnd.qt.qmakeprofile;application/vnd.qt.xml.resource;
++MimeType=text/x-c++src;text/x-c++hdr;text/x-xsrc;application/x-designer;application/vnd.qt.qmakeprofile;application/vnd.qt.xml.resource;
+ 
\ No newline at end of file
diff --git a/debian/patches/qt-creator_ninja-build.patch b/debian/patches/qt-creator_ninja-build.patch
new file mode 100644
index 0000000..e89b610
--- /dev/null
+++ b/debian/patches/qt-creator_ninja-build.patch
@@ -0,0 +1,12 @@
+diff -rupN --no-dereference qt-creator-opensource-src-11.0.2/src/plugins/cmakeprojectmanager/cmakekitinformation.cpp qt-creator-opensource-src-11.0.2-new/src/plugins/cmakeprojectmanager/cmakekitinformation.cpp
+--- qt-creator-opensource-src-11.0.2/src/plugins/cmakeprojectmanager/cmakekitinformation.cpp	2023-08-14 03:53:09.000000000 +0200
++++ qt-creator-opensource-src-11.0.2-new/src/plugins/cmakeprojectmanager/cmakekitinformation.cpp	2023-08-15 13:35:45.124780710 +0200
+@@ -652,7 +652,7 @@ QVariant CMakeGeneratorKitAspect::defaul
+             auto settings = Internal::CMakeSpecificSettings::instance();
+             if (settings->ninjaPath().isEmpty()) {
+                 auto findNinja = [](const Environment &env) -> bool {
+-                    return !env.searchInPath("ninja").isEmpty();
++                    return !env.searchInPath("ninja-build").isEmpty();
+                 };
+                 if (!findNinja(tool->filePath().deviceEnvironment()))
+                     return findNinja(k->buildEnvironment());
\ No newline at end of file
diff --git a/debian/patches/series b/debian/patches/series
index ca0a7b7..5538c64 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -3,5 +3,18 @@
 # Debian patches.
 debian_paths.diff
 
-qt-creator-litehtml.patch
-litehtml_includes.diff
\ No newline at end of file
+# Neon patches
+litehtml_includes.diff
+
+#Fedora patches
+# In Fedora (& Neon), the ninja command is called ninja-build
+qt-creator_ninja-build.patch
+# Fix leading whitespace in desktop file
+qt-creator_desktop.patch
+# Fix debuginfod detection
+qt-creator-debuginfod.patch
+# QtCreator specific patch for libClangFormat
+# https://code.qt.io/cgit/clang/llvm-project.git/commit/?h=release_130-based&id=42879d1f355fde391ef46b96a659afeb4ad7814a
+qt-creator-clangformat.patch
+# Fix build against litehtml-0.8
+qt-creator-litehtml.patch
\ No newline at end of file


More information about the Neon-commits mailing list